Visible Limits?
by Kevin Mitchell · in Torque Game Engine Advanced · 01/13/2009 (2:02 am) · 6 replies
I have a question about controlling how far an object can be from the player for the player to be able to see it. Is there a way to achieve this?
I thought it was the FOV but it looks like after reading this isn't it. My problem is that my first city looks like this:

When I cross the bridge heading into the first half of town the game starts lagging. So i'm trying to figure out how to limit the visible length of the camera. I've seen this done in some games and i've read this is called visible frustum in a directx book. Is this possible in torque or would i just have to breaking my city into parts?
I thought it was the FOV but it looks like after reading this isn't it. My problem is that my first city looks like this:

When I cross the bridge heading into the first half of town the game starts lagging. So i'm trying to figure out how to limit the visible length of the camera. I've seen this done in some games and i've read this is called visible frustum in a directx book. Is this possible in torque or would i just have to breaking my city into parts?
About the author
Riding Solo since 2005. Current Project: Fated World 2005-Present RPG Engine Tool Kit - Now available.
#2
01/13/2009 (7:14 am)
So the sky is constantly centered on the character? And its used as the clipping plane?
#3
01/13/2009 (8:24 am)
Id imagine its based around the player. That seems to be the general effects with fogs, the replicators and stuff. if you notice they also have a view distance too.
#4
01/13/2009 (8:44 am)
Yea thats something i was looking at when i used the replicator for flowers even though i need to look into replicators to control the distant at which they appear so i cant see the objects appear as easily.
#5
01/14/2009 (4:49 am)
The sky is always the set distance from the player. I did some work in the past where I set zones for the sky instead.
#6
01/15/2009 (3:50 pm)
Yes, the sky is centered on the player. Anything above visibleDistance is not rendered, and anything hidden behind at least 98% fog is not rendered. Fog starts at the fogDistance and extends until visibleDistance, though fog is best used just to give a sort of "blend" at the edge of the skybox to make it seem more natural, not a way of preventing objects from rendering at certain distances.
Torque 3D Owner Edward