Noobini Posted July 14, 2018 Share Posted July 14, 2018 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. Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted July 14, 2018 Share Posted July 14, 2018 (edited) Just take a box and let some sine waves run across its surface. // INPUTS int stripes = chi('stripes'); float diam = chf('diameter'); float bump = chf('bump'); float bend = chf('bend'); // GEOMETRY vector nml = abs(@N); vector bbox = relbbox(0, @P); // SPHERIFY @P = normalize(@P); // SURFACE vector shape = abs( sin(bbox * $PI * stripes) ); shape = pow( sin(shape), bend) * bump; // STRIPES ORIENTATION if( int(nml.z) ){ @P += @N * shape.y; } if( int(nml.y) ){ @P += @N * shape.x; } if( int(nml.x) ){ @P += @N * shape.z; } // GROUP SEAMS i@group_seams = length(@P) < 1.001; // OVERALL SCALE @P *= diam * 0.5; volleyball.hiplc Edited July 14, 2018 by konstantin magnus image editing 1 Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted July 14, 2018 Share Posted July 14, 2018 Impressive work Konstantin! This is my approach: volleyball.hipnc Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted July 14, 2018 Share Posted July 14, 2018 (edited) Ok, your topology looks more convincing. So I extrude the stripes, as well: Add stripes on a box using relative bounding box coordinates. Spherify by normalizing point coordinates. Split by colours and extrude. 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; volleyball_2.hiplc Edited July 14, 2018 by konstantin magnus 1 Quote Link to comment Share on other sites More sharing options...
Noobini Posted July 15, 2018 Author Share Posted July 15, 2018 all nice.... OK, here's mine, as usual...non-VEX approach vu_Volleyball.hipnc Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted July 15, 2018 Share Posted July 15, 2018 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) copy_grid_to_platonic.hiplc Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted July 25, 2018 Share Posted July 25, 2018 Here is a tutorial on creating a procedural volleyball: 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.