3ds max & V-Ray to UE4 – Datasmith workflow basics and tips

Software:
3ds max 2020 | V-Ray Next | Unreal Engine 4.25

This post details basic steps and tips for exporting models from 3ds max & V-Ray to Unreal Engine using the Datasmith plugin.
The Datasmith plugin from Epic Games is revolutionary in the relatively painless workflow it enables for exporting 3ds max & V-Ray architectural scenes into Unreal Engine.
Bear in mind however, that Datasmith‘s streamlined workflow can’t always free us from the need to meticulously prepare models as game assets by the book (UV unwrapping, texture baking, mesh and material unifying etc.) (especially if we need very high game performance).
That being said, the Datasmith plugin has definitely revolutionized the process of importing assets into Unreal, making it mush more convenient and accessible.

 

Preparation:
Download and Install the Datasmith exporter plugin compatible with your modeling software and Unreal Engine version:
https://www.unrealengine.com/en-US/datasmith/plugins

 

In 3ds max & V-Ray:

  1. Make sure all materials are VRayMtl type (these get interpreted relatively accurately by Datasmith)
  2. Make sure all material textures are properly located so the Datasmith exporter ill be able to export them properly.
  3. In Rendering > Exposure Control:
    Make sure Exposure control is disabled.
    Explanation:
    If the Exposure Control will be active it will be exported to the Datasmith file, and when imported to Your Unreal Level/Map a “Global_Exposure” actor will be created with the same exposure settings.
    Sounds good, right? So what’s the problem?
    The problem with this is that these exposure setting will usually be compatible with photo-metric light sources like a VRaySun for example, but when imported to Unreal, the VRaySun does not keep its photo-metric intensity. (in my tests it got 10lx intensity on import). the result is that the imported exposure settings cause the level to be displayed completely dark.
    Of-course you can simply delete the “Global_Exposure” actor after import, but honestly, I always forget its there, and start looking for a reason why would everything be black for no apparent reason…
    * If your familiar with photo-metric units, you can set the VRaySun to its correct intensity of about 100000lx, and also adjust other light sources intensity to be compatible with the exposure setting.
  4. Annotation 2020-05-12 192439
  5. Select all of the models objects intended for export,
    And File > Export > Export Selected:
    * If you choose File > Export > Export you’l still have an option to export only selected objects..
    Annotation 2020-05-12 192506
  6. In the File Export window,
    Select the export location, name the exported file,
    And in the File type drop-down select Unreal Datasmith:
    Annotation 2020-05-12 192550
  7. In the Datasmith Export Options dialog,
    Set export options, and click OK.
    * Here you select whether to export only selected object or all objects (again)
    Annotation 2020-05-12 192654
  8. Depending on the way you prepared your model,
    You may get warning messages after the export has finished:
    Explanation:
    Traditionally, models intended for use in a game engine should be very carefully prepared with completely unwrapped texture UV coordinates and no overlapping or redundant geometry UV space.
    Data-smith allows for a significantly forgiving and streamlined (and friendly) workflow but still warns for problem it locates.
    In many cases these warnings will not have an actual effect (especially if Lightmap UV’s are generated by Unreal on import), but take into account that if you do encounter material/lighting issues down the road, these warnings may be related.
    Annotation 2020-05-12 192730
  9. Note that the Datasmith exporter created both a Datasmith (*.udatasmith) file, and a corresponding folder containing assets.
    It’s important to keep both these items in their relative locations:
    Annotation 2020-05-12 204541

 

In Unreal Editor:

  1. Go to Edit > Plugins to open the Plugins Manager:
    Annotation 2020-05-12 192802
  2. In the Plugins Manager search field, type “Datasmith” to find the Datasmith Importer plugin in the list, and make sure Enabled checked for it.
    * Depending on the project template you started with, it may already be enabled.
    * If the plugin wasn’t enabled, the Unreal Editor will prompt you to restart it.
    Annotation 2020-05-12 192901
  3. In the Unreal project Content, create a folder to which the now assets will be imported:
    * You can also do this later in the import stage
    Annotation 2020-05-12 193030
  4. In the main toolbar, Click the Datasmith button to import your model:
    Annotation 2020-05-12 193043
  5. Locate the the *.udatasmith file you exported earlier, double click it or select it and press Open:
    Annotation 2020-05-12 193129
  6. In the Choose Location… dialog that opens,
    Select the folder to which you want to import the assets:
    * If you didn’t create a folder prior to this stage you can right click and create one now.
    Annotation 2020-05-12 193301
  7. The Datasmith Import Options dialog lets you set import options:
    * This can be a good time to raise the Lightmap resolution for the models if needed.
    Annotation 2020-05-12 193326
  8. Wait for the new imported shaders (materials) to compile..
    Annotation 2020-05-12 193408
  9. The new assets will automatically be placed into the active Map\Level in the Editor.
    All of the imported actors will be automatically parented to an empty actor names the same as the imported Datasmith file.
    In the Outliner window, locate the imported parent actor, and transform it in-order to transform all of the imported assets together:
    * If your map’s display turns completely dark or otherwise weird on import, locate the “Global_Exposure” actor that was imported and delete (you can of-course set new exposure setting or adjust the light settings to be compatible)
    Annotation 2020-05-12 193517

 

 

