Notifications
Clear all

[Closed] Updating individual tiles during rendering in renderer plugin

I’m writing a renderer plugin, and I would like to display rendered tiles to Max’s render window as they become available, during rendering, similarly to how it it’s done in VRay and most other renderers.

I couldn’t find anything about this in the SDK documentation, nor in the examples and open source plugins I could get my hands on.

Could somone point me in the right direction?

4 Replies

I do this in ‘Luxmax’ ( http://luxrender.net ) render plugin.
It works a bit different then what I understand you think.

The render buffer is simply a bitmap, and it’s the renderer itself that fills in the ‘buckets’.
This means that in 3dsmax SDK it’self there is no ‘bucket’ rendering mode, it’s simply ‘fill in pixel in buffer’ mode.

So the backend renderer has to render it in tiles, then you read those tiles, and place them in the bufferend image and update ‘for each tile’…

So for the Luxrender \ Luxmax – I simply grab the buffer every X seconds, fill in the render view buffer, it the backend renderer is set to tiled mode -then this is what is shown automatically in the buffer in max.

Thanks for your answer. I was suspecting that tiling would have to be done manually; I guess my next question is, how do I tell the Render Output window to refresh the bitmap after I blit a tile into it? I’ll have a look at your code.

Correct, that’s the code where I fill in and update the buffer.