Home Unreal Engine

Using atlas-texture and UV-sets for texture variation on prop

polycounter lvl 5
Offline / Send Message
b0lly polycounter lvl 5
Hi guys!
I am currently working on a scene in Unreal that is basically a "remake" of the game System Shock 2. So far I've made a couple of props for the scene. One of them being a chemical container that comes in different varieties, but I'm kinda stuck on how to most efficiently use the same prop but have it come in different types of chemicals. Screenshot from the actual game System Shock 2:



This is the prop that I've made, with and without the "Te"-label and lamps: 


I hope its clear what I want to be able to do. Basically reuse the mesh but with different labels and different colored lamps on the cannister to indicate different types of chemicals. I believe there must be a good way to do this without having to make a unique material for all the different chemicals (18 total). Maybe some way to use UV-sets and an atlas texture?
I'm kind of a noob when it comes to making materials and stuff in Unreal, I basically only know the basics :)

Hope someone can help me figure this out! thanks!

Replies

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    I would add a second material for the label. Or, one material, but 2 textures. One for the rest of the canister, and one long texture like 1024x256 or something like that for the labels. They would be laid out next to each other on the texture, and in the material, I would add ability to offset the uvs, to position them to the one that you want, using a scalar parameter in the material instance.For the lamps, you can just use a mask, and multiply it with a vector parameter, and again, just change its value in the material instances.
  • b0lly
    Options
    Offline / Send Message
    b0lly polycounter lvl 5
    cool, thanks! I don't currently know how to offset UV's in the material instance, but I'm gonna check it out tomorrow, maybe there's some good tutorials of it somewhere!
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    You can add a vector 2 to the texture coordinates. If you want to offset horizontally, use the first component. so it would be like 2,0. Similarly to this, if you decide to rather use a vertical texture, you would use 0,2 etc.
  • b0lly
    Options
    Offline / Send Message
    b0lly polycounter lvl 5
    If I make a uv offset function in a material instance to decide what part of the texture map is shown on the model, doesnt that mean that I have to make 15 different materials, all with different uv offset values? Isn't it all the same if I make 15 different meshes that has 2 material instances, one with a material for the cannister and an atlas-map with the different labels on them?
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    No because the 15 meshes would probably cost more memory. You would need to load 15 different meshes. 15 material instances should be much cheaper. The atlas map would depend. I mean what do you include. I definitely wouldn't have the full canister but with different labels 15 times. That would require much higher texture resolution for good quality. And this would be again more memory. Atlas is good but i would only atlas the labels. But of course everything is up to you. You could have 15 different textures and no atlas if you would want to.
  • b0lly
    Options
    Offline / Send Message
    b0lly polycounter lvl 5
    No currently I have one material for the cannister itself and then one atlas-material with all the labels where I place the 15 uv-shells differently for each mesh. So all cannisters share one "main" material and then the second texture is placed where the label is. Both mats are only 512x512. 
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    Obscura is right. Instanced materials are efficient and so is reusing the same static mesh. 

    I'd probably atlas the labels onto the same texture as the canister though given that the textures are so small
  • b0lly
    Options
    Offline / Send Message
    b0lly polycounter lvl 5
    Ahh good idea! gonna check that out!
Sign In or Register to comment.