About Store Forum Documentation Contact



Post Reply 
Draw Distance Malfunction + Terrain View Distance
Author Message
EthanC Offline
Member

Post: #1
Draw Distance Malfunction + Terrain View Distance
What we're trying to do is add a slider that controls draw distance but having no luck. So far it only seems to increase the horizon distance but the draw distance of terrain and objects stays at a constant past a very conservative amount (i would estimate 1km).

What we really want to have are two separate sliders, one for object draw distance (characters, buildings, etc) and one for terrain only draw distance only. This will help create the immersion of extremely large areas by allowing the user to see mountains in the distance, canyons and so on without the need to render every character or so on it's surface.

So I guess my two questions are: How do we correct the issue with he current view distance not working and also how would we add a terrain-only distance slider?
02-01-2012 09:26 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Draw Distance Malfunction + Terrain View Distance
there's
D.viewRange
and
Game::World.activeRange()

both need to setup to similar value

currently terrain+objects have the same drawing range (object fading is on the roadmap)
02-03-2012 11:46 PM
Find all posts by this user Quote this message in a reply
EthanC Offline
Member

Post: #3
RE: Draw Distance Malfunction + Terrain View Distance
(02-03-2012 11:46 PM)Esenthel Wrote:  there's
D.viewRange
and
Game::World.activeRange()

both need to setup to similar value

currently terrain+objects have the same drawing range (object fading is on the roadmap)

Much appreciated. I passed this onto my lead programmer so hopefully it helps him out. I'd glad to hear it's on the roadmap but the thing i'm looking most toward is the new occlusion methods.
02-04-2012 09:11 AM
Find all posts by this user Quote this message in a reply
JonathonA Offline
Member

Post: #4
RE: Draw Distance Malfunction + Terrain View Distance
Are any calls to update functions required after setting the D.viewRange and Game::World.activeRange?

In Esenthel MMO, if I change the activeRange does that affect how far away I can see any neighbors?
02-07-2012 12:37 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #5
RE: Draw Distance Malfunction + Terrain View Distance
neighbor visibility is toggle by a separate parameter:
Net::World::neighborDist
02-11-2012 02:43 PM
Find all posts by this user Quote this message in a reply
JonathonA Offline
Member

Post: #6
RE: Draw Distance Malfunction + Terrain View Distance
Thanks wink
02-22-2012 11:15 PM
Visit this user's website Find all posts by this user Quote this message in a reply
JonathonA Offline
Member

Post: #7
RE: Draw Distance Malfunction + Terrain View Distance
Okay, ran across an interesting problem here. I save/load D.viewRange() to/from config.txt since in Divergence we have options to allow the player to increase draw distance.

Now, when I enter the game world and Game::World.init(...) is called, memory usage goes really high even if the D.viewRange() value is say 100 (because I load the viewRange() value from config.txt before World initialization takes place).

When I enter the game world and then change my D.viewRange() and Game::World.activeRange() values using the sliders in the game menu the memory usage drops to what it should be.

It appears that Game::World.init(...) is not using D.viewRange() to set the activeRange() on game load.
(This post was last modified: 03-19-2012 12:38 PM by JonathonA.)
03-13-2012 12:25 AM
Visit this user's website Find all posts by this user Quote this message in a reply
EthanC Offline
Member

Post: #8
RE: Draw Distance Malfunction + Terrain View Distance
It might be possible that what we're experiencing is an engine bug, or something acting not as it's supposed to. Here is the data:

I noticed that when having set the draw distance at over 1k th game took exponentially longer to load. Instead of taking 5 or 6 seconds it could take as much as 15 minutes or more. I also observed that memory usage for he client was exploding close to 2k of my ram.

I was suspicious that it was trying to load the entire game. So for testing purposes I placed an object into the game world 6km from my characters saved location, built the game world, then removed the object from the file system.

Once I ran the game, lo and behold, after a massive 21 minutes of load the fame crashed out stating it couldn't find the file corresponding to the object it was trying to render a full 6km from the characters location. At the time of crash the client was devouring a massive 2.8gb of my ram. The draw distance was 2km only.

Also I've noticed that if you let it load all the way into game, once ingame your memory usage immediately begins to plummet back down to just a few hundred mb.
03-13-2012 12:27 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #9
RE: Draw Distance Malfunction + Terrain View Distance
You will need to provide some test project + step by step instructions as in my tests I don't have any problems, thank you
03-19-2012 11:54 AM
Find all posts by this user Quote this message in a reply
JonathonA Offline
Member

Post: #10
RE: Draw Distance Malfunction + Terrain View Distance
We'll try and sort something out for you to have a look at after the deadline tonight.

Is there anything in the World Editor that affects what is loaded at runtime or is all down to the code?
03-19-2012 12:39 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #11
RE: Draw Distance Malfunction + Terrain View Distance
it's down to the code
03-22-2012 11:13 AM
Find all posts by this user Quote this message in a reply
JonathonA Offline
Member

Post: #12
RE: Draw Distance Malfunction + Terrain View Distance
(02-03-2012 11:46 PM)Esenthel Wrote:  there's
D.viewRange
and
Game::World.activeRange()

both need to setup to similar value

currently terrain+objects have the same drawing range (object fading is on the roadmap)

Something I didn't ask about this comment...

Why do viewRange and activeRange need a similar value? Will there be issues if they are not similar?

I know that activeRange determines what objects/terrain are loaded/unloaded from memory so a greater viewRange distance would just mean that you extend the horizon (clipping plane) so you wouldn't see anything other than the sea.
(This post was last modified: 04-05-2012 05:55 PM by JonathonA.)
04-05-2012 04:50 PM
Visit this user's website Find all posts by this user Quote this message in a reply
EthanC Offline
Member

Post: #13
RE: Draw Distance Malfunction + Terrain View Distance
Image Included.


Attached File(s) Image(s)
   
04-05-2012 10:26 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #14
RE: Draw Distance Malfunction + Terrain View Distance
(04-05-2012 04:50 PM)JonathonA Wrote:  Why do viewRange and activeRange need a similar value? Will there be issues if they are not similar?
there won't be other issues.
activeRange is for loading/updating distance of the area.
viewRange is only for visibility.

@EthanC: it looks like you've hit PhysX limitations of actors on the scene. Try to reduce amount of actors, or merge object actors together.
04-08-2012 07:00 AM
Find all posts by this user Quote this message in a reply
Post Reply