1
$\begingroup$

I'm trying to replicate material shading from Blender Internal in Cycles, so long I managed to get Diffuse working correctly with Point Lights, a rather awkward but working sunlight/hemi node setup, even a Specular shading similar to Blender Internal's Blinn.

But Cooktor Specular is not working out, I mean it's almost there, it kind of works, but for some reason my vector seem twisted away from the light source, making the final results, while rotating, to look really weird, here a picture to show the problem, also the node setup I'm using for that Specular in case someone want to replicate it. What I'm doing wrong? Or how do I replicate Cooktorr behavior correctly?

enter image description here

$\endgroup$
6
  • $\begingroup$ At first sight, shouldn't 'surface point' in your lightVector calculation come from Geometry>Position, not Geometry>Normal? I could be wrong.. $\endgroup$ – Robin Betts Apr 28 '18 at 17:42
  • $\begingroup$ I use "normal" because for the shader to work need the surface point, "position" only gives the object's center. $\endgroup$ – Raul Arturo Gonzalez Apr 28 '18 at 17:55
  • $\begingroup$ ..not according to docs.blender.org/manual/en/dev/render/cycles/nodes/types/input/… .. but then, the rest of the tree isn't making much sense to me, yet, at least. $\endgroup$ – Robin Betts Apr 28 '18 at 18:09
  • $\begingroup$ Oh your right, it's the position in world of a point of the surface, but still, for shading purposes I think normal is of more use to me, unless I got everything backwards, how would be the node setup in order to work with "position"? $\endgroup$ – Raul Arturo Gonzalez Apr 28 '18 at 18:53
  • $\begingroup$ You might find Paul Caggegis work on cycles toon shading of interest. $\endgroup$ – sambler May 1 '18 at 19:13
1
$\begingroup$

Alright I found the issue, after reading the following observation about Cooktorr in blender dev:

https://developer.blender.org/T34564

I learned that Blender Internal Cooktorr was actually Blinn-Phong, so I reviewed the math of it and figured out which vector I had misplaced, I leave a picture with the solution, also the link to the math, for reference.

https://en.wikipedia.org/wiki/Blinn%E2%80%93Phong_shading_model

solution

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.