Problem three transparancy textures

DagoO

Addon Developer
Joined
Jan 5, 2010
Messages
38
Reaction score
0
Points
0
Location
France
Hi everyone ! I am working on TMSO and i want to add some realism. i have tried to do some trees, but there is a problem about transparency. i can't get 3 textures, one above the other one, without that one of them is invisible under the one that is above. A picture will help you to understand the problem :

14803315620390_tree.jpg


Here, the boat is hidden behind the second tree texture. I've tried to change the group order in the mesh file, but this time, the second tree texture is hidden behind the first one.

I wonder if it's the orbiter limit, or if it's just a mesh/texture problem. I hope that you will be able to help me !

Thank you :hello:
 
Last edited:
What does the tree mesh look like? Is the boat in the same mesh file?
 
What does the tree mesh look like?
From looking at the shadow of the tree it's a box, (EDIT:) or rather 2 crossed planes, and additionally I think the alpha channel of texture around the tree doesn't have full transparency. It can be seen on the background sky.
 
Last edited:
From looking at the shadow of the tree it's a box, and additionally I think the alpha channel of texture around the tree doesn't have full transparency. It can be seen on the background sky.
It looks like it might be two crossed polygons, which won't work in Orbiter's rendering engine, since it won't be able to figure out which polygon is in front. To make a tree mesh that's two intersecting planes, you need 8polygons in Orbiter.

That would explain unexpected occlusion of the tree itself. As for the boat... Brief explanation of how transparency/rendering works in Orbiter:
All vessels are rendered in some order. Within a vessel, meshes are rendered in the order they've been defined, and within a mesh, groups are rendered in the order they appear in the mesh file. In order for transparency to work, the entire scene behind the transparent polygon must be rendered before the transparent polygon is...otherwise, things behind it won't be drawn, since the z-buffer thinks they're hidden. Within an object, you can ensure this by always placing transparent polygons in the last mesh group in the last mesh of the object, but there's no way that I know of to force a given object to be rendered before another given object that works in all cases.

TL;DR version: looking entirely through one object and seeing another one behind it is not guaranteed to always work in Orbiter.
 
Back
Top