Hi, got a bit of a problem with baking objects using alpha channel. Basically what I want to do is bake lots of layers of dead leaves which are just alpha cards scattered on a plane. I'd like to get a usual diffuse/normal/AO bake from this and I'd like 3dsmax to take into account my alpha for the leaves:
PROBLEM: it cant seem to use the alpha channel at all when baking a diffuse or normal map with RTT. Doing a normal render seem to work tho...But I don't want that.
Close up of the result: (you can see leaves overlap each other where it should see through..)
![temp2.jpg](http://dl.dropbox.com/u/1488651/temp2.jpg)
How can I force RTT to not draw transparent pixels in my bakes?
Thanks for any help you could have!
Replies
not sure if there is any other way as of yet. RTT just doesn't like transparency.
Could Xnormal bake using alpha for example?
Also what does your alpha channel look like?
yeah sprunghunt that's basically what earthquake did with the vines. That'll be my last resort I guess.
First you'll need an alpha texture with decent resolution.
It can't have any anti aliasing, just 100% white or black pixels.
Also the filtering for that texture should be set to none. (Otherwise you'll have white pixels in your rendered maps. )
Use Arch&Design as a material. Put your alpha in the cutout slot.
Now you'll still have the problem that your alpha map won't anti alias properly against the background and you could work around that by putting a plane (or other mesh, in case of a more complicated bake) in the bg and use e.g. the specular slot for getting your alpha. But unfortunately MR also refuses to filter your normal map. So the simplest solution is to render in double resolution or bigger and downscale later.
another quick workaround is just to render the leaves with a new material that uses the alpha as the diffuse. So you get an image that's just black and white.
This wont work I think since there's lots of alpha cards interpenetrated (not sure of the word), so this would result is an alpha card jumping to another in the final result.
Noren thanks for the advice, I'll try that one first and foremost. I guess the AA thing can be solved by rendering an 8k for a final 1024, should give plenty of AA.
The best way to get Normals is to use this method: http://bencloward.com/tutorials_normal_maps11.shtml - apply a white material with just your alpha assigned to it.
I use this method but have it setup in Maya as that's the workflow I am familiar with but it should work just as well within Max. For the diffuse sometimes I give the material a slight translucency and have an ambient light setup (no shadows) with a very dim key light - this can add some nice touches to the diffuse.
A couple more tidbits of info here, but most has been said already.
http://wiki.polycount.com/NormalMap#Baking_Transparency
Default RTT : failed to do what I needed
Mental ray RTT with Arch&Design cutout technique: failed to do what I needed
DirectX FX shader: would have worked if my objects to bake were geometry based, not alpha based.
ToTex script: sorry didn't have time to test that one out.
5 lights setup and ortho camera: worked perfectly. All I had to do was making a no diffuse standard material, with my alpha in opacity and normal bump enabled.
With the light setup and the alpha sorted I was able to get what i wanted:
This sample doesn't tile
Again thx every one for helping me on this one.
What was the problem exactly?
If you want, you can send me a PM and I'll give you my email address so you can send me the files. Just out of curiosity, after all we won't bake from planes all the time, even if the problem at hand is resolved.
Some pics to show it should be working:
Just a proof of concept, not supposed to be pretty.
No padding for better readability.
Note there are lots of geometry intersections that make some of the leaves seem cut off, but no alpha problems at all.
If you were speaking of refraction in the material indeed i did not check that. Also you were speaking of putting 'no filtering' on textures, but I didnt find anywhere an option to set that on a per texture basis.
Refraction you can deactivate globally in the render settings:
Here's a preset, but it overwrites some of the settings you might want to adjust for different renderings/scenes. Best you go by the pics and description and understand what's going on.
http://home.arcor.de/Noren/MR_RTT_cutout_preset.rps
Did you try the preset meanwhile?
The greyish/yellowish color, is that from the diffuse map or perhaps the mesh color of the lowpoly you are rendering from? Or the background?
Try setting distinct colors for those in order to find out.
The white spots might indicate that your alpha is not "hard" (just pure black and white pixels), or is getting filtered after all.
Then I never tried rendering with a bump or normalmap on the "higphpoly". (It doesn't seem to appear in that latest rendering, though and I doubt it's the culprit. But you never know.)
I'm going to test it in 2010 in a few minutes but that was for 2012.
I'll update this post.
Oookay, so this is gonna be a huge help to all the users of this cutout technique: THIS ONLY WORKS IN 2010 (and maybe previous versions)!
Thank you again Autodesk.
Sorry for not mentioning the version.
This cutout technique should be added on the wiki I think, unless it's already on it.