3DS (.3ds)
Background & Context
-
- MIME types: application/x-3ds, image/x-3ds
- Autodesk 3DS file format.
- Scene description and 3D modeling format.
- Used for 3D modeling and animation.
- Native format of Autodesk 3D Studio.
- Binary file format.
- Stores 3D objects together with lighting and view point information.
Import & Export
- Import["file.3ds"] imports a 3DS file as a MeshRegion object representing the surface.
- Import["file.3ds",elem] imports the specified element from a 3DS file.
- The import format can be specified with Import["file","3DS"] or Import["file",{"3DS",elem,…}].
- Export["file.3ds",expr] exports a 3D mesh-based geometric region to a binary 3DS file. The expr can be any region that is ConstantRegionQ or a Graphics3D object.
- The export format can be specified with Export["file",expr,"3DS"] or Export["file",expr,{"3DS",opt1->val1,…}].
- See the following reference pages for full general information:
-
Import, Export import from or export to a file CloudImport, CloudExport import from or export to a cloud object ImportString, ExportString import from or export to a string ImportByteArray, ExportByteArray import from or export to a byte array
Import Elements
- General Import elements:
-
"Elements" list of elements and options available in this file "Summary" summary of the file "Rules" list of rules for all available elements - Data format representation elements:
-
"Comments" comments "VertexData" list of vertex coordinates "PolygonData" list of polygon elements in indexed form "PolygonCount" number of polygons "PolygonColors" face color information associated with each polygon - Geometry representation elements:
-
"BoundaryMeshRegion" boundary mesh representation of a solid "MeshRegion" mesh representation of a surface "Region" region representation of a surface - Graphics representation elements:
-
"Graphics3D" 3DS file represented as a Graphics3D object "GraphicsComplex" 3DS file as a GraphicsComplex object "PolygonObjects" list of polygon primitives in absolute coordinates - Import and Export use the "MeshRegion" element by default for 3DS files.
Examples
open all close allBasic Examples (4)
Import a 3D model from 3DS as a MeshRegion object:
Import["ExampleData/seashell.3ds"]"Summary" properties of the solid model:
Import["ExampleData/seashell.3ds", "Summary"]Import an example file, rendering it as a 3D graphic:
Import["ExampleData/747.3ds.gz", "Graphics3D", ImageSize -> Medium]Export["model.3ds", [image]]Create a solid 3D object using RegionPlot3D:
RegionPlot3D[x ^ 2 + y ^ 2 < z ^ 2, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, Mesh -> False, Boxed -> False, Axes -> False, ImageSize -> Small, ColorFunction -> "RoseColors"]Export["cones.3ds", %]Scope (8)
Import (3)
Import works on a 3DS file:
Import["ExampleData/chain.3ds"]Import["http://exampledata.wolfram.com/vase.3ds"]Import provides access to elements in the 3DS file:
Import["ExampleData/seashell.3ds", "Elements"]{"BoundaryMeshRegion", "Graphics3D", "GraphicsComplex", "MeshRegion", "PolygonColors", "PolygonData", "PolygonObjects", "Region", "Summary", "VertexData"}Export (5)
Export works on 3D graphics:
Export["model.3ds", [image]]Export["sphere.3ds", Graphics3D[Sphere[]]]Export["ball.3ds", ImplicitRegion[x ^ 2 + y ^ 2 + z ^ 2 ≤ 1, {x, y, z}]]Export["pyramid.3ds", MeshRegion[{{-1, -1, 0}, {1, -1, 0}, {1, 1, 0}, {-1, 1, 0}, {0, 0, 1}}, Pyramid[{1, 2, 3, 4, 5}]]]Export["model.3ds", [image]]Import Elements (10)
"BoundaryMeshRegion" (1)
Give a BoundaryMeshRegion:
Import["ExampleData/spikey.3ds", "BoundaryMeshRegion"]"Graphics3D" (1)
Give the Graphics3D object:
Import["ExampleData/spikey.3ds", "Graphics3D"]"GraphicsComplex" (1)
Give the GraphicsComplex object:
Import["ExampleData/spikey.3ds", "GraphicsComplex"]"MeshRegion" (1)
Give a MeshRegion:
Import["ExampleData/spikey.3ds", "MeshRegion"]"PolygonColors" (1)
"PolygonData" (1)
"PolygonObjects" (1)
Give the list of Triangle primitives given in absolute coordinates:
Import["ExampleData/spikey.3ds", "PolygonObjects"] // Short"Region" (1)
Give a Region:
Import["ExampleData/spikey.3ds", "Region"]"Summary" (1)
Related Guides
History
Introduced in 2007 (6.0) | Updated in 2020 (12.2)