Using Datasmith with Cinema 4D

Describes special considerations that apply only when you use Datasmith to bring scenes from Maxon Cinema 4D into the Unreal Editor.

Windows
MacOS
Linux

This page describes how Datasmith imports scenes from Maxon Cinema 4D into Unreal Editor. It follows the basic process outlined in the Datasmith Overview and About the Datasmith Import Process, but adds some special translation behavior that is specific to Cinema 4D. If you're planning to use Datasmith to import scenes from Cinema 4D into Unreal Editor, reading this page can help you understand how your scene is translated, and how you can work with the results in Unreal Editor.

Cinema 4D

Unreal Engine

Cinema 4D Workflow

Datasmith uses a Direct workflow for Cinema 4D. That means that to get your Cinema 4D content into Unreal using Datasmith, you need to:

  1. Save your scene to a .c4d file, using the File > Save Project for Melange option.

    This option makes the saved file include triangulated meshes for all geometry in the scene, even the geometry created procedurally by generators. It also makes the saved file include all clones in the current animation, not just the ones visible in the current frame. Datasmith needs all of this information to create Static Mesh Assets and Level Sequences that match your source scene.

  2. Use the Datasmith Cinema 4D importer to bring that file into the Unreal Editor. See Importing Datasmith Content into Unreal Engine 4.

You can configure Cinema 4D to always include the extra information Datasmith needs in every file you save. From the main menu, choose Edit > Preferences. Then, on the Files tab of the Preferences dialog, enable the Save Polygons for Melange and Save Animations For Melange options.

Note, however, that this will increase the size on disk of all the files you save. If this is a concern, and you frequently work with scenes that you don't need to bring into Unreal Engine through Datasmith, you may prefer to use the File > Save Project for Melange option only when you need it.

Geometry

Datasmith creates a separate Static Mesh Asset for each separate visible geometric object in the Cinema 4D scene.

Datasmith uses the name each object has assigned to it in the Properties panel in Cinema 4D (shown on the left in the image below) to determine the name that it assigns to the corresponding Static Mesh Asset (shown on the right in the image below).

Geometry in Cinema 4D

Geometry in Unreal Engine

You can therefore influence the granularity of the Static Mesh Assets and Actors that Datasmith creates by merging objects in Cinema 4D before you export. For example:

  • You can use the Connect Objects command in Cinema 4D to merge two objects into a single object. See the Cinema 4D documentation.

  • For more flexibility, you can use the Connect Object in Cinema 4D to combine objects that are closer than a given threshold value into a single mesh. In this case, the Datasmith import will produce a single Static Mesh Asset for the combined mesh, but the connected pieces remain as separate objects in Cinema 4D. See the Cinema 4D documentation.

Object Visibility

If you have objects that you don't want to be imported into Unreal Engine at all, hide them in Cinema 4D before you save your .c4d file. The Datasmith importer does not import geometry of hidden objects into Static Mesh Assets, and does not include them in the Datasmith Scene hierarchy.

You can use the Objects panel to hide the objects individually. Alternatively, you can put the objects you want to omit into their own layer, then use the Layers panel to hide all objects in that layer.

Generators and Deformers

When you save your Cinema 4D scene for Melange, every generator in your scene is "baked" down to a single triangular mesh that represents the total procedurally generated geometry of the object. Similarly, every deformer is baked to a single triangular mesh based on the final state of the deformer. Datasmith imports each of these triangular meshes as a single Static Mesh Asset.

Instances, Cloners, and Arrays

If you use instances, cloners, or arrays in your Cinema 4D scene to place copies of a single object at multiple different locations in your scene, Datasmith respects your intention by creating a single Static Mesh Asset in your Content Browser from that object's geometry. It then places multiple instances of this Static Mesh Asset into the Datasmith Scene.

Normal Facing Directions

The Unreal Engine, like most real-time renderers, automatically culls triangles that face away from the camera in order to maximize performance. However, Cinema 4D can render geometry with or without this backface culling. Depending on how you set up Cinema 4D, you may not be used to taking the facing direction of your surfaces into account. If your scene contains single-sided geometry for which the surface normals of the faces point away from the typical viewing direction, that geometry may seem to disappear when viewed from certain angles in the Unreal Engine.

For example, the image below shows a book that was modeled with one of its surface normals facing inward. After the scene is imported into Unreal, the front cover at first appears to be missing. In this case, flipping the normal direction of the surface makes the sides appear as they should.

Book in Cinema 4D

Book in Unreal Engine

You can avoid this problem by verifying in Cinema 4D that your surfaces are facing in the direction you expect. There are a few ways you can do this. For example:

  • You can enable the Options > Backface Culling setting for your viewport. This hides all faces whose normals are pointing away from the camera, the same way they are hidden in Unreal Engine.

  • When you are in Polygons mode, selected faces show up with a yellow highlight when they are facing toward you, but a blue highlight when facng away from you.

    Back faces are blue

  • You can configure your viewport to show vertex normals as white lines that extend from the center of each face. Choose Options > Configure and go to the Attributes panel. Make sure the Polygon Normals setting is enabled, and disable its Selected Only option to visualize the normals for all faces in the model that you have selected while you're in Polygons mode.

    Show vertex normals on all surfaces

When you find faces with inversed normals in Cinema 4D, you can flip them around using the Reverse Normals command. See the Cinema 4D documentation.

For a complete discussion and more possible solutions, see About the Datasmith Import Process.

Lights

Datasmith converts most types of lights from Cinema 4D into equivalent light types in Unreal Engine. This translation preserves the most important properties of the light, including its placement in the scene, color, photometric intensity, cone angles, IES profile, and more.

The following table describes how Datasmith maps Cinema 4D light types into Unreal Engine light types:

Cinema 4D

Unreal Engine

Point light, IES light

Point Light

Spot light, Target light

Spot Light

Area light, PBR light

DatasmithAreaLight Blueprint

Sun light, Infinite light

Directional Light

Cameras

For each camera in your Cinema 4D scene, Datasmith creates a CineCamera Actor in the Datasmith Scene. This camera is placed at the same position and rotation as its counterpart in Cinema 4D, and preserves some optional settings related to the camera's physical characteristics, including its focal length.

Scene Hierarchy

The Datasmith Scene in Unreal Engine contains a hierarchy of Actors that closely matches the hierarchy of objects in your original Cinema 4D scene. The names of your scene objects and the nesting of parents and children are preserved as closely as possible. For example, the following image shows a Cinema 4D scene hierarchy on the left, and the result of importing that scene into Unreal Engine on the right:

You may notice a few differences:

  • In the Unreal Editor World Outliner, shown above on the right, the Actors at each level of the hierarchy are always ordered alphabetically. This causes visual differences in ordering siblings, but the parent-child relationships remain unchanged.

  • Datasmith only allows alphanumeric characters, hyphens, and underscores in the names of the Actors in the Datasmith Scene. If the name of a Cinema 4D object contains any other characters, those characters will be converted to underscores automatically.

  • The final hierarchy of the Datasmith Scene must be adjusted slightly to take into account the way that the procedural features of Cinema 4D are baked during the transition to Unreal Engine—that is, the way they are replaced by static sets of Actors that replicate their effects.

    Each procedural object in the Cinema 4D scene, such as a generator, cloner, or array, comes across as a single parent Actor in the Unreal Engine. This Actor is assigned the same name as the original Cinema 4D object. Under that parent in the Datasmith Scene, you'll find all the Static Mesh Actors that Datasmith creates to simulate the effect of the procedural geometry. These Static Mesh Actors are given the same name as their parents, but with a numeric suffix. Depending on how extensively you use the procedural features of Cinema 4D, this makes the hierarchy of the Datasmith Scene somewhat more complex. However, it offers you access to each individual Actor as a separate instance.

    For example, the Cinema 4D scene on the left below uses cloners to create multiple rows and columns of desks and chairs. In the Datasmith Scene, shown on the right below, the hierarchy contains a Static Mesh Actor for each separate geometric object spawned by the cloners, organized under parent Actors that represent the cloners themselves.

Layers

Datasmith imports all named layers from your Cinema 4D scene that have at least one object in them, and assigns each Level Actor it creates to the Layer that matches its corresponding object in Cinema 4D.

Layers in Cinema 4D

Layers in Unreal Engine

Datasmith does not import empty Layers that have no objects in them in Cinema 4D.

Cinema 4D Materials

Datasmith creates a new Material Asset in the Unreal Engine Project for each Standard Material and Physical Material in your Cinema 4D scene.

Materials in Cinema 4D

Materials in Unreal Engine

The goal of these Material Assets is to respect the way you've set up the surfaces to look in Cinema 4D, while exposing properties that help you take advantage of Unreal's physically based renderer.

