• Welcome to SC4 Devotion Forum Archives.

Texture Range

Started by Akallan, July 27, 2017, 03:59:09 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Akallan

Hello everyone,

I have a small problem with the range of texture that geoffhaw gave me. When I apply these explanations in order to have a range of personal codes for textures, this does not work.

Quote from: geoffhawCreate a txt file and save it as Range.txt and put it into the System folder of SC4Tools.  Say your range is 0xB2C80000 to 0xB2CFFFFF, it would need to be the following:

0xb2c80000,0xb2cfffff

After that, every time you open the Texture Creator part of SC4Tools, it will only allocate IIDs from your range. I would advise everyone to keep a list of which IIDs you have used, as it will be very useful after a while. .
(BSC Texture Index)

I created a .txt file and I named it "Range.txt", then, in this .txt file I placed my texture range code as follows: 0xF8DC0000,0xF8DDFFFF. The .txt file is located in the "System" folder of SC4 Tool (C: \ Program Files (x86) \ SC4 Utilities \ SC4Tool \ System).

Did I make a mistake somewhere?



My CJ :


My european road textures project : S N T - v.2.1

Akallan

My CJ :


My european road textures project : S N T - v.2.1

mgb204

Honestly from what you've outlined I'd say you are doing things right. So as for why it isn't working, there is nothing obvious I can see.

If I do have one tip for you however, it's don't use SC4 Tools to create textures, it's a very slow and out of date way of working IMHO. If you are working with PNGs, then find PNG2FSH Batch by Null45, you can drag all your textures in one go into the application and it will spit out a dat with them.

Otherwise if using .BMPs, get a copy of GoFSH by Rivit, which can do much the same thing. This is my preferred way of working, after a little time adapting to making dedicated Alphas, it's obvious this way of working is much more flexible. The caveat being, all your texture's filenames must have the intended ID, for example:

PNG2FSH Batch:
  0xF8341234.png

GoFSH:
  7AB50E44-0986135E-F8341234-C0.bmp (along with the alpha, same but ending in -A0.bmp)

Note both applications use 4, 9 or E for a texture MipMap group, not 0, 5 & A.

mattb325

Just looking at what you've written - I don't use the SC4 Tool for texture making either - but it states "....0xB2C80000 to 0xB2CFFFFF ... would need to be the following: 0xb2c80000,0xb2cfffff" (that to me reads that you need to take the ID from upper case to lower case as well as separating the two with a comma)

Looking at your note pad it appears to be in upper case - perhaps changing it will work? Really, though, I am just guessing.  &idea

Akallan

#4
Thank you both for your help. :)

mattb325 : I had not seen this detail, so I tried with the miniscule letters but it still does not work. In fact, I forgot to specify a detail about my SC4Tool: when I launch it, I arrive like everyone on the menu that asks me what I want to do (textures, transit enabled, etc.) , I choose the menu I want. But once inside, I can not do anything other than the selected menu, when I hover the mouse on the toolbar at the top left, this bug and immediately stops SC4Tool.

I do not know if I was really clear ... But to make it simple, my SC4Tool does not work properly, and if you do a bad manipulation, it crashes. Maybe the problem comes from there, and for that reason the texture range does not want to work?

mgb204 : I use the .PNG files, I will then use the PNG2FSH Batch software. But I do not understand, you say that my .PNG file must bear the ID name of the texture, how do I do? I think I have to use the range of textures that geoffhaw gave me?

I can not just drag my .PNG file into the software with a common name?

Edit: I used the software, I think I understood what you meant about ID textures. Alpha is used to create texture IDs automatically, or if you want to have your personal identifiers, you rename the .JPG file with the ID you want to have? But I get to the second problem, how do we make overlay textures with the software?
My CJ :


My european road textures project : S N T - v.2.1

mgb204

Quote from: Akallan on July 29, 2017, 01:32:10 PM
I can not just drag my .PNG file into the software with a common name?

Edit: I used the software, I think I understood what you meant about ID textures. Alpha is used to create texture IDs automatically, or if you want to have your personal identifiers, you rename the .JPG file with the ID you want to have? But I get to the second problem, how do we make overlay textures with the software?

The issue is that the software has no way of knowing which ID to assign to your textures, so the filename is telling the software the ID to use. This does mean all files must be manually named to match your ID range. Of course this feature of SC4 Tool may seem like the most useful, but given you have to process each texture one by one, it's much slower than simply ID'ing the textures themselves. I use a spreadsheet which has a listing of all my texture IDs, then I can copy/paste from the list and mark them off as I use them, allowing me to keep track of them easily. See the attached resource, everything you need should be there to make this in seconds using Excel.

