Message 1 of 2
Programmatic Rendering & Render Image Storing. How?

Not applicable
11-07-2012
03:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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
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