What you're trying to do is called "NPR" (Non-Photorealistic Rendering), there's a dedicated website with some info on the subject: https://blendernpr.org/category/tutorial/ The method @Jekyll told you is a cool way to get information that's not usually available in nodes, into nodes. You bind a Converter->Combine XYZ or…
I am trying to get the lighting data to do a custom lighting shader, but couldn't find the node to read light data? (Alternatively, if anyone can come up with a conversion from blinn-phong shininess/glossiness to BSDF roughness, I am all ears, aka this isn't possible without knowing the shader implementation details, tried…
@bitinn good to know you're familiar with this, I hope I didn't offend with overexplaining (I only do it because other people might come here from a web search without knowing all this). If you use the world-space position, the light direction will go from the object position toward the world origin (0,0,0).I don't quite…
Here is my basic blinn-phong shader in Blender with normal/diffuse/specular support. What I find sourly lacking in Blender 2.8 Shader Editor: (1) Viewport Camera input: view direction, camera matrices; (2) Light Data input: light direction; (3) Math functions are spread across multiple nodes: Math node, Vector Math node…
Again I need more help on this: to compute specular term I need camera view direction and annoyingly the Camera Data node only provide view direction in Camera Space, not World Space, and I have see no model/view/projection/ matrix in Blender's shader editor (to be honest I don't even see a "matrix" node). Alternative is…
There is no node that gives you access to light direction. However, you can make your own using with the help of Drivers: Since light direction is basically the same as it's world space position, you just add a Combine XYZ node to hold the lights position vector and fill in the xyz values of the Light in the scene using…
Side note: Viewport Camera Direction in World Space can be read from Geometry Node -> Incoming socket. It took me a lot of tries but I finally made an energy conserving blinn phong in Blender, to match my custom shader...
Two suggestions:1) Go back to 2.79, as the Blender Internal render engine supports the Blinn specular and is quite fast to render.There's also the Blender Game render engine that in some simple cases is fantastic (this is the 3D View): 2) Go put in a vote so that GLSL PyNodes gets eventually committed to Eevee, it's a node…
@RN thx! I understand blinn-phong shading and NPR in general (can write shaders myself, also used shader graph a lot in Maya and Unity), and I think I understand how single-value drivers work in Blender. I see the suggestion is to using world-space position of an object (normalized) as light direction, that's a pretty…
Sort of. Since directional light sources in Blender point usally in -Z direction (in their local space) you can use that, normalized, as a direction vector. The "Edit Drivers" popup has the option to get location data either in world-space or local-space. So, by rotating the Sun object, like you would normally do to…