Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Feature Requests => [Max] Resolved Feature Requests => Topic started by: -Ben-Battler- on 2015-11-13, 20:12:36

Title: Show render passes while rendering in Max native FB
Post by: -Ben-Battler- on 2015-11-13, 20:12:36
Hi

Due to a workflow change for including VFB+ i switched to Max' native frame buffer. But there I experienced the issue that it won't show the render elements during render process.

I am now asking if it is possible to change this? Because if I want to check the passes for noise I don't want to cancel the rendering.

Regards, Ben
Title: Re: Show render passes while rendering in Max native FB
Post by: Ondra on 2016-04-12, 14:24:04
we cannot do anything about this unfortunately, it would have to be done by 3dsmax of VFB+
Title: Re: Show render passes while rendering in Max native FB
Post by: Rotem on 2016-04-12, 14:26:11
we cannot do anything about this unfortunately, it would have to be done by 3dsmax of VFB+

Is Corona writing to private image buffers and then copying to the 3dsmax buffers at the end of render? If not it should already work by default.
Title: Re: Show render passes while rendering in Max native FB
Post by: Ondra on 2016-04-12, 14:55:40
yeah you are right, we copy to max buffers only after the render for performance reasons. But our maxscript API allows you to query any element - https://corona-renderer.com/wiki/maxscript getVfbContent
Title: Re: Show render passes while rendering in Max native FB
Post by: Rotem on 2016-04-12, 15:01:32
yeah you are right, we copy to max buffers only after the render for performance reasons. But our maxscript API allows you to query any element - https://corona-renderer.com/wiki/maxscript getVfbContent

Thanks. I haven't tried it yet, but by looking at the maxscript function signature, it seems like it would copy the bitmap on each call (and optionally apply tonemapping and stamp) which would make it unfeasible to run on every draw iteration . Is there a way to get a direct pointer to the buffer from C++ (preferably without having to compile against Corona)?
Title: Re: Show render passes while rendering in Max native FB
Post by: Ondra on 2016-04-12, 15:21:36
yep, it copies it another buffer, but the overhead is negligible (at least when run through the C++ function-published version). We are using it internally.
Title: Re: Show render passes while rendering in Max native FB
Post by: Rotem on 2016-04-12, 15:24:37
Thanks, I will try to make it work in a future version.
Title: Re: Show render passes while rendering in Max native FB
Post by: pokoy on 2016-04-12, 16:32:58
It would be fantastic to have better support for/from VFB+. There are some things that I like about both, and having both work together seamlessly would be most welcome.
Title: Re: Show render passes while rendering in Max native FB
Post by: Rotem on 2016-04-12, 19:30:45
It would be fantastic to have better support for/from VFB+. There are some things that I like about both, and having both work together seamlessly would be most welcome.

I try to avoid writing features for specific render engines (though there are a couple of small features specific to VRay), but since so many recent users come from Corona I will do what I can from my side.
Title: Re: Show render passes while rendering in Max native FB
Post by: -Ben-Battler- on 2016-04-14, 05:11:44
Thank you Rotem, that sounds wonderful!
Title: Re: Show render passes while rendering in Max native FB
Post by: Rotem on 2016-05-09, 22:41:27
yeah you are right, we copy to max buffers only after the render for performance reasons. But our maxscript API allows you to query any element - https://corona-renderer.com/wiki/maxscript getVfbContent

I gave this a try using the C++ FPInterface as you suggested, and while it does work, the copy times are far from negligible. Copying a 1920x1080 element takes ~120 ms on my machine.
At the worst case, I can limit the updates of elements to once every N seconds, but if there is a more direct way to get at the image data, that would be preferable.