Find curvature on axis

   2543   6   2
User Avatar
Member
767 posts
Joined: April 2014
Offline
I have a question regarding the measure sop.

The curvature attribute of the measure sop, doesn't it calculate the curvature of the entire surface; and if so, how do I control the curvature of the surface on an particular axis ?

This is my dirty code, although it's not giving me float values then applying that to the Cd attribute it is behaving like a boolean.

@Cd = ch("ycontrol",@curvature) >= .4;
【T】【C】【S】
User Avatar
Member
24 posts
Joined: Oct. 2015
Online
Created a tool a little while back that calculates normalized curvature of a mesh, concave, convex or both.

You can use the tool or the measure sop and then multiply it by the absolute dot product of the point normal and the world axis. It would go as follows:

float curvature = calculate this either with measure or with my tool;
float curvatureXaxis = abs(dot(@N,{1,0,0})) * curvature;

@Cd = curvatureXaxis; // for a quick visualization

You can remap the dot product for further control of the mask.

Tighe Rzankowski

trzankofx@gmail.com
User Avatar
Member
767 posts
Joined: April 2014
Offline
I watched your tutorial, three times; great job

You mean something as such ? I'm not seeing a change when adjusting the channel ?

float curvature = @curvature;
float curvatureXaxis = ch("Ycontrol",abs(dot(@N,{1,0,0})))*curvature;
@Cd = curvatureXaxis;
【T】【C】【S】
User Avatar
Member
7814 posts
Joined: Sept. 2011
Offline
ch() normally takes one argument, the name of the channel. The second argument in the two argument signature control the time of the evaluation. Are you trying to access different points in time of an animation channel?
User Avatar
Member
767 posts
Joined: April 2014
Offline
The ch() function takes two arguments, one being the name of the channel the second can be a float, which is what I'm supplying.

I want to use the channel to control how much the of the curvature is applied to the mesh. Although visually I'm not seeing any changes to the mesh ?
【T】【C】【S】
User Avatar
Member
767 posts
Joined: April 2014
Offline
@trzanko - I got it working; thanks to your code. Sorry there was brain fart the other day; I thought I'd update you and let you know thanks for the help.
【T】【C】【S】
User Avatar
Member
24 posts
Joined: Oct. 2015
Online
Christopher_R
@trzanko - I got it working; thanks to your code. Sorry there was brain fart the other day; I thought I'd update you and let you know thanks for the help.

Awesome! Happy to help
Tighe Rzankowski

trzankofx@gmail.com
  • Quick Links