Close
Asset

y=f(x) Volumetric lights

y=f(x) Volumetric cone lights

 

Introduction

This component can be used to render volumetric cone lights, which are especially useful when rendering pre-visualizers. It's linked to the general lightCOMP of TouchDesigner and can be used similarly. It uses the shadow map of the lightCOMP to render volumetric shadows. There's also a possibility to inject smoke into the scene by linking to a 3d texture. All rendering is done in post-processing after the rendering using the depth and the world-space normal. 


How to use

To make use of this component, you'll need to download the yfxVLight-1.0.tox and place it in your network. It requires a renderTOP, depthTOP (with respect to the camera), and a renderselectTOP that retrieves the worldspace normals of the scene. See chapter parameters for more details.

The component contains a button 'create vlight' that will create a new extended lightCOMP in the network where the yfxVlight component is located. It contains an extra custom parameter to link a TOP to the light, which is then used as a gobo. The shadow map of the lightCOMP must be activated, but by default, this is already done when using the 'create vlight' button.


Parameters

- Render TOP
Path to the renderTOP being used to render the environment. Be sure the renderTOP has 2 color buffers (the second buffer for the normals)
- Depth TOP
Using a depthTOP (set to pixel format Depth Texture) linked to the renderTOP
- Normal TOP
This is a renderselectTOP selecting 'index 1' of the renderTOP. See chapter 'Geometry materials'
- Camera COMP
The cameraCOMP is being used in the renderTOP.
- Light parent
This is the path to a geometryCOMP where all lights are located. The lightCOMPs have a tag 'yfxVLight', which is used to search for all the volumetric lights within this geometryCOMP.
- Shadow map resolution
The resolution of the gobo textures. The best is to keep this resolution the same as the shadow map of the lights. By default, this is set to 256x256
- Render lights only
Possibility of not including the rendered environment. Useful when you want to add some blooming just on the lights.
- Brightness volume
The general brightness of all lights
- Volume decay
Decaying the light over distance so that the light is dimmed further away from the light source
- Brightness geometry
The brightness of the light when it hits the geometry
- Geometry decay
Similar to the volume decay, the light decays over distance on the geometry.
- Cone width
The light cone has a starting width to make it less like a perfect cone. The source of the light is a circle instead of an infinitesimal point.
- Smoke
Possibility to add a 3d texture to function as smoke. Dark areas in this texture will block the light slightly. Works best with loopable noise.
- Smoke TOP
Location of the 3d texture
- Smoke resolution
The scale of the noise. If you're scene is quite big, you might want to make this bigger so that repetition becomes less visible.
- Smoke offset
Offset of the smoke. Useful when you don't have loopable noise and see the borders of your noise field. Using the offset, it's possible to move this area outside of view.
- Smoke iterations
Possibility to have more detailed smoke by compositing multiple sizes of the smoke together. Similar to FBM noise (harmonics of the NoiseTOP)
- Smoke intensity
The intensity of the smoke
- Create vlight
Creating a yfxVlight prepared lightCOMP in the current network.


Geometry materials

The materials of the geometry being rendered need special care. In the 'advanced' tab of the material (phong or pbr) there's an option to add another color buffer. The already existing first one should be set to 'Full shading' (which is by default). The second one needs to be set to 'world space normal'. This is being used by the renderselectTOP described above to be able to render 
out the light reflections on the geometry surfaces. 


License

This component is released under Creative-Commons non-commercial. However, in case you want to use it commercially, that's also possible, just please let us know. We're very curious to see how this is being used.
Cheers,
Tim Gerritsen <tim@yfxlab.com> & Roy Gerritsen <roy@yfxlab.com>

Comments