<p>I am implementing a water simulation program using OpenGL. However I could not decide which technique to use for reflection and refraction. The water is wavy and there are dynamic objects around the water.</p>

<p>First, I considered dynamic environment mapping. However, it seems that it is not quite suitable for small environment, because the close objects are not reflected correctly.</p>

<p>Second, I considered SSR technique, but it does not reflect non visible objects and because realism is more important than performance for this project I gave up on SSR.</p>

<p>Is there any other good algorithms to do reflection and refraction?</p>

CC BY-SA 3.0
2018-02-20T16:12:51.840Z
If you need the reflections off wavy water to be that realistic, you should use ray-tracing. Any rasterization technique is going to involve *some* trade-offs.
Dan Hulme
CC BY-SA 3.0
2018-02-20T16:39:10.993Z
Check new [McGuire's paper](http://research.nvidia.com/publication/real-time-global-illumination-using-precomputed-light-field-probes) which introduces real time raytracing using grid of cubemaps. For dynamic objects, voxel cone tracing might be good because voxelization in real time is quite gpu friendly.
mdkdy
CC BY-SA 3.0
2018-02-20T16:54:51.763Z
You can also combine both SSR and VCT when SSR fails. The downside of voxels is finite precision measured in voxel size.
mdkdy
CC BY-SA 3.0
2018-02-21T14:56:02.000Z
Thank you for the comments. UE4's planar Reflections looks very realistic. Is there any article about how Planar Reflection works? https://docs.unrealengine.com/latest/INT/Engine/Rendering/LightingAndShadows/PlanarReflections/index.html
user3117189
CC BY-SA 3.0
2018-02-22T01:35:42.217Z
Have you considered using the so-called planar reflections using an extra camera from the other side of the reflective plane? Usually warping the uv maps of the projected image acording to normals is enough to fake the bumpiness convincingly
Sebastián Mestre
<opengl><reflection><refraction>
What is a good way to do reflection and refraction in small environment for bumpy planar surface?
user3117189
# What is a good way to do reflection and refraction in small environment for bumpy planar surface?

(Asked by: username_0 on 2018-02-20)

I am implementing a water simulation program using OpenGL. However I could not decide which technique to use for reflection and refraction. The water is wavy and there are dynamic objects around the water.

First, I considered dynamic environment mapping. However, it seems that it is not quite suitable for small environment, because the close objects are not reflected correctly.

Second, I considered SSR technique, but it does not reflect non visible objects and because realism is more important than performance for this project I gave up on SSR.

Is there any other good algorithms to do reflection and refraction?

**Tags:** opengl, reflection, refraction

> **Comments:**
> **username_1**: If you need the reflections off wavy water to be that realistic, you should use ray-tracing. Any rasterization technique is going to involve *some* trade-offs.  
> **username_2**: Check new [McGuire's paper](http://research.nvidia.com/publication/real-time-global-illumination-using-precomputed-light-field-probes) which introduces real time raytracing using grid of cubemaps. For dynamic objects, voxel cone tracing might be good because voxelization in real time is quite gpu friendly.  
> **username_2**: You can also combine both SSR and VCT when SSR fails. The downside of voxels is finite precision measured in voxel size.  
> **username_0**: Thank you for the comments. UE4's planar Reflections looks very realistic. Is there any article about how Planar Reflection works? https://docs.unrealengine.com/latest/INT/Engine/Rendering/LightingAndShadows/PlanarReflections/index.html  
> **username_3**: Have you considered using the so-called planar reflections using an extra camera from the other side of the reflective plane? Usually warping the uv maps of the projected image acording to normals is enough to fake the bumpiness convincingly  

---

## 0 answers

