Jump to content

Simple Circle Packing


Noobini

Recommended Posts

This is a simple circle / sphere packing scene. It is very simple, suitable for beginners to dissect and fool around with.

For now, if you change some param, like Repel and you see the BLUE cached frames on the timeline hasn't been cleared out...then you have to click the Reset Sim button on the Solver node....yeah tiny PIA...hence my question below...

(Does anyone know how to create a button in Param Editor to push the Reset Sim button in the solver ?)

 

vu_SimplePacking.hipnc

Edited by Noobini
  • Thanks 2
Link to comment
Share on other sites

ver 2: added Use Overlap option.

Previously, the Repel represents how much to move away each iteration, in absolute terms. Now if Use Overlap is enabled, the Repel is a portion of the actual overlap amount. So if 2 spheres overlap by 3 units...and Repel is 0.5, then the 'move away' amount is 1.5

With Use Overlap enabled (and say Repel is 1), it gets to the desired positions much quicker...but not as 'nice' and relaxing as when Repel is lowish...

 

vu_SimplePacking2.hipnc

  • Like 3
Link to comment
Share on other sites

  • 2 weeks later...

Hi Vusta,

Not sure if you still have question about creating the button to reset the sim, but it you do you could try this:

You can create a button in your UI and in callback script you can use hou.node('PATHTOSOPSOLVER').parm('NAMEOFBUTTON').pressButton()

Best,
Viola
 

Link to comment
Share on other sites

4 hours ago, violalyu said:

Hi Vusta,

Not sure if you still have question about creating the button to reset the sim, but it you do you could try this:

You can create a button in your UI and in callback script you can use hou.node('PATHTOSOPSOLVER').parm('NAMEOFBUTTON').pressButton()

Best,
Viola
 

I did try the pressButton() method.....but couldn't get it to work.....I'll try it again, maybe it was just some sort of typo on my part. Thanks.

EDIT: well waddayaknow....just tried it again and it worked !!!....yeah must have been a typo previous times I tried it.

anyway FYI, hou.node('../solver1').parm('resimulate').pressButton()

works...(change to python language, of course)

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

  • 1 year 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...