Jump to content
_Michael

Custom Texture Creation Help

8 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

Hello all,

So once again I'm delving into the world of custom content, specifically custom lots and textures. I noticed though, for the project I have in mind that I will need to make some custom overlay textures, and I'm a little uncertain as to the process to do so. Therefore, I have summarised my main queries into the questions below, and I do hope someone, somewhere will be able to answer them.

  1. So starting at the beginning in Photoshop (Or equivalent), I assume I leave the areas I don't need for the overlay to be transparent, and saved as a BMP?
    1. For diagonal textures, (Sidewalks, road - things that need to line up) what would be the best way to keep all the parts lining up?
  2. Then I put the BMPs into GOFsh? Save into FSH and then DAT files?
  3. I've heard something about texture ranges. What are they, how would I use them?

Please fell free to mention any information you think I'd need to know, and that I haven't mentioned. :)

By the way, I'm creating sidewalk width overlay textures for a custom road/street set.

Hope someone can help. 

Thanks

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

If you plan to work with sidewalks, I'd start preparing C0/D0 pairs for them. What does that mean? Simply that you have two texture files, one ending in C0 - the Colour or Texture, and another ending in D0, containing the definition alpha, which I'll try to explain. In order to use automation to place your sidewalks, you need to define what parts of the texture will be sidewalk. So those parts of the definition alpha showing Green will become sidewalks. Any Cyan parts would show grass, whilst Black will become transparent. If you use White, those parts of the respective C0 will be included in your new texture, without altering it.

Based on this example, I've included a "start" repository, so you can begin to play with this concept. That includes one C0/D0 pair. Rename the last part "F83641C4" with a Texture ID from your personal range for both images (you can use the included one to test things). If you open the Definition alpha in PS, switch to the "Channels" view, you can see how this alpha works. Those areas that are white in the green channel become Green. That's because the colour green in RGB is 0,255,0. Or expressed another way, Red Off, Green On, Blue Off. Note a small strip between the black and white parts are 50% grey. Those edges will generate the sidewalks with 50% transparency, i.e. to blend it better where the edge touches another texture. This example is the exact width of sidewalk for an EU Road texture. In fact, I simply used the existing Alpha channels from a road textures from the NAM to create it.

If you are looking to do the same thing, you can make fitting sidewalk overlays exactly right, without ever making a single texture. It can all be copied from those Alpha channels, which already contain the information needed. Hint: Use FSHxDAT to find the textures, EU Textures are found in z___NAM\Road Textures\Euro Cosmetic Re-Texture Mod. This will export them as FSH, which when run through GoFSH will export A0/C0 BMP pairs. In this case, A0 simply means a regular alpha channel. I.e. a texture that defines transparency, black areas will be transparent in the C0 texture.

Having made a set of textures (in Textures folder) and ID'd them. You can run the included script to build them. It's quicker to work this way, plus you can make a set compatible with other sidewalks without remaking a thing. If you venture into using $ or $$$ wealth sidewalks, you will need separate folders to place those textures. In the script, use the command EDIT11 for $ wealth, EDIT/EDIT22 (EDIT defaults to 22 or $$ wealth) or EDIT33 for $$$ wealth. The numbers stand for EDITGP - Where G = Grass wealth (1-3) and P = Paving (sidewalk) wealth (1-3). I hope that makes sense. You'd then just need to copy the first 4 lines under "=== GENERATE", paste them and update the folder location (SRCDIR) and Generate type.

Note you will find more complete instructions on how to use Definition Alphas and the scripting language in the GoFSH user manual (button from home screen of application).

Sidewalk Example.zip

  • Like 2

Head over to my Lot and Mod Shack to keep abreast of my latest developments.

Do you like custom textures, but don't like all the work involved creating them?, take a look at the Texture Automation options here. Change the look and feel of your transit networks, with the minimum of effort, for example customised versions of my Sidewalk NAM (SWN) and Terrain Grass NAM (TGN) mods, and much more besides.

New to the NAM? Check out my tutorials on YouTube. Latest upload: How to: RHW - MHO Roundabout Interchanges. (Nov 25).

p.s. - I'm MGB over on SC4D and a member of the NAM team.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
19 hours ago, _Michael said:

By the way, I'm creating sidewalk width overlay textures for a custom road/street set.

If the set will be for an actual network (road, street, etc.), it is a little more advanced, but rsc did a fantastic job explaining it. If however, you are just aiming for lot textures, it is quite a bit simpler. Using photoshop (or similar), finish the texture as you'd like it, in 128x128 form. Save as *.png. Using PngToFshBatch, you can just load them all in and save to a dat file in one step. It will automatically differentiate between base and overlay based on transparency (or lack thereof) in each png.

  • Like 1

