What would be better for performance?

I have a table, and you are going to be able to disassemble some screws off of it, to craft into other items.

Would it be better for the screw and nut to have its own small texture, with its own material?
Or is it better to have the screw in the tables texture, and reference the same material as the table.

So far I’ve been putting the small objects textures inside the big one, but I’m wondering when such a small object is referencing a huge texture, even if its only a small fraction of it, if it has more of a performance impact.

I have a lot of objects that are going to do similar things, so I’m gunna be anal about this nice and early.

In simple words, less materials you have, better it is.

It’s even better if you use a big texture (2k, 4k, 8k depending on the platform) containing as much objects as possible. (called an atlas)

If you have multiple dynamic objects with the same materials and the same mesh, you can also use a instancing version of the shader to reduce draw calls. (Unity will be able to store a single array of the mesh for each objects GPU-Side instead of an array for each objects).

If you use multiple statics objetcs, use static batching instead of instancing.

2 Likes

Thanks, this is really helpful!

Cool, I have been texturing things in a group, so I’m glad to clarify that.

But one more question, in 3ds Max, I have a bunch of beds(static), they are the same object as the BSP. Not physically attached, but apart of the same object (I just looked up static batching, and this seems similar). But would it be better to detach them, delete all but one, import them into unity and them place them using static batching? Or should I just keep them apart of the BSP. Cause Right now its having to import all the geometry, when I could just import one and duplicate it. This may seem trivial but I’m making a jail, and there’s lots of duplicated objects other then the beds.

Thanks again.

There is one big difference between using static batching and grouping meshes yourself, that’s the usage of Occlusion culling.

5 beds merged together in 3dsmax are always computed together even if you only see one of the five monkeys on the bed. (Occluded or out of frustrum).

That’s not the case with static batching.

1 Like

K gotchya. Thanks a lot.

1 Like