Texture only visible in shadow solution needed.

Forums: Texture only visible in shadow solution needed.
Blender (Export script developed by yoyoz; Integrated Plugin developed by JimStar)

Texture only visible in shadow solution needed.

Postby Greggers » Sat Mar 05, 2022 11:43 pm

Greggers Sat Mar 05, 2022 11:43 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?
User avatar
Greggers
Licensed Customer
Licensed Customer
 
Posts: 149
Joined: Wed Feb 15, 2017 9:51 pm

Re: Texture only visible in shadow solution needed.

Postby linograndiotoy » Fri Mar 11, 2022 11:36 am

linograndiotoy Fri Mar 11, 2022 11:36 am
It would be great if you could be more specific, with real examples about the final result you would like to get.
linograndiotoy
OctaneRender Team
OctaneRender Team
 
Posts: 1155
Joined: Thu Feb 01, 2018 7:10 pm

Re: Texture only visible in shadow solution needed.

Postby jobigoud » Fri Mar 11, 2022 12:35 pm

jobigoud Fri Mar 11, 2022 12:35 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
jobigoud
OctaneRender Team
OctaneRender Team
 
Posts: 230
Joined: Sat Aug 15, 2015 1:28 pm

Re: Texture only visible in shadow solution needed.

Postby Greggers » Sat Mar 12, 2022 8:03 am

Greggers Sat Mar 12, 2022 8:03 am
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.
User avatar
Greggers
Licensed Customer
Licensed Customer
 
Posts: 149
Joined: Wed Feb 15, 2017 9:51 pm

Re: Texture only visible in shadow solution needed.

Postby linograndiotoy » Sun Mar 13, 2022 9:34 am

linograndiotoy Sun Mar 13, 2022 9:34 am
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.
linograndiotoy
OctaneRender Team
OctaneRender Team
 
Posts: 1155
Joined: Thu Feb 01, 2018 7:10 pm

Re: Texture only visible in shadow solution needed.

Postby Greggers » Sun Mar 13, 2022 11:11 am

Greggers Sun Mar 13, 2022 11:11 am
Thanks Lino. Going to experiment.
User avatar
Greggers
Licensed Customer
Licensed Customer
 
Posts: 149
Joined: Wed Feb 15, 2017 9:51 pm

Re: Texture only visible in shadow solution needed.

Postby Turck » Mon May 02, 2022 9:15 am

Turck Mon May 02, 2022 9:15 am
Any new insights?
Turck
Licensed Customer
Licensed Customer
 
Posts: 23
Joined: Thu Jul 11, 2019 10:56 am

Re: Texture only visible in shadow solution needed.

Postby Turck » Wed Oct 05, 2022 3:34 pm

Turck Wed Oct 05, 2022 3:34 pm
I would like to revive the question. I can't get it to work. Has anyone had success with this?
Turck
Licensed Customer
Licensed Customer
 
Posts: 23
Joined: Thu Jul 11, 2019 10:56 am

Re: Texture only visible in shadow solution needed.

Postby pegot » Wed Oct 05, 2022 11:59 pm

pegot Wed Oct 05, 2022 11:59 pm
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)
pegot
Licensed Customer
Licensed Customer
 
Posts: 921
Joined: Mon Nov 07, 2011 3:44 am

Return to Blender


Who is online

Users browsing this forum: No registered users and 11 guests

Fri Apr 19, 2024 7:10 pm [ UTC ]
cron