Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

blueEbola

Very annoying terrain problem

This topic is 6081 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, I've taken NeHe's terrain demo (tutorial 35) and I've added quadtrees to it. The quadtree seems to be working well, and the demo runs a bit faster. But the only problem is that when you move the camera, some of the quads dart out in unusual directions. It is very hard to explain but it's very ANNOYING! I have a screen shot here (and a zip file with the src + exe): http://www.geocities.com/blueebola/night_vision.html I circled the area that is the problem, as you can see its like some sort of polygon is darting out in one single direction. Anybody know how to fix this? This is the first time i ever got any kind of "tree" in anything and I am very excited Thanks in advance anyone who can help [edit: not tutorial 36, its tutorial 35... UGH] Edited by - blueEbola on February 23, 2002 2:58:45 PM

Share this post


Link to post
Share on other sites
Advertisement
Check the vertices that are being sent to OGL. It''s possible that a vertex gets removed by your culling, and so OGL draws the incomplete tri/quad funny.

Share this post


Link to post
Share on other sites
I''ve checked mostly everything in the rendering pipeline and it all seems fine.

This thing just doesnt want to work for me

I am beginning to wonder if its just the structure of the program thats giving me this or if its my quadtree I have made several little edits to my code (local) and all I can do is make it faster (by the means of better frustrum culling, and i switched to triangle strips for rendering). I switched to triangle strips with hope that it would just fix itself (hah, yeah right) but it still is acting up. Can somebody look at the code or diagnose possible reasons these quads are doing this?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Perhaps you are trying to render nonexistant vertices. That''s what it look like to me.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Perhaps you are trying to render nonexistant vertices. That''s what it look like to me.

Share this post


Link to post
Share on other sites
I think that may be the problem (in fact, I am pretty sure that is). I just don''t know when and where the vertices are being rendered at, so I have no idea where it is happening.

Another thing,

I changed the height map from a 1024x1024 raw file to a 32x32 one and the terrain looks great except that some tri strips are sticking to the origin (0.0f,0.0f,0.0f), as if it was specified as one of the vertices. Switching down to a smaller size of a height map seemed to have helped and I may be able to figure out whats wrong faster (hopefully) but has anybody ever experienced this kind of thing with models or even terrain before? I am looking for common problems that could have caused this behavior but I still can''t find anything. Thanks again

Share this post


Link to post
Share on other sites
AHA!

I have fixed it

Thank you AP the problem was exactly as you said, non existent vertices (thanks mikey too I found the problem by checking to see if a vertex''s value is the origin (which in the heightmap i have, should not exist) and then outputting some data to check out where and when it was happening... i found that my dum program was trying to display a vertex out of the bounds of the array. Heh, and to think i''d been pondering over this for about a week and a half..

Thank you anybody who tried to help!!

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!