_cullDist not taking effect - 2.0.10

Questions and answers about the how and why of making maps.
Post Reply
User avatar
BinarySpike
Corporal
Corporal
Posts: 735
Joined: Mon Mar 28, 2005 11:58 pm
Contact:

_cullDist not taking effect - 2.0.10

Post by BinarySpike » Sat May 09, 2009 6:14 pm

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.

User avatar
optic delusion
Special Forces
Special Forces
Posts: 999
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Re: _cullDist not taking effect - 2.0.10

Post by optic delusion » Mon May 11, 2009 11:26 pm

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.
Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.

anomaly
Private First Class
Private First Class
Posts: 220
Joined: Tue Jul 26, 2005 10:32 pm
Location: Gainesville Florida

Re: _cullDist not taking effect - 2.0.10

Post by anomaly » Tue May 12, 2009 7:27 pm

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.

Post Reply