1
$\begingroup$

I'm trying to bake a branch made from a cut out atlas onto a single plane for a tree to be used in a game engine.

enter image description here (Branch mesh with applied textures)

enter image description here (Branch ready to bake onto a flat plane)

However, when I bake, the transparency on the textures does not go through to the bake. Instead, the transparency is replaced with a black fill.

enter image description here (Bake result, replaces texture transparency with black fill)

I'm in the middle of creating another quite complex pine tree and I need to bake the branches onto single planes, very much like the SpeedTree Leaf Map Makers tool (aka "Clustering") as seen in this video demonstration.

I've wondered if there was a way to cutout transparency like what shaders can do in Unity and Unreal, using the transparency to cut out the geometry, making a very high poly mesh, then transparency won't be an issue. And I don't want to have to manually cut around every single leaf there.

I've done a lot of searching and have not found a way to do this without SpeedTree. Surely SpeedTree isn't the only program that can do this... right?

Thanks.

EDIT: Here is my material setup just in case anyone is wondering:

enter image description here

$\endgroup$
1
$\begingroup$

not sure if this will help but.. the way I do this, is by baking a Diffuse Color only, from the mask that I'm using as the factor in the mix shader with the transparency node.. thus having a mask image to use.

you can also you the emission shader with the emit bake.. probably a better choice.

enter image description here

$\endgroup$
4
  • $\begingroup$ Thanks for the reply! The main problem is that the higher planes are blocking out the lower planes. Where it is transparent on the higher planes, it turns black and blocks out any lower branches that would be seen, like in picture 2 (top down view before baking). So the bake is not looking through the transparency to the lower branches, it simply stops when it hits the mesh and ignores the transparency, unlike a camera render. That's my problem :/ $\endgroup$ Nov 4 '18 at 16:17
  • $\begingroup$ And it should be noted that the Diffuse Bake Type is the one I'm using. $\endgroup$ Nov 4 '18 at 16:18
  • 2
    $\begingroup$ as far as I am aware you cannot bake transparency.. if is that what you mean. you can instead bake a mask image to use later on as factor between what you see and what you don't see. the problem you describe as higher planes are blocking out lower planes, is affected by the transparency samples in the render tab under light paths.. but that affects only the viewport/render. $\endgroup$ Nov 4 '18 at 18:16
  • $\begingroup$ Okay, I was hoping someone would say that it is possible, regardless of which program lol. Thanks. $\endgroup$ Nov 6 '18 at 0:24
1
$\begingroup$

So I've been racking my brain with this problem for half a year now. I've wanted to be able to make texture painted hair cards that I apply to flat meshes but then build up more complex clumps that I can bake out to get moss or do shells and fins techniques.

I finally cracked it playing around in Blender today. At least as long as I'm baking it to a flat plane and not to a new plane curving with the shapes that I'm baking.

The solution is to simply render it to a camera. This also works for normal maps, which is what I had issues with. Just place your objects in relation to the camera instead of a plane, connect whatever channel you want to render to the emission slot, set the color management to none in the render tab, and set the diffuse to 50% gray.

$\endgroup$
1
  • $\begingroup$ That makes a ton of sense! And seems so simple. I will try this out myself sometime and report back $\endgroup$ May 9 at 4:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.