I hosted cycles in my rendering pipeline.
I have constructed Cycles scene and now I need to render screenshots of my scene from a couple of camera angles.
session->params.background=true;
I need to set the write_render_cb field of session parameters so that once the rendering is done, this function is invoked with the pixel information as argument.
I have gone thru the session.cpp code and the write_render_cb is invoked only from the ~Session();
So, for every screenshot, I need to dispose my session and create a new session.
Is my understanding wrong?
Can we have a method which will provide the pixel information?
session->reset(buffer_params, samples);
session->start();
session->wait();
const uchar* pixels = session->get_rendered_pixels(); //Can we have a method like this?
I have been trying to implement this functionality but I am getting many access violation exceptions.
Hi @jesterKing,
I made it working. I made it simple. Instead of following how blender is building scene, I followed how Cycles Stanalone is building scene and then applied your logic. It is simple and worked.