YafaRay rendering plug-in
Following a performance study of the rendering engines able to run within Sweet Home 3D, I decided last year to develop a new plug-in based on YafaRay rendering engine. After many tests and the feedback of volunteers, here's the version 1.0 of the YafaRay rendering plug-in (24 MB – See below for updates) able to run under Windows 32/64 bit (from Windows 7), macOS 64 bit (from Mac OS X 10.8) and Linux 32/64 bit (from Ubuntu 16). As it depends on DLLs that must be included with the plug-in to support all these operating systems, it's much larger than other plug-ins, and it's slower to start than SunFlow rendering engine used in Sweet Home 3D. But once the rendering has begun to be computed, you should get the final image much faster (generally twice as fast). Therefore, the performance gain should be interesting mostly if you want to compute large images.
The plug-in adds the Tools > Create photo with YafaRay menu item which shows a dialog box with the same appearance and parameters as the existing photo creation tool. Modifying the settings in either dialog box will change the same ones in both photo creation tools. The dialog box of the plug-in can also be resized, but the Spherical lens used to compute equirectangular images isn't available for the moment (YafaRay doesn't seem to provide some direct way to compute this kind of images).
The two lower quality levels still use OpenGL to compute images like in the 3D view, and the two upper quality levels use YafaRay to render them, in place of SunFlow. At the third quality level, images rendered with YafaRay and SunFlow are very similar. At the best quality level, the silk aspect of shiny surfaces look different and are less shiny with YafaRay, like on the plates in the following pictures which show the scene of Sweet Home 3D splash screen. Some users will probably prefer it because it's more convenient to get good results faster.
Sweet Home 3D splash screen rendered with YafaRay
Sweet Home 3D splash screen rendered with SunFlow
The YafaRay rendering engine may be distributed as the default engine of the photo and video creation tools in a future version of Sweet Home 3D. As it's programmed in C++ and not in Java, it may require more tests and additional refinements to ensure it correctly works for all users. It will be probably also integrated in EnkoNyito's Photo-video rendering plug-in to let users select the rendering engine of their choice with advanced settings.
Finally, this plug-in shows that it's technically feasible to integrate in Sweet Home 3D some renderering engines programmed in a language different from Java (the plug-in includes source files if you're interested).
Many thanks to David Bluecame from YafaRay team for his help and to Sweet Home 3D users who help me with their tests.
[Updates]
May 8, 2020: | The version 1.1 of the plug-in allows to compute equirectangular images with the Spherical lens added to YafaRay. |
May 18, 2020: | The version 1.2 of the plug-in fixes the projection used in Fisheye lens and improves the launch delay of the rendering process. |
June 6, 2020: | The version 1.3 of the plug-in handles better crashes bound to missing memory and stop/restart sequences. |
November 25, 2020: | The version 1.4 of the plug-in hand includes YafaRay update 3.5.1 and fixes some crashes under Windows. |
July 13, 2022 | The YafaRay rendering engine is now available directly in Sweet Home 3D 7.0 from the new Renderer list added to photo and video creation tools. |