Export OBJ files with textures for Cinema4d and import to Blender

I am preparing a model to export for Cinema4d and have decided that the obj format would probably be the best to respect geometry and textures.

I made a simple test object to check the importer/exporter and wrapper for texture nodes.

The new «wrapper» seems to work well when exporting from blender.

It writes an .mtl file and seems to point the image textures to right places, (although places Normal maps as Bump)

The exported .mtl file describes the material like this:

Blender MTL File: ‘test.blend’

Material Count: 1

newmtl Material.001
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.800000 0.800000 0.800000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2

map_Bump Test_Normal.png
map_Kd Test_Color.png
map_Ns Test_Roughness.png
refl Test_Metallic.png

To check the file I tried importing it back into blender, unfortunately when I try to import the obj file (exported with blender) the «wrapper» mixes the maps up.

It maps the metallic image to the diffuse colour input with reflection coordinates as vector input, and drops the diffuse colour map and the roughness map

The original node setup is this:

The node setup that is produced after import is this:

It is strange that blender mixes up .mtl files that it has made itself.

Does anybody know if I am doing something wrong?

I read the documentation in the manual about OBJ and the wrapper and think I have followed the convention.

I have had success if I only use colour and Normal map, but I would like to include metallic and roughness maps as well. Simple values for metallic and roughness also work properly. The problem arrives when I plug in the image maps.

A second question would be that I also I have no idea how Cinema4d will interpret the texture, I have prepared the test .obj with texture maps in a zip file.
Here is the zip file:
TestObject.tar.gz (110.6 KB)
If anyone reading has Cinema4d, could you kindly import it and see how Cinema4d handles it?

It should look like this:

Many thanks in advance!

One thing I do at all time is to set flags on export as well as an import…


On the export, I usually select both of the Objects as Obj and as Group
The rest are the defaults…
On import, I select split by Object and by a group…

My version of Cinema4d is so old it would not be worth it to test…

Thanks for your answer. I have tried those settings and the results are the same, as I said blenders importer does work if I only use Colour and Normal maps (I even spelled it “color” !:slight_smile: . The problem arrives when I use a metallic map, the importer puts it in the colour input with reflection as vector input!
The result with my test object when i import to blender looks like this:

Funny but not correct!
Thanks for answering.

OK…I just looked at the mtl file and I guess obj files don’t have a reference for metallic or for roughness?? I did rename the Color to DIFFUSE and and I actually stripped the prefix off all the maps…and it imported as a obj file…just without metallic and roughness I think you really need to export as an FBX as once I changed things got the shaders fixed and exported and imported the FBX it worked perfectly!!

1 Like

Ok thanks I will try the fbx and change color to Diffuse.
The object file does not reference metalic and roughness maps, but the blender exporter does point them to refl (metalic) and NS (specular weight/roughness), I found it strange that blenders importer does not use the same logic.
I did read somewhere that there will be an update of the obj format one day to cope with PBR maps, I’ll have to wait for that!

Brilliant, the fbx file is much more promising :slight_smile: At least Blender understands it and all maps are placed correctly in the generated node system, the fbx import looks exactly the same as the original!

It has even doubled the diffuse texture and plugged it into the alpha input! (which does not effect the look of this test object but is very useful as I do have some textures with alpha values in the diffuse texture).

I did change Color to Diffuse, but I did not strip the prefixes as the real file I want to export has many objects that use different material maps and i need to use different names.

It looks like the fbx format will be best, thank you for your help.

The only doubt I have now is if Cinema4d will interpret the fbx as well as blender.

If anyone reading has a modern copy of Cinema4d (or another post pbr comercial 3d pakage) and could test the fbx file I would be very grateful.

Here is the fbx file of the same test object.
Testfbx.tar.gz (115.7 KB)

1 Like