CSE 168 Final Project Milestone
Transmission
I have (almost) implemented microfacet transmission using the GGX distribution model1 with BSDF importance sampling. The relevant commands are transmittance <r> <g> <b>
and ior <x>
. The transmission seems to be working correctly with roughness, and refraction kind of works, as illustrated by the following demo image (modified from the test GGX scene file for Homework 4).
GGX spheres and planes: The sphere on the left has ior 1
and roughness 0.25
, and seems to be working okay (at least it passes the test by casual eye). The plane in the middle has ior 1.2
and roughness 1
, but it’s weirdly bright. Finally, the plane on the right has ior 1
and roughness 0.001
, and it seems fine.
Unforunately, “kind of works” is doing some heavy-lifting here.
GGX spheres and planes: Same as before, but all with ior 1.5
. Evidently, not all is right. No clue what’s going on with the sphere on the left.
However, I would like to note that all of these effects were attempted without photon mapping. I initially wanted to experiment with extending previous techniques to transmission, just to see how feasible it would be. As such, the NEE is completely wrong, and even wholly transparent objects will cast shadows.
GGX spheres and planes: Additional plane on the right with specular 0 0 0
, transmittance 1 1 1
, roughness 0.001
, and ior 1
. Spooky shadow…
Turning off NEE and increasing the number of samples, we do get something “decent.” The spooky shadows are gone, and the purple translucent plane now casts a purple shadow. So everything seems mostly correct. Refraction still seems mostly broken, though.
GGX sphers and planes: Same as before, but with nee off
and spp 2048
.
ℹ️ Update: 5/31/2024
I got refraction working :) Again, without NEE.
GGX spheres and planes: Yay! The ball on the left is supposed to replicate glass, with ior 1.5
. It accurately flips the image behind it. Note that the refraction here doesn’t make much sense. Planes are treated as faces of some larger object. So rays hitting the planes are treated as entering some object, but since there’s no back face, they just… stay refracted. To model a thin piece of glass, we should place backwards facing planes behind each of the planes. But then the refraction effect would be almost unnoticeable, so that is not done here for the sake of demonstration.
Photon Mapping
Turning off NEE and relying on brute force is pretty impractical, so I imagine this is where photon mapping comes into play. I’ve only just started reading into it, though, so I’m still not totally sure. Hence I have nothing to show related to photon mapping right now.
References
-
Bruce Walter, Stephen R Marschner, Hongsong Li, and Kenneth E Torrance. 2007. Microfacet models for refraction through rough surfaces. In Proceedings of the 18th Eurographics conference on Rendering Techniques. 195–206. https://www.cs.cornell.edu/~srm/publications/EGSR07-btdf.html. ↩