|02 February 2008||#1|
Manchester, United Kingdom
Join Date: Jul 2007
Slight random rotation
I've never really had a chance to use MEL, so please forgive me if this is a bit simple, but i can't figure it out (in the short amount of time I have).
I want to randomise, just slightly, the rotation of a few hundred simple 4-sided poly planes which represent glass panels so they'll pick up reflections in a more natural way.
Is there a simple way to do this?
They're currently separate objects, but once their rotation has been altered I'll be combining them.
Each pane is around 4 units high, and I only need to rotate them through X and Y, probably by no more than 0.5 - I don't need to rotate them through Z.
Here's an image, with units shown, in case it helps:
Should this be as simple as I think it should be?
Any help appreciated.
|02 February 2008||#2|
Senior Technical Animator, Game Animator
Gaming Minds Studios
Select all you Objects and run this:
you can play with the RandomValue to increase the randomness
Take care of your pivot...
Last edited by GiantG : 02 February 2008 at 02:17 PM.
|02 February 2008||#4|
Winter Park, USA
I was also thinking about this and I was curious if you were doing any animation with this structure. Because I was thinking that you might also be able to make a locator or something to select that you could create an attr channel, on so that you could control the open and closing of these windows in groups, or all at once.
polyObject.rx = locator.windows *(rand($randvalue)
With that I will play around with it some. But the whole purpose of that is for you to be able to control the degree in which the windows are opening, which would be affected by the time of day. As well as weather conditions.
|Thread Closed share thread|