Strange Red Lines and Vanishing object with Ardor3D

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Strange Red Lines and Vanishing object with Ardor3D

hedgehog
This post was updated on .
I'm getting a weird effect in my scene having red lines that I didn't put in the scene. These appear/disappear as I rotate my scene object. The scene object can also have parts of it missing.

If I place my scene object around the origin (0,0,0) I don't get these effects but if I place it where it should be placed (ie; large x, y values: x=182148, y= 7618202; z=851.1068) then these effects start to appear.

See the 2nd image in which an area of triangles vanish at a particular rotation.

It's as if a clipping plane is interferring with the scene object.

Has anyone else experienced this problem and know of a solution?





If I translate the object to (0,0,0) then the red lines disappear but if translate the object forward it starts to vanish:



I worked out that the vanishing object is due to the far frustum plane not being set. When this is set via:

  camera.setFrustumPerspective(45.0, 1.6, 1.0, 1e08); // fov, aspect, near, far

it resolves the hidden surface.

However, I'm still getting red lines appear that are not part of the scene objects?

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Strange Red Lines and Vanishing object with Ardor3D

gouessej
Administrator
Hi

It comes from the frustum or the axis aligned bounding box.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Strange Red Lines and Vanishing object with Ardor3D

hedgehog
I set up the frustum and don't set a model bbox, so how do I get rid of the red lines?

Is there a way of debugging the scene with the frustum?

Reply | Threaded
Open this post in threaded view
|

Re: Strange Red Lines and Vanishing object with Ardor3D

gouessej
Administrator
Please try to modify a bit an existing publicly available example to reproduce this problem. For the moment, I don't really know from where those lines come.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Strange Red Lines and Vanishing object with Ardor3D

hedgehog
I'll try building an example, but this may be difficult to replicate in a small example.

The key question, is how can they appear in the first place? If a user adds nodes to a root node, which are all rendered then what else exists in the scene that is also being rendered?
Reply | Threaded
Open this post in threaded view
|

Re: Strange Red Lines with Ardor3D - SOLVED

hedgehog
SOLVED - the red lines were due to having debugging turned on.

I was using Debugger defined in com.ardor3d.util.geom.Debugger.

When I turn this off the red lines go away.

Reply | Threaded
Open this post in threaded view
|

Re: Strange Red Lines with Ardor3D - SOLVED

gouessej
Administrator
Thank you for the feedback but I advise you to provide a SSCCE in the future if you really want to give us a chance to help you.
Julien Gouesse | Personal blog | Website