Why is my material function creating a totally black sphere?

I’m following an online tutorial to make a physically-based cel shader, and one part of the tutorial involves a material function to limit the shadows with a dynamic S curve. However, the tutorial does not lay out the specifics of making the function, so I’ve had to eyeball everything to recreate it. In doing so, I seem to not be getting the same results as the tutorial - his has discernable, hard-edged shadows on the example sphere, while mine is pitch black. What am I doing wrong? Included are pictures of my recreation, followed by the tutorial’s function.

Mine:

Tutorials:

1 Like

The graphs aren’t the same :wink:

1 Like

Was getting ready to point that out. Nice eyeballing.

:eye: :glasses:

1 Like

(post deleted by author)

2 Likes

Thanks for catching those! I don’t know how I didn’t let that happen. However, despite fixing up all the issues, I’m still seeing the same problem.

I’m also noticing that every time I restart Unreal, all of my named reroutes disappear except for b. I’m not sure why this is, but it might be related?

1 Like

Disappearing nodes doesn’t sound good.

I would try copying the setup into a new material, or even a new project to check it out.

Yeah, I tried making a new material function like this from scratch, and the nodes started disappearing there too when I closed and reopened the graph. I tried to recreate it in another fresh project - literally a blank template from the Unreal start window - and am seeing similar results, including the entirely black result. None of the reroute nodes disappeared this time, but they all have weird, unconnected lines emerging from them, which I think are where I double clicked on their connection lines to turn them into reroutes in the first place. Of note, I was seeing the pitch black result before even closing the window, so I’m not sure if this restarting weirdness is even related to my main issue. You can see what I’m seeing here:

I’m also noticing all of sudden that the screenshot I took of the original tutorial is actually depicting a graph titled “PP_PBCelShader”, not the graph for the S Curve I thought I was trying to replicate, or even a material function at all it seems, so I might be SOL anyway. Hrm.

1 Like

Very weird. Could be drivers, at a push.

You could try latest studio drivers ( not game ).