Tags / Unity
Caustics Simulation in Unity
- Part 4 in a series about creating a realistic water simulation and rendering
Caustics are ripples of light projected onto surfaces behind the refracting surface when light shines through. Caustics have the effect of concentrating light in very distinctive bands because when the refracting surface deforms it acts like a complex lens dynamically bending and focusing the light. Like the refraction, caustics are relatively straightforward to implement in ray-tracing though very computationally expensive. I could find no implementations of real caustics in Unity. The approaches I found use some kind of animation with static baked caustic textures that are warped in a wave-like fashion.
Published Feb 11, 2021
3 min read
unity
·
simulation
·
graphics
Refracting Water Surface in Unity
- Part 3 in a series about creating a realistic water simulation and rendering
Refraction is the physical phenomena that distorts views through the boundary between two transparent materials that have differing refractive indices. Common examples are looking into water or through a lens. This is very easy to achieve with ray-tracing because it closely simulates the physical process of light moving around a scene. Today (2021) ray-tracing can only be done offline or with limited complexity scenes on the latest hardware. Most games today use a technique called rasterization which is much faster but has many limitations.
Published Feb 11, 2021
3 min read
unity
·
simulation
·
graphics
Creating the Physics of Water Movement
- Part 2 in a series about creating a realistic water simulation and rendering
In this section we are going to look at simulating the movement of the water surface. We model the surface as a 2D grid of particles. These particles then form the basis of a mesh by rendering triangles between them. A particle is modelled as a point in space with a mass and velocity vector. Each particle is connected to each of its immediate eight neighbours. That is four to the left, right, in-front, and behind, then the diagonals.
Published Feb 11, 2021
3 min read
unity
·
simulation
·
graphics
Physical Simulation of Water
- creating a realistic simulation of water with refraction and caustics in Unity
Simulating water has been a nerdy hobby of mine for a long time now. My first attempts were on the game Downstream Danger back in 1985. There were a few pre-defined animations for waterfalls and streams. In 1999 I got into DirectX and 3D games development on Windows. I started a game with the working title of Microcosm, but unfortunately I never got it completed. It had landscapes comprised of fractal mountains with simulated erosion.
Published Feb 11, 2021
3 min read
unity
·
simulation
·
graphics