#Shading opacity issue

1 messages · Page 1 of 1 (latest)

restive prairie
#

i've been struggling with double sided opacity masks bc the mask works on the front but i just can't get it to work on the back, any tips?

#

btw i'm new to unity but i am an unreal engine user so i can still understand alot

pine kelp
restive prairie
restive prairie
pine kelp
#

If you actually do have an opacity map for alpha, it being not double sided is pretty hard to achieve by accident

restive prairie
#

lemme make a mat in unreal for reference

#

forgot to show the materials modified properties

pine kelp
#

Hard to see the nodes in the screenshot

#

But frankly it'd be simpler and likely more performant to duplicate and flip the geometry and use different materials of the same one-sided shader for both

subtle orbit
#

Honestly, I'd reset all the surface settings to their defaults and use that as a starting point instead.

subtle orbit
# restive prairie

Okay.
Now remove the mask(or just disconnect it from the output in the shader) and take a screenshot again.

restive prairie
subtle orbit
# restive prairie

Okay. One question that pops in mind, is why is the desired shape not done via geometry instead, but nevermind that.

From what I can see, the mask is not applied in the right places, which makes me think that it's a uvs issue or possible with the logic in the shader that leads to the alpha value output(Can't see shit on that nodes screenshot).
Providing the material setup in unreal and a clear screenshot of the shader graph nodes, might be helpful to solving this problem.

restive prairie
#

hopefully better

subtle orbit
restive prairie
#

i only did that because i literally don't know how to make mesh toggles in the creator companion (its the game kit for vr chat avatar creation)

#

and it was the first thing that popped into my head that i thought i could actually do with no knowledge on unity

subtle orbit
#

Then maybe research that.

But anyways. One thing that concerns me right away is that we don't see what uvs are used for the top sample node. I'd assume it's collapsed or something to not display the inputs?

restive prairie
#

ohhh good point, i didn't ever notice that

#

and it was collasped

subtle orbit
#

Another thing is that since the predicates use the same condition and the second one sets a constant value of 1 on false, the second mask is basically never used. I don't know if that's intentional or not, but it sounds like a borked logic.

#

This basically makes all backfaces render all of the time if I get it right.

restive prairie
#

yea it was the issue :/

#

thank you for helping me and i apologize for my stupidity

subtle orbit
restive prairie
#

yes

subtle orbit
# restive prairie

Because it looks nothing like that unreal screenshot... I thought it was supposed to be a reference..?

restive prairie
#

i just hadn't changed the other mat yet

subtle orbit
#

Ah, okay

#

Well, glad you got that solved.