4
$\begingroup$

I'm trying to make a rock stick out of the sea, and want to blend from a wet rock to dry rock using cycles nodes.

I use a mix shader to blend between two shaders based on the Z position. The mix factor is obtained by calling smoothstep in an OSL script.

My node setup is like so:

Nodes

However, for some reason I'm getting a sharp seam along Z positions where the blending ends:

Seam

Anyone know what might cause this, or how to fix it?

Thanks!

$\endgroup$
  • $\begingroup$ I was not able to reproduce your issue. I don't think the problem is caused by the OSL script. Texture? Could you upload your blendfile for deeper inpection? $\endgroup$ – Carlo Sep 4 '15 at 23:24
  • $\begingroup$ Just uploaded it. :) $\endgroup$ – user673679 Sep 4 '15 at 23:25
2
$\begingroup$

OSL Shading issue with Diffuse Roughness > 0

enter image description here

By dupilcate the Diffuse shader as in the node setup belowe an lowering the amount of the second Diffuse Roughness to something like .95 you should get the expected result.

There seems to be an issue in the usage of that parameter. It leads to strange behaviours. Note that if you don't double the node but just try to lower the Roughness of the Diffuse shader node, you'll need to set it lower than 0.5 to achieve the given result.

enter image description here

enter image description here

Notice that is not related with the use of the OSL script because it still happens even with default nodes...

enter image description here

..when the same scene, rendered with OSL Shading disabled, gives expected results.

enter image description here

| improve this answer | |
$\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.