Here is a scale proposition :
Code: Select all
1 Max unit = 1 Irrlicht Unit = 1 inch = 2.54 centimeters?
Thus a 65635 units squared area in 3D represents 1667 meters squared in real world
65365 is the maximum allowed by several editors for obvious 32 bits reasons.
View frustum Culling
irrlicht is good at it already. Let's assume nodes that are not in frustrum are not drawn by default : this is built-in irrlicht feature?
Detail culling
Consists not to draw objects that are too far away.
Camera Far Value and fog do it well, as you pointed out, DeM0nFiRe.
LOD
A model located pretty far away from the camera is represented on screen by only 1 pixel. However suppose this model is made of 20.000 tris, it would be a
waste. So the idea is to show the high-poly version of the model only if it is very close from the camera, otherwise draw lower poly versions of the model.
Modellers usually start by creating the high-poly version, then derive it in 4-5 models the last being the most simple shape imaginable. Polychop is a good
Max plugin for this. This method is used in most modern engines. It is really worth the treatment/polies reduction. One of these models can be used in the editor to help the level designer.
I proposed to model an object for this. It works fine, I implemented it 2 years ago for vast woods. The code is very easy since it only consists in determining the distance from the view point to the object, and show the appropriate model for the LOD level. Of course this step is performed
after frustrum culling. Just be precise about the first model to "build" because it takes time to create a model.
At some point I am sure the mipmapping LOD code from ITerrainSceneNode will help because it allows to manipulate the mesh automatically, this saves the work of 4-5 people isn't it?
Occlusion culling
is something about Z-buffer one could explain better...
Portal Culling
This is one of the important steps during the compilation of the bsp.
A room is a box. When you are in a room, you can't see the furniture in the room behind that wall, so don't draw it! Fantastic boost and extemely fast code
however there is no general implementation of portal culling because a generic solution won't reach the top performances in every case. Programmers like
code dedicated to its task and we go for performances (this includes low-end hardware?)
I implemented this method, but not on a bsp. The process consists to create cubes in the editor (an irrlicht-based editor BECAUSE irr bsp loader does not
recognize func-brushes) then the engine compares these boxes with the rest, allowing to say "yes, the player is in the re-health area, give him 100 points health", or "no, player is not in the cave, so hide the node of cave interior and disable normal-techno-parallax-bump effect from it". Portal culling is outstanding for indoor maps.
At the moment the irr bsp loader partially ignores precalculated leaves stored in the binary file. Dont get me wrong what has been done is outstanding. If I
remember right the code has the bit buffer precising if a leave can be seen by another or not. Just need to determine the PVS and it's done. Who can?
I think we could just copy the Q3 namespace, call it the Steel namespace and start from there.