Print at Aug 8, 2020, 10:04:00 PM

Posted by digitaltrails at Apr 3, 2019, 9:33:35 PM
CameraBagPlugin Export/Import Points of View as CSV
I've written a plugin that can export and import a model's named points of view (its cameras) to a CSV file (hence camera bag, a bag of cameras). The plugin adds Export Cameras and Import Cameras menu items to the tools menu. When invoked via the menu, the plugin pops up an appropriate file selection dialog, defaulting to cameras.csv.

The ability to export/import provides you some ability to work around the current 50 points of view limit set in SH3D. Plus it provides you with the ability to generate points of view in bulk.

For example, say I need to create 30 images from the same point of view over a 3 month period. Rather than pointing and clicking to create 30 points of view, I can just export a single point of view and them use a spreadsheet or column oriented editor to generate the 29 other points of view, and then import all 30 back into SH3D.

The exported CSV looks something like:

Names with commas in them will be exported with the commas replaced by spaces.

The date will be exported in the time zone of the model's compass. Yaw, pitch, and fov angles are in degrees. For the moment x, y, z are internal metric only.

The cameraTypes are internal names that correspond to the Lens setting in the create photo panel as follows:
  • PINHOLE - Default
  • NORMAL - Depth of field
  • FISHEYE - Fisheye
  • SPHERICAL - Spherical
The viewType can be observer (virtual visitor) or topview (aerialview).

The observerSizeType is internal and determines some of the format of tooltips in some circumstances, it would normally be variableSize for both observer and topview cameras, but if the cameraType is observer, it may be fixedSize (perhaps just copy what's been exported).

The plugin has been uploaded to the sourceforge SH3D plugins contrib: