Cineware for Unreal

Kristina
Kristina
  • Updated

Quickstart

CinewareForUnreal enables seamless import of .C4D projects via Datasmith. It supports importing geometry as StaticMeshes, materials, textures, cameras, and lights. Render visibility and PSR animations are imported as LevelSequences, while point level animations and topology animations can be imported as GeometryCaches. However, SkeletalMeshes are not supported by Datasmith. To use it, click on the + icon at the top bar, click Datasmith > File Import.

image2023-2-16_11-35-34.png

CinewareForUnreal - "Cineware by Maxon"

This Unreal Engine plugin allows you to import C4D files through Datasmith. The importer generates assets and actors directly from any C4D project, eliminating the need for Cineware caches. There is an option to modify Cinema 4D attributes directly within Unreal by exposing them trough the Take System. 

Please make sure to read the guide carefully. If you encounter errors, bugs or any problems, please contact our support at https://support.maxon.net.

Datasmith Importer

Datasmith is an import API in Unreal that enables the import and re-import of a broad range of proprietary file formats, including .c4d. Since UE 5.1.0 the pre-installed Datasmith C4D importer of the Engine is using the older Melange API. CinewareForUnreal, the new and improved Datasmith importer can be used, if it is added to the Plugins folder of the Engine or the Unreal project and if Cinema 4D 2024.x.x installed in its default path.  

CinewareAsset, a module of the Datasmith Importer, can store exposed properties via the Cinema's Take System into a CinewareAsset, allowing to edit these values via UI or Blueprints. Reimports in the CinewareAsset will apply these changes to the scene.

Direct Link

This Cinema 4D plugin allows quick exports to Unreal via Datasmith. It eliminates the need to save and import manually. The data is transferred directly to Unreal, allowing you to see changes almost instantly.

Installation

Prerequisites

The plugin is supported on both Mac and Windows.

If you do not have Unreal Engine installed, head over to https://www.Unrealengine.com/get-now. Select your appropriate license, create an Epic Games Account, and download the Epic Games Launcher. Run the installer and open the launcher. Enter your credentials and select Unreal Engine in the left, navigation menu. Select the register Library. You should see a content area labeled Engine Versions. Click the plus sign to install the version needed.

On OSX it's also required to download the latest version of Xcode so that Unreal Engine can compile. (Xcode)

The installer links can be found here: Download Plugin for Unreal Engine

Depending on the Unreal Engine version you’ve just installed (or already have installed), you will need to choose the appropriate Cineware for Unreal installer.

The currently supported Unreal engines versions are:

  • Unreal Engine 5.1

  • Unreal Engine 5.2

  • Unreal Engine 5.3

It's important to note that for all the versions of the plugin, it's essential that Cinema 4D 2024.x.x is installed in its default path.

Win: C:\Program Files\Maxon Cinema 4D 2024

Mac: /Applications/Maxon Cinema 4D 2024

After all the prerequisites are fulfilled and the correct version of the installer is downloaded, we can run the installer.

The installer will place the Cineware for Unreal plugin inside the Unreal Engine Plugins folder (Engine/Plugins/Marketplace), and it will optionally install the new Direct Link plugin inside the Cinema 4D plugins folder:

  • Win: C:\Program Files\Maxon Cinema 4D 2024\plugins\Unreal Direct Link
  • Mac: /Applications/Maxon Cinema 4D 2024/plugins/Unreal Direct Link

Creating a new Unreal Project

To create a new project by launch the Unreal Engine and wait for a project hub window to appear. Create a new project with the templates of your liking. Select a location, click create and wait until the Editor has launched. Close the Unreal Editor and navigate to your project directory, from now on referred to as $PROJ_DIR. 

$PROJ_DIR/ should contain a bunch of directories which depend on the template you selected and a .uproject file. Create a directory, name it Plugins and copy the provided CinewareForUnreal directory into it. The path $PROJ_DIR/Plugins/CinewareAsset/ should now contain the directories Binaries, Content and a .uplugin file.

Making sure the plugin is enabled

Once your Unreal project is open, navigate in the menu bar to Edit/Plugins. This opens a window with a list of all installed plugins. Search for "cineware" and make sure Cineware by Maxon is there and activatedIf you can't find it, make sure that it was installed correctly.

plugin.png

Possible Errors

The plugin is not listed

Make sure you have installed the correct version to the correct engine. There is a a plugin for each Unreal 5.X version.

Should you encounter any issues please visit the following website: " https://support.maxon.net ". 

Failed to import 'file://.....c4d'  / Failed to load cineware

Make sure you have Cinema 4D 2024.x.x. installed in its default path.

Direct Link plugin - How to use it

This plugin only works in one direction, meaning from Cinema 4D to the Unreal Engine.

After the plugin is installed you will see a new entry in the Extensions menu of Cinema 4D.

