mayamatrix
I'm trying to achieve an anime style toon shader but need help on how to proceed.

My goal is the fantastic looking "Guilty Gear Xrd" which almost looks completely 2d but was done in Softimage.

The problem with Mayas toon/ramp shader is the shading is spread evenly across surfaces while in anime the shading is illogical and doesn't strictly follow real-world lighting. I want the shading in my model to look intentional instead of relying completely on an algorithm.

One idea I had was rotating the model twelve times by 30 degrees and painting a new texture each rotation. Are there tools to interpolate between textures? 

Anyone have any other thoughts on an approach using Soup?
pshipkov
What happens if you slap a toon -> shaded brightness 3 colors and then switch the ramp shader's color input to "brightness" ?
This usually produces interesting effects that achieve similar results to what you are looking.

If this is still not good enough for you then you need to modify the normals of your geometry, because the toon shading result heavily relies on that.

Do this:

intermediateMesh.outMesh -> point.inGeometry
point.outGeometry -> meshShape.inMesh

inside the point node enable the "normals" expression and type this:

$X=rand($NX);

$Y=rand($NY);

$Z=rand($NZ);

Render.

You will see that your rendered image looks much more "random".
You can use combination of attributeTransfer, point and textureToArray nodes to displace the normals any way you want.
Let me know if you want me to better outline how this is done.

Reply 0 0
mayamatrix
I'm a soup newbie so I'd definitely appreciate the steps!
I actually found a GDC panel where they discussed how they achieved the effect (https://www.youtube.com/watch?v=yhGjCzxJV3E) and at one point they mentioned changing certain vertex normals to 90 degrees so shading was either off or on.
Is there a way to "paint" attributes like vertex normal angle to achieve maximum control of lighting on the model?
Reply 0 0
pshipkov
Check the attached files.

Render.
Find the point node, turn-off the normals expression.
Render.
You will get the basic idea. Now you can combine this with additional math operations inside the point node and attribute transferring of normals (check the example scenes - everything regarding this is there).

PfxToon in Maya is extremely powerful and versatile tool.
In the _2 file i am showing and how the toon outlines work.
This should be enough to get you started.
Reply 0 0
mayamatrix
Awesome! Thanks for the files, I look forward to learning some new tricks!
Reply 0 0
mayamatrix
I've been getting some good results, thanks again for the files! However I've come to the conclusion that I need to animated the normals for best looks. Is there any way to make vertex normals keyable?
Reply 0 0
pshipkov
no. the only way is to control them with soup nodes and keyframe them.
Reply 0 0
mayamatrix
What is the best way to approach keying the normals? I was thinking of using RGB vertex colors for XYZ (x.normal=red, y.normal=green, z.normal=blue)0.0 to 1.0 for the normals but have no idea how to connect the nodes.
Reply 0 0
pshipkov
Check the attached scene.
Replace the ramp node with file one and point it to image sequence.
The normals will react accordingly.
Reply 1 0
mayamatrix
Thank you! This is exactly what I was looking for!
Reply 0 0
Reply