Jump to content

Disappearing World


gamecreator
 Share

Go to solution Solved by macklebee,

Recommended Posts

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?

Link to comment
Share on other sites

  • Solution

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().

 

  • Like 1

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

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:

link.jpg.060d1e60781303eba8fac575f33b6866.jpgEdit: 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.

  • Like 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...