More rendering info

Blitz3D Forums/Blitz3D Programming/More rendering info

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

This is getting interesting.

If you render things in multiple passes, it is crucial that you keep the fewest number of top-level entities possible. Each time you render, Blitz goes through and performs DX transformation operations until a hidden entity in the hierarchy is found. If you have just a few top-level entities, you can hide them and cruise through with no problem. If all your entities are top-level, you will have severe additive slowdown with each rendering pass.

Merging all meshes into one is faster than even instanced meshes. However, the fastest of all methods if to divide your map up into a grid of about 16 meshes, and merge meshes according to their position in this grid. You can also do a render box test to check visibility of each if these portal zones. When doing box tests, it is important to keep the rules from the prior paragraph in mind, since this can involve up to 16 extra renders. You can use the visibility info to cull offscreen or out-of-range terrain pieces and static meshes.