Jump to content

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.




Link to comment
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
Link to comment
Share on other sites

  • 1 month later...

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...