Home Tutorials Download Forum Documentation Wiki Blog

Advanced Optimisation Technique
1st September, 2010

Advanced Optimisation Technique

Rendering

1 Star2 Stars3 Stars4 Stars5 Stars (7 votes, average: 5.00 out of 5)
Loading ... Loading ...

The engine has a feature to optimize the draw call number but it is limited to models having less than 32 vertices. Learn here how to reduce the number of vertices in your DCC Tools.


So there you are, your game is almost ready to be submitted, still in QA’s (Quality Assurance) hands to be validated, and you’re waiting for the green light.

The result comes back and the frame rate is too low… and this is the moment when you start hating your designer, your modeler, your engine… you’ve done everything possible to optimize! Wait. Have you really done everything? Are you sure?

I guess you already know that ShiVa Engine has built-in mesh batching?
This feature allows you to display tons of (small) objects without (any) performance loss…

To work properly, there are some limitations:
- Vertex count must be under 33
- You can’t use lightmap nor dynamic lightning
- Skinned mesh is not allowed
- The material must be the original (no script override)

The most restrictive limitation is the vertex count; also you might have seen that 32 vertices in 3dsMax are not 32 vertices in ShiVa. We will now show you why, and how to get to the magic ‘32’ vertices in ShiVa.

Here is an example:

Statistics from Max:
Polys : 47
Verts : 32

Statistics from ShiVa Editor :
Polys : 49
Verts : 47

The important information is the vertex count , 32 for Max, 47 for ShiVa…

You might ask: “What? Why is ShiVa creating useless vertices?!”

In fact, ShiVa just has a different way (a good one) to count the vertices.
The vertex count, for a graphics card, is a combination of three pieces of information: Position, UV and Normal, and 3dsMax only takes one into consideration the position…

Take a more detailed look at our model.

Normals at the top are different; from the side we can count 45 normal vertices.
Top mesh UV vertices are not welded to the side ones; we can count 47 UV vertices.
47, the number given by ShiVa Editor.
In order to have 32 vertices in both tools, you have to weld and also change part of the texture.

After modification, the results are, 32 vertices on both tools.

Congratulations, your model will now be batched and save your project precious frames per second!

Learn more about the batching techniques…

Leave a Reply

Leave a Reply

You must be logged in to post a comment.