Jump to content
Sign in to follow this  


Recommended Posts

So someone posted "I modelled a soccerball".......really ? It's virtually pre-made for you in Houdini already.

Here's a tougher challenge, procedurally model a volleyball....not just the standard 3 stripes....how about ANY number of stripes ?

Won't post file yet...so ppl can have a go themselves.


Share this post

Link to post
Share on other sites

Just take a box and let some sine waves run across its surface.

int stripes = chi('stripes');
float diam = chf('diameter');
float bump = chf('bump');
float bend = chf('bend');

vector nml = abs(@N);
vector bbox = relbbox(0, @P);

@P = normalize(@P);

vector shape = abs( sin(bbox * $PI * stripes) );
shape = pow( sin(shape), bend) * bump;

if( int(nml.z) ){ @P += @N * shape.y; }
if( int(nml.y) ){ @P += @N * shape.x; }
if( int(nml.x) ){ @P += @N * shape.z; }

i@group_seams = length(@P) < 1.001;

@P *= diam * 0.5;



Edited by konstantin magnus
image editing
  • Like 1

Share this post

Link to post
Share on other sites

Ok, your topology looks more convincing. So I extrude the stripes, as well:


  1. Add stripes on a box using relative bounding box coordinates.
  2. Spherify by normalizing point coordinates.
  3. Split by colours and extrude.
  4. Fuse and subdivide.

Here is the simplified stripe code:

int stripes = chi('stripes');
vector bbox = relbbox(0, @P);
vector nml = abs(@N);

if( nml.z > 0 ){ bbox.y = 0; }
if( nml.y > 0 ){ bbox.x = 0; }
if( nml.x > 0 ){ bbox.z = 0; }

@Cd = ceil(bbox * stripes) / stripes + @N;



Edited by konstantin magnus
  • Like 1

Share this post

Link to post
Share on other sites

Quite straight forward! You could also try copying your grid to an octahedron from platonic solids.


However, this requires to handle the orient attribute on the platonic first.

vector up = v@N.zxy;			// assign swizzled normal vectors to up
matrix3 rot = maketransform(v@N, up);	// rotation matrix based on normals and up
p@orient = quaternion(rot);		// convert rotation matrix to quaternion (vector4)



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this