Home Technical Talk

How to bake transparency-Maya

somawheels
polycounter lvl 3
Offline / Send Message
somawheels polycounter lvl 3
I am trying to bake some grass/weeds to a lowpoly mesh; each grass/weed is a plane with grass/weed textures that have transparency. when i bake the color map using "transfer maps" the transparency in the textures of the grass/weeds is not respected.
How can i bake a texture with transparency taken into account?

Replies

  • Laughing_Bun
    Offline / Send Message
    Laughing_Bun polycounter lvl 17
    I am not entirely sure if you can do it all in one go. I would just convert the alpha to a color map and bake that.
  • somawheels
    Offline / Send Message
    somawheels polycounter lvl 3
    The problem is many of the weeds and grass planes overlap each-other, so without transparency applied, the planes occlude eachother/obstruct the bake scan reaching a grass plane beneath another. Its exactly like baking a tree branch with leaf cards/planes to a texture; the bake has to know what is transparent.

    If Maya cant do this, what other software can?
  • _Kratos_
    Offline / Send Message
    _Kratos_ polycounter lvl 11
    Something similar happened to me when trying to bake some foliage in Max... it was for Lods, so end up rendering with a frontal camera instead of baking... it works... Normal maps were the only thing that wasn't workin 100& correctly but for a LOD was more than enough...
    Hope it helps!
  • xillyriax
    Offline / Send Message
    xillyriax polycounter lvl 10
    You baked the Color(Diffuse) but you also need the Transparency(Alpha)?
    Select the Alpha map option but rename output file to the same name as the Diffuse map. Doing so puts the alpha into its own channel in the diffuse.
  • somawheels
    Offline / Send Message
    somawheels polycounter lvl 3
    I cant bake the color(diffuse); because the polys with a transparent leaf texture applied, occlude/overlap each-other. It is the same situation as _kratos's.

    However, unlike kratos, i cannot use his solution because i am not rendering a flat texture, but baking a highpoly mesh to lowpoly mesh.

    I need to be able to bake overlapping objects with part transparent textures applied.
  • somawheels
    Offline / Send Message
    somawheels polycounter lvl 3
    bump

    I Thought this would be a really standard thing. Anyone who is experienced with foliage creation could answer this? Any software with any suitable method will do splendidly.
  • Eric Chadwick
    _Kratos_ explained it well, that's really the only way to bake transparency-mapped models to a new texture, AFAIK.

    Foliage for games is best created by making geometry of the leaves, grass blades, etc. and baking that into textures with alpha. Photos can be used, but they're often more trouble than they're worth IMHO, and plus it's hard to make good normal maps from foliage photos.
  • somawheels
    Offline / Send Message
    somawheels polycounter lvl 3
    What about hair, I'm sure people have had to bake planes of hair texture to low-poly mesh.

    Sometimes you cant have Real geometry for 100000 objects, it is just too high a poly-count.
  • King Mango
    Offline / Send Message
    King Mango polycounter lvl 16
    Use transfer maps choose the "alpha" option.
    Baking alpha will respect any texture based alpha transparency on sheets.
  • somawheels
    Offline / Send Message
    somawheels polycounter lvl 3
    No, king mango.
    transfer maps' "Alpha" option does not respect the transparency on my high poly mesh's textured planes.
    where the planes overlap, The resulting baked alpha map has the same parts missing as all the other baked texture maps do.

    bake Alpha map option works the opposite way round, it respects the alpha transparency for the resulting baked texture, but not for the thing being baked; i.e It will create an alpha map for the gaps between a high poly wooden fence baked to a texture plane.
  • m4dcow
    Offline / Send Message
    m4dcow interpolator
    As Kratos mentioned, just render your diffuse using an orthographic camera. You can also get normal out of this by setting up a certain kind of light rig, but it can be a pain to set up.

    In all honesty for generating grass cards you might as well make the grass blades high poly and avoid the headaches with the alpha planes.
  • somawheels
    Offline / Send Message
    somawheels polycounter lvl 3
    I don't have a powerful enough computer handle so much high poly grass.. kratos sulution doesnt work for me because i need to bake the highpoly mesh to a lowpoly uv mapped mesh with multiple uv islands, not to a texture plane.
  • Eric Chadwick
    It doesn't take much geometry to create grass for baking.

    In fact it's the best way, since you can extract nice normal maps, ambient occlusion, etc. Those aren't really needed much for grass, but do help when baking for tree foliage.

    farmhouse_grass.jpg

    farmhouse_wheat.jpg
  • somawheels
    Offline / Send Message
    somawheels polycounter lvl 3
    Thanks for the your info elric, but this is nothing like my situation, if anyone knows of software that can BAKE overlapping transparent textures into one texture, then yuo will be my hero.
    But please don't bother suggesting work-arounds as there are none for this situation.
  • Eric Chadwick
    I think you're just not listening, to advice from developers who have gone this route before, and found a better way.

    But hey, keep searching, and keep testing things. The best way to learn is to keep testing and learning the various tools in software.

    Forums and video tutorials only get you so far. The best stuff is found on your own, in my experience.
  • antweiler
    Offline / Send Message
    antweiler polycounter lvl 8
    Why dont you, instead of baking your plants to a plane, actually render them to an orthographic view with a nice alpha, and use this as the texture for the low poly foliage? You can get all required maps using that method.
    Should be doable geometry wise, when looking at Erics images.
  • somawheels
    Offline / Send Message
    somawheels polycounter lvl 3
    Aahahaha... this thread so long and full of irelevant info/suggestions that people don't seem to be reading it all.

    I am not baking my plants to a plane. i already did before creating this thread; i have 100000 of these planes attached to some intersecting semi spheres, this is for the creation of a very High-poly lumpy looking moss ground.
    These planes have a transparent texture of a moss piece applied to them. I cant bake this high-poly model to some low-poly semi spheres/lumps because the texture planes on the hp model overlap each-other, thus occluding each-other in the texture bake because the ray-cast stops at the poly planes regardless of whether they have a transparent texture applied to them.

    it seems that perhaps there is no software capable of what I'm asking.
  • Bartalon
    Offline / Send Message
    Bartalon polycounter lvl 12
    somawheels wrote:
    But please don't bother suggesting work-arounds as there are none for this situation.

    somawheels wrote: »
    Aahahaha... this thread so long and full of irelevant info/suggestions that people don't seem to be reading it all.

    There are better ways to go about telling people their suggestions are not working for you.

    Frankly, if I had enough experience on this subject matter I wouldn't even bother to help with an attitude like this.
  • somawheels
    Offline / Send Message
    somawheels polycounter lvl 3
    Sorry i gave the impression of bad attitude.
    I see The irrelevant info/suggestions (including this post) are entirely my fault for not giving a specific example/situation in the first place.
    I Think that's more due to stupidity and bad communication/forum skills than bad attitude though.
  • King Mango
    Offline / Send Message
    King Mango polycounter lvl 16
    Yes it does somawheels. here is a plane with checkerboard plugged into alpha baked to a texture using alpha transfer map
    But hey, always just tell someone it doesn't without checking yourself first emiright?
  • xillyriax
    Offline / Send Message
    xillyriax polycounter lvl 10
    in this Maya? Are you willing to post the files so some of us can figure it out and, hopefully, give you a 'relevant' response?
  • somawheels
    Offline / Send Message
    somawheels polycounter lvl 3
    Oh yes! pleease try baking a texture-map from my example.

    The plane represents the lp mesh, and the transparent wavy green plant things represent the hp mesh.

    Example files (482kb): http://uppit.com/6a12i0ysrpqc/example.rar


    Edit: just though of another example where transparent texture cards are required - birds feathers/wings; using real geometry to make fine feathers would be so much harder than texture planes.
  • King Mango
    Offline / Send Message
    King Mango polycounter lvl 16
    Is that your actual scene or is that a simplified version? If that's your actual scene just render each one separately, then add them together in PS. Took me five minutes.
  • Eric Chadwick
    The feather example has the same solution as the grass example images I posted above... model just a few feathers and bake those down into textures. Apply to strips, lay them across your in-game model.

    For a step-by-step, check out the first link on this page, the one by Tom Parker.
    http://wiki.polycount.com/wiki/HairTechnique
  • somawheels
    Offline / Send Message
    somawheels polycounter lvl 3
    Nice idea king mango, but My actual scene is more complex with over 100000 moss pieces and a large file, so i made a small clean example for testing purposes.

    Eric, thanks for the that link, will come in handy for future projects, but not this one.

    There must be a reason for this difficulty in baking transparent things; I think its because its technically very difficult for software to do.

    My question has essentially been answered, There is currently no way to bake transparent overlapping texture planes, only work-arounds and alternated methods to that don't involve baking this way.

    Thanks for all the replies people, i learned something new and will no doubt find a solution to my moss clump models eventually (a solution that doesn't involve baking transparent textured polys).
  • AFsoft
Sign In or Register to comment.