Jump to content
  • Advertisement
Sign in to follow this  
daObi

Strange Problem!

This topic is 4810 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 am facing a strange problem(problem_s in fact)! 1. Strangly Though i have the z buffer enabled when rendering the terrain as seperate chunks the z buffer doesn't seem to work. i mean suppose u have a mountain to render then for the chunk where the mountain belongs the planer regions are visible over the mountain, while for another chunk this mountain is over the planer regions. What the hell could the reason be! 2. I tried texture splatting but found it'll take up a lot time to render the whole terrain more than once! if i am misunderstanding any thing tell me how to render a terrain like that of Warcraft III or Ages of Mythology Thanks in advance... -Obi

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by daObi
1. Strangly Though i have the z buffer enabled when rendering the terrain as seperate chunks the z buffer doesn't seem to work. i mean suppose u have a mountain to render then for the chunk where the mountain belongs the planer regions are visible over the mountain, while for another chunk this mountain is over the planer regions. What the hell could the reason be!

Could quite easily be a Z-precision issue. Check all your Z values - especially your near and far planes (ideally zNear >= 1.0f and zFar should be no further than you absolutely have to!)

Quote:
Original post by daObi
2. I tried texture splatting but found it'll take up a lot time to render the whole terrain more than once! if i am misunderstanding any thing tell me how to render a terrain like that of Warcraft III or Ages of Mythology

Trying to mimmick the way that AAA commercial titles work isn't easy, they have both excellent programmers and excellent artists [smile]

From my look into those 2 games (and similar) it seems that there is some sort of weight map involved that allows for per-pixel blending between given "base" textures. The exact method is difficult to tell.

Have a read of this thread I think it'll be of interest to you...

hth
Jack

Share this post


Link to post
Share on other sites

Thanks for the reply! but i'm quite sure that the z values are constants and render well in ordianry cicumstances. Basically mine is a terrain painter so the vertices are modified at run time. i only play with the y vlaues for the time being so i am out of clue as to what might be responsible. do u think the matrices ( view and projection) can cause thibesides the problem is only with the chunck i am modifying

Advance thanks for any further suggestion!
-Obi

Share this post


Link to post
Share on other sites
Quote:
Original post by daObi
i'm quite sure that the z values are constants and render well in ordianry cicumstances. Basically mine is a terrain painter so the vertices are modified at run time. i only play with the y vlaues for the time being so i am out of clue as to what might be responsible. do u think the matrices ( view and projection) can cause thibesides the problem is only with the chunck i am modifying

I mentioned it in my first post, but what are your zNear and zFar values?

It's quite easy to appear to disable your depth buffering by specifying invalid parameters to your projection matrix. It all derives from numerical instabilities, but the cause is the same...

An absolute classic example is terrain rendering where you have a suitably large draw distance, such that you spread out your Z-Precision a lot more than you might otherwise do. Setting incorrect values gives you incorrect (read: "odd" [smile]) results.

Also, remember that we're dealing with floating point values here, they're good, but they aren't perfect. floats in general have a number of precision issues that you should be careful of, it is possible that these are hurting you.

hth
Jack

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!