Hiya,
I have a problem in the shader, where I cannot multiply the noise used for displace along normal. It seems that whenever I connect the multiply everything breaks.
I only want the displacement to be along the blue not the red. There is the attached file and pictures for reference.
What's wrong with the setup? I'm sure it can be done this way.
:\
Fresnel Displacement
4436 6 0-
- thinkSHEEP
- Member
- 4 posts
- Joined: March 2012
- Offline
-
- tamte
- Member
- 9416 posts
- Joined: July 2007
- Offline
you cannot use I variable since it is not accessible in displacement context
but you can use P which is by default in camera space therefore acts as I for primary rays
so just plug P to your negate1 node, then connecting the complement1 to multiply3 will not produce any warning and shader will work as you expect
however for secondary rays it may not behave as you want
but you can use P which is by default in camera space therefore acts as I for primary rays
so just plug P to your negate1 node, then connecting the complement1 to multiply3 will not produce any warning and shader will work as you expect
however for secondary rays it may not behave as you want
Tomas Slancik
CG Supervisor
Framestore, NY
CG Supervisor
Framestore, NY
-
- thinkSHEEP
- Member
- 4 posts
- Joined: March 2012
- Offline
-
- tamte
- Member
- 9416 posts
- Joined: July 2007
- Offline
thinkSHEEPif you place Global Variables node and change it's context type to Displacement you will not see any I variable
Thanks for the answer, I didn't know the I variable can't be displaced. …?
thinkSHEEPyes, because P is in camera space so position of each sampled point will be vector from camera to that point so exactly what I represents
…
Hmm.. If I use P, will I still be able to get that “fresnel”-ing effect?
Like the blue on the outside and the reddish on the inside.
…
(it will be different for secondary rays however)
thinkSHEEPexactly, or through refraction
…
…
Also, by secondary rays, you mean the look of the weapon in some other geometry's reflection?
Tomas Slancik
CG Supervisor
Framestore, NY
CG Supervisor
Framestore, NY
-
- thinkSHEEP
- Member
- 4 posts
- Joined: March 2012
- Offline
-
- tamte
- Member
- 9416 posts
- Joined: July 2007
- Offline
the position will still represent ray from camera to shading point, however “I” would represent new, bounced ray which goes from previous shading point in reflected direction
so object in reflection by using P will not necessarily have falloff to edge but rather it would be the same falloff as from camera just looking at it from different angle
so object in reflection by using P will not necessarily have falloff to edge but rather it would be the same falloff as from camera just looking at it from different angle
Tomas Slancik
CG Supervisor
Framestore, NY
CG Supervisor
Framestore, NY
-
- thinkSHEEP
- Member
- 4 posts
- Joined: March 2012
- Offline
tamte
…however “I” would represent new, bounced ray which goes from previous shading point in reflected direction
so object in reflection by using P will not necessarily have falloff to edge but rather it would be the same falloff as from camera just looking at it from different angle
I don't really get it. Hmm.. is it possible to work out an example file from the file above?
-
- Quick Links

