View Full Version : Post-process rendered image in a plugin?
11-18-2003, 04:03 PM
I wrote a Lightwave plugin here that does some neat things by adding stuff to rendered images. I was wondering if it is possible for a Maya plugin to get access to and manipulate the rendered image. (all I need is the ability to read and write RGB and alpha values in the image after Maya renders it).
I can't really make this plugin a surface shader; it depends on accessing the pixels of the image for correct anti-aliasing (bypassing the renderer's normal sampling mechanism). A background shader might work, as long as I could have absolute control over the final pixel values (as opposed to letting Maya integrate samples).
I know this would be easy in a compositing program, but for various reasons this plugin is more useful as an integrated part of the renderer.
11-18-2003, 04:29 PM
Just out of curiosity what does the plugin do?
I Using a post render MEL script it would seem that you could access the plugin and process the image.
Although as far as I know obtaining variables from the renderer like the image name is not easy or possible.. maybe someone else can answer that with authority.
11-18-2003, 06:15 PM
It's a secret for now, but it will be available commercially in a month or two.
If all I can do is hack out the filename and open it as an image file, then there's not much point in a Maya plugin. (you might as well do the operation in a separate program instead). Lightwave lets plugins work on the rendered image *in memory*, before it is saved to disk, which is perfect for what my plugin does.
I'm thinking the best approach might be a background shader, with careful attention to how the samples are integrated.
11-18-2003, 06:24 PM
>>If all I can do is hack out the filename and open it as an image file, then there's not much point in a Maya plugin. (you might as well do the operation in a separate program instead). Lightwave lets plugins work on the rendered image *in memory*, before it is saved to disk, which is perfect for what my plugin does.
Y'know they use dto have a video on "image processing" in their store but I can't find it.. I dunno it may be possible to to do this in memory but I can say for sure.
It is possible look for MRenderCallback in the Maya API.
12-01-2003, 01:24 AM
Thanks Dans, that looks like exactly what I need!
Are the devkit docs on the Maya install CD? I thought I installed everything, but I don't have the devkit docs. (I do have the on-line reference manual)
12-01-2003, 07:37 AM
The developer documentation is off the main page.
12-01-2003, 11:28 PM
You never looked in the maya 5 bin i see.
There are all kind of neat programs, not only there is the maya.exe. There is also a small program called imconvert.exe
You can make a call to it by using the system MEL command, it should look more or less like this.
`system ("shell imconvert -add picture1.jpg picture2.jpg new.jpg")`;
You could also do resize, convert, composite, etc...
For more options and documentation for this programm, just go to the commandprompt and type " imconvert "
:: Galactor ::
01-16-2006, 05:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.