• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Draw order problems with transparent VC materials

Hello fam, I'm in a bit of a pickle here...Trying to get diffuse alpha transparencies in the cockpit for a special lighting effect that requires it, however I am getting all sorts of draw order issues when the viewed mesh overlaps either itself or another material. For the framebuffer blend, I've tried just about everything in the book starting with the "Default Transparent" preset and ending with some shot-in-the-dark combination of source/destination colors and alphas, and pretty much everything in between.

Does anyone have a "recipe", so to speak, for getting physically correct behavior out of transparency materials? I'm no expert on the extra alpha functions, and I think the SDK does a pretty poor job of explaining what each setting does. Apparently they expect us to deduce individual functions out of the various examples of presets that are provided. :confused:
 
This seems to work for me...

View attachment 33446
Thanks Robert, I will try these settings when I get home tonight...I was under the impression that the Z-write and Z-test parameters had to do with storing transparency information in a material or acting as a "master control" for transparency instead of modulating it through alphas. Looking through this thread > http://www.fsdeveloper.com/forum/threads/what-is-z-test-and-z-write.9159/ it seems that is not the case.
 
I still have issues with this. It would be nice to find a fix. If it works, please let us know, Ozz.
Well I tried out Robert's recipe yesterday and it's working beautifully for my purposes. I was a little suspicious that having many transparent and opaque materials layered behind one another would cause problems, but I haven't noticed any yet. :cool:
 
Quick little update if anyone else is looking for a material with similar properties: I spoke a bit prematurely when confirming that it worked flawlessly, as the original material refused to cast shadows on the rest of the cockpit (I didn't notice this until testing it during the daytime, and since this is for night lighting, time in P3D has been set to early dusk for the past several days and I never bothered to change it. :laughing:)

What I did to make the shadows visible was change the framebuffer blend back to "Default Opaque", and raise the Alpha Test level to about 180 (I've found that too high of a value here will sharpen your alpha threshold, making it appear blocky and DXT1-ish. It probably varies from texture to texture though.) Now I have my glorious shadows back...HOWEVER...the edges of transparent areas still don't look as nice as they did with the "Default Transparent" preset.

I'll have to fiddle with some more settings and report back later...it appears that the framebuffer blend is what's causing my shadows to either be rendered or not, so at least I've got the source narrowed down.
 
Still no luck with the shadows. :( I have tried every other blend combination besides One/Zero and all of them produce some really funky shading. For example, the glareshield will not cast a shadow on anything underneath of it, but parts of the exterior window frame (different opaque material) will cast "through" it and onto the main instrument panel.

Meanwhile, parts of my exterior that have alpha-controlled transparency cast shadows just fine, although they don't require Z-writing or testing...
 
Top