Related:

  1. Preparing an FPS project for archviz
  2. Unreal – Architectural glass material
  3. Unreal – Camera animation
  4. UE4 – Archviz Light calculaion tips

3ds max – Model a terrain from an Autocad topographical plan file

Software:
3ds max 2019

To model a terrain form an DWG (Autocad) file containing a topographical plan:

  1. Import the DWG file to into the 3ds max scene, and move the plan to the center of the 3ds max scene if necessary.
  2. Select the VIZBlock object and extract its linked geometry:
    Annotation 2019-12-12 181552.jpg
  3. Right click the Linked Geometry object and select:
    Convert To: Editable Spline
    Annotation-2019-12-12-181552b.jpg
  4. Enter Spline editing mode, select all the splines that are not part of the topography, and delete, or detach them so only the terrain ‘height lines’ will remain.
    Annotation 2019-12-12 182223.jpg
    Annotation 2019-12-12 182255.jpg
  5. With the topographical plan editable spline selected,
    Choose Create > Compound Objects > Terrain
    Annotation 2019-12-12 182640.jpg
  6. A Terrain object is now created:
    Annotation 2019-12-12 182716.jpg

To retopologize the terrain mesh to more usable quad polygon mesh:

  1. Create a new Plane primitive above the terrain mesh, slightly smaller at the sides, that has the wanted polygon resolution:
    Annotation 2019-12-12 183519.jpg
  2. From the Top view (important), with the new plane selected, choose:
    Create > Compound Objects > Conform:
    Annotation 2019-12-12 183607.jpg
  3. Set the creation method to ‘Move“, click Pick Wrap-To Object and than click the terrain mesh.
    It will now take some time for the new conformed mesh to be calculated..
    When the new object is ready, right click the viewport to exit the object picking mode.
    Annotation 2019-12-12 184044.jpg
  4. The Conform object is no ready, and contains both the terrain mesh and the new conformed quad polygon mesh:
    Right click it and choose:Convert To: Editable PolyAnnotation 2019-12-12 184552.jpg
  5. In Element editing mode, select the terrain mesh part and delete it to remain only with the new quad polygon mesh:
    Annotation 2019-12-12 184621.jpg
  6. Fix non conformed mesh parts by either moving or deleting them:
    Annotation 2019-12-12 184655Annotation 2019-12-12 184719
  7. The new retopologized terrain is ready:
    Annotation 2019-12-12 184752.jpg

 

The example demonstrated here is a DWG file by Jose Vega, free to download from Bibliocad.com

Quick friendly-topology sphere in Blender and 3ds max

Software:
Blender 2.79 | 3ds max 2017

Untitled-1.jpg

Blender:
Create Cube
Add ‘Subdivision Surface’ modifier and divide it couple of times
Apply the ‘Subdivision Surface’ modifier
Enter Edit mode and spherify the mesh using ‘To Sphere’ Command (Shift + Alt + S)

3ds max:
Create Cube
Add a TurboSmooth modifier and set wanted iterations
add Spherify modifier
Convert to Editable Poly if needed

3ds max ProBoolean shading artifacts

Software:
3ds max 2017

There are certain situations in 3ds max where using a ProBoolean operation on a model will perform the geometrical operation but produce shading/smoothing artifacts, or problems in later operations like Chamfer.
* This can often happen with geometry (models) imported from other software like Sketchup for instance

In many of these cases setting the ‘Planar Edge Removal’ to ‘No Edge Removal’ in the ProBoolean Advanced Options will solve the problem.

Probool

The reason I’m not adding some visual example of the problem I described is that I couldn’t reproduce it..
So the tip is, if you perform a ProBoolean operation, and weird stuff happens,
Try setting No Edge Removal, it may solve the problem.