← All ideas
  • Published 26 Mar 2020

Irradiance Volume baked data — export or access with Python API

Baked irradiance volume data is useful not just when rendering in Blender, but when rendering a model exported from Blender, later in the production process. Global illumination makes a huge difference in a render, and currently we lose all of that quality when exporting models to realtime engines. Comparison from a recent GDC talk , attached below. My screenshot comparison isn't totally fair, including volumetric lighting, but GI does help a lot. 😇

I'd like to be able to bake high-quality lighting with an irradiance volume in Blender, then:

  • (A) Export irradiance volume data directly to a file.
  • (B) Read irradiance volume data with the Python API.

Even (B) would be fine, since addon authors could then use the data to export to a file as needed. I don't think there is an established file format for that type of data (maybe an array or texture representing spherical harmonics for each probe?), so perhaps Python API access is the right place to start. We've also gotten this as a feature request on the Blender glTF addon .

Artboard 2.png

100%

Development Status: Open

Upvote 17 Downvote 0
donmccurdy
26 Mar 2020

7 Comments

azad1

I would like to know if you find any way. What I want to do is to import it into unity in runtime.

zhixson.xbdi

I think most engines support similar features. Instead of baking in Blender, bake in Unity, Unreal, or Godot and you will get the same effect using GI volumes/probes depending on the engine you are using.

Vyach

* @Zach Hixson * You are right, but, for example, Blender allow to distribute probes as vertex instances. So I can easily make any kind of grid for probes. I don`t think other sodtware can do it same way.

Real example. Long cave, I need probes near walls. Blender way: duplicate cave mesh. Hardly decimate, displace inside, instance ligtprobe from vertexes. Edit a little positions.

Or curve, type=poly, bend along cave, bevel it, instance probes from vertexes.

{attachment 33282653jpg}

I hope, now you see, why baking probes in blender are much easier.

2
zhixson.xbdi

* @ Vyacheslav * I do see how this could be easier, but at the same time I think that writing a unity tool script to build probes along curves might suit you better, as the bake data would be native to unity, and save you a lot of intermediate bake files.

1
donmccurdy Author

* @Zach Hixson * Unfortunately these tools don't allow you to export that GI data, and I'm not aware of any engine-agnostic tools that do. I'm one of the developers of three.js , an open source 3D graphics library for WebGL. Unlike a native game engine, we don't have a "compile" step where baking can happen: a scene is running in a web browser, and needs to display immediately.

We encourage users to create models in Blender because its glTF support is optimized for that — even relatively complex models can be loaded quickly.

Realtime GI generally needs to be precomputed. Of the tools able to do that, Blender seems to be the only one where allowing users (and Blender addons) to access that data would be compatible with the goals of the project.

4
perludum

* @Don McCurdy * I definitely support this request. It would be really great if we could read baked Irradiance Volume data with the Python API in Blender. From there on we could write exporters bringing this kind of data to any (independent) engine.

2
zhixson.xbdi

* @perludum * Yeah, the more I hear about it from other people the more I agree. As a programmer myself, having access to any type of generated data is incredibly important, so not having access to use already processed data how you want is definitely a downside.

4