Jump to content
Sign in to follow this  
arno

Transparency and textures

Recommended Posts

Guest

Hi,Using "old-style" transparency (via e.g. FSDS) my textures with transparency start to flicker a lot in the simulator. When I use DXT with alpha channel (importing the alpha via DxtBmp), I get rid of the flickering completely, but there is a nasty side effect: the colour I've given transparency to, replaces the transparency in the sim at a certain distance (not very long distance), and a fence can e.g. become solid and black, instead of transparent as I want it. Is there a way to go around this matter? This issue does not seem to depend on the amount of transparency, it's there regardless of me having 10% or 100% transparency.Grateful for help.../Sebastian

Share this post


Link to post
Share on other sites
Guest gorchi

Hello Sebastian!If You use transparent texture for fences then I would suggest to you, that You actually make two parts (fences) in FSDS. One with texture that has condition distance from 0 to 200, and the second one, which does not have a texture but put a material on it, let say gray RGB 200 200 200 with alpha let say 70-100. I had a similar problem with my fences and this is the best way to doeal with them.If You have windows, that is another problem. There is difference on applying DTX1 and DXT3 textures to part. I made a test house just to see what will happen if I have three parallel parts, the innermost as nontransparent, the other two walls from transparent or opaque material. And wow, the "house" had 8 different paintings on it... If You are interested in this, I can send You the API and 2 textures to see what is going on :)Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites
Guest

I guess you can keep the api, Goran. :) Sounds like FS is playing you tricks on that one!So far I've been using the "old-style" transparency which flickers, but I've also been using a part that is transparent and gray, and together they look quite good, from far and close distance. However, getting a "perfect" fence would be even better. :)Thanks, I'll try to test it and see what it looks like...

Share this post


Link to post
Share on other sites

Hi Sebastian,I would advise not to use the FSDS editor to make a texture transparant. I don't exactly know what kind of textures it produces, but ImageTool can usually not read them, so it's a bit of a weird format I guess.I use DXT textures all the time, without problem. I just make them by adding the alpha channel in the paint program already (and saving in a format that ImageTool knows), that's also a much faster way to make them in my opinion.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

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

What's the difference between DXT1 transparent and DXT3 transparent? I just don't seem to get it...

Share this post


Link to post
Share on other sites

DXT1 has a 1 bit alpha channel and DXT3 a 4 bit. That means that with DXT1 you can only have black or white in the alpha channel and thus only fully transparant or not. With DXT3 you have 32 colors to use, so different levels of gray also and that means you can have levels of transparancy.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

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

I noticed that DXT3 + alpha does not create that strange solidness that I earlier experienced with DXT1 + alpha. Could that be something for you Goran?/Sebastian

Share this post


Link to post
Share on other sites
Guest gorchi

Hi Sebastian!I use DXT3 primarly for making nice semi transparent effects on windows. But to put DXT3 texture on object You must set "Part uses transparent textures" otherwise You'll get very very interesting effects. I have enclosed API, that I mentioned earlier. To use it, You must prepare two bitmaps, named DXT1TST.BMP and DXT3TST.API. I made two completely different bitmaps with windows and DXT1 has completely transparent windows while the other one has semi-transparent window. Look to the second picture, what has come out in FS: one side of house, 4 different things! The last picture shows, how each poly is defined and which texture it has. Take a look, download the API and try it.But I must mention also this. If You have two walls where the outside has DXT3 bitmap, the inner must have DXT1 texture. I don't remember when but on some occasions, the inner walls completely dissapeared when using DXT3 texture on outside wall.Using textures has become now very interesting... :)Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites
Guest

Hey, that must be what happens to me too. On one spot (normally it seems not to happen) the building behind disappears when it is hidden behind the transparent texture, but only from certain directions. Quite strange. Earlier problems like this have been fixed by placing the transparent part last in the drawing list, but then that was in FSDS and when parts in the same macro started to disappear. Now the building behind is a macro in itself, and it doesn't help to place the fence last in Airport's 3d-object list. So you mean I can get rid of this feature by telling the object to be a "Uses transparent textures"-object? Must try that out then.../Sebastian

Share this post


Link to post
Share on other sites

Hi Goran,I think this has nothing to do with the type of textures you use. What you see there is the effect of the drawing order. Basically the idea is that the z-buffeting of FS does not display a polygon when it is drawn behind another polygon (to prevent bleed through). That's why transparant textures only work correct if the inner ones are drawn first (otherwise they would dissapear). For complex objects this means that there is not one drawing order that works fine and then you need to use a different drawing order for different angles.Unfortunately most design programs don't handle this drawing order very well and that is the reason of all those transparancy problems that pop up here so often :).Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

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 gorchi

Hi Arno!If that what You say is allways true... Unfortunatelly it is not. Download the API and try it. On the picture You see only what is happening on a texture applied to a poly Which "uses transparent polygons". Take a look on another side.... Funny things happen. And not to mention, wall 2 and 3 (inner walls of course) do not have any texture applied, if it has texture then even more strange things happen!Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites

I downloaded it and have a look at it this evening.The only thing the option "has transparant textures" does is to place the particular object at the end of the drawing order.Well, I'll first have a look and then probably have more comments :D.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

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

Hi efva2002,I had exactly the same problem with multi-level transparent textures 'masking' objects behind and I fixed it thanks to help from my good friend Gary Summons. Here is the reason for the problem, and the solution.FS draws objects by their ref point location (the centre of the FSDS area when using FSDS), not by the object's actual location.So, if you have 2 objects from diff FSDS files, with one in front of the other, the ref-points may actually be the opposite way around. FS will draw the furthest ref-point objects first, not the visually furthest objects first. It's know of a complex situation to explain.I suggest you split your single FSDS file into seperate ones, if they are not, and then have in each file, the object exactly in the centre of the FSDS area, and adjust the project locations accoringly, and output as seperate bgl files. It fixed the problem for me. I doubted it at first but then found Gary to be exactly right.hope this helps.Regards,

Share this post


Link to post
Share on other sites
Guest

Thanks OliMinch, I understood that very well. The ref.points are actually the way you told, parts not centered etc. etc.

Share this post


Link to post
Share on other sites

Hi efva2002.If Oil's solution is right, this might be an application for TransformCall ( BGLC'c POINT_VICALL ), that we had discussed using for preserving the autogen. Perhaps the drawing order could be established by the 'temporary' offset of the refpoints.You might be able to take them up to 32000 meters, and then N-S, E-W as much as you need to establish the drawing order. The high altitude wouldn't disturb anything else on the ground, maybe?Or maybe that's just a silly complication? :)Dick

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...