Optimizing Editor

Started by
1 comment, last by DaBono 13 years, 5 months ago
Hello,

I need to optimize our level editor. I have found that the application CPU side is actually the bottleneck, not the GPU. The problem is all the API/Draw submissions using DX9.

In the editor, we do not really have "static" geometry in the typical sense because the user can select individual objects and edit them. We don't merge objects with the same materials until export to minimize Draw calls.

I'm wondering how editor authors handle this. Is it best to have a cost on insert/deletion of objects and group objects with the same material into one mesh? I might also try using the instancing API.
-----Quat
Advertisement
You need to design your engine to support both cases:
- one where objects are real static objects
- and the other for dynamic objects (your Editor "static" objects should fall in this group, but in the game these static objects will be rendered by the real static objects path in your engine)

(It goes without saying that your engine is used both by the game and the editor in this scenario)

Grouping objects of similar material into 1 mesh is the way to go. But remember to send their transform matrices in your shader and index them there (or you could pre-transform them before you do add/merge them into the single mesh).

Hope this helps.
If you have a lot of similar objects, I'd recommend you have a look at hardware instancing.

This topic is closed to new replies.

Advertisement