Question About Viewdistance...

Blitz3D Forums/Blitz3D Programming/Question About Viewdistance...

OrcSlayer(Posted 2005) [#1]
What is the most view distance it is plausible to use? I need to create a massive space environment, much like you'd see in the game Freelancer, but I will be using a lot of culling to keep the polycount down (ships will only appear up close, planets will be reduced in polycount from a distance, some objects will be replaced by sprites with distance, etc).

I'm not sure if having a massive view distance will cause a negative impact on the system or performance, I basically need to know how big the view distance can be so I can work out the scale for everything else...

I have a few other questions but I'll post them later, for now this is the one I really need to know about...

-OrcSlayer


Stevie G(Posted 2005) [#2]
There can be no definate answer to your question. The near and far range does effect the z-order accuracy though i.e. 1/1000 & 50/50000 should have the same accuracy.

This topic has been discussed may times before and the problem you will experience is the floating point accuracy with huge universes unless you manage this correctly. For example, if you fly a ship far away from the center of your universe your ship may jitter all over the place which is simply due to this inaccuracy.

To get round this you could leave your ship at position 0,0,0 and move the rest of the universe around it. There are probably other , better methods so I would do a search on these forums for more information.

Probably not a great deal of help but there you go ...

Stevie


OrcSlayer(Posted 2005) [#3]
Thank you, so perhaps it would be best for me to test and see how far I can go accuratly and then scale the game down so the area outside of accurate range is the "badlands" (you are lost if you go that far).

I'm not actually doing the whole universe in one constant entity, just systems. Travel from system to system will require a brief loading period to swap the current system with the one being traveled too. However, I want systems to be big enough to house some massive space battles, multiple planets, etc...

OrcSlayer


John J.(Posted 2005) [#4]
I would suggest that space be divided into a big 3D "grid". When you move from one grid space to another, you could shift everything to the newly occupied grid is in the center of the universe. This would avoid precision problems, at lease near the camera.

I've never known a massive view distance to impact performance; only to cause z-buffer issues. Just remember to use 32 bit mode (with increased z-buffer precision) and to keep the "near" view range as far as possible to squeeze out as much precision as possible.

Another method (which I haven't tested) to overcome the view range limit would be to "lock" entities to a certain view distance, but also scaling them down appropriately. This way you could make it appear that you have massive galaxies, constellations, planets, etc. far far far away, while in reality they're only 10,000 units away, for example.


Zethrax(Posted 2005) [#5]
Eve Online (a space sim MMORPG) uses a grid system like the one John suggested, I believe, so it's probably the best way to go for your project. Obviously you need to be intelligent about how you manage visibility when you're near a grid cell edge and corner.


OrcSlayer(Posted 2005) [#6]
Hmmm, some good ideas here...

I'll try some expirementing to see how things work out. So far things are looking good in the tests and the results are very attractive.

-OrcSlayer


BlackJumper(Posted 2005) [#7]
a few pointers...

[a /posts.php?topic=41806]

[a /posts.php?topic=36832]


Andy(Posted 2005) [#8]
Here's Blackjumpers links in working condition with some added from other threads.

www.blitzbasic.com/Community/posts.php?topic=36832

www.blitzbasic.com/Community/posts.php?topic=41806

http://www.blitzcoder.com/cgi-bin/ubb-cgi/postdisplay.cgi?forum=Forum4&topic=000352


Andy