Most BSDFs in the room are blended between diffuse and glossy, while photon mapping does not play well with non-diffuse BSDF. To overcome this, I added BSDF lobe splitting, so that vertex merging can still be performed if the BSDF contains at least 1 diffuse lobe. It works well!
I realize I havent been very public about what ive been going the last 14 months: Ive been building a new 2D game engine called Phobos for our game studio @quelsolaar . 4 month ago we started making a game with it, and the plan is for the source to be included with the game.
There are too many sampling strategies in my renderer that I am no longer confident in adding a new strategy without breaking old ones. A chi^2 test for goodness of fit is useful in this case and has helped me finding a new bug in dielectric sampling code, even after 10 years...
@vfxpro88 Unfortunately this is an offline render. I do believe this can be made real-time though. It's cost is basically an extra microfacet BSDF evaluation.
Implemented BSDF evaluation and PDF query for microfacet-based normal mapping to support more light transport algorithms. For dielectrics, I need to make some adjustments to the equations in the original paper. Now I need to find a beautiful scene and test it.😉
@turtlespook Regular normal mapping simply replace the normal with a tabulated one, so it's not physically based. Microfacet-based normal mapping works like a lenticular card--the surface appears bumpy because there are tiny facets facing a different direction from the geometric normal.
@tigratigratigra The normal map is from their supplemental material dl.acm.org/doi/suppl/10.1…
The rest is in my custom scene format. Walls: 10x10, gold (GGX, alpha=0.16), white (Lambertian diffuse, albedo=0.7); glass ball: r=2.5 (IoR=1.5); area light: 4x4, tilted 30 degrees (500 Watts).
First sensible output with microfacet-based normal mapping in Photon-v2 renderer. If the geometry comes with flat normal/tangent, it can preserve symmetricity for bidirectional light transport out of the box.
Priority based nested dielectrics can also be used for disambiguating overlapping volumes. In the following image, the blue sphere has the highest priority, followed by green and red spheres. Medium properties are obtained from the volume with highest priority.
Tracking medium interfaces was not as easy as I originally thought. Anyway, this is the Utah teapot with simple dielectric material, attenuated by Beer's law. Next step will be trying to put some liquid in there 🥹
Several years ago I implemented Laurent Belcour's layered BSDF, and its smooth appearance always makes me happy. Sadly, I still cannot reproduce the volumetric part.
@clabaultt@TzuChieh_Chang Planar is not an option in a general setup. If you really wanna go with IDs I'd check at least for inverted normals. However a rejected ray is still a wasted ray.
Testing my bisection-based self-intersection avoidance algorithm on an interior scene (40 spp). Overall, we see ~12% increase in execution time. On average there are 3 re-intersections per hit event (2 iterations). I think I'll take that... 🤔