Page 1 of 1

_cullDist not taking effect - 2.0.10

Posted: Sat May 09, 2009 6:14 pm
by BinarySpike
I'm working on a map object that is scenery outside the bounds of play. However it's being clipped by the far plane. If I increase the worldsize then the far plane is increased with it and the object shows up just fine.

_cullDist is set to "fog", however fog is set to worldsize. Maybe I'm setting it wrong?
/set _cullDist 500

I think a better solution is making the worldsize 500 and creating invisible boundaries for the map. This would allow users to explore the scenery if they so wish to move outside those boundaries. However, I am intrigued by the fact that _cullDist does not effect any of my objects.

Re: _cullDist not taking effect - 2.0.10

Posted: Mon May 11, 2009 11:26 pm
by optic delusion
There's 3 of them _cullDist, _cullDepth, and _cullElements. I would not mind if someone gave an explanation of how they act and interact.

If your putting lots of objects outside the boundaries, thaat means tanks and shots will never interact with them. This is an ideal situation to use pure drawinfo. With no "face" data to process for collisions, all users will get an FPS boost. Then you can use LODs to cull your objects, but it might not be necessary.

If you use the solution in your third paragraph, you may have to create invisible pyramids that prevent spawns outside of the desired area.

Re: _cullDist not taking effect - 2.0.10

Posted: Tue May 12, 2009 7:27 pm
by anomaly
BinarySpike wrote: _cullDist is set to "fog", however fog is set to worldsize. Maybe I'm setting it wrong?
/set _cullDist 500
"fog" is not set to worldsize, exactly. If you are using fog with _fogMode set to linear then _fogEnd defaults to _worldSize and _cullDist will use that value. If _fogMode is "none" then the default FarPlane is used, which is 1.5 * the worldsize.

I have tried to increase the far clipping plane and it seems to not get any farther out than the default FarPlane value. It works to make it closer. If you're interested in learning more have a look at SetupFarPlane() in src/bzflag/playing.cxx around line 4961 in the latest 2.0.x SVN.

As for _cullDepth and _cullElements, those are associated with the octree. Not sure how or if they interact with _cullDist. They are used in setupCullList() in src/scene/ZSceneDatabase.cxx Changing them in-game doesn't seem to effect the far plane. Maybe I didn't hit the right values though.