Complex UV Layout in Maya
Over the last couple of years UV layout in Maya has changed for the better. In this course we're going to be taking a look at some of those changes as we UV map an entire character
# 1 31-01-2006 , 08:30 AM
happymat27's Avatar
Subscriber
Join Date: Jul 2004
Posts: 1,257

random lights

Hello there,

I have made a 1970's style flashing dancefloor, well I have made the dancefloor and lit each square from below but I need to make each square flash on and off randomly. I could turn them on and off manually while animating the scene but with 25 squares that would take an age so I thought the best way to deal with the problem was to automate it. The thing is I have no idea about MEL scripting and was hoping that someone could point me in the general direction of a relevant tutorial that I could modify or could even give me an outline of where to start with this.

Cheers,

Mat.

# 2 01-03-2006 , 11:50 AM
skywola's Avatar
Registered User
Join Date: Jan 2004
Location: Tempe, Arizona, USA
Posts: 224
You are correct, that it would take MEL to do this randomly. I'm to LAZY :zzz: to write the code for you, but whenever I have something like this that I want to do, I use three main resources. . . .

First, the Maya library. You can look up things like lights, under developer resources>MEL commands, and a lot of the functions have example code at the bottom. The "rand" function is one you'll need.

Second, when you need to find info on a particular function in a brief synopsis, go to the script editor and type:

"help" then the name of the function, i.e.

help pointLight;

Third . . . the internet . . . google . . . using keywords like MEL, Maya, Lights, Random . . . something of that nature.


"The Sage as an Astronomer: If you still see the stars as something above you, you lack the eye of knowledge." Friedrich Nietzsche
# 3 01-03-2006 , 02:25 PM
Alan's Avatar
Moderator
Join Date: Oct 2002
Location: London, UK
Posts: 2,800


Technical Director - Framestore

Currently working on: Your Highness

IMDB
# 4 01-03-2006 , 02:43 PM
happymat27's Avatar
Subscriber
Join Date: Jul 2004
Posts: 1,257
Cheers guys,

but I decided to use a loop of four different light patterns in the end, it seemed a lot easier!! I'll definately remember this for future reference though.

This is what it was needed for

It's no where near finished yet and real life makes progress slow but I'm in no rush.

Cheers,

Mat.

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