Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Programmatic Rendering & Render Image Storing. How?

Programmatic Rendering & Render Image Storing. How?

Anonymous
Not applicable
363 Views
1 Reply
Message 1 of 2

Programmatic Rendering & Render Image Storing. How?

Anonymous
Not applicable
Hi everyone,

this is my first post and guess what: it's a question! 😄

What I'm trying to create is a plugin which does the following:

1) It selects a rigged model from the scene.
2) Maybe it manipulates the skeleton, maybe not.
3) It renders the specific selected model (so as if it's the only thing in the scene) from a given camera in the scene.
4) Somehow stores the image data of the render so that it can be accessed by other C++ functions, like computer vision libraries (e.g. OpenCV).

I'm new to Maya and its API, however by going through the documentation it was relatively easy to understand how to select an object in the scene. I'm also not worried about manipulating it YET.

What I'm really interested in is how to perform steps 3 and 4. So, somehow render the specific model OR if not possible, at least render the scene; store this image somehow (e.g. MTexture? not sure which data structure) in order to process it with additional functions.

Even if you don't know all of the answers to the above but have some partial knowledge, your help will be very much appreciated. 🙂

Moreover, if you know how to perform the above through the python API or through MEL/python and not in C++, it would also be very useful!

Many thanks in advance,
Alex
0 Likes
364 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Okay, maybe a more simplified question:

Is it possible to use the render results (e.g. after a MEL render command) directly from memory, instead of having to write a file on disk and then read the file?

Thanks again,
Alex
0 Likes