Sign in to follow this  

water - texture projection distortion near camera

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

i render a mirrored view to a texture and then project it onto the water surface to achieve a similar water effect like in far cry. the problem is that i always get very ugly distortions near the camera and don't know how to fix this. i found a thread on this forum where yann suggests to use an alpha border and blend with a cube map but i don't think far cry uses this method (this would be noticable). in far cry this problem simply doesn't seem to happen at all... any ideas how to solve this?

Share this post


Link to post
Share on other sites
do you have a demo for it? Are both views (small/large) from the same engine?

If there is frustrum culling do you take into account the areas that need to be reflected on the water but not directly visible in the camera view?

Share this post


Link to post
Share on other sites
yes, both views are from the same engine. the small view is the mirror view. i just displayed it to see what's going on. the water which is visible on it just is in the background cube map.

what does frustum culling have to do with this?

[Edited by - horace3d on September 14, 2004 4:22:44 AM]

Share this post


Link to post
Share on other sites
sorry I understood no cube map was used and when you said that with near Z the reflection is distorted I thought it could been the areas not in camera view that do get reflected (on the water surface) not being calculated.

Share this post


Link to post
Share on other sites
i think the reason is that the water mesh just isn't tesselated enough. the reflection texture gets interpolated in a very inapt way to the vertices which are outside of the view. maybe far cry uses adaptive tesselation and there is a very dense mesh near the camera?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
no, it has nothing to do with the normals. i solved the problem, it works perfectly now!

if the camera is near the water the vertices of the mesh have to be closer together than the near clipping plane distance. if this isn't the case there will be very ugly distortion because of the interpolation to the projected texture coordinates outside of the view.

i use a mesh which moves with the camera and gets denser towards the center. so if the camera gets near it will always be at this high density spot. the bump map and color map do a counter movement so it looks as if the surface didn't move...

Share this post


Link to post
Share on other sites

This topic is 4838 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this