Building Facades

3 replies [Last post]
Dubbler's picture
Posts: 5

i have been tasked with building a few sky scrapers for a project at wotk (i am using unreal).  because they are huge, i was assuming that using geo was probably gonna be too costly.  i was messing around with the idea of using normal mapped sections and duplicating them.  this reduces the number of polys onscreen which is good because there will be blocks at a time loaded. so here is where the question comes in:

if i create a mesh with 2 uv sets, 1 that is effected by just the normal and a second set that is layed out differently that has my diffuse and a paralax window (like in the materials video), am i undoing what i did with geo?  better yet, how can i tell when a texture becomes too expensive as opposed to geo?

thanks

Dubbler

Riki's picture
Posts: 1257

Hmmm, I'm trying to wrap my head around what exactly you are doing.

For a skyscraper like you mention, it is important to use many tileable textures. You can tile this in the shader or in the UVs like you mention.
Each case can be unique, if you are using parallax then the meshes are probably close enough to even notice it, in this case you want to cut your mesh up to apply different materials to different areas of the mesh. Typically for something like this you dont want too many of these materials on 1 mesh (another name for this is "section counts"). I would try and keep the number around 4-5 if possible.
Its also a good idea to use the material instances like I cover in the video to help with performance, that way you can change the color of the window lights and stuff like that.
As for poly count, you could probably get away with 1-2k polys pretty easy for a mesh this size. That should be enough to cut the mesh up enough to tile these textures like you would need.
Then you could create some "clip ons" for the building to break things up, things like air conditioners, antennae, maybe cloth-lines, wires, etc.
I hope this helps point you in the right direction. I can think of many situations where things would be different, so if you want to hone in on some more specific details let us know!

-Riki

Dubbler's picture
Posts: 5

ok cool.  seems case by case is the only way to handle it.  i just didn't want to over-do it on materials when i should have been using geo in the first place.  i appreciate your help.  1 more question that myself and another artist were having about actual texture packing.  we were trying to figure out how much more costly is a 3 channel texture (r,g,b) as opposed to a (r,g,b,a).  we've been using the r,g,b channels for masks and such, but we have another artist bringing in 4 channel normal maps with the displacement as alpha.  we were just curious if the 4 channel is gonna use that much more memory over the 3.  sorry for the long winded question

thanks

Dubbler

Riki's picture
Posts: 1257

This is a great question. The crazy thing about this is adding an alpha channel doubles the memory of the texture. So it would be the exact same memory of using 2 - r,g,b textures and it would 1 - r,g,b,a texture.

Then why ever use an alpha? Well there is a performance hit for the amount of "texture lookups" a material has. So if you are referencing too many unique textures, this will cause a hit on the GPU. So its good to keep a balance with these things. Another factor is workflow, organization and stuff like that. 
So never use an alpha unless its necessary, or if the texture is already small its not a big deal. I dont think it would ever be a good idea to have an alpha on a 2048, but there are some rare situations.

-Riki