Jump to content

Must make cool sand explosion!


Recommended Posts

First steps, first hiccup. 

 

I am going to try to focus on the behavior of the sand where the front left tire hits - and then replicate it, and add clouds. 

 

This it the first step - but now I want to add a random velocity to each of the primary source particles. 

 

 

I want to slightly randomize the velocity the primary particles are born with... How?

 

my code doesn't work yet....

 

@oldvel = @v;
@v = @oldvel + (fit01(rand(@id), .02, .5));
Edited by cwalrus
Link to comment
Share on other sites

I realized why complicate things by adding a new velocity to the original one, when I should be able to just set a random velocity from the outset. 

 

However, When I put the code into the Wrangle node to do so, the particles seem to ignore the downstream POP Drag... etc...

 

 

hmmmmmm

Link to comment
Share on other sites

Arg! That doesn't work, because I need them to use the normals of the source for their original velocity.

 

So the question is, how do I add a random value to this original velocity, and have it only computed at their birth?

Link to comment
Share on other sites

Thank atom - yes, very aware of that tab :). However, since all of the particles have velocity/vectors based on the Normals of the source, adding variance there does not directly translate into variance in their velocity; rather it just moves them on the x,y,z axes more or less.

 

After messing around I've gotten closest with a POPVop - check it out. All I want to do now is either write it in VEX instead (which is more familiar to me than VEX), or add a bottom value to it in POPVOP so that they all fit to a range-  you can see some of them don't move at all now.

 

 

SandyParticle_Explosion_02.hipnc

 

 

(and if it's not clear I don't know how to do either yet, but I'm learning as fast as I can!)

Edited by cwalrus
Link to comment
Share on other sites

Personally I find the easiest way to do this is to just add noise to your initial velocities at SOP level Cameron. So you have normals on the geo you emit from which is defining their initial velocity. Inside a VOP just add some noises to this before it goes into POPS, add some 3d noise to alter the directions and then multiply the normal by some other noises to vary the initial speed. Hope this makes sense.

Cheers
Jacob.

Link to comment
Share on other sites

Yeah... get stuck right here. I'm going to revisit it but I have to jump on another sim... 

 

Shouldn't this work? This is applied to the source geo in Sops like you said, but I can see the normals are not ..... noise-ing around.....

 

Vops vexes me.... 

 

 

post-14434-0-19285900-1458259318_thumb.j

Link to comment
Share on other sites

AHA! I did not realize you have to promote the offset of the noise OUT of the VOP, and then animate it there.... Now I'm seeing noise! 

 

 

 

And... HERE is the file, with randomness applied to the velocity at birth.

 

SandyParticle_Explosion_03.hipnc

 

 

Now, if anyone can tell me how to subsample the VOP, I'd appreciate it! If you look closely you can see chunks of particles which I think represent frames....

Edited by cwalrus
Link to comment
Share on other sites

Ok I was going about this all wrong. I was spending way too much time getting hung up on the normals = velocity issue. I'll figure that out later, if I need to parent this system to some moving geo.

So I've redone it, and with some simple POP tweaks i have a good look cooking:

 

So now, on to rendering! Basically, if I can get that to look like sand, and somehow advect some clouds with it, that's most of the battle....

Link to comment
Share on other sites

Thanks Atom -

 

Now here's the thing. I have to attach that emitter to a moving object, ie the tire, for some shots I'm working on - here's one:

 

https://vimeo.com/159534907

 

password mantra

 

so of course, the particles have to emit in the direction the tire/sand contact point is facing. I know how to emit from a surface using the normals as the velocity, but I'm back to square one again (top of this posting) as to how to randomize their velocity if I use that method. 

 

What do you recommend I do, to have the same effect, but have the emitter rotate and move along with the tire?

Link to comment
Share on other sites

I played around a little with your scene. I added a POP Wrangle right after the particles are born.

@v = @N;
post-12295-0-34397100-1458327802_thumb.j

That adds some velocity difference based upon normal. I also changed the pointVOP so that P is driving P in the noise. This helps a bit too. I put the particle emitter on a path to test the rotate the emitter approach.

.

.

.

I was playing around with some more code for the Pop Wrangle. In this case I am multiplying the Normal by the Inherited Velocity from the Attributes tab.

 

float vel_scale = ch("../grid_object1_source/inheritvel");
vector local_N = @N;
@v = set(local_N[0]*vel_scale,local_N[1]*vel_scale,local_N[2]*vel_scale);
v@Cd = v@v;    // Cheap way to visualize velcities.
post-12295-0-52330900-1458328304_thumb.j

ap_SandyParticle_Explosion_03.hipnc

Edited by Atom
Link to comment
Share on other sites

I think one of the essential qualities of the truck-sand is that the emission is continuous. I think you're pretty close with your dynamics, you just need to throw milions of particles out there, have them interact, and do a little fake flip particle/volume wiggle to give the whole thing structure (or have a turbulent convection that decreases based on density of neighbors or something).

Link to comment
Share on other sites

Right on Atom! That's the code I was looking for, thank you.

 

Also, I managed to get the entire system to nicely advect a pyro cloud behind it... So my creative director is getting happier .....

 

Now I just have to merge all these into the shot. I'll post when done.

 

Thank you so much for your help!

 

@kleer - thanks, that sounds like a good idea, but I have no idea how to implement the turbulent convection plan.... ?

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