Exporting Assets
Last updated
Was this helpful?
Last updated
Was this helpful?
Threekit supports the following export formats:
.DXF
.STEP
.SVG
Most glTF viewers use render passes to process opaque and transparent materials.
Meshes using opaque materials are rendered first, from front to back.
Then, meshes using transparent materials are rendered back to front, to properly see the transparency effects.
The cut-off
, or mask
, is a third mode supported by glTF that use a threshold; below that threshold it's transparent and above opaque.
The cut-off
materials are processed with the opaque ones.
The Render Category
property in the material determines which render pass the viewer uses to process each mesh:
Guess
: Try its best to emulate opaque and transparent; depending on the opacity values, it will put the material in opaque or transparent mode.
Opaque
: Treat this material as fully opaque, ignores all the opacity properties.
Transparent
: Set in transparent mode if there's any opacity values (opacityFactor
less than 1, opacityMap
is set, and/or baseTransparent
is checked).
Cut-out Transparent
: with the Alpha Test Minimum
value, which is the threshold.
Avoid using more than two UV channels.
Break a PolyMesh into opaque and transparent parts; the render pass used for the mesh greatly affects how it is displayed.
Transparency
Bump
Clear Coat (there's the extension KHR_materials_clearcoat for this)
Anisotropy
Specular
Sheen
Light Map
Canvas textures
Tiling/Offsets (depends on the viewer)
More than two UV Maps
Not exporting cameras and lights
These are modifications applied to the data before writing the glTF file.
The meshes are triangulated.
For multi-materials, the faces are split to match their material IDs, which creates multiple meshes. Visually, they will look like they belong to the same object.
In WebGL
, multi-materials don't exist; the meshes are also split for rendering purposes.
To reduce the amount of textures needed:
Metallic and Roughness maps are combined as blue and green channels respectively.
If an Ambient Occlusion map is also available, it is combined as the red channel.
Base and Opacity maps are combined.
The inverted Opacity map is applied there also.
Normal maps are changed if the red/green flip and/or swap red/green switches are set.
For AR Kit
, tiling and offset are supported, but they have some bugs.
It seems that if a tiling or offset is applied, it's shared between textures.
For example, a material with an ambient occlusion map, a normal map, and a roughness map, with tilings of 1x1
, 5x5
, and 8x8
, respectively, would be all combined by AR Kit
with a tiling of 1x1
.
Avoid using more than one UV channel.
Transparency (might be able to support in the future)
Bump
Anisotropy
Specular
Sheen
Light
Canvas textures
Cut-Off Render Category
Multiple UV Maps (in the future, might be able to support two)
These are modifications applied to the data before writing the USDZ file.
Inverted Opacity map is converted to a different texture.
Base and Opacity maps are combined if the base map uses transparency.
Roughness map, scaled by its factor, is passed through a square root operator in order to be displayed properly in AR Kit.
Normal map is completely transformed if its factor is less than 1 or if it has the flip or swap switch set.
Metallic
Roughness (the factor is converted to shininess)
Transparency (opacity is used instead)
Sheen
Anisotropy
Light
Canvas textures
Roughness is converted to shininess
STL exports to binary or ASCII formats. Examples below:
ShellCopy
Tiling and Offset are for material textures and are supported in some viewers, like the . But it's important to test your target viewer first to see if those features are properly supported.
(Optional) Compression with .