Babylon.js: Global illumination baking engine

Created on 22 Mar 2019  路  15Comments  路  Source: BabylonJS/Babylon.js

Implement a static global illumination solver, only for diffuse lightning in the first place.
Several algorithms could be tried, voxel GI, photon mapping/path tracing, light propagation volumes, virtual pointlights, metropolis light transport...

Leverage webassembly for low-level operations ?

enhancement rendering engine

Most helpful comment

Progressive radiosity is looking pretty sharp so far !

https://drive.google.com/file/d/1JcY1IYmiKKqh1XZNKWymbWpjLYkSLXVz/view?usp=sharing

All 15 comments

As discussed offline: yeah!!

Progressive radiosity is looking pretty sharp so far !

https://drive.google.com/file/d/1JcY1IYmiKKqh1XZNKWymbWpjLYkSLXVz/view?usp=sharing

WOOOOT! can't wait to try it!! Why is it blinking?

i interleaved some renders of the scene during the baking process to see the progress. Somehow the framebuffer is cleared by something making it blink. Will fix it for nicer viewing :)

What have you planned about the workflow: is the lighting will be computed each time scene is loaded, or is it be saved to a cache system, allowing final user to load lighting without calculation?

@Vinc3r for now i'm focusing on making the baking work on the fly. Then i'll work on exporting the created lightmaps, and probably other baking info like spherical harmonics on probes.

Some news?? CAN'T WAIT TO TRY IT ;D

CAN鈥橳 WAIT AS WELL =D

Some updates for you guys :
The radiosity renderer is working pretty well, but still needs strong prerequisites. We need to have proper lightmap uv coordinates on all meshes, that share the same scale (1 texel side should approx. be 0.25 m in the world scale).
We also need to split meshes into "surfaces", that share the same lightmap bit, without occluding each other.
Finally, since I'm using spherical projection for the visibility pass, i need to retesselate the scene at a higher resolution to limit distortion from the rasterization. I'm doing this on the fly, but i don't know how many triangles i can handle before it crashes horribly.

So as you can see, there is still a lot of work, but i'm hoping i can tackle all of this. Biggest work imo is the automatic UV mapping, but I think i can port some code from Blender.

I'll keep you in touch.

Some news?? CAN'T WAIT TO TRY IT ;D

Looking at this question from another angle, why can't it interface with the existing open source raytracing renderer?

The raytracing renderer may not necessarily run on the web.

@FishOrBear I think regular lightmap support for baking in offline renderers is already supported: https://doc.babylonjs.com/babylon101/lights#lightmaps

Maybe this project is of interest aswell: https://lighttracer.org/

I was just wondering if this is it still active?

Some news?? CAN'T WAIT TO TRY IT ;D

Was this page helpful?
0 / 5 - 0 ratings