Skip to content

Add support for additional 3D model formats#566

Open
chippytech wants to merge 1 commit intop2r3:masterfrom
registcc:master
Open

Add support for additional 3D model formats#566
chippytech wants to merge 1 commit intop2r3:masterfrom
registcc:master

Conversation

@chippytech
Copy link

Overview
This pull request expands the supported 3D model input formats for the browser-based three.js visualization pipeline (threejsHandler). In addition to existing support (GLB, GLTF, OBJ, STL, PLY, FBX, DAE), the following new formats are now recognized:

3DS (.3ds) — Autodesk 3D Studio Meshes
VRML (.wrl) — Virtual Reality Modeling Language
three.js JSON Object (.json) — Native three.js scene files
Details & Highlights
New Imports:
Added TDSLoader for 3DS, VRMLLoader for VRML, and uses native ObjectLoader for three.js JSON.
supportedFormats Extended:
Each new format is listed with name, extension, MIME type, and category.
Loader Integration:
The doConvert method handles each new file type, constructing three.js objects as needed for rendering snapshots.
Housekeeping:
Blob URLs are properly revoked after use, helping browser memory.
Demonstrates Future Patterns:
The extension pattern makes additional 3D import formats easy to add in the future.
Motivation
Broader Compatibility:
Users often encounter 3D assets in legacy formats (3DS, VRML) or three.js-specific JSON scenes. Supporting these enhances the flexibility and usability of convert.to.it, making it a more comprehensive tool for 3D model preview and conversion workflows.
Uniform Interface:
All newly supported formats work identically to existing ones—upload any supported model and convert/render to PNG/JPEG/WEBP via three.js rendering.
Testing
Verified loading and 2D rendering for each new model format using varied sample files.
Checked output image formats across the entire supported range.
Notes
If further formats are needed in future (such as AMF, X3D, etc.), the loader pattern and supportedFormats array make them trivial to add.
Export (i.e., "to" model formats) is still not enabled—this only adds new input/preview types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant