[RESOLVED] Materials with Alpha channel disappearing

Discussion related to terrain/scenery design.
Lukasv
Posts: 7
Joined: Mon May 23, 2016 7:34 am

[RESOLVED] Materials with Alpha channel disappearing

Postby Lukasv » Mon May 23, 2016 8:10 am

Hello,

I am currently working on designing an airport, for the first time with the P3Dv3 SDK. Starting with the ground, I compiled 2 .bgl files already: one with the photoreal ground and the other with the asphalt and concrete textures of the airport. I am experiencing a problem with textures containing an alpha channel, where under most viewing angles and zoom levels, the textures simply disappear. These textures are mainly runway & taxiway markings.

In the material editor I am using the new Z-Bias technique along with some transparency options. Although I have tried various combinations of options, the most tested (but also without any positive result) are these:

Image


Also, please find attached some screenshots showing the issue.

Image
Image

Image
Image

I am pretty sure that the issue are the settings in the material editor, since this happens only, like mentioned before, with textures having an alpha channel.

For converting my .MDL files I am using MCX. The .dds files were created using both the image tool and DXTBmp.

Thanks

User avatar
Max Perry
Lockheed Martin
Posts: 203
Joined: Tue Sep 14, 2010 1:22 am

Re: Materials with Alpha channel disappearing

Postby Max Perry » Mon May 23, 2016 9:23 pm

In your screenshots. Is that line disappearing at certain angles? Or is it not ever showing up.

I have a zbias texture, the runway oil markings that has an alpha channel. My settings are slightly different. I have it with default opaque. Z-Test alpha checked, test level 128, GreaterEqual, Z-write alpha, No Z-write, and No shadow.

I think you want your line to be a bit transparent, those would be different settings for sure.

Lukasv
Posts: 7
Joined: Mon May 23, 2016 7:34 am

Re: Materials with Alpha channel disappearing

Postby Lukasv » Tue May 24, 2016 8:36 am

Hi Max,

thanks for your reply. The line appears only at certain (actually only a few) angles. This particular line is not transparent at all. It uses a simple black/white alpha channel, so I suppose it may work with your settings.

However, for my scenery I also use transparent textures, with different variations of grey colors in their alpha channel. These textures have, with the settings I uploaded, the same disappearing issue stated in my first post. Are there any suggested settings for transparent and semi-transparent textures? AFAIK the "Default Transparent" setting should be used for this kind of textures, which I do, but I think the issue are the other settings.

Another question I have is if I am using Z-Bias layering correctly. My lowest layer starts at -1 and as I add layers i decrease the value by -1 for each layer (-1, -2, -3, etc). Is this correct?

Thanks,

Lukasv
Posts: 7
Joined: Mon May 23, 2016 7:34 am

Re: Materials with Alpha channel disappearing

Postby Lukasv » Tue May 24, 2016 9:11 am

I would also like to note, that the material settings I posted have been set according to how other developers use them for semi-transparent textures, but apparently with F2002 style ground polygons. I assume P3Dv3 handles transparencies differently and therefore needs other settings applied to such textures, if the P3Dv3 SDK is used?

Lukasv
Posts: 7
Joined: Mon May 23, 2016 7:34 am

Re: Materials with Alpha channel disappearing

Postby Lukasv » Wed May 25, 2016 6:56 pm

I just tried your settings, Max, with a texture containing a simple black/white alpha. The issue remains: The texture is visible most of the time but when panning the camera it disappears under certain angles. Also, when I zoom out the texture disappears even more often.

This particular marking texture is at Z-Bias level -2 and my runway/taxiway texture is at -1. I also tried setting the marking texture to Z-Bias level -5 but nothing changed.

User avatar
Max Perry
Lockheed Martin
Posts: 203
Joined: Tue Sep 14, 2010 1:22 am

Re: Materials with Alpha channel disappearing

Postby Max Perry » Wed May 25, 2016 10:52 pm

Thanks for checking the settings. I don't see it on my end so we should have this fixed in the next patch. It is similar to the other post where at different angles things were disappearing related to zbias.

Dimus
Posts: 45
Joined: Mon Nov 25, 2013 7:54 pm

Re: Materials with Alpha channel disappearing

Postby Dimus » Thu May 26, 2016 7:45 am

Max, are you referring to my thread here: http://www.prepar3d.com/forum/viewtopic.php?f=6307&t=119373

Lukasv
Posts: 7
Joined: Mon May 23, 2016 7:34 am

Re: Materials with Alpha channel disappearing

Postby Lukasv » Thu Jun 02, 2016 5:55 pm

Just tried out exporting my ground polys with the new 3.3 SDK.

The layering is as before in increments of -1, the Aerial image being at -1, Asphalt textures -2, Dirt -3, Some various markings at -4, Runway Markings -5 and the runway edge at -6. Although I have no issues with the runway markings, the other textures disappear under certain viewing angles just like before.

Is there a recommended use of the Z-Bias increment? My Alpha Test Level is set to 4, for all textures that have transparency.

Also, in 3DSMax all my polys and lofts are set to the same level (Z=0)

Kevin Cartrette
Lockheed Martin
Posts: 539
Joined: Tue Aug 14, 2012 6:47 pm

Re: Materials with Alpha channel disappearing

Postby Kevin Cartrette » Thu Jun 09, 2016 3:49 pm

Hey Lukasv,

The issue is likely stemming from the fact that you are using alpha blending, which currently isn't supported for the layering. There is a limitation for the layers to not have alpha. You may want to follow the SDK material settings for best results. We understand the limitation and will consider this for future enhancements.

Edit: This may actually work in the next release.

Thanks,
-Kevin.
Prepar3D Graphics Software Engineer

Lukasv
Posts: 7
Joined: Mon May 23, 2016 7:34 am

Re: Materials with Alpha channel disappearing

Postby Lukasv » Fri Jun 10, 2016 10:17 am

Hi Kevin,

thanks for your response. The problem was actually solved when I installed the P3Dv3.3 client and everything worked perfectly when I used the Z-Bias technique, even materials with alpha channels. The problem partially appeared again, when I installed the latest hotfix, which pretty much destroys my work. Are you planning on fixing that again?

Thanks,

Kevin Cartrette
Lockheed Martin
Posts: 539
Joined: Tue Aug 14, 2012 6:47 pm

Re: Materials with Alpha channel disappearing

Postby Kevin Cartrette » Fri Jun 10, 2016 12:37 pm

Hey Lukasv,

Thanks for the information, we were not seeing this issue with the z bias scenery airports we were testing with. You may want to make sure all the layers you want to sort do not have a 0 z bias. A z bias of 0 will not be considered to be sorted against your other layers, which maybe leading to some of the issues.

If this doesn't work we can work to reproduce this on our end.

Thanks,
-Kevin.
Prepar3D Graphics Software Engineer

Lukasv
Posts: 7
Joined: Mon May 23, 2016 7:34 am

Re: Materials with Alpha channel disappearing

Postby Lukasv » Fri Jun 10, 2016 3:04 pm

Hi Kevin,

problem solved by using even numbers for layering (-2, -4, -6 etc.).

Best,


Return to “Scenery Development Questions”

Who is online

Users browsing this forum: No registered users and 4 guests