Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Dynamics & Special Effects (https://simplymaya.com/forum/forumdisplay.php?f=33)
-   -   Instancer rotation question (https://simplymaya.com/forum/showthread.php?t=31829)

Calvin 28-01-2009 01:06 PM

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 :)

ragecgi 28-01-2009 01:24 PM

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 time:)

bendingiscool 28-01-2009 04:40 PM

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

Calvin 29-01-2009 03:46 PM

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

ragecgi 29-01-2009 10:29 PM

No problem:)

Sounds like your doing it right, so the only thing we need to stop is the rotation, and deal with the jitter:)

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 together:)

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!

Calvin 30-01-2009 02:08 PM

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

Quote:

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. :) If you or anyone have any more ideas, I'm all ears.

Thanks :)


All times are GMT. The time now is 09:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018