# Any blacklight effect suggestion for 2.8?

Got a question. Are there any way to simulate blacklight (ultraviolet) effect in blender? Dont just light scene with violet colors, but make uv reactive color material or maybe fake blacklight effect? As i know some colors change it hue/saturation and become emission like. Any thoughts?

• According to this docs.blender.org/manual/fr/2.79/render/cycles/nodes/types/…, Blender stops before non visible rays. So, probably have to fake it. – lemon Aug 17 '19 at 15:12
• I did play around with something similar by using render layers and the Material Override to render the scene a second time, but with materials that would emulate a second set of RGB - which could be deemed Infrared, UV and “ultragreen”, which could then be combined with the “visible” render using the compositor. It was unfinished and very cumbersome but did kind of work. Since standard Blender only works with 3 color channels, this was the only way I could come up with of handling additional channels. – Rich Sedman Aug 17 '19 at 15:37

## 2 Answers

That can be faked with Eevee thanks to the Shader to RGB node. Though probably the proposed setting has some limitations.

The idea is to have a bright light prerendered onto a pure white Diffuse Shader.

If we convert it to RGB then to BW, we can test if it is brighter than a threshold.

From that, we can combine UV reactive part and 'normal' material parts with a mix shader.

If the threshold and lamp intensity are appropriately tuned, other (reasonable) lights won't change the effect.

Note: the fingerprint color here is due to the light color which can be changed.

Note2: could also test if the prerendered diffuse shader has some specific color output in order to avoid the setting be based only on light intensity.

Here is another approach which works in both Eevee and Cycles:

Use the distance between a light object and the fluorescent surface in order to determine how much the emission should happen. This distance should be used as the factor of a Mix Shader node, combining a regular material shader with an Emission shader.

This causes the surface far away from the black light not to emit any (fluorescent) light.

The screenshot below shows the distance computation, using Objecttexture coordinates of the blacklight (bottom left).

The blacklight's power can be used as a driver to modulate the emission, using Math nodes can drive the emission power depending on the light's power.

Further details and a full demo and open source shader node group: https://github.com/alcove-design/blender-shader-fluo (CC BY).

This animation also shows the blacklight in action.