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 18-01-2003, 08:36 AM   #1
silva
Subscriber
 
silva's Avatar
 
Join Date: Dec 2002
Location: New Zealand
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Default Aiming Cameras on Objects

Hi, I'm working through a tutorial at the moment, just building a simple rocket ship and animating its takeoff, it is real basic stuff for most ppl, I'm finding it ok so far but I'm stuck when I come to spotlights... the tutorial says to position 3 spotlights which I have done, then what I have to do is select a spotlight and the rocket, then make the spotlight always focus on the rocket, I think it was something like Constrain > aim ... or something, anyways when I do this it says it worked, like in the hypergraph there is a connection made between the spotlight and some other node which must represent the connection .... but the spotlight itself is not pointing at the rocket, my question is why? I cannot change the position of the spotlight to face the rocket, and thats sposed to be done automatically by aiming it at the rocket... any ideas?


Sorry If ive managed to confuse you even more !
silva is offline   Reply With Quote
Old 18-01-2003, 08:49 AM   #2
mark_wilkins
Registered User
 
mark_wilkins's Avatar
 
Join Date: Jan 2003
Posts: 161
Thanks: 0
Thanked 1 Time in 1 Post
Default

It's a matter of your aim axis.

There are a few ways to deal with this problem.

First, I think you can type an aim axis into the option box for the aim constraint menu item. This is probably the hardest way to go about it because you'll have to figure out what numbers correspond to the correct direction (although I suspect that the spotlights point in positive z in their local space.)

