Print at Dec 17, 2025, 3:58:59 AM View all posts in this thread on one page
Posted by aheidel at Jul 15, 2018, 12:51:59 AM
Timelapse photo sequences?
I would like to create a series of images showing the path the sun takes from sunrise to sunset, for the days of December 21, March 21, and June 21. For instance, 5am, 6am, 7am, ..., 5pm, 6pm, 7pm. This would help in the design of the house.

Currently I'm setting the time, creating an image, and saving it, 15 times for each day.

Is there a way to automate this? Something similar to the "Create photos at points of view" but instead "Create photos at points of time"? Would it for instance be possible to expose a command-line interface to create photos, specifying point of view and time and quality level?

Thanks for such a great piece of software!


Aaron

Posted by Puybaret at Jul 15, 2018, 12:33:58 PM
Re: Timelapse photo sequences?
If you know a little XML, you could open a copy of your SH3D file with a ZIP utility, extract the Home.xml entry it contains and edit it to find the lines starting with:
<camera attribute='storedCamera'
like this one:
<camera attribute='storedCamera' name='15/07/18 11:51:53' lens='PINHOLE' x='49.999912' y='1050.0' z='1010.0' yaw='3.1415927' pitch='0.7853982' fieldOfView='1.0995575' time='1531656000000'/>

Then, you would generate one line <camera attribute='storedCamera' ... /> for each moment at which you want to generate a picture, changing only the attribute time. The hardest thing is to find which value to set in this attribute because the value is noted in milliseconds since the epoch (1st January 1970 GMT), but a utility like currentmillis.com should help you to start.

Once you added all these lines (and kept them apart in case something went wrong), save your SH3D file with your updated Home.xml file, open it in Sweet Home 3D, and run Create photos at points of view feature.
Caution: the maximum number of points of view is normally limited to 50, but this number is checked only when you update the list of points of view with the 3D view > Store point of view menu item. So don't use this menu item while you're doing this (or be sure to keep somewhere your numerous <camera attribute='storedCamera' ... /> lines.

If this is too complicated for you, you should know that a point of view stores a date/time to let you create different points of view at the same place but with a different time. The date/time stored at a point of view is the one shown in the Create photo dialog box when you select the 3D view > Store point of view menu item. So from Sweet Home 3D user interface, you can store 50 points of view at the same place with a different time, run Create photos at points of view feature, and so redo the same thing for other dates.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator

Posted by aheidel at Jul 16, 2018, 12:36:55 AM
Re: Timelapse photo sequences?
Sure beats writing a plugin -- brilliant!

Thanks.

Posted by digitaltrails at Apr 3, 2019, 9:41:22 PM
Re: Timelapse photo sequences?
I've just created a camera exported/importer which might be a bit easier than editing the XML. See:

http://www.sweethome3d.com/support/forum/viewthread_thread,9364

Posted by kentf at Oct 25, 2022, 1:32:42 AM
Re: Timelapse photo sequences?
Thanks for describing this in so much detail - 4 years later it saved me a great deal of time generating dozens of solar shadow diagrams.

Posted by digitaltrails at Oct 26, 2022, 5:15:47 AM
Re: Timelapse photo sequences?
Thanks for describing this in so much detail - 4 years later it saved me a great deal of time generating dozens of solar shadow diagrams.


Thanks for the feedback. It's great to hear someone is getting some use out of the plugin.

Shading diagrams might be a good feature to have in Sweet Home 3D proper. "See your creation over a 24 hour time lapse, or over a four season time lapse."

I guess a shading diagram plugin might be worth while. Not sure I'm up for coding that one though.