View frustum culling

Blitz3D Forums/Blitz3D Programming/View frustum culling

LAB[au](Posted 2007) [#1]
Is there a way of turning off Blitz view culling? I decribe my problem, I am setting a transform matrix with Tomspeed's DX7 dll, so that the perspective is off-center, now if I move the camera the 3d models are disappearing (by the effect of blitz automatic view culling) in correspondence to the original non-off-center matrix, so sometimes when they are supposed to be still "in view".

I even tried Tomspeed DX7 dll with SetCullMode(1) , so cull mode set to none, but nothing does Blitz do culling, but if I set cullmode to 2 or 3 (CW and CCW) there it takes it ...

Did somebody experimented more with view matrix and blitz?


Warren(Posted 2007) [#2]
You're confusing view culling with backface culling (which is what the CW and CCW settings are referring to).

But I don't think you can tell Blitz to stop frustum culling in any case.


LAB[au](Posted 2007) [#3]
You are right, and what I am trying to disable or to transform is view culling.

Any idea what blitz uses to check if it has to hide the model? It is not entitybox or entityradius, is it somekind of Bounding Box?

Adding some distant vertices to the model, does the trick (entity is in view all the time). Then I have to do my own view culling...


t3K|Mac(Posted 2007) [#4]
Quote from 1.97 update:

"Added MeshCullBox for manual mesh culling. This allows you to correct some situations where an
animated mesh extends beyond the guesstimated bounding box."

MeshCullBox x#,y#,z#,width#,height#,depth#

maybe this helps? don't know if this only works with anims...


LAB[au](Posted 2007) [#5]
Oops this MeshCullBox meshhandle,x#,y#,z#,width#,height#,depth# does something, but not nice. It makes my models flickering, appearing and disappearing even at location (relative to the camera) where it didn't previously.

Is there somewhere a description of what the function does exactly?

Thanks for the suggestion.


Beaker(Posted 2007) [#6]
I doubt MeshCullBox will help, and I'm not sure there is a solution to this problem without more hacking.


LAB[au](Posted 2007) [#7]
Ok here is some code, if someone has a suggestion... it requires tom's DX7 dll as found in DevilChild's Shadow system.

Use key 3 and 4 to move the perspective left/right, 1 and 2 change the aspect ratio, use the arrow keys to move the camera.




Beaker(Posted 2007) [#8]
Have you tried this?:
MeshCullBox cube,-1000,-1000,-1000,2000,2000,2000


LAB[au](Posted 2007) [#9]
No I thought the first 3 parameters were the Box center coordinates, and the 3 others the box size!

Thanks it works!