Second (and this is my favorite overall trick for dealing with constraints, you can GROUP the light and aim-constrain the parent group. Then, you'll still be able to rotate the light itself after the fact.

This is a nice trick for cameras where you want the camera to follow something like a vehicle but you want to add animation (like camera shake) on top of the motion of the vehicle, or you want to be able to tumble and position the camera from the camera view, which constraining the camera directly would normally prevent.

Another possibility that isn't quite as flexible is to select the aim handle for the light (you'll have to turn it on, but the light has one) and point-constrain that to the rocket IF you can do that (I can't remember if you can constrain that handle and my computer with Maya is packed for moving at the moment.)

-- Mark
__________________
Mark R. Wilkins
author of MEL Scripting for Maya Animators
www.melscripting.com

Last edited by mark_wilkins : 18-01-2003 at 08:52 AM.
mark_wilkins is offline   Reply With Quote
Old 19-01-2003, 12:48 AM   #3
silva
Subscriber
 
silva's Avatar
 
Join Date: Dec 2002
Location: New Zealand
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm a bit confused now, just reading the documentation I dont see why it wont work when I follow the instructions.. I have the rocket ship near the origin and the pivot point is just below the origin, I place the spotlight up and away from the ship, when I create it it looks as if it is facing the origin kinda, so I select the rocket , then the light, constrain > aim ... and when I do this the light then aligns with the x axis and faces out along that, NOT at the ship, now from reading the manual it says something that the lights x axis will be now aimed toward the pivot point of the rocket, but its not !! Surely there has to be an easy way to solve this !

I couldnt quite follow your instructions mark, sorry, I'm pretty new to all this, and I wouldnt know how to find the coordinates to point the spotlight at.

Basically what is going to happen is the rocket will take off and I want the spotlight to always focus on the rocket, any ideas? You are right that it does have to do with the aim axis. If I typed an aim axis into the constraint menu then that wouldnt be connected to the rocket would it? When the rocket took off the camera would still be focusing on that aim axis? Don't they have to be connected somehow?

And when you say group the light and aim constraint to the parent group, what is the parent group? The rocket?
silva is offline   Reply With Quote
Old 19-01-2003, 03:29 AM   #4
baldgeek
Registered User
 
Join Date: Jan 2003
Location: NZ
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I remember trying that very same tutorial some time ago and having the exact same problem. I found the problem was the same for the lights and then the camera as well. From memory, the tutorial gets you to have the camera follow the rocket as well.

I spent ages back then playing around (basically ended up doing option 1 above). I have just spent some time playing with the old file and here are the things I had to do:

I basically aimed the light at the rocket manually,

then selected the rocket first and then the light,

selected Constrain/Aim options and set the following:

Aim Vector: 0 0 -1 (x,y,z)
Up Vector: 0 1 0 (x,y,z)
World Up Vector 0 1 0 (x,y,z).

Maybe this will work for you. I tried it this afternoon on all lights and camera and they followed the rocket perfectly. To make sure of this I selected each light and camera individually and set the perspective view to Look Through Selected, then played the anim.

Why these settings worked is beyond me. I even tried reading the help files!! but got lost in the jargon.
baldgeek is offline   Reply With Quote
Old 19-01-2003, 08:33 AM   #5
silva
Subscriber
 
silva's Avatar
 
Join Date: Dec 2002
Location: New Zealand
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks alot, I'll try that and let you know how it goes.. I'm teaching myself how to use Maya and I'm trying to understand concepts behind what I'm doing, but I guess sometimes you just gotta not ask questions and just do it, why does it work? who cares as long as it works
silva is offline   Reply With Quote
Old 19-01-2003, 01:49 PM   #6
mark_wilkins
Registered User
 
mark_wilkins's Avatar
 
Join Date: Jan 2003
Posts: 161
Thanks: 0
Thanked 1 Time in 1 Post
Default

Actually I find it's usually a good idea to ALWAYS try to know WHY things work because if you don't you'll find the disconnect eventually bites you in the ass. :/

If you've ever fiddled with the aim vector, up vector or world up vector options in the option box, remember that changed values will "stick" and then become the default for use anytime that you don't open the option window and edit those settings.

Again, as I suggested, the Aim Vector setting is almost certainly the issue. Changing the Aim Vector picks a direction in local coordinate space for the light that gets aimed at the target.

The Up Vector and World Up Vector settings control the orientation of the aimed object around the aim vector, so for a spotlight it probably won't matter what those settings are because it's circular and all orientations around the center axis amount to the same thing.

-- Mark
__________________
Mark R. Wilkins
author of MEL Scripting for Maya Animators
www.melscripting.com
mark_wilkins is offline   Reply With Quote
Old 19-01-2003, 11:41 PM   #7
baldgeek
Registered User
 
Join Date: Jan 2003
Location: NZ
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Cheers Mark for the input. Your simple explanation of the various vectors has cleared some stuff up for me in my own head.

I am another one trying to teach myself Maya and work things out as I go.

Most stuff seems fairly simple to understand so far. The help files had me confused after trying to read all about the vectors in there. I haven't had to try that kind of animation again so left it for another time.

Steve
baldgeek is offline   Reply With Quote
Old 20-01-2003, 05:26 AM   #8
silva
Subscriber
 
silva's Avatar
 
Join Date: Dec 2002
Location: New Zealand
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Mark, I managed to get it working from what you said.. but now I have another problem, all the lights are going and I'm in the middle of animating its takeoff, I have it all working except for one little bit. When the rocket takes off (the animation is controlled by dynamics like impulse & Gravity), it slows due to gravity etc, but when it hits the ground it is SUPPOSED to bounce off the ground, but instead when it hits it keeps going and the ground is pushed down with it, I need to lock the ground in place somehow, any ideas?
silva is offline   Reply With Quote
Old 20-01-2003, 07:07 PM   #9
baldgeek
Registered User
 
Join Date: Jan 2003
Location: NZ
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sounds like you made the ground an Active Rigid Body instead of a Passive Rigid Body.

An active rigid body will move when hit by something else - in this case the rocket.

A passive rigid body will act like a solid object but will not move/distort when hit by something else.

Making the ground a passive rigid body should solve your problems.
baldgeek is offline   Reply With Quote
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem solving many dynamic objects in a pile? rohiniduggal Dynamics & Special Effects 3 14-01-2011 07:26 PM
Strange Problem - Unable to change attributes for multiple objects anthonysw3 Technical Issues 4 04-12-2010 11:56 PM

Thread Tools





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.