Hi guys, sorry for the long post but I am desperate for advice!
I was hoping someone could help with this massive static mesh optimization problem I'm having. I am modeling a library for my masters project and i have gotten to the point where i have to add the books.
I'm not sure of the correct industry way to do it, and since I wanted it to look nice I made actual books instead of cubes.
I am having massive lagging problems whatever i try to do - down to .93 fps!
I have tried:
- lowering the poly count hugely, while keeping some detail
-creating a single block of books and repeating it around the entire library
-creating larger sections of books (like 6-7 blocked of bookshelves)
The problem is I have for different sized bookshelves so i will have to make different static meshes for each size.
I am pretty new to UDK so i didn't realise the problem i was going to have. if anyone knows of the best way to go about the issue it would be a great help.
At the moment I am thinking of either:
-creating a very simple blocky set of books and hope the textures will do
-delete all the books and build the world first ever bookless library
Thanks in advance!
Replies
also this is a good place to use a gradient map or to tint things in the shader for extra colour varration with no extra texture cost.
2. Arrange them in the final configuration you want to use
3. Create a low poly cube that encompasses all of the rows in a shelf (so maybe that would be 100 books or something).
4. Bake the high poly details to the low poly
5. The final asset shouldn't use many resources at all.
@beefaroni: thanks, i will def do that tomorrow...simple solution that I should have thought of before!
@abdullah: damn, now I have to re-model my wall too
Do the books have all their own separate texture? If yes, then you should try to pack all the textures in a bigger one (a texture atlas), and use as few materials as possible.
Also try to group several books (like a row of books) in one or two meshes, and reuse those 'big' meshes to create combinations.
UDK is (still?) optimized to use instances of meshes, so using a lot of instances of a few different meshes is better than using a lower number of unique single meshes.
That's the assumption that I was going on, the books are only 40-50 tris each an there are only 3 types of them. But I don't think udk is instancing them, as when I turn off static mesh instances in the viewport, nothing happens.
I will try the normal map idea tomorrow though, as it seems best practice.
UDK doesn't instance mesh during the rendering (only in memory), that's why here we have bad performances because of the drawcalls. Merging a maximum of books will help the performances. The polycount can be high, but the number of separate objects must be low however.
Static meshes are really instanced in only one case : http://udn.epicgames.com/Three/ProceduralBuildings.html
Right, and with the foliage tool: http://udn.epicgames.com/Three/Foliage.html
Yeah, I was trying to do that to a certain extent but it wasn't viable in this case, sue to lightmaps and textures. I mean, after I added my initial books (idividuall and very stupidly) I had 15759 books.I think I'm almost ready to laugh about it.
Good to know, I couldn't really find much info online about instances. Thanks!
You can see the final result here, I think I used a single set of 512x512 textures using this technique for every book in the scene.
http://www.marksneddon.net/img/content/trlt_002.jpg
Though I don't have a closeup of the books, hope these screenshots explain a bit.