Jump to content

Recursive Subdivision Algorithm: Morphing any Shape into Fractal


Brazen

Recommended Posts

Hello everybody,

I’m relatively new to Houdini, and as part of a personal project (a short film), I’m currently trying to reproduce an effect based on the recursive subdivision of a surface. We can observe the said effect for instance on this video made by Simon Holmedal : 

https://www.instagram.com/p/BK8ivNajNdu/

The different iteration (non animated) of the algorithm can be also observed on this video :

https://www.youtube.com/watch?v=HHKPdf67Sfo

Or on this one :

https://www.youtube.com/watch?v=K1mlO2YSfU4

It is also the same effect used in the official SideFx Ident  (Simon Holmedal again):

https://vimeo.com/164501803

I searched every topic on OdForce which seemed to deal with this technique, I found several topic like : 

•   http://forums.odforce.net/topic/28803-this-subdivided-thing/
•   http://forums.odforce.net/topic/28161-triangle-polygon-morph-animation-to-fractal/?tab=comments#comment-160368
•   http://forums.odforce.net/topic/26779-how-to-creat-subdivision-pattern/?tab=comments#comment-154625

And also the famous tutorial by Entagma regarding subdivisions :

•   http://www.entagma.com/loops-subdivisions/

Those topics seem to give several techniques to subdivide a surface into smaller triangle, but none of them propose a solution to actually animate the subdivided mesh. It seems that the overall technique is based on a recursive subdivision, coupled with the fact that the subdivided parts move along their normal, in order to give this effect of extrusion and fractal.

I’ve also searched more deeply into the code of such an algorithm, and I’ve found several websites (with code) explaining this effect:
 
•   http://code.algorithmicdesign.net/Recursive-Subdivision-Mesh
•   http://atlv.org/education/ghpython/#7
•   http://www.geneatcg.com/2014/11/21/rhino-python-tessellation-subdivision-first-version/
•   http://www.geneatcg.com/2014/11/28/rhino-python-mesh-boy-surface-subdivision-analysis/

There are also other websites (less significant) dealing with this issue:

•   https://codequotidien.wordpress.com/2011/07/18/half-edge-mesh/
•   http://www.wblut.com/he_mesh/
•   https://codepen.io/anon/pen/YEyYZv
•   https://wewanttolearn.wordpress.com/tag/mesh-recursive-subdivision/

That’s all I found regarding this effect. Does anyone know how to make this kind of animation? If so, could anyone post a Houdini file which implements this technique so I could learn from that ?
Thanks by advance, I hope someone here will know how to resolve this issue !

Link to comment
Share on other sites

  • 2 weeks later...

Still no answer. As someone suggested to me here at OdForce, maybe my problem is too vague, which is why I would like to expose my problem more clearly.
The problem I am trying to solve is how to perform an animation of the different iteration of a recursive subdivisions of any geometric shape. For instance, I have attached a hip file of a platonic mesh subdivided with the technique found in the tutorial of Entagma. In the hip file, you can see that between frames 21 and 26, I have different iterations of the recursive subdivisions. 

4639462017111019h1515.jpg

So my question is : how to perform a smooth animation between those different shapes, like in the first video I have post in the previous message ? I tried to document myself on the different blend shapes nodes available in Houdini but it seems that the two shapes we want to blend must have the same topology that is to say the same number of points and faces... But I can't figure how to use these nodes as two different shapes corresponding of two iterations of the recursive subdivisions algorithm have not the same topology (because triangles are created).

In this thread : http://forums.odforce.net/topic/28161-triangle-polygon-morph-animation-to-fractal/?tab=comments#comment-160368, the user Bergermon posted a file which seems to give an example of such blending, but I don't manage to merge the two technique to create the animation.

Can someone help please ?

Thank you by advance.

EDIT : I have just found this tutorial which shows a technique to morph any shape into another : https://www.youtube.com/watch?v=-ycX38_DV7E. I have just tried to do it between two shapes of two iterations of the algorithm => my computer have crashed... Well I have just a laptop, not the kind of stuff to make VFX... I will start again later.

Subdiv_Test.hipnc

 

Edited by Brazen
Link to comment
Share on other sites

Hi, just an idea :

First, I would exclude morphing geometry into another, because you would need same number of points between each geometry, which would require you to subdivide level 0 without chaning its shape. You would struggle identifying the points and it would be a mess...

