Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / hiding parts of one large terrain .x file

Author
Message
Sickly
15
Years of Service
User Offline
Joined: 14th Jul 2009
Location: Does it matter?
Posted: 6th Sep 2009 22:54 Edited at: 6th Sep 2009 22:57
ok. so i have everything in my first level set up and ready to go minues collision detection which i am soon to add after i figure out this problem. i have to large .x files that im using for terrain, and trees+foliage. when i load this level, it takes around 3-4 minutes to load it which i am assuming is from all the other objects being rendered in the entire level. my question is, is there a way to hide parts of a large file like this? like specifiying which xyz coords to hide until in a said range? or is there another option to fix this problem? i tried searching for a solution to this, and maybe a turoial, but came up empty handed. any help would be much appreciated.

here is the code i am using right now.


Also, if anyone sees something wrong with my code that i could do to improve it, that would also be of help, although it works fine aside the hiding terrain and trees and plants.

The darkest minds, are often the brightest.
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 9th Sep 2009 11:52 Edited at: 9th Sep 2009 11:53
I believe this problem is related to LOD and Quadtrees (also Bintrees and Octrees). You might want to look them up.

If you want the easy way:
Usually Terrains are split into parts which are loaded individually. Alternatively you can also use separate limbs to allow your whole world to be stored in one file.
The basic idea is to loop through all the segments, and calculate the distance to the camera, when they're too far you hide them, when they're close enough you show them.
This is the most easy, but probably most ugly way too. An LOD system is obviously much better looking.

Sven B

Sickly
15
Years of Service
User Offline
Joined: 14th Jul 2009
Location: Does it matter?
Posted: 11th Sep 2009 19:43
Thanks. I'm going to look into this. I am also going to try and invest in Action3D reducer to reduce the poly count on the terrain. I checked the terrain poly count, and it was over 200,000 polys on just the terrain itself. I also did some reading on heightmaps, and this looks fairly interesting as far as keeping the fps at a decent rate. But im also pretty nub at this, so im kinda just playing around with all the different ways to acheive this

The darkest minds, are often the brightest.

Login to post a reply

Server time is: 2024-11-25 01:46:51
Your offset time is: 2024-11-25 01:46:51