To start using it let us first create a cube in Cinema 4D. To create a cube you can go to Create>Primitives>Mesh>Cube or simply click once on cube icon next to the object manager.

After we have created a cube, we can save the scene (File>Save Project). After this we can establish a connection to the Unreal Engine from Cinema 4D.

To do that we will need to click on the “Direct Link Sync” button (Extensions>Unreal Direct Link>Direct Link Sync).

Screenshot 2024-02-15 at 10.25.28.png

If clicked on the cogwheel icon a new Cinema 4D window will open giving you the ability to send animations over the DL and also adjust preemptively the light intensity scale as well the Camera ISO Scale. These scale settings can then help to get a more matching look between the Unreal Engine and Cinema 4D.   

Datasmith Options.png

When we have adjusted these parameters to our liking we only need to click on the OK button, and the DL connection can be then finalized in the Unreal Engine. 

After that we can go to the Unreal project and under the “Add” menu (a cube with a green plus) click the menu entry Datasmith>”Direct Link Import…” (as shown on the screenshot below).

Screenshot 2023-11-29 123707.png

Unreal will show a window where we can select a Direct Link source. In our case we select the Cinema 4D scene that we’ve just sent.

Screenshot 2023-11-29 124016.png

After that is done the connection is established and Unreal should open our scene in the editor. If you now do some changes to your project, you can to re-sync your scene (“Extensions>Unreal Direct Link>Direct Link Sync”) and your Unreal project should automatically update the changes.

 

The second feature in the plugin is to export your scene to a .udatasmith file that can be imported into Unreal using the standard Datasmith import. To do that we need to go to “Extensions>Unreal Direct Link>Export to File” menu. This will open a file explorer where you have to select a folder to save your Cinema 4D scene in the Datasmith format.

Screenshot 2024-02-15 at 10.26.01.png

To import it, click the “Datasmith>File Import…“ menu entry (as shown on the screenshot below).

Screenshot 2023-11-29 125503.png

Unreal will open a file explorer where you can chose the previously saved .udatasmith file.

Currently Missing Features

  • Automatic re-syncing

  • LODs

  • Collision Geometry

  • Metadata

  • Geometry Cache animation over direct link (The Datasmith importer can be used as an workaround)

Known Issues

  • On OSX Unreal might not see Direct Link sources if there is an active VPN

  • Syncing area lights can cause issues (Use at your own risk)

Datasmith Importer - How to use it

In the Unreal Editor, click on the image2023-2-16_11-42-35.pngicon at the top bar, Datasmith, File Import. Select your C4D project and click Open.

image2023-2-16_11-35-34.png

The import process will open two pop-up windows. In the first one, select the import location within the game project browser. The second window enables you to set your import settings.  

The very first import will load up the Cineware engine. This process shows a progress bar and typically takes about 5 seconds (or as long as your usual Cinema 4D launch). Should this process take too long and stall, please contact our support. If this is your first Cineware Engine startup on the machine you will be prompted to enter your Maxon account credentials. A Maxon account is free to create and mandatory for using the engine. After successfully signing in, the actual file import begins. 

Selective Import

It is also possible to import only selected elements and their children. This provides a more granular control of the parts of a scene you intend to import. 

Enable the Selection Only check box in the Datasmith Import Options dialog. CinewareForUnreal will import the selected objects and their children of your saved Cinema 4D scene.

Screenshot 2023-08-01 at 09.33.35.png
 

Custom Frame Range 

Animations can also be imported with a Custom Frame Range. This can be done by enabling the Custom Frame Range option in the Datasmith Import Options dialog and then specifying the Start Frame and End Frame (inclusive).

Screenshot 2023-08-01 at 09.40.09.png
 

Geometry Caches

It is possible to import GeometryCache assets. Any animation that is not just a set of position-scale-rotation (PSR) keyframes (i.e. morphing topology or an animated Cloner count), should be imported as a GeometryCache. To do this, enable Import Geometry Caches in the Datasmith Import Options popup.

 image2023-2-16_13-15-59.png

After that you can select the objects to be imported as a GeometryCache. 

Import geometry cashes second Save Win.PNG

When the import is done, there will be a folder named GeometryCaches in the Contents of the import. This folder will contain the GeometryCache assets and their respective LevelSequences.

Alembic Caches

The Cineware plugin will also import animation/simulation that were cached before hand in cinema 4D to an alembic file. As an example let us cache a rigid body simulation. As the first step we would need a simple simulation. We can create that by adding a sphere and a plane to our scene, the cube can be slightly offset in the Y-axis to create some movement. Additionally we would need to add an collider tag to the plain and a rigid body tag to the sphere (Right mouse button click> Simulation Tags > Rigid body/Collider). Our simple setup should now look like shown in the screenshot below.

