Jump to content
  • Advertisement
Sign in to follow this  
bjarnia

OpenGL Camera movement screws up other objects

This topic is 3565 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

Problem: http://www.steik.org/dump/terrable.wmv It's going to be impossible to explain everything in detail, so here are quick notes: OpenGL/C++, pretty much everything done through CG Shaders Problem is that when I move my camera it seems to affect the Y position of the water as you can see in the video above. It's actually not just the water, it's apparent on the skydome as well in other scenarios. I have tried disabling the wave effects on the water without luck. I have also tried playing with near/far clipping. As well as about 100 other things, but they are too detailed to list. Also, everything is "updated" at the same time, camera position first (based on input), then all world objects (terrain, water, sky). Then everything is rendered. Pretty standard, I think. I understand this is not a lot of information/help, but i'm hoping that maybe someone sees this and recognizes it as some really obvious and common mistake/problem, as I think that's what it is. Edit: Just realized that I should possibly have posted this under OpenGL. If a moderator feels so as well, feel free to move it.

Share this post


Link to post
Share on other sites
Advertisement
Wild guess: The camera transform is updated somewhere between where the water and the rest of the world is rendered. Looks like it is off by one frame, at least.

Edit: Bad sentence... Nice shallow water effect, by the way!

Edit2: Bah. Did not catch your sentence about update order. Sorry.

[Edited by - Trond A on January 14, 2009 12:32:21 PM]

Share this post


Link to post
Share on other sites
Seems like Z-fighting. Have you tried turning off depth test when rendering water? can you show how u set up world,view,proj matrices for water?

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!