<p>If a ray intersect a transparent object (regardless of the order) multiply by the colour to get proper attenuation, then continue. Note that the order does not matter. The other options is to ignore transparent objects and check for occlusion. Only if there's no occlusion intersect the set of transparent objects only without caring about order once again, and at each such intersection attenuating by the respective colour.</p>
<p>If the transparent object is a dielectric then you need to trace in order with refraction. See for example: <a href="https://graphics.stanford.edu/courses/cs148-10-summer/docs/2006--degreve--reflection_refraction.pdf" rel="nofollow noreferrer">https://graphics.stanford.edu/courses/cs148-10-summer/docs/2006--degreve--reflection_refraction.pdf</a></p>

CC BY-SA 4.0
2021-06-23T08:09:33.087Z
2021-06-23T10:50:00.217Z
2021-06-23T10:50:00.217Z
lightxbulb
<p>As the title above. I am trying to sampling direct light and indirect light. But I have many transparent objects in scene, it's very likely to block the testing ray. To my understanding, it's not good to give up the testing ray if the blocking object is transparent. Because it still have very large chance to hit light source after coming out from transparent object. But I don't know what exactly should I do to make it correct and unbiased.</p>
<p>So, what is the best practice for direct light and transparent object?</p>

CC BY-SA 4.0
2021-06-22T23:15:16.227Z
What do you mean by transparent object? Do you mean a dielectric interface? If this is purely transparent (e.g., opacity mask for BRDFs) then you must continue your ray, otherwise you must reflect/refract according to the dielectric properties.
Hubble
CC BY-SA 4.0
2021-06-23T03:14:54.303Z
Yeah, it could be dielectric for example. Are there anything I should do to make it unbiased. @Hubble
iaomw
<raytracing><importance-sampling>
When sampling direct light, what to do if testing ray been blocked by transparent object?
iaomw
# When sampling direct light, what to do if testing ray been blocked by transparent object?

(Asked by: username_0 on 2021-06-22)

As the title above. I am trying to sampling direct light and indirect light. But I have many transparent objects in scene, it's very likely to block the testing ray. To my understanding, it's not good to give up the testing ray if the blocking object is transparent. Because it still have very large chance to hit light source after coming out from transparent object. But I don't know what exactly should I do to make it correct and unbiased.

So, what is the best practice for direct light and transparent object?

**Tags:** raytracing, importance-sampling

> **Comments:**
> **username_1**: What do you mean by transparent object? Do you mean a dielectric interface? If this is purely transparent (e.g., opacity mask for BRDFs) then you must continue your ray, otherwise you must reflect/refract according to the dielectric properties.  
> **username_0**: Yeah, it could be dielectric for example. Are there anything I should do to make it unbiased. @username_1  

---

## 1 answers

### Answer by username_2 on 2021-06-23. Score: 2

If a ray intersect a transparent object (regardless of the order) multiply by the colour to get proper attenuation, then continue. Note that the order does not matter. The other options is to ignore transparent objects and check for occlusion. Only if there's no occlusion intersect the set of transparent objects only without caring about order once again, and at each such intersection attenuating by the respective colour.

If the transparent object is a dielectric then you need to trace in order with refraction. See for example: <https://graphics.stanford.edu/courses/cs148-10-summer/docs/2006--degreve--reflection_refraction.pdf>


---

