Hi I am facing a wired problem of hardware display (high quality) for transparency maps.
However I keep the map as a alpha channel or as a separate tga file they give the same result like this:
Please help me guys
I think in Maya view port cant handle the transparency. Try uncheck the poly transparency in shading and check the att editor render if their are single side if so uncheck it and click on double side.
That's definitely one of the funnier examples I've seen of it ...
But sorry, that is actually not a "weird problem" as far as Autodesk is concerned.
Unless a user has taken it upon themselves to make a fix (and I'm not aware any have), you'll need to fully render it or just go ahead and drop your model in to a game engine to see what you've made (if you're using UDK, at least, it's easy to update the changes you make in Maya or Photoshop.)
This is one of the great Mysteries of Maya ...
(That's some nice forehead skin, by the way, Sagiarts! And welcome to polycount ... helpful folks here. Well, maybe not me, but we try.)
the fix for this is fairly simple, although annoying, you need to make 2 shaders - one for objects that actually have transparency and one for objects that dont. Even though you objects may be sharing the same textures and alpha channel you need to disconnect the transparency option in the shader for those that don't actually have transparent bits.
hlsl and cgfx shaders have their own inherent problems with transparency in maya - and i dont recommend them for this purpose. they can be made to work under limited circumstances but multiple transparent layered objects will never work properly (like hair).
This is no way weird, magic or a mystery. It's alpha-sorting. It's an issue in all realtime rendering. Maya viewport uses object transparency sorting, based on the bounding sphere I think.
Chronic gave you the best solution, but most engines would prefer a limited use of alpha, using only alpha where it's needed (hair) and not use it for the whole mesh. ie. two separate textures.
The mystery I was referring to is why it hasn't been made to work out of the box in the last three versions I've been using Maya.
The days of expecting your more enterprising customers to fix your software *should* be over. (Not ranting, here -- I love Maya. Just calling a spade a spade!)
hlsl and cgfx shaders have their own inherent problems with transparency in maya - and i dont recommend them for this purpose. they can be made to work under limited circumstances but multiple transparent layered objects will never work properly (like hair).
I actually had mutliple objects layered in front of each other with transparency using a CGFX shader. Worked fine. They had to be separated objects to work though, I think. They were all completely flat planes. Probably wont work well if its a semi-cylindrical plane and you were to see both front side and back side.
the fix for this is fairly simple, although annoying, you need to make 2 shaders - one for objects that actually have transparency and one for objects that dont. Even though you objects may be sharing the same textures and alpha channel you need to disconnect the transparency option in the shader for those that don't actually have transparent bits.
hlsl and cgfx shaders have their own inherent problems with transparency in maya - and i dont recommend them for this purpose. they can be made to work under limited circumstances but multiple transparent layered objects will never work properly (like hair).
Awesome dude this works like a charm, althought tedious and annoying, it solves the problem completely.
Ive hooked up 2 blinns, one with opacity and one without, applied the two to their respective pieces and everythings fine. I even tested it on a character im working on with layers and layers of transparency. perfect.
I should have remembered that from doing pretty much the same thing to get a good sort going inside marmoset!
Maya supports rendering of transparent CgFX shaders. Maya detects whether the blending state is enabled in the first pass. If blending is enabled, Maya uses the Object Transparency Sorting or Polygon Transparency Sorting options in the viewport to correctly render the transparent shader.
So maybe cgfx is our salvation after all - HLSL for sure is borked
try to turn off object transparency sorting and turn on polygon transparency sorting...
in the viewport under shading...
Thanks for pointing this one out, it works a charm for non normal mapped stuff. But anything with normals + opacity still end up looking pretty funky and random.
Kodde: Cool!! But try an example, thats normal mapped, all one object and has parts with and without opacity, as THAT is the main culprit thats breaking things.
The example you have there works perfectly even now in maya 8.5, with the standard blinn shader.
I don't think it will work when it's all one object, same issue as regular Maya. My point with example 2 and 3 in my image was that it sorts them correctly (seems to?) even though one object's pivot might be closer to camera than the other.
EDIT: I can give your suggestion a try though, will do it later in the evening when I'm at home.
the most annoying transparency problem I have seen is like this example from Xoliul's shader thread: http://boards.polycount.net/showpost.php?p=1075588&postcount=195
this happens with HLSL shaders and I was under the impression it happened in cgfx too, but if not then I will be fully converting to CGFX.
Thanx a ton man(chronic,kodde, Hazardous,claydough,oglu,vofff....and the list of helpful people continues) thanx alot,I really mean it..... cause nobody even bothered to respond in sites like zbrushcentral or cgtalkand I get sooooooo many helpful responses out here.
I request Admin to kindly keep an auto mailing system to the users mailbox with each response to his subscribed thread(it is not there in my case so I took a while to write this mail)
I will be experimenting with all this so valuable responses and am sure I will come up with a solution shortly.
Pals I also need to know if there is any training dvd on game level modeling texturing in 3ds max,its damn urgent.
Thanx again to all my kindhearted freinds who spent their valuable times responding this thread.
Kind regards
Arnab
AKA Sagiarts
@Kodde
Yep, i just finnished converting one of my HLSL shaders to CGFX and was disappointed as well - single or double layers of transparency could be corrected with creative object combining - but it seems like complex multi-layered transparency will always be a problem.
My cynical view is that this is one of those minor fringe case issues that Autodesk will never get around to resolving.
@Kodde
Yep, i just finnished converting one of my HLSL shaders to CGFX and was disappointed as well - single or double layers of transparency could be corrected with creative object combining - but it seems like complex multi-layered transparency will always be a problem.
My cynical view is that this is one of those minor fringe case issues that Autodesk will never get around to resolving.
Its such a shame, but ive got to agree with you man, I dont think they will get around to it either.
Alpha sorting has been a bane to game development since forever. Especially in hair. Metal Gear Solid/ Final Fantasy are one of the few places that dare actually give characters hair styles that arent crew cut / short cropped non opacity styles, I dont ever recall seeing alpha sorting problems in Final Fantasy.
I've decided to say "screw you alpha blending" - our engine here at work does alpha testing anyways so why bother with other techniques.
replace your blend code with alpha test code - seems to work in preliminary tests across all situations and isnt influenced by mayas viewport Shading>Object Transparency Sorting or Shading>Polygon Transparency Sorting
CGFX code:
Fabulous secret powers were revealed to me the day I held aloft my magic sword and said... By the power of Greyskull! I have solved alpha transparency sorting!
Replies
But sorry, that is actually not a "weird problem" as far as Autodesk is concerned.
Unless a user has taken it upon themselves to make a fix (and I'm not aware any have), you'll need to fully render it or just go ahead and drop your model in to a game engine to see what you've made (if you're using UDK, at least, it's easy to update the changes you make in Maya or Photoshop.)
This is one of the great Mysteries of Maya ...
(That's some nice forehead skin, by the way, Sagiarts! And welcome to polycount ... helpful folks here. Well, maybe not me, but we try.)
hlsl and cgfx shaders have their own inherent problems with transparency in maya - and i dont recommend them for this purpose. they can be made to work under limited circumstances but multiple transparent layered objects will never work properly (like hair).
Chronic gave you the best solution, but most engines would prefer a limited use of alpha, using only alpha where it's needed (hair) and not use it for the whole mesh. ie. two separate textures.
The mystery I was referring to is why it hasn't been made to work out of the box in the last three versions I've been using Maya.
The days of expecting your more enterprising customers to fix your software *should* be over. (Not ranting, here -- I love Maya. Just calling a spade a spade!)
I actually had mutliple objects layered in front of each other with transparency using a CGFX shader. Worked fine. They had to be separated objects to work though, I think. They were all completely flat planes. Probably wont work well if its a semi-cylindrical plane and you were to see both front side and back side.
Awesome dude this works like a charm, althought tedious and annoying, it solves the problem completely.
Ive hooked up 2 blinns, one with opacity and one without, applied the two to their respective pieces and everythings fine. I even tested it on a character im working on with layers and layers of transparency. perfect.
I should have remembered that from doing pretty much the same thing to get a good sort going inside marmoset!
in the viewport under shading...
But jes in case:
MAYA_SLOW_DRAWPIXELS = 1
Thanks for pointing this one out, it works a charm for non normal mapped stuff. But anything with normals + opacity still end up looking pretty funky and random.
The example you have there works perfectly even now in maya 8.5, with the standard blinn shader.
EDIT: I can give your suggestion a try though, will do it later in the evening when I'm at home.
http://boards.polycount.net/showpost.php?p=1075588&postcount=195
this happens with HLSL shaders and I was under the impression it happened in cgfx too, but if not then I will be fully converting to CGFX.
I request Admin to kindly keep an auto mailing system to the users mailbox with each response to his subscribed thread(it is not there in my case so I took a while to write this mail)
I will be experimenting with all this so valuable responses and am sure I will come up with a solution shortly.
Pals I also need to know if there is any training dvd on game level modeling texturing in 3ds max,its damn urgent.
Thanx again to all my kindhearted freinds who spent their valuable times responding this thread.
Kind regards
Arnab
AKA Sagiarts
Yep, i just finnished converting one of my HLSL shaders to CGFX and was disappointed as well - single or double layers of transparency could be corrected with creative object combining - but it seems like complex multi-layered transparency will always be a problem.
My cynical view is that this is one of those minor fringe case issues that Autodesk will never get around to resolving.
Its such a shame, but ive got to agree with you man, I dont think they will get around to it either.
Alpha sorting has been a bane to game development since forever. Especially in hair. Metal Gear Solid/ Final Fantasy are one of the few places that dare actually give characters hair styles that arent crew cut / short cropped non opacity styles, I dont ever recall seeing alpha sorting problems in Final Fantasy.
I blame the coders. :P :P :P
http://wiki.polycount.net/Opacity_Map#SortingProblems
replace your blend code with alpha test code - seems to work in preliminary tests across all situations and isnt influenced by mayas viewport Shading>Object Transparency Sorting or Shading>Polygon Transparency Sorting
CGFX code:
You can use both together at the same time. But it only reduces the sorting problems to a fringe of pixels, not really that helpful.
/me sips his bourbon
when will we learn?
When will YOU learn how to fix it and be the awesomest person on the planet!!!!