Joined: May 28, 2015
Post Count: 607
Status:
Offline
Is Sunflow limited in Sweet Home 3D?
Sunflow offers other types of light (Point Light, Meshlight/Area Light, Directional Lights, Cornell Box) or global illumination (Instant GI, Irradiance Caching, Fake Ambient Term). Is there a reason why these were not taken into account in Sweet Home 3D?
The configuration of these parameters is not very detailed in the Sunflow documentation and I noticed differences in terms with the source code . Is it possible to test or integrate these "new" options in a plug-in or a derived version of SH3D?
----------------------------------------
EnkoNyito
France
Joined: Nov 7, 2005
Post Count: 9426
Status:
Offline
Re: Is Sunflow limited in Sweet Home 3D?
There's no limitation. Feel free to test anything you want in SunFlow from a plug-in or a derived version of Sweet Home 3D. Some classes of SunFlow project are missing in lib/sunflow-0.07.3i.jar but I don't think they are related to the features you mentioned. Anyway it shouldn't be difficult to rebuild a full version of SunFlow by removing <exclude> elements found in buildForSweetHome3D.xml entry of sunflow-0.07.3i-src-diff.zip found in source code. This file contains the modifications I introduced in SunFlow to fix some bugs and add support for missing features.
Good luck!
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
Joined: May 28, 2015
Post Count: 607
Status:
Offline
Re: Is Sunflow limited in Sweet Home 3D?
There's no limitation. Feel free to test anything you want in SunFlow from a plug-in or a derived version of Sweet Home 3D.
Ok, so I continue my tests.
Some classes of SunFlow project are missing in lib/sunflow-0.07.3i.jar but I don't think they are related to the features you mentioned. Anyway it shouldn't be difficult to rebuild a full version of SunFlow by removing <exclude> elements found in buildForSweetHome3D.xml
By following your method to rebuild a full version of Sunflow I did not notice any difference from the original file of source code.
Is it possible to retrieve a Sunflow error message to display it in Sweet Home 3D? Examples from the LightServer.java file:
"LIGHT error: Unable to trace virtual photons, no lights in scene" "LIGHT error: Photon mapping enabled, no virtual photons to emit"
for SunSkyLight or ImageBasedLight only. The consequence is a completely black image and a progress bar stuck in indeterminate mode.
So I changed the behavior of the progress bar. It is also possible to disable virtual photons by choosing igi.samples=0. The higher this value, the greater the rendering time when there is no visual difference.
----------------------------------------
EnkoNyito
France
Joined: Nov 7, 2005
Post Count: 9426
Status:
Offline
Re: Is Sunflow limited in Sweet Home 3D?
Is it possible to retrieve a Sunflow error message to display it in Sweet Home 3D?
If you comment the line
UI.set(new SilentInterface());
in PhotoRenderer class, logs will appear in the console, so you could probably implement UserInterface another way to keep SunFlow messages.
I get these messages with the "igi" global illumination
The messages are missing But anyway, I'm not sure I can help you on these parameters. I don't remember having tested them...
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
Joined: May 28, 2015
Post Count: 607
Status:
Offline
Re: Is Sunflow limited in Sweet Home 3D?
When the other types of lights or global illumination offered by Sunlow are properly implemented in Sweet Home 3D, they do not necessarily improve the current configuration.
public static class TriangleMeshLightWithNoRepresentation extends TriangleMeshLight { public Instance createInstance() { return null; } }
does not allow to have a wire 3D shape like the SphereLight type.
For comparison, the same light panel with the type
----------------------------------------
EnkoNyito
----------------------------------------
[Edit 1 times,
last edit by enkonyito at Apr 25, 2018, 11:17:23 PM]
France
Joined: Nov 7, 2005
Post Count: 9426
Status:
Offline
Re: Is Sunflow limited in Sweet Home 3D?
Did you try to apply some 3D transformations on the vertices? Studying exportLightSources in PhotoRenderer class might be helpful...
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
Joined: May 28, 2015
Post Count: 607
Status:
Offline
Re: Is Sunflow limited in Sweet Home 3D?
Yes I had tried but not as it should because I had not understood that the position of the light source is a percentage of the width, depth and height. I applied this methodology to the vertices of my object and it works. Since taking vertices into account is manual, only one shape is possible.
By generating a transparent or invisible 3D shape, the light panel is rendered opaque when it is turned on.
For the wired 3D shape, I realized that the object had to be already in the .obj file.
The TriangleMeshLightWithNoRepresentation class does not cause the expected effect.
----------------------------------------
EnkoNyito