I am trying to get a direct refract through LPEs.
I did get the whole refraction result with:
C<TG>.*
Can anyone help me to just the direct refraction?
Thanks.
Light Expression Help with refractions
4361 6 0- mzigaib
- Member
- 948 posts
- Joined: April 2008
- Offline
- mzigaib
- Member
- 948 posts
- Joined: April 2008
- Offline
- dlee
- Staff
- 418 posts
- Joined: Sept. 2016
- Offline
Hi. The distinction between direct and indirect is the number of scattering events. If there's only one between the camera and the light, then it's direct. If there's more, then it's indirect.
So, direct refraction could be:
C<TG>L
Indirect refraction:
C<TG>.+L
You could substitute
So, direct refraction could be:
C<TG>L
Indirect refraction:
C<TG>.+L
You could substitute
[LO]
for L
if you want to count emissive objects as lights.
- tamte
- Member
- 8532 posts
- Joined: July 2007
- Online
- jsmack
- Member
- 7741 posts
- Joined: Sept. 2011
- Offline
dlee
Hi. The distinction between direct and indirect is the number of scattering events. If there's only one between the camera and the light, then it's direct. If there's more, then it's indirect.
So, direct refraction could be:
C<TG>L
Indirect refraction:
C<TG>.+L
You could substitute[LO]
forL
if you want to count emissive objects as lights.
Closed form solids are unlikely to have any direct refract events reach the camera. I've found a good substitute for ‘direct’ scatter in the pathtracer's definition is for direct from an artist's perspective. Where the path is defined as a ray that interacts with the refractive surfaces only before reaching a light source. This way light coming through a window or glints in a rain drop would be described by this event. The question is, do you also put internal reflections in this bucket? As gemstone ‘fire’ is more of an internal reflection that's transmitted back through, i.e. TRT, or TRRT etc.
- mzigaib
- Member
- 948 posts
- Joined: April 2008
- Offline
Dudes! Thank you very much for the feedback.
That seems to work but it seems that mantra works differently in the direct refraction I don't get the blueish color that I have in my interior volume and speculars are a little different even using the same shader and lighting but I think that is normal.
Anyway thanks again for the help.
That seems to work but it seems that mantra works differently in the direct refraction I don't get the blueish color that I have in my interior volume and speculars are a little different even using the same shader and lighting but I think that is normal.
Anyway thanks again for the help.
- tamte
- Member
- 8532 posts
- Joined: July 2007
- Online
jsmackso you mean something like
I've found a good substitute for ‘direct’ scatter in the pathtracer's definition is for direct from an artist's perspective. Where the path is defined as a ray that interacts with the refractive surfaces only before reaching a light source.
lpe:C<TG>+L
lpe:C<TG>[^<TG>].*L
EDIT: embedded lpes as code as they were not showing correctly
Edited by tamte - Sept. 25, 2020 11:37:48
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
-
- Quick Links