|
|
|
Tell us what you think of the site.
|
Autodesk Media & Entertainment User Community
|
Autodesk® 3ds Max®
|
|
Autodesk® Maya®
|
|
Autodesk® Softimage®
|
|
Autodesk® MotionBuilder®
|
|
Autodesk® Mudbox™
|
|
Autodesk® ImageModeler™
|
|
Autodesk® Sketchbook® Pro
|
|
Autodesk® Smoke on Mac®
|
| Special Maya/Python Project - Need Help
|
|
|
Hey All,
I am not a particularly gifted programmer, and I am unfamiliar with Python (the embedded programming language in Maya). My project requires me to take input (in the form of images) from my website and put them into my Maya template. The animation that the images will be put into is an album art animation. I also would like it to render the whole animation once the user submits the images. Thanks in advance for any advice you can give me on how to go about getting this done.
Brock
|
|
|
|
That sounds like you’d want someone to do it for you. And even then, it’s not clear what you want exactly. How are you going do do this in Python if you don’t know Python? Do you need help writing the requirements so you can give the specs to a Python programmer?
|
|
|
|
Hey! Thanks for the quick response.
I don’t expect anyone to do the project. Let me be a little clearer.
I would like to know if anyone has come across something similar or if they have done something like this. Looking for advice from someone who is familiar with Maya’s API. The program would need the following functionality: to take input (image files) and place it into a Maya template. The animation can be seen here:
http://www.youtube.com/watch?v=d_Xm69tbRn4
Each page in this animation would correspond to an image file. Maybe all I need to know is how complex the project is. Thanks!
|
|
|
|
I don’t know what would need programmed… it looks like a modeling/animation task using the pictures as textures.
|
|
|
|
I’ve worked on stuff like that. You have a set of standard models, say aluminium cans or plastic bottles, and a set of images. You tell Maya to load a model, assign images from a repository somewhere as textures and render it out. Very straightforward. Basically, all you need is a setAttr statement that tells Maya which files to use for textures. Then you’ll need some way of figuring out how to map which image where. Simples cases can be solved by proper naming conventions, more complicated scenarios might involve (you mentioned website) access to a database.
|
|
|
|
Yeah… that’s kind of what I figured. Thanks!
I know Python is a server-side language, so I think that the database functionality would be easy to set up. Just getting the images assigned correctly is my challenge.
|
|
|
masmidow 26 April 2011 09:14 PM
Just getting the images assigned correctly is my challenge.
That’s the easy part. Build a dictionary that maps a paths to a file node. Better names than file1, file2 etc… are obviously going to help, but this should illustrate the principle:
texturefiles = {"file1":"sourceimages/image1.tif",
"file2": "sourceimages/texture2.iff",
"file3":"sourceimages/im_001.png"}
for k, v in texturefiles.iteritems():
print k, v
cmds.setAttr("%s.fileTextureName" % k, v, type="string")
|
|
|
|
|
|