Features

Download

Online

Gallery

Blog

  Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 18
Posts: 18   Pages: 2   [ 1 2 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 8970 times and has 17 replies Next Thread
enkonyito
Advanced Member
Member's Avatar


Joined: May 28, 2015
Post Count: 474
Status: Offline
Reply to this Post  Reply with Quote 
Several rendering engines in the same plugin

To date, Sweet Home 3D default rendering engine is SunFlow (written in Java).
The YafaRay rendering plugin offers another rendering engine (written in C++ and accessible in Java Native Interface).

Grouping these 2 rendering engines in one plugin with a selector seems like a good idea.


1st problem
For YafaRay rendering to work when selected, you must apparently respect the order and name of the initial com/eteks/sweethome3d/plugin/yafarayrendering packages.
In this case, the YafarayRenderer.h and YafarayRenderer.cpp files do not appear to be necessary but use the lib folder containing the DLLs (Windows, Mac OS X and Linux).
- Solution #1:
In the plugin project folder, use the com/eteks/sweethome3d/plugin/yafarayrendering packages for all files (photo panel, SunFlow and YafaRay rendering engines).
This is a problem when adding another rendering engine where you will also have to respect the order and the name of the initial packages.

- Solution #2:
In the plugin project folder, keep the package created for the SunFlow rendering engine and the photo panel.
Use com/eteks/sweethome3d/plugin/yafarayrendering packages for the YafarayRenderer.java file by adding an
import com.eteks.sweethome3d.plugin.yafarayrendering.YafarayRenderer
in the PhotoPanel.java file.
In this case, each rendering engine has its own packages and this would facilitate future additions.


2nd problem
When you press the Stop button, the YafaRay rendering is not interrupted when it is selected.

Enko Nyito
[Dec 3, 2019, 2:51:53 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
enkonyito
Advanced Member
Member's Avatar


Joined: May 28, 2015
Post Count: 474
Status: Offline
Reply to this Post  Reply with Quote 
Re: Several rendering engines in the same plugin

2nd problem
When you press the Stop button, the YafaRay rendering is not interrupted when it is selected.

Solution:
Take into account the different management of the Stop button by the YafaRay rendering plugin (YafarayPhotoPanel).
[Dec 7, 2019, 3:11:51 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 7106
Status: Offline
Reply to this Post  Reply with Quote 
Re: Several rendering engines in the same plugin

YafarayRenderer.h, YafarayRenderer.cpp and any source files like Java ones are not necessary for a plug-in to work. I just took the habit to include source code in the plug-in to avoid developers to download it from another place (these files are generally not very large).
SunFlow and YafaRay renderers are completely independent from each other, so you can organize the packages where you use them like you want.
The only thing to take care of, is too update in the YafaRay program according to where the DLLs it requires are stored, so the plug-in can find these DLLs to extract and load them.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Dec 9, 2019, 12:19:04 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
enkonyito
Advanced Member
Member's Avatar


Joined: May 28, 2015
Post Count: 474
Status: Offline
Reply to this Post  Reply with Quote 
Re: Several rendering engines in the same plugin

How to reduce the size of the plug-in (12 MB) to speed up uploading?
[Jan 26, 2020, 11:43:09 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 7106
Status: Offline
Reply to this Post  Reply with Quote 
Re: Several rendering engines in the same plugin

In the Beta 4 version of YafaRay plug-in where I recompiled YafaRay DLLs, I already removed many options to make its DLLs smaller. Not sure, I can do better. By the way, once added the DLLs for 32 bit systems, the size of the plug-in will be even twice as large.
The only way I can think of to reduce the plug-in size, would be to produce one plug-in per operating system / architecture, but I'm not sure that it will be as easy to maintain, distribute and explain. We could say it's the weight of portability!
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Jan 27, 2020, 10:46:34 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 7106
Status: Offline
Reply to this Post  Reply with Quote 
Re: Several rendering engines in the same plugin

Sorry, I forgot about the DLLs found in yafaray-plugins folder. It should be possible to remove the ones which are not used: list the values associated to all the parameters named "types" in the program, and remove the DLLs which doesn't match the found names. But this might be more complicated that this, because libjpgHandler and libpngHandler DLLs must be kept to support JPEG and PNG of texture images. There might be other dependencies that will need a deeper study.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Jan 27, 2020, 1:28:28 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
UbuntuBirdy
Advanced Member
Member's Avatar

Switzerland
Joined: Aug 31, 2017
Post Count: 336
Status: Offline
Reply to this Post  Reply with Quote 
Re: Several rendering engines in the same plugin

In my opinion, in 2020 12MB is not large enough to even think about reducing size...
----------------------------------------
Pascal

SH3D 6.3 / Ubuntu 20.04 (Mainline-Kernel) / Radeon RX580 / Ryzen 7 1800x
[Jan 27, 2020, 3:39:07 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 7106
Status: Offline
Reply to this Post  Reply with Quote 
Re: Several rendering engines in the same plugin

Useless bytes are never welcomed so if the plug-in size could be reduced easily, it would be a nice gain.
By the way, larger DLLs means also more time to extract and load them at the launch of the first rendering.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Jan 27, 2020, 4:56:59 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
UbuntuBirdy
Advanced Member
Member's Avatar

Switzerland
Joined: Aug 31, 2017
Post Count: 336
Status: Offline
Reply to this Post  Reply with Quote 
Re: Several rendering engines in the same plugin

Useless bytes are never welcomed so if the plug-in size could be reduced easily, it would be a nice gain.
By the way, larger DLLs means also more time to extract and load them at the launch of the first rendering.

Correct! But, it's the wrong priority to search for useless bytes while the plug-in is not fully functional yet.
And it's totally the wrong priority if the plug-in is 12MB and not 120MB.
But as written bevore, this is only my opinion...
----------------------------------------
Pascal

SH3D 6.3 / Ubuntu 20.04 (Mainline-Kernel) / Radeon RX580 / Ryzen 7 1800x
[Jan 27, 2020, 5:53:12 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
enkonyito
Advanced Member
Member's Avatar


Joined: May 28, 2015
Post Count: 474
Status: Offline
Reply to this Post  Reply with Quote 
Re: Several rendering engines in the same plugin

About the integration of the YafaRay rendering engine.


Photos panel at points of view.
The name of the selected rendering engine is added at the end of the image file name.
No particular problem.


Video panel.
The name of the selected rendering engine is added at the end of the video file name.
The video shows a frozen image with the YafaRay renderer while the sequence is animated with the SunFlow renderer.
The following warnings are returned after the first image rendered:
WARNING: Environment: Sorry, Background "background" already exists!
WARNING: Environment: Sorry, Light "sun" already exists!
WARNING: Environment: Sorry, Camera "camera" already exists!".

[Feb 8, 2020, 1:48:42 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Posts: 18   Pages: 2   [ 1 2 | Next Page ]
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

    Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads
   
© Copyright 2006-2020 eTeks - All rights reserved