To modify a Material:

  1. Double-click it in the Content Browser. Or, select an Actor in your Level that uses the Material you want to modify, and double-click the Material in the Details panel.

  2. You'll open the Material Editor shown below, where you can use the settings in the Details panel to modify the properties imported from Cinema 4D. You can also modify other built-in parameters exposed by the Unreal renderer.

    For background information about working in this UI, see the Material Instance Editor User Guide.

Working with Material Channels

When you edit a Material imported from Cinema 4D, the top of the Details panel lists the different types of Cinema 4D channels that Datasmith handles during the import process. If you're used to working with materials in Cinema 4D, the effect of these channels and their settings should be familiar to you already.

Material channels

When a channel is activated in the top 00 Global section, the Details panel also contains a section lower down where you can configure settings related specifically to that channel. These settings expose the most important properties that you can set for the corresponding channel in Cinema 4D.

For example, the channels activated in the image above make additional sections for Color, Reflectance, Specular, and Normal appear:

The only exception to this rule is the Reflection Color channel. When the Use_ReflectionColor setting is activated, new Reflection Color and Reflection Color Strength settings are added to the 01_Color group.

Reflection Color settings

The values you set in the Reflectance channel affect multiple Material output channels in the Unreal Engine, including the Roughness, Metallic, and Specular channels. Due to these complex relationships, Datasmith only translates one layer of the Reflectance channel in Cinema 4D.

Controlling Texture UVs

At the bottom of the Details panel, you'll see settings that control the UV mapping for all channels in the Material. By changing these settings, you can change the way that the Material applies texture maps to the geometry of the Static Meshes it is applied to. The values you set here apply to all channels that use texture maps. These settings have similar effects to the offset and tiling settings for Texture Tags in Cinema 4d:

Global UV settings that affect all channels with texture maps

Each channel that offers a texture map in its settings also has its own optional UV wrapping controls. For example, the 04_Normal channel accepts a normal map texture, so it also offers a setting to use a different set of UV controls that apply only to the normal map texture:

Use per-channel UV settings

When you enable this option, a new set of UV mapping controls are added to the channel settings:

Per-channel UV settings enabled

If you customize both the general UV settings in the UV group and the settings for a specific channel, both effects are added together.

Parent Materials

Each Material Asset that Datasmith creates is a Material Instance, whose parent is always the C4DMaster Material that is built in to the Datasmith plugin. You can open up this parent Material to see how each of the properties exposed in the Material Instance are wired together in the Material graph. You can also modify the parent Material to expose other properties, or to change the way the existing properties are taken into account during the shading calculations. See Modifying a Datasmith Master Material.

Material Import Limitations

Datasmith's Material conversion process from Cinema 4D to Unreal Engine has a few limitations: it does not support procedural textures such as noise, node-based Materials (introduced in Cinema 4D R20), or third-party renderers.

In these cases, if you need the result in Unreal Engine to closely match what you see in Cinema 4D, the best approach is to bake your Materials out as bitmap textures, and create new Materials that apply these baked bitmaps to your objects. See the Cinema 4D documentation.

Animations

If your Cinema 4D scene contains any elements whose 3D transforms are animated over time, including keyframe animations, MoGraph, or Dynamics, Datasmith automatically imports those animated transforms into a new Level Sequence Asset. You can use the Sequencer Tool to play back your animation in Unreal Editor, and use Blueprint to manage interactive playback at runtime.

For example, the following video shows a scene with a MoGraph that animates the transforms of a series of clones. After import into Unreal Engine, the Level Sequence created by Datasmith results in exactly the same motion when seen from the same camera viewpoint—with shadowing from added real-time lights:

For important details about how to work with the Level Sequences that Datasmith produces, see the Animations section of About the Import Process.

User Data

If you set User Data on your scene objects in Cinema 4D, Datasmith translates that user data and stores it as Datasmith Metadata on the corresponding Level Actors. You can access this metadata in the Unreal Editor using Blueprint or Python, and in the Engine at runtime using Blueprint.

For more information, see Using Datasmith Metadata.

Credit: The classroom scene used on this page is courtesy of Turbosquid user scripter.

Select Skin
Light
Dark

새로운 언리얼 엔진 4 문서 사이트에 오신 것을 환영합니다!

문서 사이트에 대한 의견을 모을 수 있는 피드백 시스템을 포함해서 여러가지 새로운 기능을 준비하고 있습니다. 아래 Documentation Feedback 포럼(영문) 또는 언리얼 엔진 네이버 공식 카페(한글) 중 편하신 곳에 의견이나 문제점을 알려 주세요.

새 시스템이 준비되면 알려 드리겠습니다.

네이버 카페
공식 포럼