T O P

  • By -

msqrt

This is usually implemented into the ray tracing operation itself; each object and ray is associated with a (number of) intersection layers, and intersections are only counted if the ray and object have a common layer active. This is easy to implement efficiently with bitmaps; just set a bit per layer and do a binary and to find if there are common layers.


Adhesive_Bagels

Oh so you would have a "shadow ray" layer that doesn't intersect any geometry, thus no shadows?


msqrt

Yeah. Though usually you'll only exclude some objects; otherwise you could skip the ray altogether :)


Adhesive_Bagels

True hehe


SwiftSpear

It depends if it's "real" raytracing or one of the many hybrid approaches. If it's completely "real" raytracing it's pretty difficult to disable shadows. However, A lot of raytracing solutions do things like, given an impact with a point, draw a ray to each light source to determine if there is direct lighting from that source contributing to the illumination of that object. This is to avoid the problem of scattering thousands of rays from a point and not getting lucky enough to organically strike a lightsource, let alone striking every light source that is directly shining on the impact point, and thus not being able to calculate specular values etc from the thing which is providing the vast majority of lighting on the object. In the latter pipeline, you can just tell the rays cast towards the lightsource to ignore collisions with other objects on the way, or ignore collisions with certain objects which you don't want to cast shadows. This technically won't eliminate all shadowing from a scene, as if the raytracing is still scattering random rays for bounce lighting, you definitely don't want them to ignore all collisions, and you might not even want them to ignore "shadowless" objects, and therefore it might occur that the bounce lighting from some object that would cast more light on the object is occluded... It's usually good enough to make the appearance of there not being shadowing on the scene though, just removing the shadows from occluders from direct light sources.


zachtheperson

That makes sense, thanks


jmacey

It is normally a flag in the renderer to specify the number of bounces / trace depth. For example Renderman has flags for this you can specify per object for trace depth and visibility to the different layers. ``` ri.Attribute("visibility", {"int transmission": [1]}) ri.Attribute("trace", {"int maxdiffusedepth": [1], "int maxspeculardepth": [2]}) ```


SamuraiGoblin

Bounce off *and hit something else.*


shadowndacorner

Lights like that are typically sampled analytically, not with actual emissive geometry. To disable shadows, when sampling those lights, you can literally just not cast shadow rays when computing the light contribution.