RFDT Solver and WiTwin Simulator are undergoing internal testing as we prepare for public release. The functions are limited. Sign up to receive updates.

Import 3D Models

Load 3D models into your scene from various file formats

Supported Formats#

WiTwin supports a wide range of 3D model formats for importing geometry into your scenes.

FormatExtensionDescription
OBJ.objWavefront OBJ format
STL.stlStereolithography format
PLY.plyPolygon File Format
GLTF/GLB.gltf, .glbGL Transmission Format

Advanced Formats

Support for advanced formats like NeRF and 3D Gaussian Splatting will enable importing learned 3D representations directly into your digital twin scenes.

Import Methods#

There are two ways to import 3D models into your scene, both supporting bidirectional synchronization:

Method 1: Python Code#

Load models programmatically using the Python API.

Load OBJ Model

from witwin import Scene, FileImport
 
scene = Scene()
 
# Load OBJ file
building = FileImport.load_obj(
    path="models/building.obj",
    name="MainBuilding"
)
 
# The object is automatically added to the scene
# Access and modify properties
building.transform.position = [10, 0, 0]
building.transform.scale = [1, 1, 1]
 
# Add material
material = building.get_component("Material")
if material:
    material.color = [0.8, 0.8, 0.8, 1.0]

Load STL Model

from witwin import FileImport
 
# Load STL file (commonly used for 3D printing models)
antenna = FileImport.load_stl(
    path="models/antenna.stl",
    name="Antenna"
)
 
antenna.transform.position = [5, 0, 0]
 
# STL models are automatically converted to mesh objects
mesh = antenna.get_component("Mesh")
print(f"Loaded model with {mesh.vertex_count} vertices")

Bidirectional Sync

Models loaded via Python immediately appear in the WiTwin Studio. Any modifications made in the Studio are instantly reflected in the Python code.

Method 2: Drag & Drop in Studio#

Import models directly in the WiTwin Studio interface.

How to Import

  1. Open the WiTwin Studio (launch from Python or access via web)
  2. Locate your 3D model file in your file system
  3. Drag the file from your file explorer directly into the Viewport panel
  4. The model will be automatically imported and added to the scene
  5. Access the imported object in Python code immediately

Supported Drag & Drop

FormatStatus
.objSupported
.stlSupported
.plySupported
.gltf / .glbSupported

Working with Imported Models#

Access Mesh Data#

from witwin import Scene
 
scene = Scene()
 
# Get an object by name
building = scene.get_object("MainBuilding")
 
# Access mesh component
mesh = building.get_component("Mesh")
 
print(f"Vertices: {mesh.vertex_count}")
print(f"Faces: {mesh.face_count}")

Modify Transform#

# Position
building.transform.position = [0, 0, 0]
 
# Rotation (Euler angles in degrees)
building.transform.rotation = [0, 45, 0]
 
# Scale
building.transform.scale = [2, 2, 2]

Apply Materials#

# Get or add material component
material = building.get_component("Material")
if not material:
    building.add_component("Material")
    material = building.get_component("Material")
 
# Set material properties
material.color = [0.5, 0.5, 0.5, 1.0]  # Gray RGBA
material.metalness = 0.0
material.roughness = 0.8
 
# Electromagnetic properties
material.permittivity = 4.0    # Relative permittivity
material.conductivity = 0.01   # Conductivity (S/m)

Using the Library Panel#

The Library panel provides a quick way to add primitive objects:

  1. Open the Library panel in the Studio
  2. Browse categories: Basic, Lights, Cameras, RF/Wireless
  3. Click an item to add it at the camera focus point
  4. Or drag an item into the Viewport to place it precisely

Available Primitives#

CategoryItems
BasicCube, Sphere, Cylinder, Plane, Cone, Torus
LightsPoint Light, Directional Light, Spot Light
CamerasPerspective Camera
RF/WirelessTransmitter, Receiver, Radar

Next Steps#