Monday, March 23, 2015

Day 15 - Particles

Particles

For today, I tried to do some particles tutorials. Firstly,I tried on to play with some VEXpressions. So to set up the basics, I created a circle make it ZX plane and go to Particles > Source Particle Emitter. I've also created a grid so that later on when I added the expressions, I'll be able to see the difference. In order to differentiate even better, I added a "popcolor" node and color both particles differently. After that, I added a "popdrag", enabling the tick "Use VEXpressions" I added this expression in. 

if (@Frame <60 ) {
airresist = 0;
} else {
airresist = 20;
}


This expressions allow the particles to slow down very abruptly when it reaches frame 60.
However, if I want to let the particles to slow down gradually, I can change the "air resist" part to this:

if (@Frame <60 ) {
airresist = 0;
} else {
airresist = @nage*10;
}



Next, we can add a "popforce" and at the Force section, x-axis we change to 5, this would allow the particles to move slightly slanted. Or we can also change the amplitude to 5, swirl size to 10 and this would create a gradual zig-zag slant effect. "Swirl scale" is like a multiplier for the zig-zag slant effect. After that, we can make it more zig-zag way by adding an expression:

if (@Frame >120) {
amp = 60;
}



Going on to the next exercise, I've also created out a circle, making it a source particles emitter and I added a "popaxisforce". At the node there, I changed the shape > radius to 3.5 and height to 4.35. As for the speed, I changed the suction speed to 5. The suction speed will cause the particles to go downwards while lift speed will make the particles to go up. For the orbit speed, it will represent how fast the particles will be spinning around. By changing the amplitude, swirl size and swirl scale, we can create some cool shapes and effects out.



At the speed section, if we were to "Use VEXpressions" and select the "Pass through" options, we'll get some default expressions out and we can alter to suit the kind of effect that we are achieving for. So I added this expressions:

orbitspeed = orbitspeed;

if (@nage > .5) {
liftspeed *= -100;
suctionspeed *= -1;
;
}
suctionspeed = suctionspeed;



For the next example, I first drew a curve then do a resample, then I create a circle, make it ZX plane and make it a source particles emitter. Next, I added a pop curve force at the autodopnetowrk and make the sop path > curve_object


After that, I changed the Pop curve force > Curve force and the max influence radius to 0.5
Then I adjusted the individual forces to make the particles flow through nicely.



After that, to improvise further, I added a "popdrag1" and in my "popforce1", I've added this expression.
amp *= f@oncurve*3;
amp *= fit(f@oncurve, 0, 0.01, 1, 0);


Following on, I did another example, so for this one, it's some green smoke emitting and disappeared. Basically, the set up is the same as my previous exercises. Then I'm adjusting some of the settings when I added those nodes. I'm making use of "popcolor", "popforce", "popdrag","popwind" and "popreplicate" to create this effect out. For this example, I had problem initially as I didn't know which part did I made a mistake that makes me unable to produce the smoke out but a pile of particles. But after that, I opened the reference file and check according so my problem is solved.



Next up, I'm using pyro fx > wispy smoke to combine with my source particles emitter to make use of the particles to simulate the smoke. To make both simulate, I'll have to use "Pop advect by volumes" node and change the velocity source to DOP Data. and add the necessary nodes such as "popforce1" and "popdrag1".


For the last example, I'm making use of the RBD object functions to create out. I'll have to create out a grid then use an object merge to reference from one of the box that I created. Next, I'm adding in an attribwrangle node and in the parameter interface, I'll have to add a string and name it prefix. So after that, in the prefix area, I'll add in this expression : `opname("..") and at the VEXpression, I'll be adding in this expression: s@name = concat(chs("prefix"), "_", itoa(@primnum));
Then I make the grid an RBD object after going to object level and I'll add a "multisolver" and remove "rigidbodysolver" . After adjusting the settings, I'll add a rbdpackedobject and copy the sop path from grid, replacing it to rbdpackedobject sop path. It will become something like this.



After that, I'm trying out some cool shapes so I'll substitute the "popattract" node with "popaxisforce". In the popaxisforce, I'll make the shape type to be torus, radius >15 and height >10. Then for the speed section, I'll change the Orbit speed >4 , Lift speed > 4 and suction speed >5. So it will ended up be like this:


No comments:

Post a Comment