Go Back   AC3D Forums > General > AC3D General
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 27th May 2017, 06:48 AM   #1
lonewulf
Junior Member
Junior member
 
Join Date: Dec 2013
Posts: 6
Default once again: transparency

there have been a few threads on transparency, especially in the X-Plane section. I detected an issue that puzzles me a bit and which may or may not be one of the culprits why it is so difficult to apply semi-transparent textures (also in X-Plane).

Long story short: I created a simple object consisting of 4 independend faces. All set to flat, 2sided.Two of them are textured with a DDS texture including an alpha channel for the windows. As long as this alpha-channel is 100% black, everything works as expected. The oddities start as soon as there is some opacity applied by reducing alpha-channel black to (in this example) 80%.

As long as the "frontside" is at the bottom of the hierarchy, everything still looks ok.



Rotating the object by 180° and thus looking to the "backside" (being 2nd last in the hierarchy) makes the texture of the opposite side disappear.



I haven't found one single way to make this texture in question visible - no matter what tricks I tried to play. I seems to me that AC3D only allows semi-transparency on the lowest hierarchy level, while full transparency is possible on all levels.

Simple question: why?

Oskar
lonewulf is offline   Reply With Quote
Old 29th May 2017, 05:32 AM   #2
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default Re: once again: transparency

It looks like this is the result to the drawing order. In your first picture, it's correct because the transparent object is drawn last (it's at the end of the hierarchy).

In the second picture, the side at the front is drawn before the rear one. It looks like the views through the edge windows are OK - because the facing side is drawn after the side surfaces.

AC3D doesn't depth-sort polygons for transparency (it's a processor-expensive operation which would slow things down) but generally it's best to put transparent objects at the end of the hierarchy. Many graphics engines will sort polygons for transparency (perhaps by pre-calculating a "transparency map") so it depends where you will be using your output files. Note that sorting doesn't always fix transparency problems. Sometimes objects need to be split up more. Even then there can still be limitations.
Andy is offline   Reply With Quote
Old 29th May 2017, 11:38 AM   #3
lonewulf
Junior Member
Junior member
 
Join Date: Dec 2013
Posts: 6
Default Re: once again: transparency

Thanks Andy, for the quick answer. Nevertheless I must say that I find it very puzzling that this does only happen when transparency is NOT 100% (i.e. Alpha channel not 100% black). As long as I work with 100% transparency this does not happen - no matter what the drawing order is!

OTOH I must also say that usually I do merge all faces into one object and do the textureing thereafter. In this case I have of only one single object in the hierarchy list(that's at least as far as I have noticed). But even then I see the same effect: as long as I use 100% Alpha there is no "seeing through" other textures.

Next thing I will try is to "extract" all transparent surfaces into a separate object and see whether I have still the same effect.

Regards
Oskar
lonewulf is offline   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



All times are GMT -4. The time now is 06:03 AM.


AC3D Forum
(C) Inivis Limited 2020