Jump to content

How do you procedurally transform sphere into half sphere shape but with smooth bevel


Recommended Posts

r/Houdini - How do you  procedurally transform sphere into half sphere shape but with smooth bevel

Here is the images of what I mean. Transform a sphere to this shape, modified it without point count or point number changes  Ignore the center core.  I'm having a hard time getting that nice round bevel around middle section

r/Houdini - How do you  procedurally transform sphere into half sphere shape but with smooth bevel

Link to comment
Share on other sites

vector C = getbbox_center(0);
float R = getbbox_size(0).x * 0.5;
float x = @P.x - C.x;

if (x > 0.0)
{
    float u = clamp(x / R, 0.0, 1.0);

    float w = chramp("profile", u);
    float squeeze = max(ch("squeeze"), 0.0);
    float scale = 1.0 / (1.0 + squeeze * w);

    @P.x = C.x + x * scale;
}
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...