Deforming points with VEX

calendar_today

07.04.2023

label

Modeling, VEX

mouse

Houdini 19.5

Description

On-going list of point deformations using point wrangles. To be continued.

1 Displace to sphere

C
        vector pos_sphere = chv('position_sphere');
float r = chf('radius_sphere');

vector pos_hit = v@P;
vector pos_ray = pos_hit;
vector dir_ray = {0,0,-1};

float t = dot(pos_sphere - pos_ray, dir_ray);
vector p = pos_ray + dir_ray * t;
float y = length(pos_sphere - p);

if(y < r){
    float x = sqrt(r*r - y*y);
    pos_hit = pos_ray + dir_ray * (t - x);
}

v@P.z = lerp(v@P.z, pos_hit.z, f@mask);
    
download

Downloads

link

Related articles

favorite

137

label

Modeling

Adaptive Resampling of Curves

favorite

281

label

Modeling

Applying Scales to Mesh Surfaces

favorite

225

label

Modeling

Approximating subdivision surfaces

favorite

187

label

Modeling

Blending COPs SDFs into 3D Volume

favorite

271

label

Modeling

Branching Subdivision Curves

favorite

129

label

Modeling

Circuit Networks