This post expands upon my previous post, Simulating Mitosis in Houdini. After watching Creating Points, Vertices & Primitives using Vex by Fifty50, I wondered what sort of structure my mitosis emulation would create if the generated points were joined to their parent by a connecting rod.

Thanks to the Fifty50 video, implementing this was a piece of cake. With each new point generated in my existing mitosis solver, I added code the create a new polyline primitive with two vertices - one based on the parent point and the other based on the newly generated point:


[...] 
int newPoint = addpoint(geoself(), @P + randOffest);      
int prim = addprim(geoself(), "polyline"); 
int vertex1 = addvertex(geoself(), prim, @ptnum); 
int vertex2 = addvertex(geoself(), prim, newPoint);  
[...]

With some additional code to limit the total number of child points each point can generate, the solver creates a series of connected lines:



To create the renderable geometry, I took the output from the solver and piped it into a PolyWire node to create the connecting rods, and a Copy node to place a sphere at each point. With that geometry, I generated a VDB volume which was smoothed and converted back to polygons:



The final result is a smooth mesh with no hard joints between the spheres and connecting rods. In my opinion, this gives a nicer look as the spheres divide that the metaballs I've used previously:



The video above shows the final render using the default silver material and an Environment Light added to the scene. Another win for Houdini!

2

View comments

  1. What if each successive pole length was reduced by following the golden ratio?

    ReplyDelete
    Replies
    1. I'm not sure how that would work with the separation of the particles - but I'll give it a try :)

      Delete
About Me
About Me
Labels
Labels
Blog Archive
Loading