How to turn procedural shaders into Texture Maps

Some of the shaders we can create with Blender are simply mind-blowing! Tragically though, they only work inside Blender. I was wondering if there is a way to turn them into texture maps, so those could be applied to the same object in another 3D app?

Carrara for example has a plugin called Baker that does just that. I know there is a process called “baking” in Blender too, although I must admit that I don’t know much about it. Perhaps it’s exactly what I’m looking for.

Is there a way to turn my shaders into texture maps? If so, could you explain how to do it? I’m using Cycles BTW.

Thanks in advance!

Baking is exactly what you are looking for. There are several good tutorials out there a quick google search away.

Have fun!

Baking doesn’t always work, though. I’m not sure what makes a procedural shader tree not work, but I’ve had it happen. There’s a wonderful procedural brick shader somewhere here on this forum that I wanted to use, but it was far too time-intensive to use as-is. I decided to bake it out, but I could only get a black and white result, so I wasn’t able to create a diffuse/albedo map.

But, that was one isolated case. Perhaps it was a fluke that it didn’t. I only mention it because I went around in circles for hours trying to figure out what was wrong and had to finally conclude that the shader simply wasn’t designed in such a way as to allow diffuse maps to be baked.

Moved from “General Forums > Blender and CG Discussions” to “Support > Materials and Textures”

I don’t know what have you done wrong, but I’m able to bake any kind of ShaderNodeTrees (which include Nodegroups and CustomNodes)
Can you post a file where the baking doesn’t work?

It’s not a hard thing to do.

This is the shader I was talking about. I’ll be very curious to see if anyone can bake a full-color texture map using it. The scene I set up was very simple, very much like what MartinZ showed in his screenshots.

This is not a very simple scene in terms of shader setup. You still have a few options when it comes to baking it:

* You can just render it out with an orthographic camera since it's flat. You can even render normal pass and depth as well for normal and displacement textures.

* You can create one object that matches the shape around the wall, UV map it, disable everything in Object properties tab under Cycles Settings, Ray Visibility, create a new texture in it's material, select all the bricks, select the object last and bake it using Selected to Active option. You would need to adjust Margin parameter according the size of your texture.

* You could bake an individual brick or a few and use the image texture(s) but change their saturation and brightness per object in the shader. 

Everything works without any trouble.

Ah-ha. Yeah, that’s what I was thinking. Thanks for confirming. For a minute there I thought I was losing my mind.

I’ll give these a try. Thanks again, Martin.