water - texture projection distortion near camera
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?
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?
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?
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]
what does frustum culling have to do with this?
[Edited by - horace3d on September 14, 2004 4:22:44 AM]
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.
the cube map just is the sky. no cube map gets used for the reflection.
here is an example video which shows the problem:
water_distortion.avi ~2mb divx
[Edited by - horace3d on September 13, 2004 2:53:53 PM]
here is an example video which shows the problem:
water_distortion.avi ~2mb divx
[Edited by - horace3d on September 13, 2004 2:53:53 PM]
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?
I looked your avi but couldnt figured anything out. Maybe you right. With a plain mirror instead of the water mesh do you get the same results?
i have a solution now. i use a radial water mesh which gets denser at the center and moves with the camera...
Maybe.. the surface normals near the camera were pointing behind the camera? So the texture wrapped back.
Though I cannot see it, I am sure that Pipo's thought is most likely the issue at play here, as I was having this same problem earlier.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement