Maya Forum
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya topics.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Use lightness information on a texture to drive attributes (position, rotation, scale)

Message 1 of 1
29 Views, 0 Replies

Use lightness information on a texture to drive attributes (position, rotation, scale)

Not sure if it's understood correctly, but here goes. I created a set of 3D cubes in After Effects, covering the screen (a grid of 16x7 cubes 120x120) and set an expression so that a background image controls their Z position, scale and rotation. The way it works is that I have a layer with a B&W animation, then each cube has an expression that samples the luminosity of that layer at the specific XY coordinates it's in, converts it to a value, and have that value drive the Z position. I attached a video of the results.
Problem is that it slows down After Effects a LOT (it seems to choke when having too many 3D objects at once), and takes forever to render (that particular preview at 1/3rd resolution took about 2 and a half hours), so I created a new version in Maya which is easier to animate and looks great rendered with hardware render, which is VERY fast. I have it working, but in the current version I have to animate the cubes by hand. I'd like to automate it with a texture like I had it in After Effects, but not sure where to start.
To make it short, this is what I need:
Have a texture the size of the screen (ok) -> Sample luminosity at a specific point on that texture (this is where I'm stumped) -> Convert that to a value (same) -> Use that value to drive different attributes of a 3D object (position, rotation and scale, I guess with set driven key would work once I have the value).
NOTE: My first idea was to use displacement maps, but I want to be able to render in hardware for the speed and doesn't support them.


Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums