Skyscraper Question

I’m building skyscrapers and each modular floor currently has around 1.6k tris. Each floor is 2 meshes atm ( the exterior and interior). Each building will have 20+ floors so that’s 32k tris minimum per building.

I’m using the Self-Illumin/Diffuse shader for the models. There’s a tiled texture for most of the details (in Base RGB) and a plain, light grey, baked texture (from another program) in Illumin (A).

I was thinking of importing one floor interior and turning it into 20+ prefabs stacked high… If I made prefabs then they would share the same UV coordinates. If I rendered a bake of the full exterior then wouldn’t the exterior have to be one mesh (and not prefabs) due to the over-lapping UVs? :face_with_spiral_eyes:

How would you do it?

Ok, that was confusing! Let me really simplify that :slight_smile:

Say you had 20 cubes all texture baked. Each cube has a unique bake. That’s a lot of draw calls.

It would be nice if all 20 cubes shared one large baked texture map with all 120 faces laid out on one UV. Now you only need one material and one baked texture for all 20 cubes.

All the cubes are all the same shape, but they can’t be prefabs as they now share one large UV layout and one baked texture map.

Is it best to have,

  1. 20 cubes (240 tris), 20 baked textures and 20 materials? (obviously not)
  2. 20 cubes (240 tris) 1 large UV layout (120 faces), 1 baked texture and one material?
  3. 1 mesh (240 tris), 1 baked texture and one material?
  4. 20 cube prefabs (12 tris) 20 baked textures and 20 materials?

I went with separate meshes sharing one large texture as each mesh will need LODs.

What if only part of a model needs tiled textures? Say the side of a building has a tiled window texture but the bottom has a shop texture? What’s the best way to split it up?

1181623--45704--$18035700.jpg

Greetings. Sorry no ones replied to you yet. I have not done much texture baking, so I cant help much with that. However I have experience with creating buildings from multiple parts, because I’m making destructible structures. First off its always better to have less objects, so if you can make the building be one object that would be best. Also, for best performance each object should only have one material (texture). Because each material is 1 draw call. However, if you make the building only one gameObject it probably would be ok to have multiple materials for that object. For something like a skyscraper you probably wont be able to fit everything into one texture anyway because texture sizes are limited 4096 in Unity, and you probably need more resolution then that. Also, I’ve read most computers aren’t able to display 4096 texture resolution or even 2048 rez, so you probably want to keep your texture sizes 1024.

What I would do is UV map one floor of the building, then duplicate it to make the rest of the building in your 3d app, assuming each floor is the same. Then export that out as one mesh and use a mesh collider on it.

Thanks Roger0,

I thought Prefabs used less resources and planned to duplicate one floor mesh in Unity to make a building, but I can make it one building in my 3d app. I’ve worked out the multiple texture thing too.

Destructible structures sounds great.