Hi Guys,
I am new to Shade Graph. Trying a simple shader which applies different colours to different sides of the model.
I managed to do it with 3 faces , but opposite faces are black. I tried to add change vector orientation to -1 but it doesn’t work.
Should be easy, but I still can’t find a solution? I had another thought, even if I will apply same material on opposite sides it will look strange while orbiting around the object.
So shading should follow camera or directional light
You could also use view direction, depending on what kind of effect you are looking for. Then the coloring would be view space relative, so that left side always stays certain color and so on.
Now just trying to find a way to control background colour. But I think there is no an easy way.
I want to have background white after applying post effects.
This is cool. It might help. Cause currently I have left and right side same color.
So when I look from shadow side it looks strange light face in dark.
Are you typically going to be doing this with a cube? and you want each face to have its own color?
Start with a Normal Vector Node, in Object Space. Split node that. Then, for X, drag that into a saturate node, then Multiply that by a new Color called Right. Again, for X, drag that into a Negate node, then Saturate, then multiply that by a new Color called Left.
For Y, do the same thing, saturate, multiply by color TOP. Y, negate, saturate, multiply by color Bottom. For Z, again do the same thing, multiply by colors Front and Back.
Add all 6 of them together. Output that (into Emissive or Color or where ever you want it)
Use that in a material on a cube/sphere in your scene. Rotate the object/s. If you don’t want to colors to stay aligned with the individual obect/s, change the Normal Vector to World Space.
Thank you @Jesus
I did almost the way you described. I will have to use it on curved objects as well.
I am now experimenting with view direction node. To avoid having light colours in shadow