Screenshot 2024-04-02 105153.png

The simulation should now work if we click on play. To cache the scene now, we can go to the cache tab in the attributes manger.

Screenshot 2024-04-02 112808.png

Here we are presented with multiple options, like the location where we want to store the cache (Internally or Externally), if we want to cache just the object we are currently editing or the whole scene. For our example we will select the external Caching location and we will cache the whole scene. After we clicked on the cache scene button an external window will open and we will be prompted to choose a saving destination for the alembic cache.

Now that we cached our scene the only thing left to do is to save the file in cinema 4d and import it to the engine as described in Datasmith import chapter of this documentation.

 

Visibility Animation

It is possible to import keyframes of the Render Visibility attribute.  

Change or add keyframes to the Render Visibility attribute inside Cinema. This can be done in the Attributes, in the Basic tab of the object. 

Screenshot_20230215_150516.png
 

Or inside the object manager using the stoplight dots for setting the viewport visibility and the render visibility. Only the render visibility (lower dot) will be imported into Unreal.

image2023-2-16_13-19-33.png

Redshift Materials 

It is possible to import Redshift materials. 

To create a Redshift material change the renderer from Standard to Redshift if you have not done so already. To do that open Render Settings and in the Renderer dropdown select Redshift.

Screenshot 2023-04-28 at 12.59.23.png
 

Now you can create Redshift materials by opening the Material Manager on the right side, by clicking on the icon Screenshot 2023-04-28 at 13.09.00.png or by going to Window > Material Manager. To create a new material click on the plus Screenshot 2023-04-28 at 13.08.47.png icon in the Material Manager or go to Create > New Default Material. You should see that a new Redshift material was added to your list. If you double click the material, it will open the node graph, where you can edit the material. Add the material to an object by drag and dropping and save the project. The C4D file can be imported into Unreal by following the steps explained above. 

Screenshot 2023-04-28 at 13.13.45.png

 

The CinewareForUnreal plugins will also import Redshift materials that are using Subsurface scattering (SSS). To import SSS to Unreal, you will need a Redshift material with a Subsurface Weight greater than 0.  For these the Unreal plugin has a separate reference material. Its material instances have additional SSS parameters that allow adjusting the SSS strength after the import.

Additionally it is possible to manage the resizing of node material textures. This can be done in the Datasmith Import Options , under the Node Materials Textures section.

image2023-11-3_10-4-43.png
 

Don't enlarge -  Node material textures keep their original size, if they are not larger than the size set in Texture Resolution (e.g. 128x128px would remain 128x128px, 4096x4096px would be resized to 2048x2048px).

Always - Node material textures will be resized to the specified resolution (e.g. both 128x128px and 4096x4096px would be resized to 2048x2048px).

Off - Node material textures keep their original size.

 

In the import window of Unreal you will now see also an additional import option which will allow you to choose your desired size of your texture maps. 

Screenshot 2023-04-28 at 13.18.02.png

 

Redshift Lights 

Redshift lights will also be imported into the Unreal Engine using Cineware.

Currently supported light types are:

  • Point Light
  • Spot Light
  • Area Light
  • Infinite Light

It is important to keep in mind that Unreal has lumen and lux as light units and they behave differently when other properties change (e.g. spot light angle, area light size). To achieve a similar brightness, CinewareForUnreal uses these conversions:

Point Light RS Units
Intensity (lm) = Intensity / pi Image
Intensity (lm) = Intensity Luminous Power
Intensity (lm) = Intensity / (pi * 1000) Luminance
Intensity (lm) = Intensity * LuminousEfficacy Radiant Power
Intensity (lm) = Intensity * LuminousEfficacy / (pi * 1000)  Radiance

 

Spot Light
Same conversions as for point lights is applied, except that the intensity is then adjusted by the Cone Angle:

Intensity (lm) = Intensity * (1 - cos(ConeAngle) * 0.5)

 

AreaLight RS Units
Intensity (lm) = Intensity * Area / 2pi   Image
Intensity (lm) = Intensity * Area Luminous Power
Intensity (lm) = Intensity / (pi * 1000) Luminance
Intensity (lm) = Intensity * LuminousEfficacy  * Area Radiant Power
Intensity (lm) = Intensity * LuminousEfficacy / (pi * 1000)  Radiance

 

Infinite Light Units
Intensity (lux) = Intensity * 500 Image
Intensity (lux) = Intensity * 200 Luminous Power
Intensity (lux) = Intensity / 10 Luminance
Intensity (lux) = Intensity * LuminousEfficacy / 17 Radiant Power
Intensity (lux) = Intensity * LuminousEfficacy / 17 Radiance

Redshift Cameras

