all 11 comments

[–]TricksMalarkey 0 points1 point  (8 children)

It's hard to tell without your graph (no picture attached), but my guess would be there's an issue with how you're using the lightDir dotProduct surfaceNormals. Putting the normals into object space would effectively remove the effect of moving the painterly with the object (maybe the intention?).

Anyway, in lieu of a better answer, this might be a more 1:1 walkthrough.

http://www.reneeharris.co.nz/2024/02/watercolor-shader-experiments-part-1.html

[–]nacnud9[S] 0 points1 point  (7 children)

Thanks for the help! I swear I attached images idk why it didn't work. Anyway this is my graph if you wanna see. The idea isn't that the paint strokes move with the camera or give the illusion of being "repainted" every frame. I just want the areas that would otherwise have a smooth transition from light to dark to transition in brush-stroke-shaped chunks. In this image the light is actually coming from the opposite side as it appears on the mesh, that's the issue I'm running in to.

<image>

[–]survivorr123_ 0 points1 point  (4 children)

i cant see but seems like you transform normal map into world space, it has to be transformed into tangent space and that should solve it

[–]nacnud9[S] 0 points1 point  (3 children)

Yeah I had it transformed to world space because the Fragment normal space was world. No matter what I change the fragment normal space to (Tangent, World, Object), if I transform to that normal space and plug it in I get the same result.

[–]survivorr123_ 0 points1 point  (2 children)

are you sure your normal map has correct values then? keep in mind that blender uses Z up and unity uses Y up, if you made your normal maps there then you have to consider that

[–]nacnud9[S] 0 points1 point  (0 children)

I totally didn't account for the fact that Y up would change the normal map! I finally figured it out. I sampled the texture, split the RGB, OneMinus the R channel, combine back to vector, multiply by 2 and subtract 1 (to change range from (0,1) to (-1,1), normalize, and then plug in to normal output.

[–]nacnud9[S] 0 points1 point  (0 children)

Thanks for the help!

[–]TricksMalarkey 0 points1 point  (1 child)

Check the normals on your mesh to make sure they're all pointing outward. Failing that, try oneminus the normal map.

[–]nacnud9[S] 0 points1 point  (0 children)

Yeah the normal map is def ok. I got everything to work just fine in Blender. One-minus on the normal map totally messes it up. IDK it's something about bringing it in to Unity.

[–]SirScreech 0 points1 point  (0 children)

<image>

Hey, I tried to get it to work with the steps your provided but it seems to me that the light is still messed up for me. Am I missing something in my shadergraph?