preparing a 30 scene for datasmith -...
TRANSCRIPT
Preparing a 30 Scene fo r Datasmith Tne Datasmith Importer for u nreal Engine 4 (UE4) supports Autoctesk 3DS Max using an exporter plugin and a variety of CAD file types
natively. In almost all cases, you snould not need to adjust your content and Oatasmith snould "just worl<" when you import it into UE4.
Each of the supported OCCs creates and manages its assets in ways that aren't alWays going to align With a real-time engine. The
sections of this guide detail some general guidelines that you can reference when creating your projects or provides some insight into
how your content is translated to Unreal through Datasmith.
For a comprehensive list of supported software and file types, see the Datasmith Supported Software and File Types page.
General Content Guidelines
Below are some general guidelines for creating your content in your software package and some additional topics you should be aware
of when importing content into Unreal using Oatasmith.
Geometry
Level of Deta il (LODI
Currently, level of detail (LOO) meshes are not imported or generated at import for your scene geometry. This process can be automated
using the Pytnon sclipting plugin in unreal Engine 4.
Manually creating LOOs using Unreal Engine 4's own mesh reduction system can be achieved by following the steps in the Setting up
Automatic LOO Generation.
Collision Primit ives
Currently, collision primitiVes are not imported or generated at import for your scene geometry. This process can be automated using the
Python scripting plugin in Unreal Engine 4.
Manually adding collision to your scene and Static Meshes can t>e achieved in one of two ways:
• Use a Blocking Volume to act as collision for a section of your scene in the level.
• Set up collision per-Static Mesh using Simple Collision shapes or Convex shapes that more closely matell your geometries shape.
UV Coordinates for Lightma p UVs in UE4
Lightmaps are a uniquely unwrapped UV where every part of the model has its own representatiVe space. II is used during a light build to
generate a texture that stores light and dark information for the Actor in the scene.
Below is the process that Datasmith uses to generate a lightmap UV:
1. Datasmith content is imported ·as-is". It preserves the UV Channels that object in 3DS Max may nave. Depending on now the
object was set up, it can have up to 99 UV Channels.
2. Datasmith generates an additional UV cnannel that does an auto-unwrap. It ensures that UV charts are not unwrapped property.
3. The UV channel created in step 2 is used to generate the lightmap UV that will be used when you build lighting for the scene. The
lightmap is appropriately padded and packed based on the Static Mesh Lightmap settings used during the Datasmith Import
process.
The Datasmith import process will always generate two unique UV channels that are used to create a functional lightmap UV. These UV
channels Will be added to the existing list of UV Channels that are viewable through the Static Mesh Editor toolbar.
Textures and Materials
When textures and materials are imported using Datasmith, their properties and Characteristics are translated to ones that Unreal Engine
4 can use. The following are supported texture inputs that can be converted to ones used by UE4's Material Editor:
• Diffuse/Base Color
• Specular Value or Texture
• Roughness Value
• Opacity Value and Mask
• Normal Map
• Displacement and Tessellation
• Refraction
Depending on the complexity of the material being imported, it will be set up accordingly where possible. For example, if you nave a
glass material in your software package, the one created in UE4 will be set up to use a Translucent blend mode in UE4. If the material is
using an opacity mask, UE4 will set up one tnat is using a Masked blend mode when it assigns and connects the texture inputs.
For additional information, see the Material Blend Mode page.
Be aware that not all software packages translate their materials the same way, so some materials may require extra set up in
Unreal Engine 4 or may not be supported at all when importing from your Datasmith scene.
Lights
Unreal Engine 4 is a real time renderer, so tnere are some features that are supported in offline rendering software that is not or cannot
be supported.
Unreal Engine 4 is a real time renderer, unlike many software packages tnat use offline rendering. Th is means that some features
supported for offline rendering are not yet supported or cannot be supported due to limitations. When lights are imported using Datasmith
for Unreal Engine 4, they are converted using features and properties tnat currently align With UE4's.
Datasmith attempts to translate the folloWing features during import:
• Position
• Orientation
• Shape
• Size
• Intensity
• Units Lamp Color
• Filter Color
Unfortunately, features aren't always translated and sometimes you'll need to make adjustments in UE4. For additional information about
using lights in Unreal, see tne Lighting Basics page.
Naming Convent ions
Unreal Engine 4 naming for assets only accepts alphanumeric characters and no spacing. Spaces will be replaced with an underscore
and cnaracters tnat are not supported by unreal are dropped. For some applications, like with 3DS Max, tne object name Will only be
reflected in the World Outliner for the asset in your level but the name of tne asset stored in the Content Browser will be the unique
reference ID used by your application to the object. This is commonly used under the hood when applications support object naming
where multiple objects can be named the same thing but are different assets. Unreal Engine 4 supports this for Actors in your Level
through the World Outliner as well.
Scene Hierarchy
When your Datasmith scene is imported and placed in the active level, tne naming and ParenVChild hierarchy are preserved if hierarcny
and metadata export is supported from your software package. In the UE4 World Outliner, the Actor hierarchy will be preserved under a
root Actor with the name of tne Datasmith Scene file that was imported and appended by _Root.
Seject 0 1iplay Edit ·;; Vi'o·ld Out 1rsPr
SCENE ROOT
~-- CAMERA
r·· ~LANEOOI
j ~----~ M_STATUE
j ~--·· FSPOTOOI
j l--··FSPOTOO2
L- SPOTOOI
In this example, the scene hierarchy is displayed in 3DS Max and how it is set up in UE4's World Outliner. The scene root in the World
Outliner takes on the name of the CAD or unreal Datasmith file that is imported. In this case, the hierarchy is preserved under
Statue _Lighting_ Root.
Autodesk 30S Max Scene Gu idelines
AutooesK 3DS Max uses a custom Datasmith Exporter plugin that outputs an unreal Datasmith (•.UDATASMITH) file. Some functionality
presented here is unique to how we output that information from 3DS Max and tnen import it into UE4.
Toe following examples apply to Unreal Datasmit h (•.UDATASMITH) files generated by the Autodesk 3DS Max Exporter plug in
that are imported into Unreal Engine 4.
Geometry
Pivot Points
3DS Max allows you to set custom pivot points for objects in your scene, regardless of them being instanced. unreal Engine 4 does not
currently support custom piVot points for instances.
To support custom pivot points for instances, Datasmith exports custom pivot information as a sub-component. Unreal uses this
information to create a sub-component for the corresponeling Actors in the level. In the example below, Teapot002's pivot is the root
component anel Teapot002_Pivot is the instanceel mesh set as a chilel of the root that is acting as the custom pivot point.
Inst ances with Custom Pivot Points and Non-Unifo rm Scaling
Instances of an object in 30S Max that use a custom pivot point anel have been non-uniformly scaleel are a special case that unreal
Engine 4 cannot support. Attempting to export content that exhibits these characteristics using Datasmith will generate a warning in the
30S Max Output warnings Winelow Cluring export:
INVALID TRANSFORMS
Some objects have customized pivots and nonuniform scales. Those combinations are not supported by Unreal and will produce incorrect results.
It is recommended to use the Resetl Xf orm Utility on those objects:
To solve the issue, use the 30S Max utility for Reset XForm on those objects:
• Utifities
More ...
Perspective Maid,
Colapse
Color Clipboard
Measure
Motion CaptJSe
MAXScript
Flight Studio (c)
• Reset Transform
Reset Selected
Lights
3DS Max supports a variety of light types for its scenes, such as Standard, Photometric, V-Ray, and Corona. Tile intent of Datasmith is to
support the following characteristics of those lights:
• Position , Orientation, Shape, and Size.
• Intensity, Units Lamp Color, and Filter Color
• Render Shape Visibility
• Instancing
However, unreal Engine 4 does not currently support the following light Characteristics:
• Instanced Lights
• Area Ug his
Lights are imported With With their ParenVChild Actors and Components are added in the level to Actors to handle the visible light shape.
The Child Actor is the Light Actor, Where you can further adjust the properties of the light
Light shapes can t>e selected in the Shape/Area Shadows section of light properties of 3DS Max which translate to a drop-down
selection t>ox for Light Shape in UE4.
• Shape/Area Shadows
Emit light from (Shape)
Rectangle
length:
Width:
Rendemg
100.0
300.0
.,, light Shape VlSble in Rendering
Shadow Samples: 1..4 •
3DS Max
.11111 Appearance
Uglit Shape
[> Dimensions
[> Col or
Intensity
X 1000 .,, Y 300.0 ....
Unreal Enaine 4
Tne visibility of the light Shape can be enabled and disabled by using tile Actor Hidden In Game clled< box found in the Details panel
of UE4.
~ Rendermg
~ Editor Billboard Scale -
Light Color and Intensity
During the conversion of lights to UE4, tile folloWing characteristics nave been preseJVed:
• Intensity
• Kelvin Temperature
• Filter Color
• Light Type (IES Profiles, Spotlig his, etc.}
• • • • t e e e -
- • - ~~ ••••
30S Max Unreal Engine 4
Top: Point Lights with /ES Profiles and scaled KeMn Temperatures; Middle: Point Lights with /ES Profiles and scaled light intensity;
Bottom: Spot Lights with Filter Color.
There may be some minor differences between lighting in your 3DS Max scene versus your Unreal Engine 4 scene. You may have
to make some adjustments to your lights inside of UE4 to get similar results.
Known Issues
• Since lignt instancing is not supported, using two Ugnt Actors adds clutter to tne scene.
o In a future release, tne idea is to combine tnose two Light Actors as a unique Blueprint Object.
• Support for some V-Ray light snapes are not property converted. For example, Vertical Cylinder, spneroid , and Custom Mesn
lignts.
• Standard lights are unitless and allow for custom attenuation parameters tnat are not supported by UE4. Tnese lights will require
some manual adjustment in UE4
• Emissive snapes for lights Will not contribute to Ugntmass calculations in UE4 when building lighting. It is purely a visual effect at
tn is time.
Text ures and Materials
30S Max UV Channels vs Unreal UV Channels
In 3DS Max, you are allowed to nave up to 99 UV cnannel associated Witn an object. Unreal Engine 4 only allOws for eight UV cnannels
to exist. wnen Datasmitn content is exported to unreal Engine 4, tne Datasmitn export plugin will consolidate tne UV cnannels found and
create an array tnat contains up to eight UV channels. It does tnis by sl<ipping any blank slots use a UV channel but contain no UV
charts.
For example, the 3DS Max object below has five UV channels in its modifier list. Each one of these UVs nas a number associated Witn it
between O and 99 stored on the object wnicn represent tne UV channel slot being used. In Unreal, only five UV channels (plus the two
lightmap UV channels) will be imported and generated, producing seven UV channels overall.
+ !C Vemces
Modfier list
Reser Camera
UV Channel 0
UV Channel 1
UV Channel 2
UV Channel 3
UV Channel 4
UV Channel 5
UV Channel &
Below is a breakdown of tne same example, with explanations for the UV channels imported from 3DS Max and tne ones generated for
Ughtmap UVs.
30S Max UV Channel
2
3
10
99
Resulting Unreal UV Channel
0
2
3
4
5
Notes
The UV channel 1 in 30S Max is assigned to UV channel O in Unreal.
The UV channel 2 in 30S Max is assigned to UV channel 1 in Unreal.
The UV channel 3 in 30S Max is assigned to UV channel 2 in Unreal.
The UV channel 10 in 30S Max is assigned to UV channel 3 in Unreal.
The UV channel 99 in 30S Max is assigned to UV channel 4 in Unreal.
UV channel 5 in Unreal is generated during import to create an automatic unwrap of the geometry contained in
the Oatasmith scene. It is the basis for the lightmap UV generation used by UV channel 6.
6 UV channel 6 in Unreal is generated based on UV channel 5 to correctly pad and pack the UV charts based on
the Oatasmith Import Options used for the Static Mesh Lightmap Resolution values.
Materials Best Practices
Datasmith attempts to export 3DS Max materials With a good level of fidelity an<! recreate them in u nreal Engine 4. However, there are
limrtations With regar<ls to the complexity of the material that can be exported. Because of th is, you must consicler the following When
looking to bring materials from 3DS Max into UE4:
• 3DS Max supports multiple shading models for materials, such as V-Ray, Corona, Arnol<l, Mental Ray, an<! more.
o Each shading model is a separate piece of software that eacn have their own unique features an<! are inconsistent from one
another.
• To support an arbitrary number of these materia l graphs in Unreal Engine 4 woul<l require that eacn Material or Map plugin from
3DS Max also exists in Unreal.
o To support that init iative, a large part of 3DS Max functionality for Unreal woul<l have to be adde<l, which is not planne<l.
Since unreal cannot support the variety of these shading models for the MaterialS you create in 30S Max, below are some examples of
what workS best When exporting your materia ls to Unreal Engine 4.
Materials that are relatively ·simple· will translate better than complex shader graphs.
• M<4>•S Billnap
• MapOJ Botmop
Cliek image for fuJI size.
Complex material graphs will not likely have issues converting or nee<l a<l<litional clean up in UE4'sMaterial E<lnor. An example of a
complex material would be one tllat uses many <lifferent shaders neste<l in one another.
Cliek image for fuJI size.
Autodesk Materials do not translate in Datasmittl. These are materials that are usually imported from Autooesk Revn.
Naming Convent ions
Stat ic Mesh Asset Name
When naming your assets in your software application an<l then importing tllem into Unreal, you may fin<l that tile name of your assets is
not the same. There are a couple of reasons that tllis coukl be:
• Unreal Assets must have unique names
• Name and path locations are limite<l to 256 characters
• Non-Alphanumeric characters are not supported, inclu<ling ones from different languages
For example, in 30S Max, object names are not enforce<l to be unique, can have an arbrtrary length, an<l use arbitrary characters. This is
important to note When supporting reimport worl<flows, an<l searcn and replace. There needs to be a persistent han<lle to objects an<l the
object name is not something that should be relie<l on. As a result, with 30S Max, the nO<le han<lle is used, which is a unique object
identifier provided by the 30S Max SOK as a way to identify entnies that are unique.
30S Node ID vs Object Name
Imported Static Meshes in UE4 are name<l according to tile internal "nooe ID" handle used to reference an object for tile following
reasons:
• Object Names are not enforced to be unique and can nave arbitrary lengths and cnaracters from different languages.
• Unreal assets must nave unique names only include alphanumeric characters and are limited to a file patn name of 256 characters.
• To support reimport wort<flows for Datasmit11, a persistent nandle to objects is neected. Object names in 3DS Max cannot be reflect
on in tnis instance.
Tne World Outliner in unreal Engine (that lists all your Actors in tne currently loaded level) uses tne Object Name from 3DS Max for easy
reference.
Select Display Edit Customize
X l!a ri] Name (Sorted Ascending Age)
~ O, SpotOOl.Target
r.1 O • I CameraOO 1
E.I o • Plane001
i!J o, Fspot002
~ o, FspotOOl •, SpotOOl
0 e SM_Statue
·-~ World Outliner -,> Levels
Label Type
0 A•;J Untnled (Editor) ,'/::, 1 I::: 0 .. • Statue_Scene_Root :. :: ~::,I
0 t._,..- CameraOOl :11-1fJC, ,:1c1t.
0 f, , FspotOOl :: 1:, ::,~L ,· 0 f, , Fspot002 :: 1:, ::,~L ,· 0 r) PlaneOOl :: ~ C1 ~I:: I.'.- 1-1i
® Q SM_Statue Actor SpotOO l
7 actors (1 selected) <!> v ,ew Options~
However, when you select tne Actor in tne Level or from tne World Outliner, the Details panel displays a reference to tne Static Mesh
Actor that uses the node ID handle from 30S Max to identify the asset.
1 ~arf,;
0:: Blueprint/Add Script
"'Transform
L,XJtl:>r ,,..
"'Materials
Cliek image tor fuJI size.
Using the node ID handles to identify the asset in UE4 makes the most sense since it is a unique object identifier proVided by tne 3DS
Max SOK. It identifies all entities tnat are unique in your scene, even if they are given tne same Object Name.
To quickly locate an asset in your scene in the Content Browser, use tne magnifying glass next to any asset in referenced in the
Details panel. The Content Browser will show the asset in its folder location in the Content Browser.
Click image tor full size.
In 3DS Max, you can locate a corresponding object by using MaxScript to get the same node with the following command:
Maxops.getnodebyhandle [number)
CAD Scenes
The following sections apply to natively supported CAD files imported using Datasmith for Unreal Engine 4. These sections contain
general information and lips that you shoukl be aware of when developing and planning your CAD scenes for use in UE4.
Geomet ry
Geom etry Tesselation
For applications that use a mathematical representation of its assets versus using polygonal geometry, during import, a polygonal mesh
will be created based on tne settings used for Geometry & Tessellation. These values determine how complex the mesh that is created
will be when represented in unreal Engine 4.
Data smith Import Options
Import File Hypospray Vl O stp
Import To /Game/
_. Include
Geometry ~
Materials & Textures t!'J lights ~
Cameras ~
.o1111 Static Mesh Options
Min lightmap Resolution
Max lightmap Resolution
_. Geometry & Tessellation Options
Chord Tolerance
Max Edge Length
NOfmal Tolerance
Version O 17 (?J
0 2 cm ....
00cm ....
111111
• \,,;OOra 101erance: 1 ne 111a.x1r11u111 uIst.c:u1ce uetwee11 a ye11eIa teu uIa.ny1e a.110 me 01191110.1 su11a.c..:e. ~111a 11e1 va1ues 111t.::1ease ma11y1e
counts.
• Max Edge Length: The maximum length of an edge in the triangles generated from a surface. Smaller values increase triangle
counts.
• Normal Tolerance: The maximum angle between adjacent triangles generated from a surface. Smaller values increase triangle
counts.
Due to the potential complexity of CAD files and having to generate a mesh during import, you may notice that import limes can
increase or take a while based on the values used for the Geometry & Tessellation Options.
Lights
For CAD programs that support Lights in their scenes, these will attempt to be imported and retain their properties where possible. This
may be improved for future releases.
Texture and Materia ls
Currently, texture import from CAD files is limited or not supported but is planned to be added in a future release.
Materials and Colors
Materials imported that are different colors in a source CAD file are imported as a Material Instance and reference a Master (or Parent)
Material in UE4.
UV Coordinates
Due to the way CAD files are created and how they must be translated to UE4, UVs for materials and textures is limited. Currently, the
only uvs are ones generated for the Lightmap uv in Unreal Engine 4. The first UV is flattens out all the geometry and the second UV
(that becomes your Lightmap UV for your Static Mesh in UE4) re-packs all tile UV islands so that tnere are no overlapping faces.