Redshift cameras are supported as well.  Only these properties can be imported into Unreal:

  • Focal Length
  • Sensor Width
  • Focus Distance
  • Sensor Aspect Ratio (= Render Settings)
  • Shutter Speed
  • ISO (or Exposure)
  • F-Stop
  • Look-At Actor if one is set

Exposing CinewareAsset Properties via Cinema 4D Takes

Scene properties can be exposed to Unreal Engine via Cinema 4D's Take System. A video tutorial can be found here by GreyscaleGorilla on Youtube. 

Open the Cinema 4D Take workspace and click Add New Take. 

Documentation_cineware_screen.png

Switch to the state of the Take by left-clicking on it. All properties on scene objects should now be greyed out. 

Screenshot 2021-11-25 at 15.14.21.png

Screenshot 2021-11-25 at 15.14.32.png

Right-click on the property you want to promote and click Override from the context menu. This will add the property to the selected take.  

x6sa3wpo.png

You can also add whole elements to the CinewareAsset by right clicking on the element (e.g. a cloner object and not just a single property) and then clicking Take Assignment > Your Take.

r2q9ugbj.png

Screenshot 2021-11-25 at 15.19.35.png

The supported override types are: 

  • Integer  
  • Dropdowns  
  • Checkboxes 
  • Text 
  • Floating point 
  • Vectors 
  • Colors 

Save the file. Note that it is no longer necessary to save your project via the "Save for Cineware" command. This dramatically reduces the files sizes of shared .c4d files. 

CinewareAsset

An initial import of .c4d files will be imported with the default values of exposed properties as they are set within the Cinema 4D scene. The import creates a CinewareAsset next to the Datasmith asset. This asset is filled with the properties exposed with the Take System.

Screenshot 2021-11-25 at 15.24.13.png

Edit Values

There are multiple ways to edit the stored properties stored within the asset. 

Via UI

Double click the CinewareAsset to open up a Panel window displaying all the properties stored within the asset. The CinewareAsset is linked to the Datasmith asset via the original file path. Both absolute and relative paths are considered to make sure the project can be shared within a team. This means you can move the CinewareAsset anywhere within your project and rename it as you wish. For convenience the asset is created next to the imported Datasmith scene and named accordingly.

Screenshot 2021-11-25 at 15.36.12.png

Via Blueprints

A CinewareAsset can be referenced by Editor Blueprints. Since the assets are cooked when the project is packaged, no runtime blueprint is able to work with the CinewareAsset. Cineware exposes several Blueprint Editor functions. It is possible to set data, read data or browse the given asset. This makes it possible to edit the values dynamically based on Editor events. 

Setting properties by name

It is possible to use variables of type Cineware Asset for Editor Blueprint Actors and Editor Level Blueprints. There are a few Setter methods for the CinewareAssets. Use the same key as is displayed in the Cineware details panel. The methods return True if setting a value was successful. In the example below you can see the user converting an actor position from Unreal space to Cinema space before applying the value. 

bp-setter.png

Reading properties by name

Cineware Assets have straightforward Getter methods which return a Boolean, stating if getting the value was successful and a struct containing all information depending on the type. Every struct contains the Key, Value, Type and sorted position in the Cinema 4D hierarchy. The container information varies depending on the out value. 

cw-get.png

Browsing for properties

There may be situations where you do not know the exact nature of the created asset. In these cases, you may want to browse through a given Cineware Asset and filter by name, value or type and apply some logic to it. Cineware Assets expose browsing properties for this to work. Note that in the example below the first call is the Begin Iteration, this resets all iterators of the asset. You can then browse through it by type. Via a while loop and a switch, you may then call the appropriate Get Next functionality. It is recommended to check the Boolean return value before accessing the returned container. 

cw-browsing.png

Things to consider: 

  • The coordinate systems differ between Unreal Engine and Cinema 4D. When setting Unreal Engine positions via Blueprints make sure to execute the UnrealToCinema4DPosition or Cinema4DToUnrealPosition blueprint method, before setting them in a CinewareAsset. 
  • When setting properties by their name, use the name as it is printed when having Friendly Property Names disabled in the CinewareAsset panel. Friendly keys are currently not supported. 
  • Make sure to check the returned Boolean value if it is safe to access the container 
  • CinewareAsset Blueprint functions can only be called in Editor Blueprints. If you do not have the option to call them, make sure you are running in an Editor environment. This is visualized with a yellow and black bar in the Blueprint layout. 

Reimport

For the changes of the CinewareAsset to be applied, press the 'Reimport' button in the CinewareAsset Editor.

You can reimport the scene as it was saved in Cinema by right-clicking the Datasmith asset and clicking 'Reimport'.

Objects with an annotation tag "exclude" will not be imported.

Feedback

Should you encounter any issues please visit the following website: " https://support.maxon.net ". Here you can contact our support team. 

 

Was this article helpful?

/

Comments

0 comments

Article is closed for comments.