Looking for a prop or texture? The SC4 Prop & Texture Catalog might help! View online here.

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Thanks you two. So the textures will be for a custom road set, but one which is made from lots, so essentially it is just a set of lots.

    I'm not wanting to go any further. One thing I'm still unsure of is Texture ID ranges and how to use them. Sometimes I've read something about using SC4 Tool, but then you mentioned Robin, about just renaming the files? I've requested a range on SC4D, but how would I implement this range so they work with the game?

    Also, my base texture is one included in your MTRDK mod, namely "7AB50E44-0986135E-25BF1004" This is a thin-ish strip of my sidewalk texture which I can use to from two opposite sidewalks in a narrow street setting. But I'll need to make a diagonal and T-shape version of this, using this width. Now what would be the best way to get the diagonals to line up and make a transition and so on?

    Once I've made all of my definition Alphas, I'll create a GoFSH script to insert my sidewalk texture right? But then again, I don't know how to use the texture ID system. I've read what each part means, and kindda understand, but the range is still confusing me.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    It can be a little daunting knowing which IDs to use at first. But the texture ID's break down as follows:

    Type ID              Group ID           Purpose

    7AB50E44    -    0986135E    -    Lot Editor

       "          "       -    1ABE787D   -    Transit Textures

    So for LE textures, we'll always be using Type and Group IDs 7AB50E44-0986135E-. The number we need to worry about though is the third group of digits or the Instance ID, which breaks down as: 

    FFFFWUUZ

    F - The first four digits are your personal texture family which will be assigned to you. Example F834.

    W - The fifth digit denotes a texture's wealth from 0-F (or 1-16 in decimal).
    The simplest way to explain this, if you don't want texture wealth groups, never use 0, 1, 2 or 3 here, always use from 4-F (or 5-16 in decimal).

    U - 6th & 7th Digits, these are unique numbers. Each can be between 0-F

    Z - The 8th digit represents the zoom level or size of the texture. Most SC4 textures include an additional 4 mipmaps or reduced size variants. Most applications will make these for you however. The textures you create each need five IDs, 1 for the largest texture, and one for each of the mipmaps. Hence we start with texture 0-4, 5-9 then A-E. Usually in practise that means your textures must end with digit 4, 9 or E.

    Now we work backwards to build the IDs. Say for your assigned range, F834 was the first family ID you had to use. The 8th digit (Z) starts at 4. The 6th & 7th digits (U) start at 0. Because we're not using Wealth Groups, the 5th digit (W) starts at 4. So that makes our first ID:

    F8344004. For our next ID the 8th digit (Z), then changes to 9, i.e. F8344009, next comes F834400E.

    For our next IDs, we must now increment the 7th Digit (U). Note the 8th digit resets to start again at 4. Our next ID's are:

    F8344014, F8344019 then F834401E.

    We then increments the 7th digit once more, to 2, we get:

    F8344024, F8344029 then F834402E

    Keep incrementing the 7th Digit until you've used up 9, the next number is then A (11), then B (12), C (13), D (14), E (15) & finally F (16):

    F83440F4, F83440F9 then F83440FE

    Continue now by resetting digits 7 & 8, we increment the 6th digit to 1:

    F8344104, F8344109 then F834410E

    So you keep following this routine, until you've reached F for both the 6th & 7th digit. Then the 5th digits increments from 4 to 5, and you continue again from right to left through all available digits until you end up with F834FFFE. At this point you must change to another family ID, but you would have used 768 IDs also.

    I have a template in Excel that lists all these values for you. I just need to know your ID range to customise it for your IDs, then you could just look them up and use them. So let me know when you have it, all the theory is here, but the list saves a lot of time. It takes 2 seconds to alter it for a given ID range, so it's no trouble either.

    • Like 3

    Head over to my Lot and Mod Shack to keep abreast of my latest developments.

    Do you like custom textures, but don't like all the work involved creating them?, take a look at the Texture Automation options here. Change the look and feel of your transit networks, with the minimum of effort, for example customised versions of my Sidewalk NAM (SWN) and Terrain Grass NAM (TGN) mods, and much more besides.

    New to the NAM? Check out my tutorials on YouTube. Latest upload: How to: RHW - MHO Roundabout Interchanges. (Nov 25).

    p.s. - I'm MGB over on SC4D and a member of the NAM team.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Thanks - that clears it up. I'm just waiting for me to be assigned a range on SC4D. The range 'manager' there, as far as I can tell however, hasn't been active for some time...

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    I have noticed a few outstanding requests. Rest assured though Geoff checks in semi-regularly and takes care of things. In the meantime, if you only need a handful of IDs, I can spare some for you?

    • Like 1

    Head over to my Lot and Mod Shack to keep abreast of my latest developments.

    Do you like custom textures, but don't like all the work involved creating them?, take a look at the Texture Automation options here. Change the look and feel of your transit networks, with the minimum of effort, for example customised versions of my Sidewalk NAM (SWN) and Terrain Grass NAM (TGN) mods, and much more besides.

    New to the NAM? Check out my tutorials on YouTube. Latest upload: How to: RHW - MHO Roundabout Interchanges. (Nov 25).

    p.s. - I'm MGB over on SC4D and a member of the NAM team.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Now I have my range and PNGtoFSHBatch, along with some textures I've made, I'll have to let you know how I get on. Thanks both of you for your help. :) 

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account


    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections