Humen lighting guide
On this page
Humen traces indirect diffuse light and reflections in real time. It requires Windows, Direct3D 12 and a GPU that supports hardware ray tracing. Use a single-view, deferred Game or Scene camera. The project must already use URP or HDRP.
This release supports URP and HDRP in Unity 6.0, 6.3 and 6.6.
Install Humen#
- Import the Humen asset into the project. Keep the contents of
Assets/Humentogether. - In
Humen/Pipelines, open the Unity package for the project's render pipeline. Import its contents. - In Project Settings > Player > Other Settings, select the Windows build target. Clear Auto Graphics API and put Direct3D12 first. Restart the editor if Unity asks.
- Follow the setup for your render pipeline below. Add a Global Volume with a profile. Choose Add Override > Lighting > Truss Humen.
- Check the override boxes for Diffuse and Reflections, then enable their values. To check a surface, set Debug View to World Normals. The surface should show a color that changes with its orientation. Set Debug View back to None for normal rendering.
Universal Render Pipeline#
Open the Universal Renderer Data asset used by the camera. Set Rendering Path to Deferred, or Deferred+ when available. Enable Render Graph and add Humen Renderer Feature under Renderer Features. Use a Base camera, the full viewport, one MSAA sample and a fixed render resolution.
For an opaque or alpha-clipped URP Lit material, select Truss Humen/Lit in the material's Shader menu. This shader keeps URP's direct light, emission and Lit material properties. Existing materials using the stock Lit shader keep their native indirect lighting.
For a URP Lit Shader Graph, insert a Custom Function node in the wire leading to Base Color. Set its type to File, its name to HumenLit, and its source to Assets/Humen/Shaders/URP/HumenLit.hlsl. Add a Vector 3 input named In and a Vector 3 output named Out. Connect the original color to In and connect Out to Base Color. Save the graph.
Ray hits sample conventional material properties. Custom vertex deformation and layered graph effects can look different in reflections.
For glass, select Truss Humen/Glass and enable Receive Humen Reflections. In the Volume, enable Reflections and Transparent Reflections. Glass uses the camera's opaque color for transmission. Enable Opaque Texture in the URP asset if you also use the material with Humen switched off. The Sky override accepts a cubemap for rays that miss the scene. Its default is the scene environment.
High Definition Render Pipeline#
In the active HDRP asset, enable Ray Tracing and Custom Pass. Set Lit Shader Mode to Both so a player build includes the forward material pass used for composition. In the camera's Frame Settings, choose Deferred and enable Ray Tracing, Custom Pass and Motion Vectors.
Use HDRP Lit materials. Set a moving renderer's Ray Tracing Mode to Dynamic Transform. Use Dynamic Geometry for a deforming mesh.
For glass, enable screen-space reflections, transparent reflections and the transparent depth prepass in the HDRP asset. Enable transparent reflections in the camera's Frame Settings. On the transparent Lit material, enable Receive SSR Transparent. In the Humen Volume, enable Reflections and Transparent Reflections.
Transparent reflections use one hardware-traced bounce. Transmission samples the camera color. Opaque rays that miss the scene sample the active HDRI, Gradient or Physically Based lighting sky.
In HDRP 6.0, Humen redraws opaque surfaces after HDRP resolves subsurface scattering. Skin and wax lose the scattering effect in this redraw.
Quality and troubleshooting#
Quality controls the ray and reconstruction budgets. Performance, Balanced, High and Ultra trace 1, 2, 4 and 8 cache rays per active entry. Lower the preset first if GPU time exceeds your frame budget. Ray Length sets the maximum trace distance in world units. Sample Luminance limits bright samples. Zero keeps their full range.
Open the adapter's Examples/Lighting scene to check a working Volume and material setup. In URP, the center cube uses the included Lit Shader Graph. Its node shows how to connect a different graph.
Use the Pipeline Baseline debug view to compare the same camera with its native lighting. In the GPU Profiler, compare warmed-up frames at the same resolution. Diffuse GI and Reflections show each lighting channel. Reprojection Validity shows where the renderer accepts lighting from the previous frame.
If a surface stays black in World Normals, check the camera, material and renderer settings above. If the entire effect is absent, restart the editor, then check the graphics API and the active quality level's pipeline asset. Forward-only cameras and XR use native lighting. See Third-Party Notices.txt in the Humen folder for licenses.