I’m getting started integrating Krakatoa SR into Softimage and I have run into a few small issues with the current API.
I don’t see any way to capture the logging output and that leaves the users blind certain types of information. It also makes debugging hard since I can’t see whats going on. This is my biggest hurdle by far. There should be a callback interface for log messages so I can capture and redirect log messages to the Softimage console.
It would be nice to add in a render crop so I can support Quick/Region renders without having to render the whole frame anyways.
More detailed progressive output (buckets/fragments as threads finish etc). Right now the api only supports a full frame buffer refresh at time
I think the assumption for the C++ API is that you would be writing your own console messages tailored to your application needs. That’s what we’re doing with our Fusion plugin. We provide customized console logging as well as progress messages inside the renderer control panel.
The window or region rendering can be handled by your application directly. Just make a smaller image and transform your camera. It would be nice if we could supply or own projection matrix directly, though. Yet while it would be nice to specify a window directly, since the gathering of the particles and sorting and lighting and resorting and such has to be done each time anyway, there is very little to be saved by having a window. There is currently no caching in SR, and the splatting is pretty fast.
Krakatoa doesn’t do bucket rendering, but instead does a painter’s algorithm on depth sorted bins to different buffers. Since these buffers are done in parallel, you wouldn’t see progress unless you had a larger number of bins than active threads. Even then, you’d only get depth slices and they might not be in order. That said, we have requested access to those intermediate bins and buffers in the API because they would be useful for depth compositing.
The problem I have with the console messages is that once rendering starts (renderer.render()), I have no insight into the process or feedback besides the progress_logger_interface (which doesn’t give much information except for the stage). In the examples, there is quite a bit of useful information printed to the console for even the basic examples which were all printed out from inside krakatoa (not by the client code). I think it would helpful for everyone to have api access to this information just like the log that is accessible from inside the 3dsmax integration. Even just the simple memory usage output can be very useful.
I realize I can modify the camera to transform to match the cropped view, it would just be nice to support the crop directly with a simple api call for usability. At the very least, its less memory wasted in the frame buffer (albeit not much).
Yeah I was just saying the the crop in general will save a little bit in frame buffer memory vs a full frame render (even if it didn’t do anything for speed). However, in my testing the crop has been quite a bit faster on simple scenes and the cancel reacts quicker on the smaller frames which is important for the Quick/Region render tool in Softimage which can try to launch and stop and render quickly over and over as the user adjusts the crop box. So for my softimage integration, the crop is defiantly worth the effort.
Ah, I understand what you mean. Currently the output goes to the system’s standard out. That may be ignored within your application. Does your application have a way of capturing standard out?
I think the best solution is for me to add a new “message logging” interface to the API. it will be like the “progress logging” interface, but for debug output. It would default to writing to standard out, but you could direct it to a file, or use a custom handler function. Thank you for the suggestion. I will try to add that for the next release.
This is something we could add to the API if it would be useful. It would be a convenience function that would modify the camera resolution and film offsets.
As Chad mentioned, the renderer does not render in buckets. It’s output is several steps of semi-completed frames. Some scene setups work better than others to provide nice looking progress updates. I can look into how we might improve on the progressive output.
Also, thank you Chad for providing very good information!
Yes, but offer two ways to do output it.
The most obvious (to me) is to just output a smaller image. So if the window goes from 100,100 to 200,150 you make your output image 100x50. But the other nice option is to actually use the EXR format’s “data window” so that the output buffer’s display window is the same size, there’s just fewer live pixels.
I was wondering when someone was going to inform you of this forum.
I’m currently integrating with Softimage and I don’t have any way to capture stdout generically from a C++ plugin. Even if I could, I imagine I might get other non-krakatoa output along with it. I would really love to have a message logging interface so I re-direct this output back to the softimage console or custom log for the user (just like the 3dsmax log).
A couple other quick notes:
krakatoasr::shader_schlick::use_phane_eccentricity_channel
should be
krakatoasr::shader_schlick::use_phase_eccentricity_channel
just a typo.
I’m also having an issue with the phong shader. All the other shaders work fine for me, but the phong shader is generating an all black output even with default parameters in scenes where all the other shaders produce correct output. Has anyone else had this issue?
Ah thanks for the suggestion. Turns out Softimage’s ICE was optimizing away my Normal channel since it wasn’t directly affecting the display of particles, so the normal channel was not getting pushed into krakatoa.