Importing 3D models
So far, we've shown how to add fairly simple objects in our 3D world—objects that can be defined with a few lines or curves. Even the TPath3D
component with its array of path points is only a 2D object at its root.
To create a 3D object not constrained to a handful of lines requires a TMesh
. Its parent class, TCustomMesh
, is actually the base class for all non-extruded 3D shapes, with properties hidden and methods overridden to make them easy to use. A mesh allows a set of connected points and—optionally—textures to define a 3D object. What we want is something even more complex.
Enter TModel3D
. This component has a MeshCollection
property that connects several mesh objects into one comprehensive object. What's more, MeshCollection
can import standard 3D model files built into many kinds of popular 3D modeling software, such as Autodesk or Blender. Three formats are supported: ASE
, DAE
, and OBJ
.
3D modeling software has a...