Camera Data Generator
The SweetHome3D Camera Data Generator is a Java-based auxiliary tool designed to create camera settings files for use in the SweetHome 3D software. This tool allows users to generate detailed camera configurations, including location (X, Y, Z), angles (Pitch, Yaw), Field of View (FOV), time zones, and more. The generated data can be exported as a CSV file and imported into SweetHome 3D to automate camera setups for rendering or visualization purposes.
This tool provides several modes of operation to cater to different camera configuration needs:
- Cycle Time: Automates the generation of camera data over a range of days.
- Cycle FOV: Iterates through a range of Field of View (FOV) values.
- Cycle YAW: Iterates through a range of Yaw (horizontal angle) values.
- Create Circular PATH: Generates camera positions along a circular path.
Below is a detailed description of the program's functionality, commands, and operational modes.
User Guide and Command Help
Main Features
- Input Fields:
- Start Day / End Day: Define the range of days for which camera data will be generated.
- Location (X, Y, Z): Set the camera's position in 3D space.
- Angles (Pitch, Yaw, FOV): Configure the camera's orientation and field of view.
- Date / Time: Specify the timestamp for the camera data.
- Time Zone: Select the time zone for accurate time stamping.
-
Circular Path Parameters (Radius, Height): Define the radius and height of a circular camera path.
-
Output:
-
The generated camera data is saved as a CSV file on the user's desktop (Cameras-List.csv).
-
Progress Bar:
- A progress bar visually tracks the generation process.
Operational Modes
1. Cycle Time
- Description: Automates the generation of camera data over a specified range of days.
- How It Works:
- The user specifies a start day and an end day.
- The program generates camera data for each day within the range.
- If the interval spinner is enabled, the program divides each day into intervals (e.g., every 60 minutes).
- Use Case:
- Useful for creating time-lapse animations or rendering sequences over multiple days.
- Settings:
- Enable the "Cycle TIME (Start Day > End Day)" checkbox.
- Adjust the Start Day, End Day, and Interval spinners.
2. Cycle FOV
- Description: Iterates through a range of Field of View (FOV) values, generating camera data for each step.
- How It Works:
- The program cycles the FOV from 0.25° to 180° and back to 0.25° in increments of 0.25°.
- Each FOV value corresponds to a unique camera configuration.
- Use Case:
- Ideal for testing how different FOV settings affect the rendered scene.
- Settings:
- Enable the "Cycle FOV angle (0.25° > 180° > 0.25°)" checkbox.
- Set the desired Pitch, Yaw, and other parameters.
3. Cycle YAW
- Description: Iterates through a range of Yaw (horizontal angle) values, generating camera data for each step.
- How It Works:
- The program cycles the Yaw angle from 0° to 360° in increments of 0.25°.
- Each Yaw value corresponds to a unique camera orientation.
- Use Case:
- Useful for creating panoramic views or testing horizontal camera rotations.
- Settings:
- Enable the "Cycle YAW angle (0° > 360°)" checkbox.
- Set the desired Pitch, FOV, and other parameters.
4. Create Circular PATH
- Description: Generates camera positions along a circular path.
- How It Works:
- The user specifies the radius and height of the circular path.
- The program calculates camera positions at evenly spaced points around the circle.
- Yaw angles are automatically adjusted to align with the circular path.
- Use Case:
- Perfect for creating smooth camera movements along a curved trajectory.
- Settings:
- Enable the "Create a Circular PATH" checkbox.
- Adjust the Radius and Height spinners.
- Set the center coordinates (X, Y) for the circular path.
General Workflow
- Launch the Program:
-
Open the application, and the main window will appear with input fields, checkboxes, and buttons.
-
Configure Settings:
- Fill in the required fields (e.g., X, Y, Z, Pitch, Yaw, FOV).
-
Select the desired operational mode (Cycle Time, Cycle FOV, Cycle YAW, or Create Circular PATH).
-
Generate Data:
- Click the OK button to validate inputs and generate the camera data.
-
A progress bar will indicate the status of the generation process.
-
Save Output:
- Once the process is complete, the program will save the data as a CSV file on the desktop.
-
A confirmation message will appear.
-
Import into SweetHome3D:
- Use the generated CSV file to import camera settings into SweetHome 3D for rendering or visualization.
Additional Notes
- Time Zone Handling:
- The program includes a comprehensive list of time zones and their offsets.
-
The selected time zone affects the timestamp in the generated data.
-
Image Display:
-
A world time zones map is displayed for reference when selecting time zones.
-
Validation:
-
The program validates user inputs to ensure consistency (e.g., Start Day cannot exceed End Day).
-
Hardcoded Output Path:
- The program saves the generated CSV file to the user's Desktop
Conclusion
The SweetHome3D Camera Data Generator is a powerful tool for automating camera configurations in SweetHome3D. By leveraging its various operational modes, users can efficiently create complex camera setups for rendering, animation, or visualization projects. Whether you need to cycle through time, FOV, Yaw, or create circular paths, this tool provides the flexibility and precision required for professional-quality results.
Screenshot!
Hi xlance, you forgot to upload sh3p file
Here are the files :-)
Hi xlance,
Great idea,
I did try and this is what I found at first test :
Didn't found 'cycle time' checkbox
Date / time imput changed and not taken in account
Fuzzed with start day , end day and date/time , will be more simple and explicit to give a start day with a date-time (local) and end day in the same way (date-time local)
Longitude & Latitude not relevant (you are not going to change the compass parameters in SH3D)
Cheers
...
Last edit: xlance 2025-03-23
Hi :-)
Didn't found 'cycle time' checkbox
Cycle time checkbox is at the very top and is always ON (default)
Date / time input changed and not taken in account
Please clarify more !
Cheers
Hi,
On my iMac , I still don't find this cycle time checkbox, however I don't see also the map on the right side as shown in your jpg.
If I input for Date / Time as example today ; the csv is still produced with 2024-02-29 ...
On another hand (fuzzed), if I want to generate a serie of (13) point of view as for today at each hour between 8AM and 8PM : what/where I should input ?
Lon and Lat are linked to time Zone , so dont show them ... (otherwise one can think he can change them ...)
I understand that Time Zone should be the same as in SH3D compass parameter to generate coherent POV timestamp, so if user gives Time Zone, Date/time can be given local as for example 2025-03-25T12:53 without 'greenwich' add on
BR
@Olivier
"Cycle time checkbox" is Grayed, that's inactive (refer to attached Screenshot1.jpg) and serves only as visual representation of the default operation of "Cycle through time from Start day to End day ". As for why it does not show on Mac OS, this needs some digging !
Download "World-Time-Zones-Map.png" file and put it in the same folder as *.jar file
Program defaults to 2024-02-29 or any DATE in Date/Time field for operation modes:
Cycle FOV
Cycle RAW
Circular PATH
but not in default mode, Cycle TIME from Start day to End day
Refer to attached "Screenshot2.jpg" for requested Values
Refer to attached "Cameras-List.csv" to examine generated *.csv file
Please note that generated values will be from 00:00 to 23:00 and not from 8:00am
to 8:00pm. Actually it's a good idea to add an option for selecting start and end hour :-)
Indeed Time Zones and Date/Time Formats MUST the same as in SH3D, however if you change the City/Region, say from Paris to Fiji, the local indicator (+02:00) changes accordingly.
Last edit: xlance 2025-03-25
The World-Time-Zones-Map.png was in the same folder ...
This is the screen that I get on Mac.
@Olivier
@xlance
Ok now I can see the map & cycle time button ( However I still wonder what the map and button are for ... )
In att input screen I've tried with some parameters and corresponding camera list output.
As you will see many inconsistencies in csv (y, pitch, yaw , fov, time (and not cycling), ...
Cheers
@Olivier
Try this please :-)
Hi xlance,
Each day it becomes a little better ... :-) , thanks
Apart my previous remarks this is what I found for today
Numerous code adjustments !
Added two Calendars to select Start day, End day
Added "Fix on specific Hour" function @Olivier
Added Validation mechanisms for the sensitive Date / Time field
Output files are merely .txt files but with .csv extension (no header needed) @Olivier
Names of output files now are unique for each mode:
Cameras-List-T.txt (TIME)
Cameras-List-F.txt (FOV)
Cameras-List-Y.txt (YAW)
Cameras-List-P.txt (PATH)
For Time Cycle:
Single Day operation ---> gets input from Date/Time Field
More than one Day operation ---> gets input from Start Day & End Day spinners / calendars
1 = 1 January
2 = 2 January
3 = 3 January
...
366 = 31 December (for leap years)
Last edit: xlance 2025-03-28
New INTERACTIVE Map with red Crosshair which Auto position based on Longitude and Latitude inputs (x, y coordinates)
Positioning is instantaneous without pressing Enter, either by direct input or choosing a location from the drop-down menu
Fixed an issue with Euro digital separator ( , )
Hereunder some findings about last version (h):
-Cameras-List-P.csv : missing header
Better than a list of textual remarks, please find a fac-similé for Camera Data Generator interface, that I’ld like to have. (Logic behind is self-explained , otherwise just ask)
Cheers
Olivier
@Olivier
The New functions requested are very comprehensive and took a lot of time and effort :-)
COMPLETE + Give possibility to generate for Aerial view (topview) in addition to (observer)
COMPLETE + FOV : possibility to choose the interval and min / step / max / step / min
COMPLETE + YAW : possibility to choose the interval and min / step / max
COMPLETE + Camera types : PINHOLE, NORMAL (Depth of field) ; FISHEYE, SPHERICAL
COMPLETE + Cameras-List-P.csv : Added header
and the really TRICKY one:
COMPLETE + Possibility to cycle time within 1 month interval or any number of days, also
taking into consideration variable lengths of Months (28, 29, 30, 31), so
output will be consistent
Input 31 days ---> 1 Jan, 1 Feb, 1 Mar ...
Input 16 days --->1 Jan, 17 Jan, 1 Feb, 17 Feb, 1 Mar, 17 Mar ...
+ On every startup, the program will randomly select a different destination and jumps to it !
Cheers
Last edit: xlance 2025-03-30
Hi xlance, Thanks again for your work and efforts !
I've had a look at last version and this is what I found
Cheers
Start 1 ; End 4 ; Fix Num days 2 Output message wrong or misleading (Total days 4) whilst Output is correct with 2 days generated (1 & 3)
Behavior is intentional, to indicate the Total days processed
Haven’t seen how to have interval of x months (only Num of days proposed)
Input 31 and it will correctly output 12 Months
Don’t understand why for Cycle FOV you go up and then down (data down are
same that data up )
Behavior is intentional, for Aesthetic reasons :-)
For Circular path Height is useless as you can take Z value, in the output
Some users requested it
Point 005 is useless as identical to point 001
It is crucial for closing the Path
How to have a circular path with 12 positions (30° step) ;
Only 5 are needed for creating a Path, refer to "Create Video" in PhotoVideoRenderer Plugin
Map not needed
Actually it's the crown jewel of the program ;-)
Cheers
1.1Q
(Circles have radius 1 = radius 2)
.
(Circular or Elliptical)
.
.
.
Note:
CameraBagPlugin-1.8 plugin now supports importing CSV files with ( ; ) separator
Last edit: xlance 2025-04-08