Jump to content
Sign in to follow this  
marcosimonvfx

technical: How are geometry lights rendered

Recommended Posts

Hi all,

this is a technical question to help me understand what's going on under the hood about how geometry lights are rendered:

 

I am playing with writing my own raytracer within Houdini, where I also want to use geometry lights. The way I go about it is that each shaded point does a shadow test to a randomly generated point on the surface of the light geometry. As this happens completely at random it is somewhat likely that the generated point will lie on the far side of the geometry, so the light geometry itself will cast a shadow (self shadow on). This results in the first attached picture.

This makes sense to me - if you consider a shaded point on the wall behind the turquoise cube - it has only a 1/6th chance of generating a point on that cube that it can actually see whereas a point to the top and right of that point sees 3 sides of the same light geometry, therefore it has a higher chance of generating a point it is illuminated by.

This is not what I would imagine seeing in real life (though maybe my conception is wrong). However when I rebuild and render the scene in Houdini/Mantra (type geometry with a box as geo and self shadow on), the result is very different (see attachment 2).

 

Maybe someone can shed a light on how Mantra does its magic.

Cheers!

selfShadow01.jpg

selfShadow02.jpg

Share this post


Link to post
Share on other sites

maybe look at files like:

$HFS/houdini/vex/Light/sampler_geometry.vfl

$HFS/houdini/vex/Light/tracer_geometry.vfl

$HFS/houdini/vex/include/pbr_direct_lighting.h

and others in there, and hopefully you will find some useful info in there

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×