Game Development Community

Near Clipping Plane

by Tony Pitman · in Torque X 3D · 10/31/2009 (3:53 am) · 8 replies

I have a free camera component that I am using as my main camera. When I am really close to my objects in my scene some of the polygons disappear. Particularly I have a balcony with a railing on it. When you stand right next to the balcony the railing disappears as if there is a sphere right around the camera that the railing can't be seen inside of.

Is this a near clipping problem? If so, how to I change the near clipping plan distance?

#1
10/31/2009 (4:24 pm)
I have seen this as well. However, I have not looked in to it to closely.


#2
10/31/2009 (4:33 pm)
Is there a solution to it?
#3
10/31/2009 (5:05 pm)
I believe it has to do with the World Boxes of Torque Objects

The Near plane is set to 0.1f, so that shouldn't be an issue, check on T3DSceneGraph's RenderObjects and SetupProjection for when they are set.

Later on there is Frustum Culling using an objects World Box and the Projection Frustum. Check to see if the World Boxes for your objects are where they should be, and as large as they should be.
#4
10/31/2009 (5:13 pm)
I just noticed my Characters World Box is a point, rather than a Box. This could cause the issue if it is a long railing. If it's world Box is a point, it will not draw if you cannot see it's Root Node.

Edit: and looking at your pictures, that looks like it could be happening to your terrain as well.
#5
10/31/2009 (6:02 pm)
Where do I check these things? I don't see anything about a worldbox in the XML and I am not making anything in code. Is it something in the XSI modeling software. I create them in XSI and then export them to DTS before using them in the TX3D game.

I am so new to this and learning as I go.
#6
10/31/2009 (6:13 pm)
I'm using breakpoints in the code and watching as data comes in.

I think it may be a bug on Garage Games' side.

However to view it in the XML turn that object's Scene Component's RenderObjectBounds property to true.

It should provide a wireframe Box.
#7
10/31/2009 (6:18 pm)
I will look at that.
#8
10/31/2009 (7:44 pm)
I still can't figure out why the railing is disappearing.

The railing is part of a mesh for the whole balcony. The balcony is in the same model with a larger building mesh and several other balconies.

The player camera is positioned just above the railing.

Here are some images:

www.shatalmic.com/GroundProblem/RailingProblem1.png

www.shatalmic.com/GroundProblem/RailingProblem2.png

www.shatalmic.com/GroundProblem/RailingProblem3.png