Waffle structure from mesh

calendar_today

14.06.2022

label

Hard-surface

mouse

Houdini 19.0

Description

Turning a 3d mesh into a waffle structure. Inspired by the waffle video tutorial by Entagma. Main difference is the avoidance of for loops and a more compact setup.

1 Code discussion

C
        int slices = chi('slices');

int copy = prim(0, 'copynum', i@primnum);
float side = copy ? v@P.x : v@P.z;

v@P.y = sin(side * M_PI * slices) * 0.01;
    

Before the attribute wrangle, we store the rest position and create a copy of the input mesh using the "copy transform"-node with the copynum-attribute activated. Based on whether the the copy number is 0 or 1, we'll choose either the X or the Z axis using copy ? v@P.x : v@P.z.

To prepare cutting the slices, we'll assign a sine wave running along these axis to v@P.y.

download

Downloads

link

Related articles

favorite

182

label

Hard-surface

Aircraft propeller

favorite

325

label

Hard-surface

Ball

favorite

146

label

Hard-surface

Bike helmet

favorite

267

label

Hard-surface

Bottle from cylinder using VOPs

favorite

200

label

Hard-surface

Bridging and Chaining Shapes

favorite

219

label

Hard-surface

Concept Chair