Rastar Posted September 30, 2013 Share Posted September 30, 2013 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 More sharing options...
shadmar Posted September 30, 2013 Share Posted September 30, 2013 I think deafult camera range is about 1500, but you can change it : http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/camera/camerasetrange-r203 HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Rastar Posted September 30, 2013 Author Share Posted September 30, 2013 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 More sharing options...
shadmar Posted September 30, 2013 Share Posted September 30, 2013 Yes that makes sense, it might be a bug then. HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Rastar Posted October 21, 2013 Author Share Posted October 21, 2013 I'm bumping this thread because I still think this is a bug. If not, please give me some hint what I should do differently. Link to comment Share on other sites More sharing options...
Josh Posted October 21, 2013 Share Posted October 21, 2013 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 More sharing options...
Rastar Posted October 22, 2013 Author Share Posted October 22, 2013 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 More sharing options...
Admin Posted October 22, 2013 Share Posted October 22, 2013 Thank you, that helps a lot. Link to comment Share on other sites More sharing options...
Josh Posted May 11, 2014 Share Posted May 11, 2014 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 More sharing options...
Recommended Posts