Hello, I am trying to get some balloons inflating by increasing the rest length scale parameter of a vellum constraint properties node inside the autodopnetwork. Setting it to a value higher than the one that's coming in, makes the balloons get bigger
However I would like to gain some control about the speed by which they grow and/or time they need to reach their desired state of inflation, e.g. 10 frames after their individual "birth" they should reach the intended state.
Since the balloons come in sequentially, one after the other with some frames inbetween each of them (used the instance from points on the vellum source in combination with an expression on the source's activation parameter), I cannot just keyframe the rest length parameter.
I guess I would need the VEXpression field working on the rest length scale but have no clue how to approach this. Any help would be much appreciated. Thanks.
vellum animate rest length scale for a sequence of objects
2511 6 2- trantor
- Member
- 6 posts
- Joined: 5月 2019
- Offline
- Enivob
- Member
- 2625 posts
- Joined: 6月 2008
- Offline
This tutorial is not balloon related, but it does demonstrate how to stagger restlength animations over time.
https://entagma.com/simulating-curling-ribbons-in-vellum/ [entagma.com]
https://entagma.com/simulating-curling-ribbons-in-vellum/ [entagma.com]
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
- trantor
- Member
- 6 posts
- Joined: 5月 2019
- Offline
Thanks a lot Enivob for the tutorial link - very interesting! I am not quite sure yet how I may use it for my case though, I guess I would have to watch it a couple of times more to really get behind the concepts used .
What I was initially hoping for, was some kind of expression inside the vellum constraint properties node that would allow to animate and evaluate the rest length scale across a certain amount of frames for each instance that gets "spawned" into the scene. But maybe this is the wrong way to tackle it.
What I was initially hoping for, was some kind of expression inside the vellum constraint properties node that would allow to animate and evaluate the rest length scale across a certain amount of frames for each instance that gets "spawned" into the scene. But maybe this is the wrong way to tackle it.
- Robbert
- Member
- 53 posts
- Joined: 2月 2017
- Offline
In the SOP network, prior to emitting the balloons into the vellum sim you can store the frame number on the geometry. A wrangle with something like f@emitframe = @Frame; will do. When they are emitted into the sim, this attribute stops accumulating and thus stores the frame at which it was actually emitted. You can then use another wrangle, or a VEXpression in the sim and just lerp the restlength based on that number. For example; f@restlength = lerp(f@originalrestlength,f@targetrestlength,fit(clamp(@Frame - f@emitframe,0,10),0,10,0,1)); This way, your restlength will lerp from the original length to another length over 10 frames. Additionally, you can store the targetrestlength on the emitted geo, giving you per-balloon control. You could even do the same with the time it takes to lerp, by replacing '10' with for example 'f@lerptime'. Hope this helps a bit
Edited by Robbert - 2023年4月25日 08:57:40
Technical VFX artist @ Housemarque / Sony Interactive Entertainment
- trantor
- Member
- 6 posts
- Joined: 5月 2019
- Offline
Hi Robbert, thank you for giving some advice. I am pretty sure it would do exactly what I was after, but I seem to be not able to get it working though (that's why it took me so long to reply ) - probably some issues with my setup. I have attached the file if you don't mind taking a look. What also confuses me is that leaving the rest length in the vellum constraint properties node at its default of 1 would make the mesh explode.
Btw, do you know a good procedure / workflow to initially dial in and balance stretch, bend and pressure settings? I seem to be poking in the dark and eventually land at a point I am happy with ...
Btw, do you know a good procedure / workflow to initially dial in and balance stretch, bend and pressure settings? I seem to be poking in the dark and eventually land at a point I am happy with ...
- Robbert
- Member
- 53 posts
- Joined: 2月 2017
- Offline
Took a quick look at your setup and pulled it a few steps forward I've attached that file again. As for the changes;
- The most important thing is to really regard the surface constraints and the pressure constraint as totally separate things. Scaling the surface of a balloon does not simply multiply the inside volume and thus we need some tricks to calculate the correct rest length for the pressure constraint (you can see this in the setup that is attached). I've used a transform that looks up a detail attribute from it's spare input to simply scale the original balloon so you can visually see what is happening (you could also just calculate it all in a wrangle). We then have the original volume and the target volume, and can simply deduct a scaling factor from those.
- I've pulled the writing to the pressure constraint totally separate from the other constraints. Mostly for clarity.
- A real balloon has a bit more pressure than its surface allows for (hence the stretching of the surface). So we either scale the pressure up a bit (can be done in the wrangle with a slider) or lower the final restlengths a bit (done in the sim in the VellumConstraintsProperty node).
- The pressure constraint 'fighting' with the surface constraint can cause bit of random movements as they try to overcome each other. I've added a bit of drag to quickly dampen this, but there are many other more elegant ways of doing this.
Anyhow, I think you were not that far off. This balloon thing is a bit of a complicated setup, and doing the same with a softbody containing pressure 'strut' constraints would be much easier and more stable to handle. Hope this helps you out a bit tough
Cheers!
- The most important thing is to really regard the surface constraints and the pressure constraint as totally separate things. Scaling the surface of a balloon does not simply multiply the inside volume and thus we need some tricks to calculate the correct rest length for the pressure constraint (you can see this in the setup that is attached). I've used a transform that looks up a detail attribute from it's spare input to simply scale the original balloon so you can visually see what is happening (you could also just calculate it all in a wrangle). We then have the original volume and the target volume, and can simply deduct a scaling factor from those.
- I've pulled the writing to the pressure constraint totally separate from the other constraints. Mostly for clarity.
- A real balloon has a bit more pressure than its surface allows for (hence the stretching of the surface). So we either scale the pressure up a bit (can be done in the wrangle with a slider) or lower the final restlengths a bit (done in the sim in the VellumConstraintsProperty node).
- The pressure constraint 'fighting' with the surface constraint can cause bit of random movements as they try to overcome each other. I've added a bit of drag to quickly dampen this, but there are many other more elegant ways of doing this.
Anyhow, I think you were not that far off. This balloon thing is a bit of a complicated setup, and doing the same with a softbody containing pressure 'strut' constraints would be much easier and more stable to handle. Hope this helps you out a bit tough
Cheers!
Edited by Robbert - 2023年4月28日 03:44:11
Technical VFX artist @ Housemarque / Sony Interactive Entertainment
- trantor
- Member
- 6 posts
- Joined: 5月 2019
- Offline
-
- Quick Links