If you are using PNG files, the transparency or Alpha layer is embedded into the file, you do not need this as a separate texture. Honestly, I would avoid using .jpgs at all, it's only going to degrade the quality of your textures, save them as PNGs to begin with or use BMPs. When working with bitmaps you do need a separate Alpha texture, because the BMP format doesn't allow for embedded Alpha layers (well it can be done, but I don't think it's a standard thing).

PNG2FSH batch will look at the PNG file and if it sees transparency, it will create an overlay texture automatically. GoFSH works similarly, although the transparency is based upon the separated Alpha texture.

Andreas

Right-click the destop icon/start menu entry for SC4Tool, select "properties" and then check "Desktop Composition" on the "Compatibility" tab. Then the menus should work as desired.
Andreas

Akallan

#7
mgb204 : Okay, I understand more or less now. Your table is very clear, but I also realize that a range of texture only makes 768 textures (48 textures for a column, x 16 columns), this will never be enough enough for my work in the future.

I suppose that you made specially, but do not you have to do an extra texture code for each end of the column? Because if I follow my logic from the observations in your table, each last code in each table ends with the letter "E" (FA904CFE / FA904DFE / FA904EFE / FA904FFE), but it should not be the letter "F" ? Just an image to illustrate my explanations:

Thank you for your help in any case! :thumbsup:

Andreas : What am I stupid, I had tried to use different modes of compatibility, but I had not thought of this button. Thanks, now it works without problems! Do you also know why the range of textures that geoffhaw gave me does not work for SC4 Tool?


Edit: geoffhaw gave me this range of texture: 0xF8DC0000 to 0xF8DDFFFF, I realize that made more than 768 different textures, I was wrong... mgb204, I made a quick calculation, to explain myself I present it with images, Tell me if I'm right or wrong:



Do I have 24'576 textures at my disposal as shown by my calculation?

This is the first time I try to understand the code of the textures, I did this calculation by observing your table. I may actually make a mistake.


I also make a mistake by telling you that we can put in the first image that we can add texture code "FA904FFF". It is normal that the last code is "FA904FFE". I looked with the Reader textures and there are 5 different zooms per texture, so 5 different codes for a textures. Finishing with "FA904FFE", this stays in the multiple of 5.
My CJ :


My european road textures project : S N T - v.2.1

Andreas

Sorry, not sure what's up with the texture range problem, I never made any custom textures myself apart from modifying existing ones.
Andreas

mgb204

All textures need a set of MipMaps, or smaller textures so you have one for each zoom level of the game. So whilst you do have 16 IDs, the game (and LE) will only accept IDs that end in 0-4, 5-9 and A-E. As a result, F is basically a wasted ID, which you can't really use. So for each 16 ID's you have, you get 3 texture groups.

Transit networks can be configured differently and it's actually possible to use up the F texture for those. But it's only really useful when the texture in question does not need MipMaps.

As for not having enough IDs, 764 is a lot of IDs for most, but indeed with a project such as yours, I can see how you may need more. First make sure you understand this is a Template, FA90 is not your family and needs to be changed for each ID listed. That's easy, following the included Readme, you simply use a find/replace operation to change FA90 to F8DC, the first family of your personal range. Once that's done, you can make a copy of the sheet in the workbook, so you have two spreadsheets in one file. Then do a similar find/replace on this second sheet only, changing F8DC4 to F8DC5.. You can repeat this 12 times (4 to F) to end up with 9,216 unique IDs. If that's still not enough, then you can switch F8DCF to F8DD4., to use your second family of IDs. This will give you all 18,432 textures you can use from your assigned ranges.

The point of all this is that rather than working out the IDs somehow, armed with the template it takes just seconds to auto-populate them.

Akallan

Andreas : This is not problem, thank you again for your help. Using SC4 Tool is better when it does not bug! ()stsfd()

mgb204 : We met each other while everyone was writing. Indeed, I understand the system much better now and I thank you for your explanations. But unlike you, I ended up with 24'576 different textures, did I make a mistake?
My CJ :


My european road textures project : S N T - v.2.1

mgb204

Yes/No, because the way SC4 works, you loose the F texture from every ID, that can add up. Similarly, the 5th Digit of an ID, if it contains 0-3, will create a wealth group. Trust me, you don't want this to happen, because it will mess with the intended display of your textures. As a result, 4 of your 16 ID groups(or one quarter), can never be used unless you make wealth grouped textures. This likely accounts for the difference in your calculations.

But in real terms the figure of 18,432 is absolute for your assigned range.

Akallan

Oh ok, I understand why your chart starts from the number 4 and not the 0,1,2, or 3. I have done the calculation by removing the first 4 groups, and actually I get the same amount as you. Everything becomes clearer, thank you very much for your help. I would have made a lot of mistake without you! :squirrel:
My CJ :


My european road textures project : S N T - v.2.1