Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Maya Basics & Newbie Lounge (https://simplymaya.com/forum/forumdisplay.php?f=31)
-   -   Batch Render and Images (https://simplymaya.com/forum/showthread.php?t=35116)

max krigger 15-02-2011 10:48 AM

Batch Render and Images
 
Hello guys,

I am doing some animations and optimization with maya and matlab (maths software). All I need to do is render an animation of my model and get some coordinates figures from the model (done with mel scripts that save the figures in files) and that is it. For now, I drive the rendering from matlab by calling a dos command (render -e 1 -s 500 etc.) the thing is that mayabatch computes all the images which are unnecessary for me and takes processing time. Do you know any way to ask maya not to compute the images while rendering?

Cheers :D

stwert 15-02-2011 05:22 PM

Maybe I don't quite understand, but can't you get the coordinate data without rendering?

max krigger 15-02-2011 05:41 PM

Hi stwert,

The model is driven with dynamics constraints which change from one frame to another and I don't really know if the dynamic solver can do the job by itself but, while rendering, the dynamic solver works and that enables me to get the right data at each frame :)

stwert 15-02-2011 07:14 PM

I'm fairly sure that the rendering process is independent of the dynamic solver... by which I mean the dynamic solver computes the location and other attributes for each frame, and then the rendering engine outputs that information visually. So you should be able to get the info without rendering.

max krigger 15-02-2011 09:01 PM

Uhm right, but would you have any idea to do this?

stwert 15-02-2011 09:42 PM

Well you mentioned that mel scripts are getting the coordinate data, right? I'm assuming these scripts are not looking at the rendered data, but are looking at what the dynamic solver produces. It would depend on the scripts, and they might have to be modified, which might be beyond my skill level at this point. Best case scenario, you'd be able to run the scripts and gather the data just by hitting play on the timeline.

max krigger 15-02-2011 10:17 PM

Actually by hitting play on the timeline I get the data correctly but maya has to compute the positions of the different vertices and render them in the main view so it does take time as well. Moreover, as I am doing some optimisation, I need an easy way to launch a rendering externally through dos for instance and I am not aware of such a command for the timeline :/

stwert 15-02-2011 11:05 PM

For the viewport rendering, I wonder if you would get a speed-up by setting the view to either point cloud or wireframe. Or simply change the main viewport window to the outliner or something that doesn't require a preview, if you don't need to see it. From that standpoint, the time it takes to go through should be pretty much the time it takes for the dynamic solver to calculate. As for running it from the command line, that is more of a problem. I don't know of a way to do that either.

gster123 16-02-2011 08:05 AM

I've dont some work with Maya and Matlab, I just ended up making a script that took coords of animated objects from Maya into a text file for importing into matlab. I'm not too sure that you can actually do what you are saying as the rendered images are independant from the coords in the 3D scene (though they are calculated for positionsl data of the pixels) from the commnand line. Though as I was not looking to get data from Maya into matlab directly i.e as maya computes the data porting it over as soon as it is done.

To do this you might need to do some work in the API to get the data out. I'm sure that there would be a way to port the data into something like a simulink node and then process this in Matlab (or using simulinks blocksets) though I'm not too sure.

I assume that you need to get some XYZ data accross from Maya into Matlab as soon as it is animated not as 2 sepperate bits of work?


All times are GMT. The time now is 09:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018