[RESOLVED] Materials with Alpha channel disappearing
[RESOLVED] Materials with Alpha channel disappearing
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:
Also, please find attached some screenshots showing the issue.
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
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:
Also, please find attached some screenshots showing the issue.
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
Re: Materials with Alpha channel disappearing
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.
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.
Re: Materials with Alpha channel disappearing
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,
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,
Re: Materials with Alpha channel disappearing
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?
Re: Materials with Alpha channel disappearing
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.
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.
Re: Materials with Alpha channel disappearing
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.
Re: Materials with Alpha channel disappearing
Max, are you referring to my thread here: http://www.prepar3d.com/forum/viewtopic ... 7&t=119373
Re: Materials with Alpha channel disappearing
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)
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)
-
- Lockheed Martin
- Posts: 1111
- Joined: Tue Aug 14, 2012 6:47 pm
Re: Materials with Alpha channel disappearing
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.
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
Re: Materials with Alpha channel disappearing
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,
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,
-
- Lockheed Martin
- Posts: 1111
- Joined: Tue Aug 14, 2012 6:47 pm
Re: Materials with Alpha channel disappearing
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.
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
Re: Materials with Alpha channel disappearing
Hi Kevin,
problem solved by using even numbers for layering (-2, -4, -6 etc.).
Best,
problem solved by using even numbers for layering (-2, -4, -6 etc.).
Best,