Voxel Cone Tracing Global Illumination
Howto: setup existing project with Voxel Cone Tracing GI
Reference Stride.Voxels
Since Stride is modular based, we need to add a reference to Stride.Voxels
plugin:
In the Solution Explorer, right-click on the user project
Select
Add Dependency
Select
Stride.Voxels
in the list and pressOK
You might be asked if you want to reload project, choose whichever option, both are OK.
Graphics Compositor
Voxel Cone Tracing requires several changes to the graphics compositor.
To make this easier, we prepared a graphics compositor ready to use with Voxel GI in the asset templates:
In the Asset View, click
Start to type
Voxel
in the search barSelect
Graphics Compositor (Voxel Cone Tracing)
In your
Game Settings
asset, change the graphics compositor to the newly created one:
Setup scene: Volume and Light
In the scene explorer, above the Entity Tree, click the icon and select
Lights
thenVoxel volume
Click the icon again and select
Lights
thenVoxel light
At that point, the scene rendering will likely crash due to the light not being setup correctly (with error
No Voxel Volume Component selected for voxel light.
), but that's expected.In the property grid, change the Light Volume to the previously created entity:
At that point, you can click the
Resume
button in scene renderer, and everything should be setup!
Play with it
To do a quick test, you can disable Skybox light (keep only directional light), go in shadow area and see if some ambient light spread there. You can also play with emissive materials.
Video tutorial
Here's a youtube alternative tutorial made by David Jeske on how to set it up: