Appearance
Export images and simulation data
Camera export renders scene Cameras at a chosen resolution. Configure the Camera's placement first; Free view is a separate local view. See Views and cameras.
Configure image export in the GUI
Before initialization:
- Select Global settings in World and expand Export.
- Enable Export camera views.
- Set Camera view width/height, for example 960 × 640.
- Set World's Working directory to an existing output folder.
- Enable Auto export for scheduled frames, set its target FPS and start time, then initialize and advance.
Automatic FPS is measured per simulated second. At 30 FPS, export targets are about 0.0333 simulated seconds apart. A slow simulation can take much longer in wall time; each export occurs at an available simulation-step boundary.
For data output, also enable the relevant System's Export > Enabled and choose its format. Camera images use the global switch; a fluid or rigid-body System's export switch controls that System's data.
Export one frame with RPC
Follow Workspace RPC and download the prepared P600 project, which includes Cameras. Place it beside the script below. Start Flare Live with Simulation stopped and no Experiment active. The script opens that project, runs a temporary short trial, exports and returns to Document.
Save as export_frame.py:
python
from pathlib import Path
from flarelive_client import connect
PROJECT = Path(__file__).with_name("p600-gen2.fll")
OUTPUT = Path(__file__).with_name("frame-output")
OUTPUT.mkdir(exist_ok=True)
with connect() as client:
ws = client.workspace
# Configure image export in a temporary trial.
ws.open_world(PROJECT)
ws.begin_experiment()
world = ws.world_handle()
for path, value in {
"working_directory": str(OUTPUT.resolve()),
"export.export_camera_views": True,
"export.camera_view_width": 960,
"export.camera_view_height": 640,
}.items():
ws.set_property(world, path, value)
# Initialize, advance and export the current Camera views.
ws.initialize_simulation()
ws.advance_simulation(steps=10)
ws.export_simulation()
for image in OUTPUT.glob("export/*/camera_views/**/*.png"):
print(image)
ws.clear_simulation()
ws.end_experiment()Save your current work before running, or use an independent headless instance.
Run in the activated Python environment:
sh
python export_frame.pyThe method returns after export completes and the script prints local file paths. The default filename suffix is 0; pass another sequential_number when exporting additional frames. Exporting itself keeps the current simulated time.
Find the files
With default export folder name:
text
<working-directory>/
└── export/
└── <run-series>/
├── camera_views/
│ └── <camera-path>/
│ └── <camera-path>_0.png
└── <enabled System exporters' output>Camera hierarchy separators are replaced in folder/filename labels. Open PNGs in an image viewer and check subject placement and visible simulation response. A reset/initialization starts a new output series.
Files are written on the simulator's computer. The RPC result confirms completion; the example prints the PNG paths from that same computer.
Other data formats
- Fluid grids: enable the fluid solver's exporter and select its supported grid format. Open VTK output with a compatible scientific viewer such as ParaView.
- Rigid-body data: the Rigid Body Solver's export options include joint data and animated FBX. View text/CSV data in a spreadsheet or script; use a compatible 3D tool for FBX.
- Sensor time series: record
exchange_simulation_iooutputs in Python for CSV files. Output Recorder can print a parent sensor's values to Log for quick checks.
Grid export resolution/downsampling controls output size independently of simulation resolution. For an image-only run, leave data exporters disabled to avoid extra time and disk use.
The same RPC export calls work with GUI and headless instances. Headless Camera export needs a working graphics driver; Linux offscreen rendering uses EGL. To capture the application window and its panels, use GUI control and window capture in a GUI instance.