Notifications
Clear all

[Closed] How to access Last Rendered Image ?

Hi,

I want to acess last rendered image in my script, how can I do that in 3dsmax 2008.
I know there is function in max 2009 called [b]getLastRe[font=‘Courier New’]nderedImage[/font]/b
but I want to do that in max 2008.

Thanks
ravi

14 Replies

The same function exists in MAXScript since at least Max 3 or possibly earlier. It is NOT a new method in Max 2009 so it should work the same.


a = GetLastRenderedImage()
display a

Look up bitmap values for how to save the image to disk for example.

Thanks for quick reply , my mistake, i didnt find it.

Now can I display any existing image to same VFB without closing it?

if you keep the bitmap in the same variable, you can call display() on that variable to update the existing display without opening a new window.


a = bitmap 100 100 color:red
display a -- opens window 1, red

b = bitmap 100 100 color:green
display b -- opens window 2, green

c = bitmap 100 100 color:blue
copy c a
display a -- updates window 1, blue

if you’re calling render() yourself, then you don’t need to use getLastRenderedImage() -and- you can specify into:<bitmap value> so you won’t need the copy (or pastebitmap, alternative) command.

Hi zeebox, yes it works as far as the resolution is same, but in my case the resolution may chage in second image.

a = bitmap 100 100 color:red
display a – opens window 1, red

b = bitmap 100 100 color:green
display b – opens window 2, green

c = bitmap 200 200 color:blue
copy c a
display a – updates window 1, blue —- resulting bitmap will be scaled to fit the bitmap a which is 100×100

This is the problem I want to maintain resolutions of bitmap c is it possible?

I’m guessing “no”; the VFB is basically a view of a framebuffer, and if you need a different resolution, a differently sized buffer has to be allocated.

If you need this type of functionality, try writing your own display window using either native MaxScript or .NET

With any luck I’m mistaken, though

Hi ZeeBox, I too thinking “NO” to my question,

Sounds intresting If it is possible to do it within maxscript by writng my own VFB,

actually in our group people want functionality same like MAYA they want max VFB to appear and work pretty much same way the MAYA’s rendered frame window works. where you can keep rendered image within framebuffer and comare them within buffer by just sliding the slider at the bottom.

can you guide me where and how I can start, because I never done programing with dotnet,

and last question – how can I tell max to use my own VFB instead of max inbuilt.

your help is very important
thanks
ravi

can’t replace the VFB entirely – closest thing to it is popping up your own window after rendering has completed (using e.g. a #postRenderFrame callback).

if you want to do a side-by-side, look a the RAM Player… there’s an example script in the documentation that shows how to load two bitmap (files) into the RAM player for comparison purposes.

all in all, though, it’s not a light undertaking and it’s much easier to just deal with a new window popping up can always close the old one first.

any possibility with SDK?

Page 1 / 2