Integrating 3D models with photography
Interested in integrating your 3D work with the real world? This might help
# 1 03-09-2004 , 06:11 PM
sjurick's Avatar
Subscriber
Join Date: May 2003
Posts: 136

SDK duplication

I'm trying to figure out how to get an effect thats hard to describe in text:

For help in visualizing what I'm going for, think of the spinning wheels on game shows or at carnivals that have a spinning pointer go around and all around the border of the board is a concentric set of lights. Each light illuminates as the pointer goes past it.

I've tried a mockup by using SDK to key the illumination of the first light, but instead of having to manually key all n number of lights (which could be several), I'm wanting to try to duplicate or copy the keys for the other lights on the board. Unfortunately the pointer position seems to be copied as well and isn't advancing to the next light bulb if that makes sense.

Is there a better way to accomplish this simulation?


"Please excuse the crudity of this model, I didn’t have time to build it to scale or to paint it"
:: Dr. Emmett Brown
# 2 28-09-2004 , 02:28 AM
twisteddragon33's Avatar
Registered User
Join Date: Apr 2003
Location: New York, USA
Posts: 1,945
Does the wheel move and light stationary or the light move and wheel stationary?


________________________
AIM: SublimeDragon33
Catch me if i'm on. Always up for a chat.
e-mail: sublimedragon33@gmail.com
# 3 28-09-2004 , 11:53 AM
sjurick's Avatar
Subscriber
Join Date: May 2003
Posts: 136
The wheel would be stationary, as are the lights attached to it. The "pointer" would be the only thing moving.

The ultimate goal is to have lets say 360 lights for the 360 directional degrees of a circle. As the pointer passes by each bulb, it turns on and off (on as the pointer is just about on it through just about off it, then the bulb turns off).

This needs to be duplicated I'm guessing 359 more times but each bulb of course is in its relative position of the 360 degree circle.

When I duplicate it after the first bulb setup with SDK, ALL bulbs come on and off as soon as the pointer passes the first bulb. Then the other 359 don't work as the pointer continues around the wheel until it hits the first bulb again, at which time all of the bulbs light and dim at the same time again, etc.

It seems very simple at a high level but darn if I can figure out how to do this.


"Please excuse the crudity of this model, I didn’t have time to build it to scale or to paint it"
:: Dr. Emmett Brown
# 4 03-10-2004 , 09:30 AM
ArtBlack's Avatar
Registered User
Join Date: Apr 2004
Posts: 15
I read your post three times and STILL couldn't understand what exactly you are talking about.. must be getting tired here!...

Now here are some ideas... since you have the lights turn on and off only when they are at one specific point. why do you use 360 lights to begin with? Lights themselves don't render anyways! Just create one light and have it stable to where the pointer is and have it light on and off as the wheel gets in to the right position.
There are many ways to do this. The fastest would be to write an expression, a less advanced (but more work) would be to keyframe it.

And actually if you have letters or numbers that are on the wheel just like those game shows maybe it is just better you just light it up with incandecency. Have two texture sets asighned to the object. One set for the colour texture and another set for the incandescency. Having the second one be a projection texture that only projects to the specific area that the wheel passes. If you also use an aditive to the shader network you can have only the lighter parts that don't have a sort of text or number on it light up a dear bit more.

If I really misunderstood the whole problem and made it even more confusing I am really sorry. As a result if a wheel spinning around and a segment of it lighting up in only one specific part as it passes this specific point as it spins is what you are talking about: there are really alot of ways to do it.

Hope this helps

Black

# 5 03-10-2004 , 07:33 PM
Registered User
Join Date: Aug 2004
Posts: 24
As ArtBlack said, there are many ways to do this, but you want a simple way that you can duplicate and not have to set up everything more than once. Here is a quick method for you:

Create your first light and the pointer and creat a distanceDimension (Create->Messuring Tools->Distance Tool) move one of the distance locators to the light and the other to your pointer. Parent the light locator to the light and the pointer locator to the point. To make sure everything duplicates ok, also parent the distanceDimension to the light. Now create an expression that looks at the distance between the light and the pointer and changes you light. To test this I actually changed the scale of the light (a simple sphere). The expression would look somthing like this:

if (Light1_DistanceShape1.distance < 8.5)
{
Light.scaleX = 2;
Light.scaleY = 2;
Light.scaleZ = 2;

}
else
{
Light.scaleX = 1;
Light.scaleY = 1;
Light.scaleZ = 1;
}


You will have to change the distance value to what ever your scale is. Be carfull with the distance, maya internally works in cm, so if you are not in cm's then the distance on screen will not be the same as the distance in the expression. All I did was use getAttr Light1_DistanceShape1.distance to see what range I wanted for the expression.
To finish this I grouped the Light so that I could move the rotation pivot without altering the distance and moved it to the center of the `wheel`. Now I could rotate the group node and watch the Light move round and round and get twice as big when it nears the pointer.
From here I was able to duplicate the group node with `duplicate input graph` checked and everything duplicated with it. Make sure you also have `assign unique name to child nodes` checked when duplcating. Now you can duplicate the Light as many times as you like and have lots of them without having to set it all up again.

Hope this helps a little,

Richard


----------------------------------------------
Richard Cheek
https://www.freelance-animation.com
----------------------------------------------
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