Skip to content

Environment Probes

tobspr edited this page Apr 15, 2016 · 9 revisions

Environment probes capture the scene from a given point of view. They render their surroundings into a cubemap, which is then used in the main pass to provide more accurate reflections and also some sort of global illumination (although very approximate).

To be able to use environment probes, you have to enable the envprobes plugins, either via the [Plugin Configurator](Plugin Configurator) or in config/plugins.yaml.

Creating Environment Probes

There are two possibilities for creating environment probes:

In Blender

To create an environment probe in blender, press space and enter Add Empty. Select the Add Empty option, and then select Cube. You should now see a wireframe cube in your level. You can now scale, move and rotate it to fit your needs.

Important: You need to name the object ENVPROBE (If you have multiple environment probes, blender will add .001, .002 and so on, but thats fine) to make sure the render pipeline knows its an environment probe.

When you finally exported your model, and want to load it, be sure to call render_pipeline.prepare_scene(my_model) after loading your model. This will register your environment probe.

In Python

If you want to create an environment probe manually, you can do so with the following code (For an explanation of the options, see below):

probe = self.render_pipeline.add_environment_probe()
probe.set_pos(Vec3(1, 2, 3))
probe.set_scale(Vec3(10, 10, 5))
probe.set_hpr(Vec3(0, 0, 90))
probe.border_smoothness = 0.05
probe.parallax_correction = True
Clone this wiki locally