Hi, not sure if this is a bug or missing feature, or expected behavior, actually... but trying to use meanCurvature() within a shader to control the blend channel doesn't seem to do anything, you get either 100% material A or material B depending on how you code it, but no transitions that I would expect. when you call that function in the color channel you get very distinct black and white areas, so I thought it would be a natural application to use with blend.
any info on why this doesn't work? am I thinking about it wrong? thanks!
access meanCurvature() within a blend shader
-
- Posts: 512
- Joined: Wed May 02, 2007 11:34 am
Re: access meanCurvature() within a blend shader
First, the curvature is signed. Which means the sign changes between concave and convex surfaces
Also, the unit is 1/m, and the value is the reciprocal of the curvature radius. This means that if your surface has features of a few mm, with similar curvature radius, the curvature value will be around 1000.
So your shader will rapidly vary from -1000 to +1000, which means you will not even notice the "gray" zone between 0 and 1
Try something such as 0.5+meanCurvature()*0.001, and if the transition is still too sharp, lower the 0.001 coefficient. If it's too blended, increase it.
Also, the unit is 1/m, and the value is the reciprocal of the curvature radius. This means that if your surface has features of a few mm, with similar curvature radius, the curvature value will be around 1000.
So your shader will rapidly vary from -1000 to +1000, which means you will not even notice the "gray" zone between 0 and 1
Try something such as 0.5+meanCurvature()*0.001, and if the transition is still too sharp, lower the 0.001 coefficient. If it's too blended, increase it.
Eclat-Digital Research
http://www.eclat-digital.com
http://www.eclat-digital.com
Re: access meanCurvature() within a blend shader
Well, I just tested, and ... it does not work. I think it worked once, but I'm not sure.
Eclat-Digital Research
http://www.eclat-digital.com
http://www.eclat-digital.com
- Oscar J
- Posts: 2204
- Joined: Sat Mar 31, 2012 3:47 am
- Location: Gothenburg, Sweden
- 3D Software: Blender
Re: access meanCurvature() within a blend shader
I think the next build has a fix for this.
- arc en ciel
- Posts: 138
- Joined: Tue Apr 12, 2016 2:33 am
Re: access meanCurvature() within a blend shader
yo,
this mat use meanCurvature()
http://www.indigorenderer.com/materials/materials/1144
it works with Indigo 3.8
not with 4
this mat use meanCurvature()
http://www.indigorenderer.com/materials/materials/1144
it works with Indigo 3.8
not with 4
-
- Posts: 512
- Joined: Wed May 02, 2007 11:34 am
Re: access meanCurvature() within a blend shader
Aha,
ok, at least I know it should work. Thx guys.
ok, at least I know it should work. Thx guys.
Re: access meanCurvature() within a blend shader
Yes, meanCurvature doesn't work in blend params (in Indigo 4 at least).
(Blend params are a bit special).
Just making that work:
Here is a blend betweeen a phong with specular reflectivity, and a brown diffuse material.
Blend shader is
(Blend params are a bit special).
Just making that work:
Here is a blend betweeen a phong with specular reflectivity, and a brown diffuse material.
Blend shader is
Code: Select all
def eval() real :
(meanCurvature() + noise(posOS()*20.0)*2.0) > -2.0 ? 1.0 : 0.0
Who is online
Users browsing this forum: No registered users and 80 guests