Jump to content
Sign In to follow this  
dcbenji

Learn How Colors Are Applied to Materials in this new Tutiral

15 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 
I think this one sums up the core concepts need to understanding how buildings are put together. Hopefully this will speed people along in developing custom models for the game!
 
Learn how colors are applied to materials in the latest episode of SimCity Guide to Custom Creations:
 
  • Like 2

Share this post


Link to post
Posted:
Last Online:  
 

In the color map, could a purple color (part blue, part red) be done, which would then blend the corresponding colors in the color palette? And if so, can the colors in the color palette simply be red green and blue?

 

In other words, can we circumvent the palette system by making RGB correspond to RGB? (regardless of whether or not anyone would have the computer power to have a city full of buildings like that)

 

 

My apologies if this has already been talked about.


patreon.png    PATREON    •    MIPRO    •    MY BAT & TUTORIAL THREAD

Share this post


Link to post
Posted:
Last Online:  
 

Basically what I see at moment is that RGB are place holders for the colors you want, you color those rows and that corresponds with the colors that are designated on the materials page. I believe you can probably overlap way "r" with the color "red" since one is just a place holder and not actually telling the building what color to be. The problem once I get a chance to dig into this deeper, is that are these colors hex coded strings, or can we simply change the color page by painting over top. Though at moment I have to say the idea of getting any highlights other what the game already gives would chose to be difficult. Unlike the cars, because the game picks out were these tones and spots will be. Where with cars and so forth we can kind of control that through the Raw files. Now with the material page, we maybe able to eventually change the tones by were indentations are, though I do not think we will be able to say take dark brown for the door and light brown for the trim, unless the program has that desinated or we change the coloring of the RGB map. I hope this kind of helps answer this palette question, and at the same time maybe I can get some feed back if I was understanding the videos correctly. I am hoping to start tinkering with this stuff sometime this week, but at moment I have college to deal with at the start of the week and my boyfriends home so I have to take care of house stuff first. 

Share this post


