gamecreator Posted February 6, 2018 Share Posted February 6, 2018 I feel like I came across this before but I couldn't remember it or find it on the forums. When I move far enough away, my models just disappear. When I return, they pop back. I thought it had to do with the distance from the origin but while it's really close, it's not exactly it. Right now the light is created just a simple way: Light* light = DirectionalLight::Create(); light->SetRotation(35, 35, 0); Each room is a separate model loaded in and moved (with a bunch of children, like walls and doors that can open). SetLightQuality is set to max. Zooming in and out with the camera doesn't change it so it seems like it doesn't have to do with the camera or the light but I'm hoping I'm wrong. Any thoughts what might cause this? Quote Link to comment Share on other sites More sharing options...
Thirsty Panther Posted February 6, 2018 Share Posted February 6, 2018 Does this sound like your problem. 1 Quote Link to comment Share on other sites More sharing options...
Solution macklebee Posted February 6, 2018 Solution Share Posted February 6, 2018 or if not vegetation but just a model, then look at the View Range setting in the editor under the Appearance tab in the Scene panel. https://www.leadwerks.com/learn?page=Tutorials_Editor_Scene-Panel or if you are creating these models dynamically through code, then set the view range by SetViewRange(). 1 Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
gamecreator Posted February 6, 2018 Author Share Posted February 6, 2018 Thank you. SetViewRange worked via code (I had to set it to InfiniteViewRange because it looked like it was already MaxViewRange by default). I remember now that I used it before. It does take a pretty big hit on FPS however, even if I'm zoomed in on one room and the others are offscreen. This is fine because I can hide the other rooms later and that should resolve this. So two curiosity questions: 1. I thought this should all be related to the camera. The distance from the camera is mostly constant in my example. Why does it seem like the distance is from the origin? 2. Shouldn't models that are off camera be culled automatically? I remember we had people complain that models suddenly popped back up when they turned around quickly in a level and so I thought that Leadwerks took care of this. It would be handy here if it did it automatically but like I said, I can easily do this myself. Also, Thirsty, I can't view your embedded link for some reason. It looks like this to me, even if I try to quote it: Edit: I ended up going into the page source and finding it: https://www.leadwerks.com/community/topic/2024-large-terrains-and-z-buffer-precision/ Thanks for the suggestion. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.