Maya Training

Introduction to Hard Surface Modeling

Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

Maya Training

Shading, Lighting and Rendering the Bedroom in MR

Maya Training

Robot volume one - Modeling with animation in mind

Maya Training

Spach-Alspaugh House the complete courseware

Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

New Maya Training

Robot Volume 02 - Hybrid Rigging
You are here > Home > SimplyMaya Community Forums
Loading

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 28-01-2009, 01:06 PM   #1
Calvin
Registered User
 
Join Date: Nov 2002
Location: Philippines
Posts: 134
Thanks: 1
Thanked 3 Times in 3 Posts
Default 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
Calvin is offline   Reply With Quote
Old 28-01-2009, 01:24 PM   #2
ragecgi
Super Moderator
 
ragecgi's Avatar
 
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
Thanks: 0
Thanked 13 Times in 12 Posts
Default

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
__________________
Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
ragecgi is offline   Reply With Quote
Old 28-01-2009, 04:40 PM   #3
bendingiscool
Subscriber
 
bendingiscool's Avatar
 
Join Date: Jul 2006
Location: London
Posts: 567
Thanks: 0
Thanked 1 Time in 1 Post
Default

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
bendingiscool is offline   Reply With Quote
Old 29-01-2009, 03:46 PM   #4
Calvin
Registered User
 
Join Date: Nov 2002
Location: Philippines
Posts: 134
Thanks: 1
Thanked 3 Times in 3 Posts
Default

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.
Calvin is offline   Reply With Quote
Old 29-01-2009, 10:29 PM   #5
ragecgi
Super Moderator
 
ragecgi's Avatar
 
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
Thanks: 0
Thanked 13 Times in 12 Posts
Default

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!
__________________
Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
ragecgi is offline   Reply With Quote
Old 30-01-2009, 02:08 PM   #6
Calvin
Registered User
 
Join Date: Nov 2002
Location: Philippines
Posts: 134
Thanks: 1
Thanked 3 Times in 3 Posts
Default

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

Thanks
Calvin is offline   Reply With Quote

A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2015 SimplyMaya - vBulletin® Copyright © 2000-2015, Jelsoft Enterprises Ltd.