Link to post
  • Original Poster
  • Posted:
    Last Online:  
     

    In the color map, could a purple color (part blue, part red) be done, which would then blend the corresponding colors in the color palette? And if so, can the colors in the color palette simply be red green and blue?

     

    In other words, can we circumvent the palette system by making RGB correspond to RGB? (regardless of whether or not anyone would have the computer power to have a city full of buildings like that)

     

     

    My apologies if this has already been talked about.

     

    No apologies, I'm not really talking to anyone about this. There's not enough of these sorts of conversations happending. Seems like most are sitting around waiting for buildings to get made :/

     

    Good question. It would be interesting to see what SimCity does with a color control map that has a purple color. It may work, in fact I think that this is how it is made to work: palette colors being blended into one another. It's just that the artists don't take advantage of it. I fired the question off, we'll see if I get a response and i'll let you know. 

     

    These two messages from Ryan Ingram may provide some more insight:

     

    "In the tintmap texture, r/g/b are masks on 3 palette colors.  So if you had a tintmap that was (0.33,0.33,0.34), it means ‘blend (about) equally between all three colors in the palette entry for this material’.  But the color control map for that color would be

     

    rgb = 0.33+0.33+0.34 = 1

    rg = 0.33+0.33 = 0.66

     

    ControlR = b/rgb = 0.34/1 = 0.34

    ControlG = g/rg = 0.33/0.66 = 0.5

    ControlB = rgb*0.5 = 1 * 0.5 = 0.5

     

    The palettizing code in the shader will use this data to extract a color from the palette, which is approximately 33% of palette entry 1, 33% of palette entry 2, and 34% of palette entry 3.  (This optimization is the reason for the 2x2 organization of the palette entries, since it lets you get all 3 palette colors blended, using only one sample into the palette texture)

     

    Now, the SimCity artists generally used pure masks over each channel with little to no blending, but the system allows much more sophisticated color blending if you want to take advantage of it.  For example, you could make a generic 3-color plaid tintmap and tint the plaid with the 3 palette colors giving you many blended color combinations in the final result, even though there are only 3 colors specified.

     

    And another bit here:

     

    "If you just put pure red/green/blue in the palette, then the palette transform is an identity (except for the lossiness in the clamp of (r+g+b)*0.5 to 2 during the transformation from tint map to color control, so I guess you are limited to somewhat dark textures…)  This could allow you to skip the ‘palettizing’ step and use more traditional textures—you still need to run them through that conversion I just specified though.  And your buildings would be harder to create variations for, since any change in the palette colors could lead to some very odd color shifting."

     

    So it seems that you can have a paleete with RGB which would allow you to use more custom textures in your material set. This would probably be really useful for plopables and/or landmarks.

     

    (Please let me know of any 'progress' you or anyone is making when applying the information I've presented. I want to use it for my own bulidings and help share the info in my videos :)

     

    -benji

    • Like 1

    Share this post


    Link to post
  • Original Poster
  • Posted:
    Last Online:  
     

    Basically what I see at moment is that RGB are place holders for the colors you want, you color those rows and that corresponds with the colors that are designated on the materials page. I believe you can probably overlap way "r" with the color "red" since one is just a place holder and not actually telling the building what color to be. The problem once I get a chance to dig into this deeper, is that are these colors hex coded strings, or can we simply change the color page by painting over top. Though at moment I have to say the idea of getting any highlights other what the game already gives would chose to be difficult. Unlike the cars, because the game picks out were these tones and spots will be. Where with cars and so forth we can kind of control that through the Raw files. Now with the material page, we maybe able to eventually change the tones by were indentations are, though I do not think we will be able to say take dark brown for the door and light brown for the trim, unless the program has that desinated or we change the coloring of the RGB map. I hope this kind of helps answer this palette question, and at the same time maybe I can get some feed back if I was understanding the videos correctly. I am hoping to start tinkering with this stuff sometime this week, but at moment I have college to deal with at the start of the week and my boyfriends home so I have to take care of house stuff first. 

     

    The color palettes are not hex coded strings AFAIK, they are an actual PNG image (512x16 pixels large). I show this image in the tutorial. So I'm guessing you could just change the colors of the pixels in the palette to whatever you want. Currently, the only way to get a building into the game is to have it reference pre-existing palettes and material sets. The materials and palettes don't get brought in with your model, your model carries information with it that tell SimCity what materials and palette to apply to it.

     

    But when we do figure out how to import our own assets (really when Oppie figures it out I guess), we could start with one of the palettes as a template and just color pick the pixels within each block, swapping in custom colors. Or we could just pick a pre-existing color palette and use it as-is. There are tons of color options available, maybe what sets your building apart will be the design of the materials and the mesh more than a completely custom color scheme. 

     

    Also using the palettes from the game would help your buildings 'live' in the design world of SimCity while still being able to have a custom aspect to them through custom materials and modeling (whenever we're able to import custom material sets anyway).

     

    -benji

    Share this post


    Link to post
  • Original Poster
  • Posted:
    Last Online:  
     

    In the color map, could a purple color (part blue, part red) be done, which would then blend the corresponding colors in the color palette? And if so, can the colors in the color palette simply be red green and blue?

     

    In other words, can we circumvent the palette system by making RGB correspond to RGB? (regardless of whether or not anyone would have the computer power to have a city full of buildings like that)

     

     

    My apologies if this has already been talked about.

    And here is the answer to your question about 'purple" from Ryan:

     

    "Yes! If you start with 50% red (128) and 50% blue (128), you’ll get an average of the “red” palette entry and the “blue” palette entry.

     

    This also works with values that total to above and below 100%, so if you are 40% red (102) and 40% blue (102), you’ll get the same color as the previous example, but darkened by 20%.

     

    You are limited to at most 200% total, so pure white (255,255,255) will get 33% of each palette entry mixed in, but only be brightened by 200%, not 300%.

     

    Single color channels *can* go over 100% during this process, to be affected by lighting, so if you had a color control (255,255,0) and the ‘red’ palette entry was (255,128,0) and the ‘green’ palette entry was (255,0,255), you’d end up with 200% red, 50% green, 100% blue before lighting.  Of course this value will get capped if it’s in a bright area of the scene, which could lead to some color shifting on these bright values."

     

     

    -benji

    Share this post


    Link to post
    Posted:
    Last Online:  
     

     

    Basically what I see at moment is that RGB are place holders for the colors you want, you color those rows and that corresponds with the colors that are designated on the materials page. I believe you can probably overlap way "r" with the color "red" since one is just a place holder and not actually telling the building what color to be. The problem once I get a chance to dig into this deeper, is that are these colors hex coded strings, or can we simply change the color page by painting over top. Though at moment I have to say the idea of getting any highlights other what the game already gives would chose to be difficult. Unlike the cars, because the game picks out were these tones and spots will be. Where with cars and so forth we can kind of control that through the Raw files. Now with the material page, we maybe able to eventually change the tones by were indentations are, though I do not think we will be able to say take dark brown for the door and light brown for the trim, unless the program has that desinated or we change the coloring of the RGB map. I hope this kind of helps answer this palette question, and at the same time maybe I can get some feed back if I was understanding the videos correctly. I am hoping to start tinkering with this stuff sometime this week, but at moment I have college to deal with at the start of the week and my boyfriends home so I have to take care of house stuff first. 

     

    The color palettes are not hex coded strings AFAIK, they are an actual PNG image (512x16 pixels large). I show this image in the tutorial. So I'm guessing you could just change the colors of the pixels in the palette to whatever you want. Currently, the only way to get a building into the game is to have it reference pre-existing palettes and material sets. The materials and palettes don't get brought in with your model, your model carries information with it that tell SimCity what materials and palette to apply to it.

     

    But when we do figure out how to import our own assets (really when Oppie figures it out I guess), we could start with one of the palettes as a template and just color pick the pixels within each block, swapping in custom colors. Or we could just pick a pre-existing color palette and use it as-is. There are tons of color options available, maybe what sets your building apart will be the design of the materials and the mesh more than a completely custom color scheme. 

     

    Also using the palettes from the game would help your buildings 'live' in the design world of SimCity while still being able to have a custom aspect to them through custom materials and modeling (whenever we're able to import custom material sets anyway).

     

    -benji

     

    I got it at moment on my other post were I am testing with one particular pallet, and I am coming up with all kinds of results. Some of them make sense while other ones do not make much sense to me. You can import custom color trays, the problem is getting our original designs to go with those trays. At moment the only reason I believe my tinker is working, is because I took an already made design from the game and the color tray that simcitypak showed me. Hopefully can take a look at that under my color projects post, I figured in my tinkering maybe you could make sense of some of what I was showing and confirm or tell me what maybe going wrong when I do not see certain colors represented. I am at moment looking over all this information as well. 

    Share this post


    Link to post
  • Original Poster
  • Posted:
    Last Online:  
     

     

     

    Basically what I see at moment is that RGB are place holders for the colors you want, you color those rows and that corresponds with the colors that are designated on the materials page. I believe you can probably overlap way "r" with the color "red" since one is just a place holder and not actually telling the building what color to be. The problem once I get a chance to dig into this deeper, is that are these colors hex coded strings, or can we simply change the color page by painting over top. Though at moment I have to say the idea of getting any highlights other what the game already gives would chose to be difficult. Unlike the cars, because the game picks out were these tones and spots will be. Where with cars and so forth we can kind of control that through the Raw files. Now with the material page, we maybe able to eventually change the tones by were indentations are, though I do not think we will be able to say take dark brown for the door and light brown for the trim, unless the program has that desinated or we change the coloring of the RGB map. I hope this kind of helps answer this palette question, and at the same time maybe I can get some feed back if I was understanding the videos correctly. I am hoping to start tinkering with this stuff sometime this week, but at moment I have college to deal with at the start of the week and my boyfriends home so I have to take care of house stuff first. 

     

    The color palettes are not hex coded strings AFAIK, they are an actual PNG image (512x16 pixels large). I show this image in the tutorial. So I'm guessing you could just change the colors of the pixels in the palette to whatever you want. Currently, the only way to get a building into the game is to have it reference pre-existing palettes and material sets. The materials and palettes don't get brought in with your model, your model carries information with it that tell SimCity what materials and palette to apply to it.

     

    But when we do figure out how to import our own assets (really when Oppie figures it out I guess), we could start with one of the palettes as a template and just color pick the pixels within each block, swapping in custom colors. Or we could just pick a pre-existing color palette and use it as-is. There are tons of color options available, maybe what sets your building apart will be the design of the materials and the mesh more than a completely custom color scheme. 

     

    Also using the palettes from the game would help your buildings 'live' in the design world of SimCity while still being able to have a custom aspect to them through custom materials and modeling (whenever we're able to import custom material sets anyway).

     

    -benji

     

    I got it at moment on my other post were I am testing with one particular pallet, and I am coming up with all kinds of results. Some of them make sense while other ones do not make much sense to me. You can import custom color trays, the problem is getting our original designs to go with those trays. At moment the only reason I believe my tinker is working, is because I took an already made design from the game and the color tray that simcitypak showed me.

     

    One reason I am making videos is to try to get everyone to use the same terms. There are many assets involoved in creating custom buildings and if we're calling them different names it becomes too difficult to communicate clearly to help eachother. 

     

    1.When you say "color trays" are you refering to the Color Palettes or the Material Sets?

    2.Does "our original designs" mean original models or does it mean original material sets?

     

    Thanks for clarifying,

    -benji

    Share this post


    Link to post
    Posted:
    Last Online:  
     

    When I say color trays that means color palettes, if I say material sets that is exactly the material sets you had shown us in the videos. Sorry about the mix up in communication by adding my own terms in, part of my lazy side. 

     

    When I say original designs I mean designs imported in that are not part of the game already. 

     

    Original material sets I tend to not work with at moment too afraid, I only work with Original palettes that go over a house mesh that is already created in game. I hope this guides you a bit, some of the terms I used are the same as yours, and the color tray = color palettes is something I changed up. I will try to stay on the same boat = same terminology. :rofl:

     

    on my post of my day two rambling, i put up some pictures in which what I am talking about can be identified with as well.  :)

    Share this post


    Link to post
  • Original Poster
  • Posted:
    Last Online:  
     

    When I say color trays that means color palettes, if I say material sets that is exactly the material sets you had shown us in the videos. Sorry about the mix up in communication by adding my own terms in, part of my lazy side. 

     

    When I say original designs I mean designs imported in that are not part of the game already. 

     

    Original material sets I tend to not work with at moment too afraid, I only work with Original palettes that go over a house mesh that is already created in game. I hope this guides you a bit, some of the terms I used are the same as yours, and the color tray = color palettes is something I changed up. I will try to stay on the same boat = same terminology. :rofl:

     

    on my post of my day two rambling, i put up some pictures in which what I am talking about can be identified with as well.  :)

     

    Its really encouraging to to see other people experimenting with this stuff. I responded on your post about experimenting with the color palette.

     

    -benji

    • Like 1

    Share this post


    Link to post
    Posted:
    Last Online:  
     

    I wanted to put in something about the purple house idea, which is very much you found as part of an answer Benji and part of why the coloring chart has to be kind of tuned a bit. I used 100% value for a purple color, which I did end up with a purple house. Now with knowing a bit of how shading can alter colors, at 100% purple one side of the house was purple, but on the shaded side of the house it was a dark blue. So then I had to adjust my mind to understand that it was all purple, but because of the shading one side was in fact purple but because of the dark over tone it was dark blue. I have noticed this happens with the brick houses many times, it seems from the extra special effect from the brick pattern. Such as you mentioned in your full over view of all of the material sheets, that this can alter the house color chosen a bit. Where I found with the 100% pink house value against a wooden house it in fact did come out all pink, and a slightly darker pink on the shaded side. I am going to start my experimenting again now so that I have something to write up on my forum page of things that worked or did not work for me, since I have some time to tinker. 

     

    I am still in love with that  Maya tool that you showed in one of your postings, for me it was very much like blender at some point I really do want to tinker with 3d mesh's once I get enough guts to do so. Though at moment I am still trying to understand the color palette and color control map. Once I figure that out maybe i will think really hard of moving on to the next thing. Just some reason I am hypnotized by just these two items at moment. :)

     

    editing to this post : This is a picture example of how the shading changed a 100% color pretty fast on one side. One side of the house is purple, but the shaded part is like a dark blue. Though in theory the full house is still technically purple.

    post-662467-0-81701300-1396490908_thumb.

    Share this post


    Link to post
  • Original Poster
  • Posted:
    Last Online:  
     

    Sounds cool, keep it up!

    Share this post


    Link to post
    Posted:
    Last Online:  
     

    That's great news that we can do something more like normal texturing.

     

    Otherwise we're stuck with the flat color block style (textures that have no actual texture).

     

    I'm also starting to think now that an entire building could be a single or a few unique elements, instead of being composed of many elements, to be even more conventional.

     

     

    I know why maxis did what they did and they were very clever, but for me personally, both making buildings with that system is unenjoyable (assembling kit of parts buildings) and playing a game full of those buildings isn't something I'd be in to.

     

    I personally won't be making any progress though, since I don't have the game (no money! :P ) and I still have lots of SC4 projects to do. :)


    patreon.png    PATREON    •    MIPRO    •    MY BAT & TUTORIAL THREAD

    Share this post


    Link to post
  • Original Poster
  • Posted:
    Last Online:  
     

    That's great news that we can do something more like normal texturing.

     

    Otherwise we're stuck with the flat color block style (textures that have no actual texture).

     

    I'm also starting to think now that an entire building could be a single or a few unique elements, instead of being composed of many elements, to be even more conventional.

     

     

    I know why maxis did what they did and they were very clever, but for me personally, both making buildings with that system is unenjoyable (assembling kit of parts buildings) and playing a game full of those buildings isn't something I'd be in to.

     

    I personally won't be making any progress though, since I don't have the game (no money! :P ) and I still have lots of SC4 projects to do. :)

     

    I see where are coming from. However the "flat blocks" do have textures. A material set is made up of Specular Map, Depth Map, Normal Map & Ambient Occlusion in addition to reflection properties, custom environment mapping, and light emission -- all of which give the materials detail other than simply the color that is assigned from the palette. For example, A wall made of wood planks has little grooves where the slats come together defined by the normal map  & a metal roof has long shingles that recess into the mesh using the relief mapping technique.

     

    What's cool is that the color is independent of the textures so you can apply the materials within a Material Set to different parts of buildings  and get variation amongst models of the same type in addition to the variation between models of different types just by using the color palette effectively. A material Set can contain Multiple windows and doors which can be used on some models and not used on others. It's done for efficiency, but the creative options within the "constraints" are plentiful and exist within a pretty sweet rendering engine so the houses and buildings end up looking awesome IMO.

     

    Although if this is a SC4 vs SC13 discussion I'm not interested. Its a different aesthetic altogether. If you don't dig it you don't dig it.

    Share this post


    Link to post
    Posted:
    Last Online:  
     

    That's great news that we can do something more like normal texturing.

     

    Otherwise we're stuck with the flat color block style (textures that have no actual texture).

     

    I'm also starting to think now that an entire building could be a single or a few unique elements, instead of being composed of many elements, to be even more conventional.

     

     

    I know why maxis did what they did and they were very clever, but for me personally, both making buildings with that system is unenjoyable (assembling kit of parts buildings) and playing a game full of those buildings isn't something I'd be in to.

     

    I personally won't be making any progress though, since I don't have the game (no money! :P ) and I still have lots of SC4 projects to do. :)

    Thanks for the encouragement, and all of what Benji said is true. Though I can see from tinkering with this how it is fun for me, though I think of it as painting models. It does at moment take a long time, and yes different looks can happen but I am no were wanting to touch the texture material files yet. As for solid colors, yeah you got solid colors but there is texture, just because i put on flat pink does not mean the building will come out in that flat pink. This is because of the "different materials" that make up the building. SC4 was fun for me for the time I had it on my comps, I just tend to move up with the games though true not everyone can do this the economy is not fun sometimes. :lost:

    Share this post


    Link to post

    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

    Sign In to follow this  
    ×

    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