Maybe an option is just to « project » each geometry of subdivision N onto the first level (un-subdivided) and bake the distance between surfaces into a texture (if your first level have proper UV). I mean : take each level N of subdivided geo (your fractal level N), scatter points onto its surface, project that onto the un-subdivided geo (fractal level 0), and bake that as a displacement texture. 

Then just blend your textures over time, and use that as a file sequence of displacement map on the level 0 geo and check result at render time.

I am not sure if I am clear, and you must dig a bit into VEX to learn how to project, get intersection, from there calculate distance and put the value onto the UV space, but I think it’s a viable option, maybe not the best :-)

Hope this helps

Edited by StepbyStepVFX
Link to comment
Share on other sites

EDIT : I have been playing with your file a bit, and my suggestions won't work so easily. You would need to do it iteratively, each step from Fractal N to Fractal N+1, because the geo is "dented" and projection cannot happen properly from step N to step N+2 for example. I will try to propose you something soon

Edited by StepbyStepVFX
Link to comment
Share on other sites

3 hours ago, Brazen said:

Still no answer. As someone suggested to me here at OdForce, maybe my problem is too vague, which is why I would like to expose my problem more clearly.
The problem I am trying to solve is how to perform an animation of the different iteration of a recursive subdivisions of any geometric shape. For instance, I have attached a hip file of a platonic mesh subdivided with the technique found in the tutorial of Entagma. In the hip file, you can see that between frames 21 and 26, I have different iterations of the recursive subdivisions. 

4639462017111019h1515.jpg

So my question is : how to perform a smooth animation between those different shapes, like in the first video I have post in the previous message ? I tried to document myself on the different blend shapes nodes available in Houdini but it seems that the two shapes we want to blend must have the same topology that is to say the same number of points and faces... But I can't figure how to use these nodes as two different shapes corresponding of two iterations of the recursive subdivisions algorithm have not the same topology (because triangles are created).

In this thread : http://forums.odforce.net/topic/28161-triangle-polygon-morph-animation-to-fractal/?tab=comments#comment-160368, the user Bergermon posted a file which seems to give an example of such blending, but I don't manage to merge the two technique to create the animation.

Can someone help please ?

Thank you by advance.

EDIT : I have just found this tutorial which shows a technique to morph any shape into another : https://www.youtube.com/watch?v=-ycX38_DV7E. I have just tried to do it between two shapes of two iterations of the algorithm => my computer have crashed... Well I have just a laptop, not the kind of stuff to make VFX... I will start again later.

Subdiv_Test.hipnc

 

Just a remark concerning your solution with VDB that made your computer crash : VDB is a way to subdivide a cube in space into voxels (3D pixels if you want). It is highly probable that you made those voxels too small, and therefore, it had to create lots of voxels to cover your cube of space, and took a huge space in memory of your computer, that made him crash. Reduce that voxel size and it will work. The drawback, is that it will make the small details of your geometry « blocky », like LEGO.... or you will have to reduce voxel size (careful or it will crash again). This solution maybe less acurate that the proposal to calculate displacement maps.

Edited by StepbyStepVFX
Link to comment
Share on other sites

I don't think topology changes at all in the case of the SideFX ident, just the form. Could be a mixture of deforming noises running through the structure or other parameters being animated.

Didn't look at your scene yet, but you could always project your end-result (high-resolution) back onto your first steps with a ray node and also transfer the normals from the low-res mesh, so that the rendering looks similar or the same and then morph between those projected states - simple since they have the same topology.

Cheers,

Tom

Edited by Thomas Helzle
Link to comment
Share on other sites

Hi again, so to animate between fractal levels, I just used your setup to subdivide with 0 distance, just to have the same topology between levels of subdiv but with same initial geo, and then used primuv to find where the points should be in space between your different levels of fractals. Then you can animate the blend attribute to go from one fractal to another.

Here is the file

Subdiv_Test_v2.hipnc

Edited by StepbyStepVFX
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Big thanks to all, your solutions are quite impressive for the beginner that I am. I will analyse the file to understand exactly what you were saying guys. I have quite a lot to learn, and your insights are very appreciated.

Yet another effect done by the masters of OdForce :) Thank you again !

Edited by Brazen
Link to comment
Share on other sites

  • 4 years later...
  • 11 months later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...