Jump to content

Very distant objects culled away


Rastar
 Share

Recommended Posts

After not finding the problem with my clipmap terrain getting culled once I move the camera beyond about 1500 units from the origin, I did the following test:

 

Create a new project, open the start.map, delete the blue cube and scale the orange plane by 100 in the x and z directions. Move it to (0,0,1800). Then run the project and move the camera towards the plane.

 

Once you're getting to about 1500 units, the plane vanishes. So either this is a regular effect, then I'd like to know how to get around it (I need much larger distances). Or it is a bug, or there is some general culling call in the engine or something which I need to adapt.

Link to comment
Share on other sites

But those are the near and far ranges, evaluated relative to the current camera position, aren't they? So if I have a far range of 1000 and the camera is at 1000, I should be able to see objects up to 2000, correct?

 

If I set the far range to 1000, my plane vanishes when the camera reaches about 1500 (so I guess that's the default). With a far range of 1500, it vanishes around 2000, with a far range of 2000 it doesn't get culled.

 

I still don't understand that behavior.

Link to comment
Share on other sites

  • 3 weeks later...

TBH, it probably would have been looked at already if a sample map was included, but it gets pushed to the back because I have to take time to try to recreate the problem.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Attached are the map file (I had to zip it, the forum wouldn't let me upload a map file) and a modified App.cpp (it prints out the camera position and moves it faster). Put both in a new C++ project and move straight ahead. At around 1500 the orange box suddenly vanishes although it should still be in view.

App.cpp

start.zip

Link to comment
Share on other sites

  • 6 months later...

This occurs because at that distance the object is outside the scene octree. Since your distance from the scene octree AABB is greater than that object's culling distance, if gets hidden, even if you're right on top of it. Increase the world size in the scene root properties or call world->SetSize().

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...