Maya for 3D Printing - Rapid Prototyping
In this course we're going to look at something a little different, creating technically accurate 3D printed parts.
# 1 28-01-2009 , 01:06 PM
Registered User
Join Date: Nov 2002
Location: Philippines
Posts: 136

Instancer rotation question

Hi everyone, I want to do a gatling gut sort of effect, where the bullets fly out and the casings are ejected and fall to the floor. I've gotten the instanced shell casings to randomly rotate in the air when ejected, but they don't stop rotating and seem to vibrate when they land on the ground. Does anyone know how to address this? Any and all help would be appreciated.

Thanks user added image

# 2 28-01-2009 , 01:24 PM
ragecgi's Avatar
Registered User
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
Well, as there are a number of things going on here, I'll need to narrow down one thing before we begin troubleshooting for you, cool?

Ok, you said that you got your instanced objects to randomly rotate.
My first question is how did you do this for your objects exactly?

As there are a number of ways to do this each with their own individual issues, so i just wanna make sure I don't waste your timeuser added image


Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
# 3 28-01-2009 , 04:40 PM
bendingiscool's Avatar
Subscriber
Join Date: Jul 2006
Location: London
Posts: 567
I'm guessing your using come custom PP expressions on your instanced geometry? If so please could you post them so we can help ya.

A simple thing to do would be to add a runtime expression that tells whatever your using to drive the rotation to stop when it collides with the floor.

You may have some odd results as the bullets are only instanced so it won't be them that are hitting the floor but the particles, so there may be penetration between the bullets and the ground which can't really be helped with instanced geometry.

As Rage mentioned a little more info would be handy.

Chris

# 4 29-01-2009 , 03:46 PM
Registered User
Join Date: Nov 2002
Location: Philippines
Posts: 136
Right, I am using a couple of PP expressions, a creation to get them to be born at random rorientations and a runtime to get them to spin randomly. I'll ge those up soon. I just don't have them with me right now and I can't remember the exactly off the top of my head.

As for the intersection, I found that for what I'm doing at least, having a non-renderable collision object slightly above the rendered ground plane works well.

Thanks in advance, guys. user added image

# 5 29-01-2009 , 10:29 PM
ragecgi's Avatar
Registered User
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
No problemuser added image

Sounds like your doing it right, so the only thing we need to stop is the rotation, and deal with the jitteruser added image

The Fist thing regarding the jitter that I would suggest you check is in the GEO node for the floor AND the particles are to make sure that the "resilience" (otherwise known as bounciness) is set to ZERO on both the floor and your particles, otherwise they will continue jittering.

Also, you can key this value as well so they bounce a few times, then stop.

Finally, one TRUE, way of killing the bounciness completely is to bake your simulation, and in the graph editor starting at the frame where your particles are hardly jittering at all, just delete all the keyframes after that, this way they will freeze in place, thus stopping their movement all togetheruser added image

This is a great technique to use in conjunction with the Trax editor to get the animation timing to look right as well.


As far as the random rotation, having particles rotate randomly with an expression is nice, but they will continue rotating regardless of the scene interaction.
So, if you set the rotation expression to be controlled by particle age, then they will stop as the particle gets older.

There are a few other ways to help this as well, such as particle collision events, etc. but try those first, good luck!


Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
# 6 30-01-2009 , 02:08 PM
Registered User
Join Date: Nov 2002
Location: Philippines
Posts: 136
Thanks for the ideas, I never thought of going in and deleting keyframes on a baked simulation. I'll try that and let you know what happens.

At any rate, here are the expressions I used. I first made a couple of new attributes, CustomValue, which is a float, I think, and CustomRotation, which is a vector.

Tha partice object was renamed to Casing

Creation Expression:
//Random Value//
CasingParticleShape.CustomValue = rand(-10, 10);

//Random start rotation for each instance//
CasingParticleShape.CustomRotation = <<rand(360), rand(360), rand(360)>>;

Runtime Before Dynamics Expression:
//Random Rotation Over Time//
CasingParticleShape.CustomRotation += CasingParticleShape.CustomValue;

//Attempt to stop rotation of instances//
if{CasingParticleShape.age >=3)
(CasingParticleShape.CustomValue = 0);

The idea of the if statement is that at around 3 seconds of age, roughly when a shell casing lands and bounces once, it stops rotating becase the number that gets added to the rotation value from the previous frame is 0.

So, now that's my current set-up. Will try your suggestions. Rage. user added image If you or anyone have any more ideas, I'm all ears.

Thanks user added image

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads