PDA

View Full Version : How to access VRay-VFB?


wavestone
05-04-2008, 08:43 PM
Hi there,

i am writing a script where i need to read the content of the vray-framebuffer in order to get the bitmap inside. "getLastRenderedImage()" just helps to read the max-framebuffer :(... Any hints?


greetings,
Martin

^Lele^
05-05-2008, 02:21 PM
There's no way to access the vfb contents, atm, afaik.
Just turn vray vfb output off, and render into a bitmap with hdr:on

antonv
05-05-2008, 04:09 PM
I've had the same problem and haven't found an answer yet. There seems to be a way to get a render effect in top and you would be able to read it's output but haven't tried it yet.

Also Vlado said it would be easy to do it through the Vray sdk but i have no knowledge of C++...

Kramsurfer
05-05-2008, 06:21 PM
Anton and I have talked about this.... here's a quick hack that saves it local...

plugin renderEffect SaveFromVFB
name:"Save Last Vray Image"
classID:#(0xb7aa794c, 0xc3bd78ab)
(
rollout params "Save Last Vray Image"
( label LB00 "by Keith Morrison @ focus360" )
on apply bmp do
(
display bmp
bmp.filename = ( sysinfo.tempdir + "LastRendered"+ ( getfilenameType rendoutputfilename ) )
save bmp
)
)

Good luck

^Lele^
05-05-2008, 09:24 PM
Very clever way to go about it, indeed.
The method though has one issue (common to all render effects, as far as i know): if the filetype in the render panel is not a float format, the grabbed image will lose HDR data. Also, I found no way to initialise the bmp bitmap to be hdri, if not that of setting the max render output format to an hdr one.
Rendering to an aptly initialised Bitmap will not have these issues, but will of course lose the VRay VFB functionalities after rendering (color correction, mainly).

wavestone
05-05-2008, 10:23 PM
thanks for your replies! The thing with the render-effect is quite an interesting approach but since in never did something with plungIns, I have to do some more research untill i get my ideas scripted...

I had the problem that when I evaluated your script the first time, Kramsurfer, it all went fine - with VFB activated. But after modifying the location where to save the bitmap and changing the rendered perspective, I noticed that the "display bmp"-command showed the rendering from the first time i rendered with the effect applied. What did i do wrong?

Anyways, i am to tired to think at the moment... :)


cheers,

martin

Kramsurfer
05-05-2008, 11:36 PM
Yeah, you have to have set the save filetype to initialize the max buffer before the render call... with that said saving to "every channel enabled RPF's" seems to work okay. But it's definitely a hack. Hopefully Vlado will give us easy access on the next verison...

CGTalk Moderation
05-05-2008, 11:36 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.