Jump to content

procedural venation


kleer001

Recommended Posts

I thought I was clever, but I guess not so much. Can anyone else make heads or tails of this procedure?

http://pepefx.blogspot.com/2013/05/a-few-days-ago-i-was-reading-this.html

I totally understand that the creator wants to keep his work private, and the clues look straight forward enough. I thought I could do it in sops, but after banging my head on it for a couple days I'm totally lost. It's the feedback loop, I think, that I get lost in. It almost seems like something I could do in a single point wrangle SOP, if I knew VEX.

Link to comment
Share on other sites

I thought I was clever, but I guess not so much. Can anyone else make heads or tails of this procedure?

http://pepefx.blogsp...ading-this.html

I totally understand that the creator wants to keep his work private, and the clues look straight forward enough. I thought I could do it in sops, but after banging my head on it for a couple days I'm totally lost. It's the feedback loop, I think, that I get lost in. It almost seems like something I could do in a single point wrangle SOP, if I knew VEX.

hi Kleer !

I basically used 2 forloop nested.

Loop1:

The outer loop was for the number of the iterations (basically the more iterations, the longer the branches).

For each loop, each hormon gets assigned his closest root (via vop sop).

Then i use the partition sop to create groups of hormons based on the closest root number.

The inner forloop loops through all the just created hormon (primitive) groups. For each hormon group the distance from each hormon present in the groop and the closest root (each group share the same closest root) is averaged, inverted, weighted (step size) added to the position of the closest root, and a new root point is created in the resulting position.

So, a new root point is created for each group of hormons that share the same closest root.

This is the general idea.

Let me know if you need further clarifications.

p.s.

I initially tried to use SOP solver but it was acting a bit weird (translater : I was not able to use it properly :)). So i decided to switch to forloops after asking around on this same forum.

The otl version is slow and has conceptial issues: the main issue is that in order to see the branches growing you want to keyframe the outer iteration count. So at every frame ALL the roots are considered for the closest hormon check, which is not smart, cause only the roots created in the previous loop should be considered, since they were the closest before, why shouldn't be now !? :)

Instead of tweaking the OTL i decided to switch to HDK for 2 reasons:

- speed (about 20x faster)

- I prefer coding to nodes

- via HDK you work with raw data and you don't have the restrictions caused by SIMD nature of VEX (which makes it incredibly fast and multithreaded, but makes a bit difficult to create new geometry. But I believe now, with H13, you can create new geometry using new geometry tools to create points, vertices and primitives in cvex context ... or something similar, i still have to really look into that, but it seems really powerful stuff).

Link to comment
Share on other sites

hi Kleer !

HI Alessandro !!! Thank you for chiming in. Wow. I'll get some free time around 3am on Sunday and try that out. Lol, so busy. But thank you thank you!

Yes, :e.d.w.a.r.d. . I love the solver sop!

craig brown, I'll check it out. Thank you!

And thank you Artem Smirnov too!

So much to chew through. :D

Link to comment
Share on other sites

I was testing new vex geometry generation functions few days ago and got something similar to space colonization algorithm. It is not finished and kind of messy. And I don't think I will finish it someday but maybe you will=)

Artem your setup is brilliant !

I was looking forward to have some time to check the new addpoint / prim / vertex in cvex context and the new Python SOP and your scene gives a really cool example of those. Furthermore your implementation of the algorithm is really well done.

HI Alessandro !!! Thank you for chiming in. Wow. I'll get some free time around 3am on Sunday and try that out. Lol, so busy. But thank you thank you!

Kleer,

No prob ! I am learning a lot on this matter from this thread too :)

@Edward

Every time I work in any of these "simulation" contexts based on the previous frame or state (SOP solver / foreach ..) i have troubles debugging the state of the current iteration. The workflow I follow usually is to create the main loop instance at the geometry level, and once it works, i paste it in the sop solver / foreach and pray ... eehhe. Now with the Wrangle nodes I suppose i can drop print statements here and there in the simulation context in order to read the feedback in the Console Window while I am at the geometry level. Is there any better workflow you might suggest that might allow to see the evolution of the simulation at each iteration , for instance in a SOP Solver ?

Link to comment
Share on other sites

Very cool thread. Artem, really interested by your file but the attribwrangle SOP errors complaining about undefined functions for addvertex and addprim.

Is that just me?

If I am not mistaken those vex functions are available only starting from H13 ?

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...
  • 3 months later...

Wow, turns out that with some back-burnering I am actually pretty clever. See attached for barebones prototype working SOP solver with a For Loop inside working venation setup!

 

Thanks for the help everyone. And here's some light reading for homework:

 

http://algorithmicbotany.org/papers/venation.sig2005.pdf

 

 

If you feel like leaving a tip, here's my public bitcoin address :

18u5bDYAbKTYFepv5GgtbnzNeXMdWHMqdH

 

https://blockchain.info/qr?data=18u5bDYAbKTYFepv5GgtbnzNeXMdWHMqdH&size=200

 

Oa8E3xy.png

 

 

veins_01.hip

  • Like 2
Link to comment
Share on other sites

  • 4 weeks later...
  • 7 years later...
On 24/03/2014 at 8:11 PM, kleer001 said:

Wow, turns out that with some back-burnering I am actually pretty clever. See attached for barebones prototype working SOP solver with a For Loop inside working venation setup!

 

Thanks for the help everyone. And here's some light reading for homework:

 

http://algorithmicbotany.org/papers/venation.sig2005.pdf

 

 

 

If you feel like leaving a tip, here's my public bitcoin address :

18u5bDYAbKTYFepv5GgtbnzNeXMdWHMqdH

 

https://blockchain.info/qr?data=18u5bDYAbKTYFepv5GgtbnzNeXMdWHMqdH&size=200

 

Oa8E3xy.png

 

 

veins_01.hip

Hi, has anyone made a setup up where all the lines join? When using the vein they stop before they attach, like broken branches. Thanks!

Link to comment
Share on other sites

  • 3 weeks later...
On 4/30/2021 at 9:47 AM, encom said:

Hi, has anyone made a setup up where all the lines join? When using the vein they stop before they attach, like broken branches. Thanks!

I'm not entirely sure what you're describing. Can you upload a hip file and an image?

Link to comment
Share on other sites

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...