FORUMS: list search recent posts

Drive Light Intensity/Color by Texture UV coords?

COW Forums : Autodesk Maya

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Jason Brummett
Drive Light Intensity/Color by Texture UV coords?
on May 19, 2005 at 12:08:19 am

I want to setup a generic "lightboard" effect like a "Now Playing" thing
that would allow me to take a bunch of lights/bulbs in a rectangular array
and pass an animated texture node same size in 3D as the Arrayed lights under this. How could I get
Maya to look at the color value of the animated texutre maps UV coords and then
drive the color/intensity of each light bulb?

In other words hook up 3D lights space to UV coords space over large texture board
and if Maya can sample the intensity/color of a texture at that location some how?

I watched a Tom Kluskeyns DVD on similarly related stuff (advanced shading/node networks) but can't seem to find a way to Create this 3D Light Billboard from an animated texture.

Thanks and Hope for 64bit Maya too...probalby release 10.

Jason Brummett
Studio Z Inc.


Return to posts index

Steve Sayer
Re: Drive Light Intensity/Color by Texture UV coords?
on May 19, 2005 at 5:41:09 am

I found this challenging. Maybe there's a simple solution out there, but I found I had to resort to some fairly elaborate trickery to make any progress. Hopefully someone else will be able to improve on my approach--or suggest a better one.

You want to to read an array of discrete colour values from a texture. I believe that the most natural tool for this is the arrayMapper node used with particles. (I can't shake the feeling that there's a more straightforward way to read the colour value of a texture at a user-defined UV co-ordinate, though.)

Anyway, my approach is to use a particle object and an arrayMapper node to read those discrete values from your texture node. I'm thinking, of course, of having one particle for every light bulb object you'll need for the final scene. Once that's all set up, you can write an expression to read the colour values from the individual particles and then write them to the colour or intensity of your light bulbs. Here are the Hypershade connections I was using:

file1.message -> arrayMapper.computeNode
file1.outColor -> arrayMapper.computeNodeColor

and

particleShape1.userScalarPP1 -> arrayMapper.uCoordPP
particleShape1.userScalarPP2 -> arrayMapper.vCoordPP

You have to set the userScalarPP attributes yourself, unfortunately, and they need to function as a coordinate system, so that the bottom left particle is 0,0 and the upper-right one is 1,1. If there are few bulbs, you could type them in by hand. If there are many, a MEL loop is more appropriate.

If you get all that set up right, then you should end up with a bunch of particles (arranged similarly to your lightbulbs) which inherit the colour of your file texture. Then all you have to do is write that expression, which reads the appropriate values from the particles and writes them to the lightbulbs.

Jeez, that seems like a lot of work. Surely there's a better way? Anyone?

-Steve


Return to posts index

Jason Brummett
Re: Drive Light Intensity/Color by Texture UV coords?
on May 19, 2005 at 2:15:56 pm

Great Idea Steve!

I'll have to give this a wirl as I'm out of other idears. I was reading in the maya docs about 2 nodes that I've never worked with that might help here. I'm a relative new user to Maya and haven't used particles at all haven't played with nodes not present by default or generated by basic maya manipulation.

Have you or know how to use these nodes/commands?

command: colorAtPoint (http://localhost:4446/Maya6.0/en_US/index.html)
node: I can't find the node I found yesterday unfortunately...

Another idea has come to mind. Is there any way to use the samplerInfo node on an orthographic camera with a directional light aimed at the light board that could drive the lights in the orthographic view and just use another camera for rendering? I don't think this will work but just kinda brain storming on the fly here.

thanks,

Jason Brummett
Studio Z Inc.


Return to posts index


Steve Sayer
Re: Drive Light Intensity/Color by Texture UV coords?
on May 19, 2005 at 2:38:20 pm

Hi, Jason. I have an older version of Maya, which lacks the colorAtPoint node. However, it sounds like it's perfect for what you want to do, with no need to muck around with particles or arrayMappers at all.

This thread from HighEnd3D looks like it should be useful to you:

http://highend3d.com/maya/archive/sp.3d?mail_id=70322

Good luck!

-Steve


Return to posts index

jason brummett
Re: Drive Light Intensity/Color by Texture UV coords?
on May 19, 2005 at 2:51:20 pm

Thanks for that great thread Steve.

looks like i should be able to figure this out 1 way or another.

Jason Brummett
Studio Z Inc.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]