Realistic bubbles simulation
Re: Realistic bubbles simulation
Lmc,
Yes of course I can help, ICE is a bit confusing at first, but do not worry, nobody is born with the knowledge, once you have connected a few nodes together you will get much better.
So , I would love to redo that article point by point , its a great article , and would be worth it for beginners to see the equivalent in ICE, only im at work right now and they wouldnt be too happy with me spending all my time doing this, definitely later this evening I will translate it into ICE, but for now here is a few bits to help you get started.
Yes of course I can help, ICE is a bit confusing at first, but do not worry, nobody is born with the knowledge, once you have connected a few nodes together you will get much better.
So , I would love to redo that article point by point , its a great article , and would be worth it for beginners to see the equivalent in ICE, only im at work right now and they wouldnt be too happy with me spending all my time doing this, definitely later this evening I will translate it into ICE, but for now here is a few bits to help you get started.
- Attachments
-
- Bubble set velocity if reaches certain value
- bubbles_start_2.jpg (103.78 KiB) Viewed 2890 times
-
- bubble random size on emission
- bubbles_start_1.jpg (153.75 KiB) Viewed 2890 times
Gossip is what no one claims to like, but everybody enjoys.
Re: Realistic bubbles simulation
Tekano: no worry i can understand that, take your time. Btw i need sometimes to try out what u had jst posted. lol
thanks for ur help, i really appreciated it.
Best Regards,
lmc
thanks for ur help, i really appreciated it.
Best Regards,
lmc
Re: Realistic bubbles simulation
Hey, got some spare time & happy to help, its an interesting topic, and to be honest, the curl to noise framework that comes with Get>ICE>bubbles Does have all the elements you need except the connection to size & velocity ,which hopefully you will realise isnt that much of a problem to connect up in ICE after this. I'm just going to roughly translate some details & javascript code in Mr. Lords's article into ICE for you and hopefully provide you with a way to make a similar effect, and maybe learn something along the way.
Remember though, I believe Francois wrote that original article and script code to overcome the shortcomings of the as then XSI 5 or 6 exisiting particle system, which was dire... but in ICE its now elementary to do some of the code he wrote, therefore a lot of this I'm about to do is pretty reduntant, I have my reasons, first, its an interesting topic and article and secondly , I could never code and still can't! So its kind of in your face jscript
First bit of the article on Softimage Blog http://www.softimageblog.com/archives/127
Size problem
Size = (random number)5 * 0.025 + 0.005
The “* 0.025″ sets the difference in size between the biggest and the smallest bubbles.
The “+ 0.005″ sets the size of the smallest bubble size at 0.005 units. The biggest bubbles will be 0.03 units big.
In JScript, it’s written like this:
1 inParticle.Size = Math.pow(Math.random(), 5) * 0.025 + 0.005;
In ICE that code would look something like the pic below as jscript Math.pow(x,y) is where x = the base (or the random number between 0 & 1) and Y = the exponent or in this case 5
Remember though, I believe Francois wrote that original article and script code to overcome the shortcomings of the as then XSI 5 or 6 exisiting particle system, which was dire... but in ICE its now elementary to do some of the code he wrote, therefore a lot of this I'm about to do is pretty reduntant, I have my reasons, first, its an interesting topic and article and secondly , I could never code and still can't! So its kind of in your face jscript
First bit of the article on Softimage Blog http://www.softimageblog.com/archives/127
Size problem
Size = (random number)5 * 0.025 + 0.005
The “* 0.025″ sets the difference in size between the biggest and the smallest bubbles.
The “+ 0.005″ sets the size of the smallest bubble size at 0.005 units. The biggest bubbles will be 0.03 units big.
In JScript, it’s written like this:
1 inParticle.Size = Math.pow(Math.random(), 5) * 0.025 + 0.005;
In ICE that code would look something like the pic below as jscript Math.pow(x,y) is where x = the base (or the random number between 0 & 1) and Y = the exponent or in this case 5
- Attachments
-
- Size Problem Ice tree
- Size_problem_jscript_ice.jpg (57.93 KiB) Viewed 2861 times
Last edited by Tekano on 26 Oct 2011, 03:16, edited 1 time in total.
Gossip is what no one claims to like, but everybody enjoys.
Re: Realistic bubbles simulation
One node covers all that now in ICE, the Randomise value by range node, and inside this compound can be edited and the random value node inside has different distribution types, including a custom curve option so you can shape your distribution curve similar to the article
- Attachments
-
- randomise_valu_by_range_node.jpg (13.5 KiB) Viewed 2861 times
Gossip is what no one claims to like, but everybody enjoys.
Re: Realistic bubbles simulation
The speed problem
If a particle’s speed exceeds the product of it’s size and a coefficient, bring it back to that product.
1 speed = inParticle.Velocity;
2 size = inParticle.Size;
3 if (speed.Length() > size * 10) { // if speed is bigger than 10 times the size...
4 speed.NormalizeInPlace(); // scale the speed to be 1 and
5 speed.ScaleInPlace(size * 10); // scale speed to be 10 times the size.
6 }
7 inParticle.Velocity = speed;
If a particle’s speed exceeds the product of it’s size and a coefficient, bring it back to that product.
1 speed = inParticle.Velocity;
2 size = inParticle.Size;
3 if (speed.Length() > size * 10) { // if speed is bigger than 10 times the size...
4 speed.NormalizeInPlace(); // scale the speed to be 1 and
5 speed.ScaleInPlace(size * 10); // scale speed to be 10 times the size.
6 }
7 inParticle.Velocity = speed;
- Attachments
-
- speed_from_size_problem.jpg (91.96 KiB) Viewed 2861 times
Last edited by Tekano on 26 Oct 2011, 03:11, edited 1 time in total.
Gossip is what no one claims to like, but everybody enjoys.
Re: Realistic bubbles simulation
Francois has put some perlin noise already into the gravity force in the original particle system so we will do something similar here
- Attachments
-
- perlin_noise_gravity.jpg (53.26 KiB) Viewed 2861 times
Gossip is what no one claims to like, but everybody enjoys.
Re: Realistic bubbles simulation
The Wobble Problem
Generate a vector that has a random value for the X and Z axes, and multiply that value by the size and the speed. Add that vector the the particle’s position.
The big particles will wobble more than the small ones, and all particles will wobble progressively more as they gain speed.
Hopefully that gives you enough info to get started. Ive attached a compound as well which has this setup, get an empty point cloud, creat a simulated ice tree, attach this compound, then just attach a torpedo emitting object and hopefully should work
Generate a vector that has a random value for the X and Z axes, and multiply that value by the size and the speed. Add that vector the the particle’s position.
The big particles will wobble more than the small ones, and all particles will wobble progressively more as they gain speed.
Hopefully that gives you enough info to get started. Ive attached a compound as well which has this setup, get an empty point cloud, creat a simulated ice tree, attach this compound, then just attach a torpedo emitting object and hopefully should work
- Attachments
-
- F_Lord jscript bubbles.zip
- (26.39 KiB) Downloaded 146 times
-
- wobble_by_size_and_speed.jpg (70.61 KiB) Viewed 2160 times
Gossip is what no one claims to like, but everybody enjoys.
Re: Realistic bubbles simulation
and heres the video of it in action, please bear in mind that in the original post by Francois that he is using an image sequence of realistic moving bubbles (possibly live action) mapped to a grid that lasts for 100 frames. Am not sure which approach you are wanting to take, but to randomly select the starting frame of this sequence for each 'bubble' is not difficult to accomplish, Of course you need the sequence to begin with ;)
Gossip is what no one claims to like, but everybody enjoys.
- Hirazi Blue
- Administrator
- Posts: 5107
- Joined: 04 Jun 2009, 12:15
Re: Realistic bubbles simulation
Wow, that's some interesting/great stuff you cooked up, Tekano...
Stay safe, sane & healthy!
Re: Realistic bubbles simulation
wow, thank you for that realy good explanation!
makes it so understandable!
makes it so understandable!
Re: Realistic bubbles simulation
Tekano, thanks for the shared... its really helped and mean alot to us who got problems with script and ice tree setup.
Thanks again for your help and i believe alot of peaple will appreciated your posted.
Best Regards,
lmc
Thanks again for your help and i believe alot of peaple will appreciated your posted.
Best Regards,
lmc
Who is online
Users browsing this forum: No registered users and 66 guests