Export HP mesh with procedural material so that xNormal can recognize diffuse texture

Hello. Hope for your help, because i’m stuck.

I have:

  1. Highpoly mesh with rather complex procedural material.
  2. UV-unwrapped lowpoly version of this mesh. Lowpoly.

And i need to bake material diffuse color from highpoly mesh to lowpoly with help of xNormal.

I export highpoly mesh in *.obj format with *mtl file for material. But i found out that xNormal can not recognize *.mtl material so i can not bake diffuse texture.

I tried to bake using Cycles, following this tutorial http://www.blenderguru.com/tutorials/introduction-baking-cycles/ but end up with completely black image.

So, is there any way to export highpoly model with procedural material so that xNormal recognize color information and i can bake it properly? May be if i export in 3ds, xNormal can recognize color information?

May be problem in blender *.obj exporter, which can not export procedural material from Cycles?

You would have to bake the procedural material to an image texture (Render / Bake panel)
The .obj exporter works with Blender Render materials not Cycles materials

And i need to bake material diffuse color from highpoly mesh to lowpoly with help of xNormal.
Or you could do this in blender itself

Many thanks Richard Marklew! You saved a lot of my time. I never know that blender exporter unable to export Cycles procedural materials. How many time i would waste trying to figure out what is wrong. By the way, do they plan to add support for *.mtl export in Cycles?

I tried to bake in Cycles. Test scene with two cylinders (LP with UV, and HP with procedural material) and a cage works fine. But when i try to bake my scene, texture just become black. Settings all the same. I wonder if problem can be caused by material itself.

Here is test scene.baking-test-scene.blend (542 KB) Diffuse texture bakes fine. I copy settings to my scene and diffuse texture is baked as black contours of UV.

Your test file works as expected; can’t comment on your work file though.

Thank you for answer. I do some research and it seems that a file or a scene itself, or may be render settings cause the problem.
I delete everything from my work file and created two test cylinders. And they also can not be baked properly.
Here is *.blend file
baking-fail-problem.blend (707 KB)

Are you sure you want to bake “Diffuse Direct”? I assume you rather want to bake “Diffuse Color”, no?
“Diffuse Direct” is a lighting pass - and with no light sources in your scene, it will of course be black.

OMG. I can’t believe i have not noticed it. Sure i want to bake diffuse color not diffuse direct. Thank you very much. Hm, but it also end up wih black texture. Strange.

it seems problem is in material itself.
I bake diffuse texture of test cylinder with simple material in work scene and it bake fine. Then i apply my material to test cylinder ad it bakes completely black.

Even more strange - when i unplug all nodes from material and try to bake it only with simple grey diffuse, it is black.

P.S. I deleted one of diffuse shaders and add it again ang suddenly texture baked fine. It was some bug i believe

By the way i find a way to pass diffuse texture from Cycles to xNormal. In case someone will need this info:

  1. Unwrap highpoly mesh (It is easy since we create highpoly just by adding subsurf modifier) and save this image.

  2. Bake diffuse texture (There is not need for lowpoly mesh in this case. Cycles will bake color from highpoly procedural material to highpoly UV-layout)

  3. Convert baked texture in *.psd and add it to your highpoly mesh in xNormal.


After you do this you can bake base texture from highpoly mesh to lowpoly mesh with xNormal.