Hi,
Is there a way I can only make a materials texture appear in shadow ie opposite from the light source?
Another question I hope to have answered, using the new aov system, is there a way to use camera depth to control a materials visibility on a model using the depth pass?
Texture only visible in shadow solution needed.
- linograndiotoy
- Posts: 1350
- Joined: Thu Feb 01, 2018 7:10 pm
It would be great if you could be more specific, with real examples about the final result you would like to get.
My guess is they are looking for a way to show a certain texture only in the parts of the model that are not directly illuminated by the light source.
There is an AOV that gives the direction of the light source, maybe there is a way to composite that with the local normal with a dot product to determine if these two vectors go in the same direction (if they go in the same direction that part of the model is facing opposite the light source).
For material visibility based on depth you should be able to use the Z depth texture, plug it into a Compare texture and return 1 or 0 based on a distance threshold. Then plug that in the material opacity.
There is an AOV that gives the direction of the light source, maybe there is a way to composite that with the local normal with a dot product to determine if these two vectors go in the same direction (if they go in the same direction that part of the model is facing opposite the light source).
For material visibility based on depth you should be able to use the Z depth texture, plug it into a Compare texture and return 1 or 0 based on a distance threshold. Then plug that in the material opacity.
- linograndiotoy
- Posts: 1350
- Joined: Thu Feb 01, 2018 7:10 pm
Yes, you should use the shadow pass for something like that.
Last edited by linograndiotoy on Tue May 03, 2022 1:04 pm, edited 1 time in total.
Can you show the exact set up and placement for that? I'm unfamiliar with either of these nodes.jobigoud wrote:For material visibility based on depth you should be able to use the Z depth texture, plug it into a Compare texture and return 1 or 0 based on a distance threshold. Then plug that in the material opacity.
Win 10
3.7Ghz i9 10900k / 64GB
ASUS STRIX Z490-E
PSU: PowerSpec 850Wd
RTX 3090 Asus Tuff
Network rendering:
Win 10
4.2Ghz i7 7700k / 64GB
AsRock SuperCarrier
PSU: EVGA 1200w
RTX 3080 Ti EVGA Hybrid
RTX 3080 ASUS Tuff
GTX 1080ti SC Black (wc)
3.7Ghz i9 10900k / 64GB
ASUS STRIX Z490-E
PSU: PowerSpec 850Wd
RTX 3090 Asus Tuff
Network rendering:
Win 10
4.2Ghz i7 7700k / 64GB
AsRock SuperCarrier
PSU: EVGA 1200w
RTX 3080 Ti EVGA Hybrid
RTX 3080 ASUS Tuff
GTX 1080ti SC Black (wc)