Hello all. Long Time no see.
So I actully have the Emisive working (kinda).
http://s3.postimg.org/b5bznuylb/UE4_Cel_Shader_Post_Processing_2.jpg
And remember I was going to let y’all figure it out how I did this? I’m going back on my word with it (Because its a bit hacky).
http://s3.postimg.org/6i5xm3b8f/UE4_Cel_Shader_Post_Processing_mat1.jpg
http://s26.postimg.org/j305a421h/UE4_Cel_Shader_Post_Processing_mat2.jpg
(note: If you having trouble finding something like SceneColor or world normals it is coming for the SceneTexture)
On the cel shading part I re-did the lighting. I doted The Scene Color and the world normal and subtracted with a desaturated diffuse color. What that does it it made sure that I am removing any color that is coming out of the Scene Color and Just give us the light that is bouncing off the mesh. If you were to Subtract the Scene Color and the Diffuse color you will only get what was the light is getting from that mesh.
Then I just added the bands to it by just putting a Ceil to it divide by a Constant Scaler (which is just a float number ) and then Clamp it with a min of 0.1 and a max of 1. When I ceiled the light, I’m setting the value to a whole number up so if you have a float that is 0.3 It will go to 1(We’re not rounding it. we’re ceiling it). Light only have a scale of 0.0 and infinity (0.0 meaning no light and infinity mean a lot of light) by ceiling it we are setting the light to only have whole number. When I divide that Ceil to a constant number of 1 I’m telling it to only have one band of light to show. And when I Clamp it to only have a min of 0.1 I’m telling it to brighten up the shadows.
Then I multiply it with the Diffuse Color (or the Color Base, They both work). This is just to bring back the colored material that was applied to it.
When placed it into the emissive color and click the apply button everything work except the emissive color and specular that was applied on the mesh.(For example The sky light dome and the tech hex title didn’t appear). That is because I also got rid of it while I was trying to get only the light coming for the light and the diffuse color and base color doe not apply any emissive that was in the material. So I tried to bring them back in to it.
I did it by, Multiplying the Scene color and lighting model and then multiplying it with the specular color. then Desaturated it and then multiply it by the scene color. This only bring back any specular and emissive that was gone. It not the best way because it also got rid of the sky light. However I have no other Idea on how to bring it back fully.
Then I brought the skylight back by just inversing (oneMinus) the Material AO and Multiply the Scene Color. It s a hack way of bringing it back but it also got rid of my ability to to have opacity on certain material (if I want to do some type of fading I’ll have to figure out another way.)
Finally, I added the Cel Shade with the Emissive/Specular and the Emissive Sky to get the result I have now. I’m still working on ways to make it better. I’m Looking at EillotB way to used the Custom Depth Debuffer on the material.
I wonder on How ElliotB was able to do the if statement. I tryed it by placing the Custom scene into it but it telling me I need a Float.