Why is my expression not working on a Motion path?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 06 June 2013   #1
Unhappy Why is my expression not working on a Motion path?

Autodesk Maya 2013

Hi all,

I am relatively new to using expressions, so please bear with me.

I have created a spaceship scene, and for my fan blades I have created a expression so that they are constantly spinning on the Z axis. Here is the expression:

EngineR|FanBlades.rotateZ = frame * CCShip_handle.TurbineSpeed;
EngineL|FanBlades.rotateZ = frame * CCShip_handle.TurbineSpeed;

It worked just fine, right up until I wanted to attach my Spaceship onto a path. Is this normal?

I have tried to fix it and researched the issue but, keep coming up short, Any ideas why this would be happening?

Kind regards
Bianca

P.S. Please note that I have a value by the Turbine Speed Attribute so that is not the issue.

Last edited by Bianca-Lee : 06 June 2013 at 06:18 AM.
 
Old 06 June 2013   #2
You could put each of the rotating fan blades into their own group and then either hard parent or parent constrain them to the object that is going to animate along a curve/path.

This will make sure that the blades still rotate locally on their own Z axis inside the groups no matter how the groups are aligned in world space.
__________________
AKA KC / Intuition
 
Old 06 June 2013   #3
Hey there.

Quote:
Originally Posted by PerfectLine
You could put each of the rotating fan blades into their own group and then either hard parent or parent constrain them to the object that is going to animate along a curve/path.

This will make sure that the blades still rotate locally on their own Z axis inside the groups no matter how the groups are aligned in world space.


Hi PerfectLine

Thanks for the tip, but not quiet sure I follow. I have put all the fan blades into two separate groups, one group for the left fan blades and another group for the right. Both group are parented to the main spaceship. I have never done that before. Is there no way I could fix my expression some how?

What I did try to do was take the group and parent constrain it to the animating object and it didn't make a difference though.

Thanks again for the help.

Kind regards
Bianca

Last edited by Bianca-Lee : 06 June 2013 at 01:26 PM.
 
Old 06 June 2013   #4
Quote:
Originally Posted by Bianca-Lee
It worked just fine, right up until I wanted to attach my Spaceship onto a path. Is this normal?
It would help us if you describe how it didn't work. I mean, did you get any error messages? Did the blades stop spinning, or keep spinning, but not how you expected?
From what you have said I would just say... No, it is not normal. Assuming the blades were parented under the group that was attached to the motion path, they should just go along for the ride and keep spinning.


The following is not related to your problem, but worth mentioning maybe... Try to avoid duplicate short names. For example you have EngineR|FanBlades. Here the short name is FanBlades.rotateZ, and it is the same as the one under EngineR. There are many situations where this causes problems for maya so it is good practise to name those parts uniquely: FanBladeR and FanBladesL. When the short names are unique you will have cleaner expressions since you no longer need the path to uniquely identify them.

FanBladesR.rotateZ = frame * CCShip_handle.TurbineSpeed;
FanBladesL.rotateZ = frame * CCShip_handle.TurbineSpeed;



David
__________________
http://www.djx.com.au
 
Old 06 June 2013   #5
Hi DJX

[QUOTE=djx]It would help us if you describe how it didn't work. I mean, did you get any error messages? Did the blades stop spinning, or keep spinning, but not how you expected?

Basically it just stopped spinning and I never received any errors. I agree with you on the naming, but don't think it is that in this situation as it was working before I attached it to the motion path.

This is very confusing to me. I changed the names by the way so the expresion looks like this now:

FanBladesR.rotateZ = frame * CCShip_handle.TurbineSpeed;
FanBladesL.rotateZ = frame * CCShip_handle.TurbineSpeed;

Still no change I am afraid :(

Thanks for the help though.

Kind regards
Bianca

Last edited by Bianca-Lee : 06 June 2013 at 02:44 PM.
 
Old 06 June 2013   #6
Still not working

Hi guys,

I realized now that as soon as the ship starts moving be it on a motion path or not, the blades don't move, but when it is still it starts moving again. Any ideas why it is dong this?

Kind Regards
Bianca
 
Old 06 June 2013   #7
Probably the easiest way to get a quick solution is to post a simple scene that demonstrates the problem. We don't need the full model, just the bit that is not working. I'm happy to take a look if you prefer to email it to me instead.

David
__________________
http://www.djx.com.au
 
Old 06 June 2013   #8
Morning DJX

Hello,

You can check out this link, Its just a quick render to give you the idea, hope this helps.

http://www.flickr.com/photos/95801803@N04/9125532048/

Kind regards
Bianca
 
Old 06 June 2013   #9
Are you certain the blades are not spinning? It probably seems like a silly question, but depending on the speed of rotation, it is possible that you are getting a space-age version of the old waggon-wheel effect. With repeating patterns the rule of thumb is that you need 3 frames minimum between the repetition if you want to be able to perceive what direction it is moving. Unless you rotate those blades extremely slowly, there is little chance you we be able to perceive the motion. I think you should consider breaking the repetition by significantly discoloring one or two, and maybe adding some other detail to a couple. You need something for your eyes to be able to actually follow. I could be completely wrong, but I suspect this could be your problem.

David
__________________
http://www.djx.com.au
 
Old 06 June 2013   #10
Quote:
Originally Posted by djx
Are you certain the blades are not spinning? It probably seems like a silly question, but depending on the speed of rotation, it is possible that you are getting a space-age version of the old waggon-wheel effect.


This is true.. parent a camera to the spaceship and look through it.. it will reveal if the blades are actually turning or not.

Were you planning on rendering with motion blur?
__________________
blah blah blah
 
Old 06 June 2013   #11
Hehe

Hi guys,

Going to give it a go and see if that makes a difference, going to feel like such a tool if it is.

Kind regards
Bianca
 
Old 06 June 2013   #12
Hello again.

Me again,

So I parented a camera to the space ship and now I feel like a complete noob. It turns out you were right it is moving HAHAHA... Yes I definitely want to add motion blur on my final renders.

Kind regards
Bianca
 
Old 06 June 2013   #13
Even with mo-blur you'll get better results if you find some way to break up the repetition at the source. A couple of oil stains or tarnished metal from a previous battle, or a dint from an asteroid hit. This details will help you see the rotation and go a long way to giving the perceived motion that you are looking for.

David
__________________
http://www.djx.com.au
 
Old 06 June 2013   #14
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 04:39 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.