Archive 17/01/2023.

SHLighting testing

Lumak

Reading this document, http://www.research.scea.com/gdc2003/spherical-harmonic-lighting.pdf, for the 1st time was confusing, but once I started coding what was in the doc it made more sense.
I’m also using https://code.google.com/archive/p/understanding-the-efficiency-of-ray-traversal-on-gpus/ for a little bit of speed up.

I’ve been working on this for a less than a week and still got a lot of work remaining, but would like to show my progress anyway.

My sample scene - normal lighting

Sample scene - SH lighting tech: diffused unshadowed transfer

Close up, normal lighting

Close up, SH lighting: diffused unshadowed transfer

I hope you can see the shading on the SH lighting images.

To do next:
-shadowed diffuse transfer
-interreflective transfer

Edit: added SH lighting technique for images.

sabotage3d

This is awesome! I have tried something similar before. Have you captured the shadows in addition to the diffuse lighting? It is also possible to capture Ambient Occlusion and Color Bleeding.

Lumak

I have completed the “shadowed diffuse transfer” which is essentially AO and currently working on “diffuse interreflected transfer” which does color bleeding.

I might have some more images in a day or two.

sabotage3d

Nice. How is the FPS?

Lumak

No change in the frame rate. SH is written to vertex color and rendered using DiffVCol technique.

Lumak

Update - all images using 100 SH samples and rendered using diffVCol
Huge limitation using vertex color, especially if the mesh are not high quality.

normal lighting

diffused unshadowed transfer

shadowed diffuse transfer

diffuse interreflect transfer

Lumak

Created a repository - https://github.com/Lumak/Urho3D-1.4-SphericalHarmonicLighting/ if anyone is also interested in this topic.

sabotage3d

Thanks a lot Lumak. Using SH as vertex color is quite limited, it looks a lot better if used as multiple light probes: http://blogs.unity3d.com/2011/03/09/light-probes/