Menu

#18 Photo-video rendering plug-in

open
nobody
None
1
2025-03-30
2016-11-19
No

This new plug-in groups together in a specific menu the old plug-ins linked to rendering.
It consists of:

  • Simple photo rendering (replaces Create photo with renderer)
  • Multiple photo rendering (replaces Multiple rendering)
  • Video rendering
  • Rendering properties (replaces Advanced settings of photo rendering)

Simple photo rendering also allows:

  • display the progress in percentage
  • display the elapsed time and estimated remaining time
  • enhance the external brightness (at the 2 best quality levels)
  • view/edit the advanced settings (at the 2 best quality levels)

Multiple photo rendering also allows:

  • display the progress in percentage (at the 2 best quality levels)
  • display the elapsed time
  • display the name of the point of view being computed

Video rendering also allows:

  • display the progress in percentage
  • display the elapsed time
  • enhance the external brightness (at the 2 best quality levels)

Rendering properties allows to:

  • view/edit the parameters of the rendering engine

The improvements and corrections made to SH3D-5.3 have been taken into account.

The sh3p file with source code is included in the compressed folder.

1 Attachments

Discussion

1 2 3 4 > >> (Page 1 of 4)
  • Anonymous

    Anonymous - 2017-01-26

    Hi,
    You can create a 360 photo (equirectangular image) by selecting
    Spherical in Lens combo box.

    Shahid Islam:

    Dear Sir.
    Is there any system to create 360 photo with SH3D?

    Thanks.

     

    Last edit: Anonymous 2017-01-26
  • Anonymous

    Anonymous - 2017-03-31

    Version 1.1

    • Sky texture visible when rendering in aerial view
    • Better definition of shadows for Image Based Light (option "Enhance external brightness" checked)

    Examples of IBL rendering. (www.sweethome3d.com)

     
  • Anonymous

    Anonymous - 2017-07-17

    Version 1.2

    For video rendering:

    • Implicit enhancement of external brightness
    • Adding new video formats
    • Deleting current recorded camera location
    • Automatic saving of video file

    Panoramic video (ImageBasedLight)
    Panoramic video (SunSkyLight)

     

    Last edit: Anonymous 2017-09-11
  • Anonymous

    Anonymous - 2017-09-11

    Version 1.3

    Compatible only with SweetHome3D-5.5 and higher
    (lights rotation around a horizontal axis)

    For video rendering:

    • curved line for camera path (circular arc)
    • variable speed according to distance

    SH3D camera animation

     
  • Anonymous

    Anonymous - 2018-01-30

    Version 1.4

    • display a message about plug-in compatibility
    • display a message when closing a rendering
    • added a minimum night brightness (dark level 2)
    • selection, in the simple photo rendering panel, of available LookAndFeels
    • other minor bugs fixes and enhancements
     

    Last edit: Anonymous 2018-01-30
  • Anonymous

    Anonymous - 2018-02-26

    Version 1.4.1

    • resizable photo panel with modified layout
    • display of the current version of the plug-in in the menu
     

    Last edit: Anonymous 2018-02-28
  • Anonymous

    Anonymous - 2018-03-05

    Update of the document "Configure the SunFlow rendering engine".
    This version 2 describes the parameters and their interactions, with examples of rendering and an indication of the duration.

     
  • Anonymous

    Anonymous - 2018-04-13

    Corrective version 1.4.2

    • minimum night brightness off for a time range of sky color
    • offscreen image without rendering progress panel (quality 1 and 2)
     
  • Anonymous

    Anonymous - 2018-05-28

    Version 1.5

    • management of other types of light (PointLight, TriangleMeshLight)

    Libraries Other types of light only compatible with this plug-in, containing:

    • 3 light panels of modifiable color
    • 6 light points of different colors
      Available in the Light sources category.
     
  • Anton

    Anton - 2018-07-30

    Thanks for these tools! They are excellent!

     
  • Anonymous

    Anonymous - 2018-10-13

    PhotoVideoRendering-1.6 plug-in

    • compatibility with Sweet Home 3D 6.0 and higher
    • management of new light sources
    • use of a light panel as room ceiling light
    • added Speed and Frame Rate fields in the video panel
    • possibility to choose the type of path in the video panel

    OtherLightTypes-1.1 libraries (compatible only with this plug-in)

    • PointLight_type: 1 light point with modifiable color
    • SphereLight_type: 3 light spheres with modifiable color
    • TrianglemeshLight_type: 3 light panels including 2 with modifiable color
      Available in the Light sources category.
     

    Last edit: Anonymous 2021-01-11
  • Jon

    Jon - 2019-04-14

    Hi Enko,

    Is this the correct place to submit a bug for the 1.6 PhotoVideoRendering plugin?

    I successfully installed the 1.5 version - no problems encountered, I used it and it seemed to work fine. However I wanted the 1.6 version because I wanted the speed control, I only downloaded the 1.5 version to investigate the bug.

    I am running SweetHome 6.1.2 on Ubuntu 18.04.1 LTS .
    My machine is 64 bit Intel® Core™ i7-3632QM CPU @ 2.20GHz × 8

    The 1.6 plugin loads ok - I can see the item in the main window item and open the pane.

    However the menu item Video Rendering (1.6) is inactive and ignores my mouse click.

    I am running this is a terminal window and see an error report which centres on a float to double cast.

    I have included the terminal trace in the attached plain text file.

    Thanks Jon

     
  • Anonymous

    Anonymous - 2019-04-16

    Hi Jon,

    Unfortunately, I don't have a Linux system to test the plug-in.

    When you click on a plug-in action and nothing happens, there is surely an exception generated by the code.
    This is what I found in your bug report:

    Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: java.lang.Float cannot be cast to java.lang.Double
    ...
        at sh3d_plugin.AdvancedVideoPanel.createComponents(AdvancedVideoPanel.java:729)
        at sh3d_plugin.AdvancedVideoPanel.<init>(AdvancedVideoPanel.java:310)
        at sh3d_plugin.VideoRenderingAction.execute(VideoRenderingAction.java:63)
    ...
    

    Here is the source code part of the VideoPanel.java file that I modified:

    controller.addPropertyChangeListener(VideoController.Property.SPEED, propertyChangeListener);
    this.speedLabel = new JLabel();
    final SpinnerNumberModel speedSpinnerModel = new SpinnerNumberModel(1.0f, 0.25f, 2.0f, 0.25f);
    this.speedSpinner = new AutoCommitSpinner(speedSpinnerModel);
    this.preferredSpeed = 2400f / 3600; // 2.4 km/h // see https://sourceforge.net/p/sweethome3d/code/HEAD/tree/trunk/SweetHome3D/src/com/eteks/sweethome3d/model/HomeEnvironment.java#l125
    speedSpinnerModel.setValue(controller.getSpeed() / this.preferredSpeed);
    speedSpinnerModel.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent ev) {
          double speedSpinnerValue = (Double) speedSpinner.getValue();
          controller.setSpeed((float) (speedSpinnerValue * preferredSpeed));
          updatePlaybackTimer();
        }
      });
    

    Since there is no error in compiling or running on Windows, I had not encountered this kind of problem.

     
  • Emmanuel Puybaret

    I remember having similar problems, the reason why there are some explicit boxing operations in SpinnerLengthModel constructor.
    It's subtle but very logic: if you call SpinnerNumberModel constructor with float numbers, Java will decide to call the constructor with arguments of double type which will initialize its fields with Double instances (look at SpinnerNumberModelsource code).
    Then, when you call setValue(Object) with a parameter of float type, that value will automatically boxed to a Float instance, and finally, Java refuses to compare Double fields with the Float value because it can't cast a Float object to a Double one.
    To avoid this issue, call directly the constructor SpinnerNumberModel(Number, Comparable, Comparable, Number) with explicit boxing operations:

    new SpinnerNumberModel(new Float(1.0f), new Float(0.25f), new Float(2.0f), new Float(0.25f))

     

    Last edit: Emmanuel Puybaret 2019-04-16
  • Jon

    Jon - 2019-04-16

    Sorry my use of the word 'cast' I have not coded in Java yet ( well actually one day so far ) - thanks for the responses.

    I had started playing around with plugins - had not used eclipse before so a little bit of a learning curve.

    I will check see if source code is included and then see if I can modify and compile the proposed fix this end and give you feedback on whether it fixes the issue.

    If that is too slow then I would also be happy to accept a compiled zipped plugin from you and test that.

     
  • Jon

    Jon - 2019-04-16

    Hi Enko,

    I am having problems building from your source - its most likely me as my exposure to Java and Eclipse can be counted in hours :-) specifically I cannot get 'com.eteks' imports to resolve but
    its probably quicker if you are willing to prepared to implement Emmanuels proposed changes and export to a ready built plugin file suitable for dropping into my plugins folder I am happy to check that it fixes the fault.

    I include the import failiures for reference just in case there is an easy fix that will enable me to proceed.

    ====

    import com.eteks.sweethome3d.j3d.PhotoRenderer;
    import com.eteks.sweethome3d.model.AspectRatio;
    import com.eteks.sweethome3d.model.Camera;
    import com.eteks.sweethome3d.model.Camera.Lens;
    import com.eteks.sweethome3d.model.Home;
    import com.eteks.sweethome3d.model.HomeEnvironment;
    import com.eteks.sweethome3d.model.Selectable;
    import com.eteks.sweethome3d.model.UserPreferences;
    import com.eteks.sweethome3d.swing.HomeComponent3D; // addition (enkonyito)
    import com.eteks.sweethome3d.swing.IconManager; // addition (enkonyito)
    import com.eteks.sweethome3d.swing.PhotoPanel; // addition (enkonyito)
    import com.eteks.sweethome3d.swing.ResourceAction; // addition (enkonyito)
    import com.eteks.sweethome3d.swing.ScaledImageComponent; // addition (enkonyito)
    import com.eteks.sweethome3d.swing.SwingTools; // addition (enkonyito)
    import com.eteks.sweethome3d.swing.VisualTransferHandler; // addition (enkonyito)
    import com.eteks.sweethome3d.tools.OperatingSystem;
    import com.eteks.sweethome3d.viewcontroller.AbstractPhotoController;
    import com.eteks.sweethome3d.viewcontroller.ContentManager;
    import com.eteks.sweethome3d.viewcontroller.DialogView;
    import com.eteks.sweethome3d.viewcontroller.HomeController; // addition (enkonyito)
    import com.eteks.sweethome3d.viewcontroller.Object3DFactory;
    import com.eteks.sweethome3d.viewcontroller.PhotoController;
    import com.eteks.sweethome3d.viewcontroller.View;
    import com.eteks.sweethome3d.viewcontroller.ViewFactory; // addition (enkonyito)

    ====

     
  • Anonymous

    Anonymous - 2019-04-16

    Thanks Emmanuel for the explanation and the solution!

    Jon, can you test if this beta version 1.7 solves the problem?
    You can use the userGuideExample.sh3d (www.sweethome3d.com) file that already has a recorded video path.

     
  • Jon

    Jon - 2019-04-16

    Hi Enko, wow that was fast.

    I used the your 1.7 beta version against useGuideExample.sh3d as you indicated.

    I can open the panel now.

    I was able to playback the preview of the path.

    I was able to create videos with quality settings 1 and 2 with observer camera.

    With quality settings 3 and 4 it seems to abort after maybe one or two seconds after pressing the create button - I have not fully investigated that, personally I would not be usng settings 3 and 4.

    The abort was not accompanied by any warnings and I could go on to create videos with quality settings 1 and 2 again with no problem, there seemed to be no side effects of the failed attempt at quality 3 and 4.

    I was able to locate videos produced with quality settings 1 and 2 and play them back, they looked fine.

    Thanks for such a fast response, I will have a go on my full model next and see how it all goes.

    I am happy to test future Ubuntu issues in the future.

    Jon

     
  • Anonymous

    Anonymous - 2019-04-17

    Thank you for your feedback Jon!

    For the other bug that you found, it's due to the fact that I had not yet taken into account the new ambient lighting feature for the video panel.
    I am working on it.

    Enko

     

    Last edit: Anonymous 2019-04-17
  • Anonymous

    Anonymous - 2019-04-24

    While waiting for the next version of Sweet Home 3D, here is the latest beta 1.7 of the plug-in. This allows you to test the ambient lighting panels by activating "Add all ceiling lights" in the standard version of SH3D.
    To view the location of panels in the plan using polylines, you can use this utility.

     
  • Anonymous

    Anonymous - 2019-07-14

    PhotoVideoRendering-1.7 plug-in

    • added an ambient lighting slider (simple photo panel)
    • fixed a bug in the management of curved lines (video panel)
    • fixed a bug in the management of speed values (video panel)
    • added other global illumination (rendering properties)
    • management of additional Sunflow options
    • compatibility with the standard version of SH3D and its derived version

    AdditionalSunflowOptions-1.1 plug-in

    • Sunflow options to override shaders

    SH3D-6.2_derived executable jar

    • added an independent ceiling light in each room
    • added Fake Ambient Term 2 global illumination
    • grouping the actions of a same plug-in in a menu
    • other minor enhancements

    The source code of the derived version is in the SH3D-6.2_derived-src compressed folder.

     

    Last edit: Anonymous 2019-07-16
  • Emmanuel Puybaret

    Thanks for posting this new version. It looks like the source code of the derived version, a requirement of the GNU General Public License, is missing. Please post it too.

     
  • Anonymous

    Anonymous - 2019-07-16

    Sorry for forgetting, the source code of the derived version has been added.

     
  • Jose Carlos Sousa B. Junior

    Hi. When I try to render something with a texture loaded in the 3d view (like a sky for exemple), the only globalIllumination that works is ambient occlusion. If I try path Tracing (all the others possibilities) the rendered image get very strange... I made a test scene to ilustrate what is happening... This was hapenning in the 1.6 version too

     
  • Anonymous

    Anonymous - 2019-08-25

    Hi Jose,

    There are 2 ways to use "Path Tracing" global illumination with a number of diffused bounces greater than or equal to 1.

    Choose a time when sunlight is visible.
    1- With a sky color, which emits light by default, it is automatic.
    2- With a sky texture, which does not emit light by default, it is necessary to check Enhance external brightness otherwise the image will be largely black.

    Enko

     
1 2 3 4 > >> (Page 1 of 4)

Log in to post a comment.

MongoDB Logo MongoDB