Author : Nate Broach


Reply
Reply
 
Thread Tools Display Modes
Conor's Avatar
Old (#1)
Maya's realtime display of textures with transparency seems to be broken (or the way I'm doing it is wrong). Below is an example. If I map a 32bit tga onto a box and sphere in max, and set transparency to the alpha chanel I get nice transparent objects, with the texture on the outside, as I would expect. In maya, if I apply the same texture, and put the texture's alpha channel into the transparency I get a black/flickery mess. The sorting on the polygons gets messed up, the texture is drawn on the backfaces and the texture flickers when I rotate the view. In max this works fine with direct 3D or openGL - surely this can't be a bug in maya can it? Any maya users out there care to enlighten me?

Offline , spline, 212 Posts, Join Date Oct 2004, Location Melbourne  
   Reply With Quote

Daz's Avatar
Old (#2)
Well, yeah it can do transparency in the viewport.
Make sure that If your alpha isnt showing up, under the hardware texturing tab in the shader properties, that texture channel is set to 'combined textures'.

The bad news is that If you are displaying multiple alphas overlapping each other in the viewport, it wont sort them properly no. Its a weakness that you learn to work around Im afraid.
Offline , veteran polycounter, 3,571 Posts, Join Date Oct 2004, Location SF Bay area  
   Reply With Quote

Conor's Avatar
Old (#3)
Thanks Daz - I tried switching the hardware shading properties from color to transparency and to combined and it doesn't appear to have any effect. Surely there are people who use Maya for games and need to display transparency in the viewport correctly? I can't believe a major 3D app can't sort alpha polygons and nobody's ever complained about it.
Offline , spline, 212 Posts, Join Date Oct 2004, Location Melbourne  
   Reply With Quote

SouL's Avatar
Old (#4)
It depends on what version of Maya you're using. In 4.5 the alpha's should show up automatically if they're in a 32-bit TGA. In 5.0 (and above, I think) you have to connect your texture to the transparency channel. Just drag/drop and you should be set to go.

Transparency sorting has improved a bit in the later version... but you have to be careful how you set it up. You'll get the best results if you seperate each group of polies into their own PolySurface node.

So let's say you have 3 plane strips for hair. Seperate each piece into their own nodes and they should render much better. For some reason the transparency crashes on itself if everything is one piece.
If you want to select each piece quickly... simply group them.

Also... if they're showing inside out, simply flip the face normals. This sometimes happens on instanced/duplicated geo that have a -1 scale value for X.
Offline , polycounter, 833 Posts, Join Date Oct 2004,  
   Reply With Quote

Conor's Avatar
Old (#5)
Sorry, I should have mentioned that this Maya 6. Here's what the scene looks like with all the normals flipped...



I can't think of an easy way to divide up a sphere into seperate parts so that it will sort correctly from all angles. Realistically, I shouldn't have to - a tool for creating game art content should show your art in the viewport correctly without having to 'work around' the quirks in the program. This is very disappointing - even Alias haven't responded with a decent answer to this.
Offline , spline, 212 Posts, Join Date Oct 2004, Location Melbourne  
   Reply With Quote

Daz's Avatar
Old (#6)
Hang on a sec here. Maybe Im not clear on what youre wanting to do. So both of these objects have alpha channels. Youre wanting to just display them both using the alpha even somewhat normally and its not even close? Or theres just a bit of alpha flickering going on?

Youre not on an ATI card are you? Can you send me the files or is it work stuff?
Offline , veteran polycounter, 3,571 Posts, Join Date Oct 2004, Location SF Bay area  
   Reply With Quote

Daz's Avatar
Old (#7)
Well, no need to send me the files for something so simple I guess. Well, this alpha sorts perfectly fine for me. No flicker. Two objects with alpha overlapping each other in the viweport. Is that all youre trying to do? Or have I misunderstood?

Offline , veteran polycounter, 3,571 Posts, Join Date Oct 2004, Location SF Bay area  
   Reply With Quote

Daz's Avatar
Old (#8)
Have you got shading>shade options>transparency shading ticked in the viewport?
Offline , veteran polycounter, 3,571 Posts, Join Date Oct 2004, Location SF Bay area  
   Reply With Quote

Conor's Avatar
Old (#9)
Daz - thanks for the tips, I tried it again and this time it automatically wired the transparency as well as the color when I loaded the image into hypershade - and when I applied it I got exactly the same result as you have above - which is good! I don't know what went wrong the first time, but it seems like if you wire in the transparency afterwards it doesn't work right.
Offline , spline, 212 Posts, Join Date Oct 2004, Location Melbourne  
   Reply With Quote

Conor's Avatar
Old (#10)
Well we got a response from Alias's QA department wich wasn't very promising...

[ QUOTE ]

I got the following answer from our dev. But currently there is no clear solution for this.
"Only suggestion for this is to put the transparent part in a separate texture since this is the only part
that seems to require transparency."

Sorry about that.
-Girish

[/ QUOTE ]

How can anyone seriously use Maya as a game development environment when it can't sort transparent polygons?
Offline , spline, 212 Posts, Join Date Oct 2004, Location Melbourne  
   Reply With Quote

Scott Ruggels's Avatar
Old (#11)
Easy, we export to the game engine to test Transparency.

Scott
Offline , polycounter, 1,099 Posts, Join Date Oct 2004, Location Los Angeles, California  
   Reply With Quote

Conor's Avatar
Old (#12)
Well that's all well and good if your game engine works, but with most projects I work on the art is way ahead of the engine until near the end of the project. Besides, when you're texturing your model you have to be able to view that texture in your 3D app for quick feedback. I'm surprised that such a fundamental feature has been overlooked by Maya developers (and users) for so long.
Offline , spline, 212 Posts, Join Date Oct 2004, Location Melbourne  
   Reply With Quote

Jackablade's Avatar
Old (#13)
Well theres something for the Max crew to crow about. They may have an unwieldy animation system, a complicated programming language and an intrerface that usually only caters to do things one way instead of a dozen, but at least the goddamn alpha sorting works.
Tipping cows in fields Elysian.

Portfolio: www.jackablade.com
Offline , insane polycounter, 5,644 Posts, Join Date Oct 2004, Location Melbourne, Australia  
   Reply With Quote

Daz's Avatar
Old (#14)
Ok now I am confused. Conor, I thought you achieved what you wanted to? Or no?

The alpha sorting is crappy with many layers. With a scene like this its fine. Mayas roots are in film. Not much cause for the use of tons of alpha there. Maya has alot of catching up to do for functionality geared toward games, its a relatively new thing that its use is so widepread in games. Its a weakness I know.
JB: Stop turning every oppurtunity you find into a software war. The more unconstructive bashing of their chosen tool ( often not chosen by them ) folks see, the less theyre going to be inclined to help out.
Offline , veteran polycounter, 3,571 Posts, Join Date Oct 2004, Location SF Bay area  
   Reply With Quote

Jackablade's Avatar
Old (#15)
Ah yeah, sorry about that. I had meant to write more in that post, but I got called away for a meeting and just posted what I had... its rather harsher than I intended. The fact that I ran into the same problem this morning left me as frustrated as my esteemed colleague Conor here.

I am really trying to like Maya. Theres a lot of it which is pretty nice. Just every time I think I'm enjoying it, something like this pops up.

Tipping cows in fields Elysian.

Portfolio: www.jackablade.com
Offline , insane polycounter, 5,644 Posts, Join Date Oct 2004, Location Melbourne, Australia  
   Reply With Quote

Daz's Avatar
Old (#16)
Im not saying 'ooh dont say mean things about my 3D app! ' heh. Maya definitely is far from perfect and heck bring up the issues as you see fit. Im just sayin' you'll find people more inclined to help If its done a bit more constructively.
Offline , veteran polycounter, 3,571 Posts, Join Date Oct 2004, Location SF Bay area  
   Reply With Quote

Snowfly's Avatar
Old (#17)
somewhat connected to this topic, is it standard practice to assign transparent objects their own texture?
Offline , dedicated polycounter, 1,874 Posts, Join Date Oct 2004, Location Singapore Send a message via MSN to Snowfly Send a message via Skype™ to Snowfly  
   Reply With Quote

Daz's Avatar
Old (#18)
you mean for a game engine? If so, it kind of depends on the engine. For the last game I worked on, we did, because the alpha would remove some bit depth from the texture and produce banding.
Offline , veteran polycounter, 3,571 Posts, Join Date Oct 2004, Location SF Bay area  
   Reply With Quote

Jackablade's Avatar
Old (#19)
Hm, so let me just clarify... we'd be better to use a seperate black and white alpha map than a combined colour and alpha targa, correct?
Tipping cows in fields Elysian.

Portfolio: www.jackablade.com
Offline , insane polycounter, 5,644 Posts, Join Date Oct 2004, Location Melbourne, Australia  
   Reply With Quote

Daz's Avatar
Old (#20)
Thats what I do for pre-rendered work yes. I dont embed the alpha. I paint the transparency map as its own black and white tga. For game engine stuff I suspect that for the most part you would want to embed the alpha ( assuming your engine supports 32 bit targas ) . However, I put areas of a character that use alpha ( e.g eyelash ) onto a seperate, smaller map, not the character main map, so's not to take any colour out of the .tga If that makes sense.
Offline , veteran polycounter, 3,571 Posts, Join Date Oct 2004, Location SF Bay area  
   Reply With Quote

FatAssasin's Avatar
Old (#21)
I've never worked at a game developer that used a seperate file for the alpha, it's alway a 32-bit tga. But I wouldn't be surprised if there's a company somewhere that does. It just doesn't seem very effecient for the artist or the engine.

For prerendered stuff, I use layered psd files and have the bump, spec, diffuse, and whatever else each on their own layer. Then you specify which layer to use from within Maya (or Max).
Offline , polycounter, 813 Posts, Join Date Oct 2004, Location Kirkland, WA  
   Reply With Quote

Scott Ruggels's Avatar
Old (#22)
Gamebryo uses separate Alphas, because, the Alphas can animate (All the textures can Animate). Gamebryo also uses 24 bit Specularity masks. So you can get some nice looking glass if you work at it. but the problem of 1 shader per material is being addressed, for the Next Rev.

Scott
Offline , polycounter, 1,099 Posts, Join Date Oct 2004, Location Los Angeles, California  
   Reply With Quote

malcolm's Avatar
Old (#23)
On the game I am currently working on we save 32bit .tga with alpha channel included these get converted to 8bit colour in the pipe, or 4bit if you want. I'm an environment artist though not a character artist so I could imagine the process would be quite different depending on your render engine and what pipe makes sense for you. I agree the alpha sorting in Maya is ghetto but it doesn't look like it will ever get fixed so I gave up caring about it, most game engines don't even self sort objects with alpha on them. The only way I have seen it in a game working correctly is if there is some flag that tells the object to be drawn before every thing else and will only be seen from one camera direction, or if your pipe supports it you can use 1bit alphas which are great and will self sort and sort with other objects perfectly.
Offline , card carrying polycounter, 2,029 Posts, Join Date Oct 2004, Location Vancouver Canada  
   Reply With Quote

Jackablade's Avatar
Old (#24)
It seems like such an obvious thing though, its bizarre that that it even made it into the final release...
Tipping cows in fields Elysian.

Portfolio: www.jackablade.com
Offline , insane polycounter, 5,644 Posts, Join Date Oct 2004, Location Melbourne, Australia  
   Reply With Quote

Snowfly's Avatar
Old (#25)
I remember my first human model in Maya 4.5, a likeness of the actress Zhao Wei. Workflow was great, modeling, UV, skeleton setup, skinning.. everything felt slicker than my previous modeling package.

Imagine my shock when I got to texturing her hair.... Gaahhhh.... it looked like somebody bashed her skull in and turned her head inside out.
Offline , dedicated polycounter, 1,874 Posts, Join Date Oct 2004, Location Singapore Send a message via MSN to Snowfly Send a message via Skype™ to Snowfly  
   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright 1998-2012 A. Risch