Jump to content
Sign in to follow this  
arno

FSDSv2 and transparencies/ Object vs. Scasm/API files

Recommended Posts

Guest

Hi Folks,I am fairly new at using FSDSv2. I have an antenna tower I have been fighting with as far as transparent textures goes. I found that to make the inside and outside of the tower, I have to make two objects of the same shape, but the inside one has to be just a bit smaller than the outside one. Also, the polygons need to be flipped on the inside object in regards to the outside object.I have applied all the different formats for transparent textures, but none of the inside tower textures show through the outside tower textures. Also, this only happens when I assemble the Scasm/Api file for the object. When I assemble the Object file directly to the scenery folder the textures work fine, but as an API macro, the textures on the outside of the tower are transparent in relation to the ground texture, but the inside tower textures don't show through the outside tower textures.I would appreciate some help on this problem. It usually is something simple that I have overlooked. Thanks in advance.Take care.John Williams

Share this post


Link to post
Share on other sites

Hi John,Sounds like a drawing order problem to me. Try to make sure that the inside polygons are drawn before the outside (so they must be in the source before the outside). You can achieve this by selecting the "Uses transparant textures" option for the outside polygons.


Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites
Guest

Thanks Arno, that was the problem. I knew it was something simple, and I did overlook the drawing order, geez. I couldn't achieve the proper order by just using the "uses transparent textures" alone. I did go into the source code and actually change the order of all the inside and outside routines for the Call32s and the Transform_Mat, and that worked.I don't post here alot, but I do visit quite often, and I always learn something from my visits. Thanks again arno.Take care.John Williams

Share this post


Link to post
Share on other sites
Guest GerrishGray

Hi guysYes, it seems that drawing order is very important with transparency because of the way that DirectX works. As I understand it, transparency in a new triangle being drawn is done by 'adding' the new transparent or semi-transparent image to what has already been drawn in the frame buffer. So it is important that parts visible through a transparent part have been drawn BEFORE. At the macro level this should be handled by the z-sorting / 'painter's algorithm', but within the same object it is probably important to get the drawing order of the triangles correct i.e. always draw transparent surfaces last, and draw internal surfaces before external ones.There is increasing evidence that the z-sorting does not work correctly in these circumstances, or may not even be applied to triangles within the same draw list at all, despite the suggestion by MS that z-sorting is done at the triangle level ?RegardsGerrish

Share this post


Link to post
Share on other sites
Guest

Hi Gerrish,Thanks for the supporting information. I have also found that the z-sorting is a bit tricky in my experiments with the graphic programs available. The drawing order seems to be the most important operation when transparencies are involved. I knew this, but in my haste to overcome a problem, I created myself, I forgot to check the drawing order.Take care. John Williams

Share this post


Link to post
Share on other sites

Maybe this can help some people out there, it's a tutorial about the subject I wrote some time ago.http://home.wanadoo.nl/arno.gerretsen/down...cy_problems.pdf


Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...