Jump to content
Sign in to follow this  

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.




Share this post

Link to post
Share on other sites

maybe look at files like:




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

  • Like 1

Share this post

Link to post
Share on other sites
Posted (edited)

I never thanked you for these! Thanks!

I didn't quite find what I was looking for, but I found my answer eventually in the raytracing gems book: http://www.realtimerendering.com/raytracinggems/ [page 216ff].

Tldr: Instead of shooting rays to the points on the lightsource, trying to see if they reach the point only the direction is taken and a ray shot in that direction. If the ray hits the lightsource (no matter where) then it's good.



Edited by marcosimonvfx

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