![]() Remember that you'll be rendering your scene multiple times, one for each pass. On the left you'll see the base render, on the middle the caustic render, and on the right both combined together. ![]() Playground example: Multiple Passes Example. ![]() Since v5.0 it's very easy to use a different material than the regular material ( mesh.material) when a mesh is rendered into a render target texture: simply use tMaterialForRendering(meshOrMeshes, material). We can render the scene applying a material that simulates caustics with a wave generator and mix it with the base texture. One interesting effect to simulate with this technique is water caustics. Let's do that, adding a simple effect on all meshes and compose it with the original material. Playground example: Water Refraction with RTT Making multiple passes and composing themĪnother possibility, as mentioned, is making multiple render passes of the main camera and compose them. In this example we add two meshes, pool and ground, to the RTT and distort the UVs of the texture applied to the water plane using a node material to simulate refraction of the mesh behind the water plane. Playground example: Render Target Texture In this example we only add half of the spheres to the RTT, showing how you can selectively pick the objects rendered there.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |