Texture only visible in shadow solution needed.

Blender (Export script developed by yoyoz; Integrated Plugin developed by JimStar)
Post Reply
User avatar
Greggers
Licensed Customer
Posts: 149
Joined: Wed Feb 15, 2017 9:51 pm

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?
linograndiotoy
OctaneRender Team
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.
User avatar
jobigoud
OctaneRender Team
Posts: 244
Joined: Sat Aug 15, 2015 1:28 pm

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.
User avatar
Greggers
Licensed Customer
Posts: 149
Joined: Wed Feb 15, 2017 9:51 pm

Yes. I want to be able to add a texture that is only revealed in the shadow. Maybe using the shadow pass as a mask? Regards the depth, yes the zdepth pass will be useful there.
linograndiotoy
OctaneRender Team
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.
User avatar
Greggers
Licensed Customer
Posts: 149
Joined: Wed Feb 15, 2017 9:51 pm

Thanks Lino. Going to experiment.
Turck
Licensed Customer
Posts: 30
Joined: Thu Jul 11, 2019 10:56 am

Any new insights?
Turck
Licensed Customer
Posts: 30
Joined: Thu Jul 11, 2019 10:56 am

I would like to revive the question. I can't get it to work. Has anyone had success with this?
pegot
Licensed Customer
Posts: 934
Joined: Mon Nov 07, 2011 3:44 am

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.
Can you show the exact set up and placement for that? I'm unfamiliar with either of these nodes.
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)
Post Reply

Return to “Blender”