Ok, so I've got another technical question and decided to make a separate post in case there are others looking for similar info that's not related to my Overlapping vs Wasted space post.
I'm currently working on a Castle environment that I'm going to be putting together in UDK. I'm using modular pieces with some tiling and some non-tiling textures. What I'm trying to figure out is the optimal way to go about exporting these assets to the engine and putting them together. For example, I have the Castle Walls assets that are currently two separate meshes. The wall itself which uses two tiling textures and the Merlons which use 1 non-tiling texture:
My quandary comes from not knowing if it will be more beneficial to leave the Merlons and Wall as separate meshes, or attach them together and export as one piece. They're never going to be used separately but I'm a little unclear about the technical reasoning behind leaving them as separate meshes.
Firstly, I know that its beneficial to have the mesh broken into several pieces if there's a chance that part of the mesh won't be seen and can be occluded or culled from the scene. For example, if I leave them as two separate meshes and someone stands at the base of the wall, then the Merlons should be far enough away for UDK to cull them based on camera distance. So this is a definite plus.
I've also heard that if a mesh uses multiple textures then it means a separate draw call for each texture. The wall, having two textures would need to be drawn twice per frame and the Merlons once per frame for a total of 3 draw calls. But if the Merlons are ALWAYS going to be used with the wall, is it really beneficial to leave them as a separate mesh since its going to require 3 draw calls anyway? I guess if they're culled when they're out of view then it would reduce the number down to 2 draw calls but only if occluded.
Finally, I've also heard that although instancing is great and what UDK excels at, its possible to go too far. For example, if I took the Merlons mesh and broke it down into 8 assets (1 mesh per "tooth") then it would actually negatively affect the scene because there are so many more assets to draw? I'm basing this off the Foliage tutorial by Damian Lazarski that I watched on 3D Motive. Damian suggests that you should make your grass clumps as big as possible - within reason - so that you're not bogging down the system by forcing it to render so many separate meshes. Is this true? Because I've also heard that instancing works by having one draw call for every instance regardless of how many of them are in the scene so these two statements seems to go against each other.
Thanks!
Replies
It's typically best to work with as large of pieces as possible when trying to make a level, but don't allow that to cause you to make things less unique and more tiled.
Udk counts each section as a drawcall. A section is split by material ID then split again at the object level. So your wall is going to be two sections no matter what you do.