Download

Online

Gallery

Blog

Sweet Home 3D Blog

This blog presents news and tips about Sweet Home 3D.

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.


Avatar: Simeon

Re: YafaRay rendering plug-in

Great to see a new Article so soon after it's published. Yafaray renderer plugin looks good. I'm a Blender user and I found that your OBJ export converts to Blender's Cycles engine very well now. Maybe you can have Cycles render engine integrated as a future option? In the meantime, I export my SweetHome3D files to OBJ, then import into Blender 2.8x for final PBR texture setup, Lighting and rendering in Cycles or EEVEE Real-time renderer. Lots of possibilities, keep up the good work.

Re: YafaRay rendering plug-in

Can I use the pictures I have made from the work I've done in sweet home 3D for games to be used commercially?
Avatar: Emmanuel Puybaret

Re: YafaRay rendering plug-in

Yes, but you should give attribution to the authors of the 3D models and textures you used, when they are distributed under Free Art License or CC-BY License. The list of authors can be displayed by in the Creator column of the furniture list if needed. See also the license page.
Avatar: Baker

Re: YafaRay rendering plug-in

Are there plans to add a "render multiple images/positions" ?
Avatar: Daniel

Re: YafaRay rendering plug-in

I successfully installed the plugin and can access the render window using Tools > Create Photo with Yafaray, but I can't render anything unfortunately... When I click the "Create" button, a loading icon appears inside image box but its gone in seconds and no image shows up. "Save" button remains disabled, so I suppose the plugin is not rendering at all. I'm using SH3D 6.3 in Mac OS 10.15.4 (Catalina). Any hints about what I'm doing wrong?
Avatar: Emmanuel Puybaret

Re: YafaRay rendering plug-in

Try first to run the default SunFlow rendering engine available in the photo creation tool. Try also some demos to check if YafaRay can't run with your home or more generally with the configuration of your computer.
Avatar: MedConsulting

Re: YafaRay rendering plug-in

Won't run on Catalina 10.15.7(19H2) Mac Mini (2018): Gatekeeper interferes '"libboost_system.dylib" cannot be opened as the developer cannot be verified'. It offers only the trash and the cancel button. The usual override in System Preferences > Security & Privacy > General: Open Anyway appears after 'cancel', but the plugin doesn not continue thereafter, and SH3 relaunch does not remember the override and the warning reappears. Trashing of course is no option. Will there be solution in a new version? Thanks
Avatar: Emmanuel Puybaret

Re: YafaRay rendering plug-in

Maybe signing the .dylib files of the plug-in would help. I'll try for next update.

Re: YafaRay rendering plug-in

yeah same problem here hope it gets resolved soon .my renders are taking way to long

Re: YafaRay rendering plug-in

Thank you for integrating YafaRay to SH3D. For me, the new plug-in results in a speed-up of 3.4x compared to the default photo process. Do you plan on creating videos using the new method as well? Rendering time is more annoying with videos, as they take a significantly larger amount of time.

Re: YafaRay rendering plug-in

Hello, I prefer the SunFlow tool for quality Raytracing and YafaRendering plugin for an preview rendering. The Yafa 1.4 tool seems to do not realy raytracing. With Sunflow the ray points (endpoints of rays)are sometimes visible and also detailed shadows and reflections, with Yafa you will never see this. May be there is any more option to change but I allready pull the quality slider to the best Quality and the resolution to full HD.
Avatar: Anonymous

Re: YafaRay rendering plug-in

is there a possibility to modify this in order to make it run in the video mode?
Avatar: Emmanuel Puybaret

Re: YafaRay rendering plug-in

See PhotoVideoRendering plug-in
Avatar: Anonymous

Re: YafaRay rendering plug-in

Hello, I noticed that the directory proposed by default for saving Yafaray photos is " /Users/user/Library/Containers/com.eteks.sweethome3d.SweetHome3D/Data" (Mac OS Big Sur ) instead of last user folder selected. Could you modify this ? Thanks.
Avatar: Emmanuel Puybaret

Re: YafaRay rendering plug-in

I won't change it because if you use the Mac App Store version, it's the only folder (or a subfolder of this place) where you have the rights to save an image generated with YafaRay plug-in.
Avatar: mattewre

Re: YafaRay rendering plug-in

Tested on MacBook Air Apple Silicon (ARM) M1. Seems to be running as ARM native (no Rosetta) and performance are much better (and surely over 2x at best quality). Thank you for this plugin. Unfortunately it doesn't offer batch photo creation (point of view queue) and it will slow down automated workflow.
Avatar: Nimmy82

Re: YafaRay rendering plug-in

YafaRay instantly crashes my SH3D (Win10 64Bit). This had worked half a year ago. Any tips?
    Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads
   
© Copyright 2006-2024 eTeks - All rights reserved