Unity-C4D Observations for Maxon


#1

Donavan, in another thread you wrote,
"If you run into issues with the C4D -> Unity workflow, please document them. "

I’m creating this dedicated thread to do exactly that…so you or others at Maxon won’t have to wade through lengthy c4d/Unity threads to see our c4d-Unity questions and requests.

Item #1.
It would seem to me that the most common reason people bake out objects/materials is for use in game engines. And as you know well game engines love textures with values of factors of 2. 512, 1024, etc. I see that Allegorithmic provides common sizes in a menu selection.

I suggest the same: bake dialog boxes featuring convenient drop down list with game-friendly values. It’s a bit faster but also helpful for newbies.


#2

Donavan, I have a question that I think will help a number of us:

I was watching a recent Maxon tutorial regarding getting c4d materials to Unity. It was put out by Maxon UK:
https://www.youtube.com/watch?v=TvZiDsODf8k&t=616s

The video shows an easy-to-repeat process that gets textures and c4d shaders easily into Unity (or Unreal)

But here’s my question:
If I bake a c4d object …as best I understand it only generates one texture, so you get color value but there is no separate export for specular data, reflections, bump, etc.

Those of us exploring Unity are learning there are texture slots there for Albedo (color/diffuse), Metalic (reflections), normal map, height map (bump or displacement). Oh and also Emission (luminance), occlusion (AO). There is also Detail Masks for overlays. You know all this quite well.

Would you recommend those of us w/game aspirations use a C4D/Substance approach to our materials, where we have separate images for different ‘channels’? Or is there a way in c4d to easily convert shader data to discrete reflectance, displacement, etc in separate image maps?


#3

I don’t do much of this, but the Bake Texture tag allows you to generate multiple textures (in one layered file or individual files) containing any or all channels.
Is this what you mean?


#4

Let me play and explore with that. There is definitely more there than with ‘Bake Object’. Thanks!


#5

There’s surprisingly good API access for the baking commands, so it might be possible to re-wrap them in a plugin if there’s enough else that can be improved with the baking workflow.


#6

Donovan, OK. I have one more suggestion coming your way tonight.

There’s a lot of moving pieces here. Limitations of c4d, limitations of Autodesk’s FBX format and limitations of Unity. It’s difficult to always know the formula for success.

I suppose in some instances color data alone is enough. One can dial in metallicity and smoothness in Unity. So object baking is one option. Limited for simpler materials but it’s fast and (sometimes) easy.

I will say that I now know enough to get meshes and their materials as well as animations from c4d to Unity. There often is a little fiddle factor. I’m going to PM you w/more thoughts.


#7

Being able to bake from other render engines would be fantastic. In my case VrayforC4D, but I suspect this is easier said than done.


#8

Pete, You can bake lighting/materials within Unity’s Octane plugin. One could also create an Octane OrbX within c4d and transport that over to Unity. Much of this is new and still a bit experimental. I seem to vaguely remember VRAY having baking options but I’ve never played with them.

I tried C4D’s native texture baking you suggested above. Texture baking does look promising as far as getting break-outs of the different channels into separate images. However it is painfully slow to process and doesn’t seem to render out what you expect to get. I might check Cineversity…maybe I’m missing some steps.

My hunch is that using Substances will be the smartest way to go for more sophisticated materials…and C4D’s FBX exporter includes a checkbox to export Substances.


#9

Watching Cineversity videos by Rick was very helpful w/texture transfer into Unity:
https://www.cineversity.com/vidplaytut/unity_game_development_with_cinema_4d_part_05

My conclusion from experience and from Rick:
When exporting FBX…don’t embed textures. Copy the texture(s) in File Explorer is the best way to go.


#10

One of Unity’s 2018.1 new features:
“FBX import improvements.”

It’s currently in open beta.


#11

@ Donovan - For C4D’s fbx exporter to work properly with Unity, it needs a Flip X axis option like we have in the .obj exporter. Currently all our fbx models from C4D come into Unity facing the wrong direction which makes extra work dealing with object movement and rotation.


#12

If the model you are baking has multiple materials like metals and dielectrics then using Unity shader to adjust the metallic and roughness is of no use. You really want that data provided in a metallic and roughness map from the C4D bake. Since C4D’s Reflectance material system was introduced, I create all my materials in Substance Designer or Painter. I’m hoping Maxon adopt a more standard and simplified approach to their material system in R20.

A workflow I use from C4D to Substance Designer to Unity is:

  1. C4D - Create High and Low poly meshes
  2. C4D - UV unwrap the low poly mesh
    3a. C4D - Apply base colour materials to set selections on my model ie, red, green, blue, yellow. pink, orange etc to bake a colourID map. these colours determine where my different materials get applied, ie metal, plastic, rubber, paint etc.
    3b. or you can hand paint the ColourID map from your UV map.
  3. Substance Designer - bake my normal, curvature maps etc using my High poly to Low poly meshes.
  4. Substance Designer Import my C4D generated colourID map
  5. Publish by Substance to Unity
  6. Import my Low poly mesh to Unity and apply my Substance.

In my opinion, if you are serious about PBR, there is little point creating your materials in C4D. Just slot Substance Designer or Painter into your pipeline.

Edited. Added a 3b option I forgot to mention earlier…


#13

Thanks for the info. Good stuff.

I’ve come to the conclusion that once I start doing serious scenes I’ll mostly use SD. In fairness to c4d…I’ve heard that the majority of pro game devs use Substance over the native material systems in Maya, Max or Blender.

If you have time and interest to check in on our learning expedition we lesser experienced users will benefit from any advice you can offer.


#14

I’ll second the advice to use a Substance workflow. It’s a game-changer (pun intended) and has direct workflow for PBR as well as more traditional approaches. You can create substances in SD, paint in SP, and choose the texture formats on export. (Metallic/roughness vs spec/gloss, etc.)

I have found that Unity is plug and play when using a true PBR material method. I’m currently in the process of making some prefabs for my first Unity project in over 6 years…and Substance has made it so much easier.


#15

^ Yes this! I agree with Gary and the advice to use a substance workflow.


#16

One thing I suggest Maxon adds to it’s FBX export option is scale conversion. Max/Maya feature that. This is the current Maxon export dialog. Screen grabs to come…


#17

Donavan,

I would like to request Maxon add ‘Unit/Scale’ conversion to it’s FBX export. Unity can do conversion, but it would add a convenience to c4d users and give us parity to Autodesk’s export.

For Comparison:


#18

Sheesh! Unity sure has been changing their import code a lot lately.
That’s one reason why I wrote my own .fbx exporter a while back. Maxon takes far too long to catch up with their changes. But to be fair I can’t expect them to do that either.
I’ve always thought that the .fbx and .obj exporter code should be included in the sdk so we can tweak it as needed. That way the users wouldn’t be so helpless.

-ScottA


#19

I agree with using the substance C4D Unity workflow ( and for consistent looks between vfx packages like Maya, Houdini, Max…). It has been a pure joy using substances in Unity, the look can be tweaked on the fly inside a headset. However I still value the awesome noises and other world space nodes found in C4D for use in SP SD. The ability to bake world space nodes without seems into 2D bitmaps with the C4D bake tag (along with proper UVs on your model) provides seamless results that triplaner nodes sometimes can not achieve, high contrast geometric patterns reveal triplaner seems.


#20

Donavan, I’ve achieved a comfort level with the C4d-Unity pipeline.

But I ran into a gotcha tonight and couldn’t find any path to success. Specifically the alpha in materials would not transport into Unity. I tried various approaches and looked around online.

Can you convey a methodology? Is this a limitation w/c4d’s exporter or with FBX?