Reality Composer Pro Cel Shader Node Graph
This is a simple 3 color cel shader node graph. It's the file I create in my in upcoming tutorial on building a cel shader. I do not plan to update this, it's just for instructional purposes, however you can use it however you see fit, just don't re-sell it please. It was created in Reality Composer Pro V1.0 packaged with Xcode 15 beta 8, and future updates to Reality Composer Pro / Xcode / visionOS might affect its compatibility.
This shader node graph can be used to create a cel shader with 3 distinct colors.
Disclaimers: Because it relies on the dot product of the normal and the view angle, your mesh must have correct normals. The shader calculation is based on one "infinite light" with a direction that is editable. The shader does not take into account shadows (or self-shadowing); this is evident in the eyesockets of the skull seen in the product images. This is the shader only - does not include the models (all of the models shown are models from Apple's library, or are primitives).
How to use:
Open or import into Reality Composer Pro. Assign the material to your mesh (or a Reality Composer Pro primitive).
Set the "light" position in the LightDirection node in the main material. The rest of the settings are in the "_3ColorCelShader" Node Graph.
I've left some common sense values set in the node graph. Select 3 distinct colors to create your cel shader. The thresholds are for the start and end of the Mid Color, (everything higher than the MidColor_StartThreshold will be the HighlightColor, everything lower than the MidColor_EndThreshold will be the DarkColor.
If you'd like to purchase a slightly expanded version, see my upcoming 5 Color Cel Shader Node Graph variant. This will have the ability to apply up to 5 colors easily, based on a ratio that automatically updates. It also has the ability to add gradient transitions (easily toggle-able) between the colors.
Play around with it and if you have any questions or make something cool, let me know on Twitter!
Feel free to do whatever you want with this item, just don't re-sell it.
💜 @mrdeerwhale
3 Color Simple Cel Shader Graph Node for Reality Composer Pro. Consider paying $2 to help support new content.