bool result = renderer->vfb.loadImage(“123.exr”);
result = renderer->vfb.saveImage(“123.bmp”);
}
Same code in SDK 4.30.3.1 works fine,but in SDK 5.10.01
VFB UI can’t display, vfb.loadimage return true,but vfb.saveimage return false.
Okay, the first thing to check is why the VFB UI is not showing. Can you try to attach a callback to the LogMessage event before you try to show the VFB and copy the log:
void logMessage(VRay::VRayRenderer &renderer, const char* message, VRay::MessageLevel level, double instant, void* userData) {
switch (level) {
case VRay::MessageError:
printf("[ERROR] %s\n", message);
break;
case VRay::MessageWarning:
printf("[Warning] %s\n", message);
break;
case VRay::MessageInfo:
printf("[info] %s\n", message);
break;
case VRay::MessageDebug:
// Uncomment for testing, but you might want to ignore these in real code
printf("[debug] %s\n", message);
break;
}
}
...
renderer = new VRayRenderer(ro);
renderer->setOnLogMessage(logMessage);
renderer->vfb.show(true, true);
Also, does the VFB UI display if you start an actual render, or you can’t make it appear at all?
It turns out that this was in fact a problem - loadImage returns before the image is fully loaded. It has already been fixed, so if you try any build after April 27, you should be okay.