AggrorJorn Posted August 16, 2010 Share Posted August 16, 2010 I am updating the user guide with several material file examples. When it comes to transparency, alpha and opacity there are several question that I don't know the answer to myself. For instance: What is the proper way for using alpha blending? (texture has black areas that need to be removed.) What is the proper way for using transparency blending? (texture has transparent areas.) When do you make use of the alpha_blend or alphatest shaders? And what is the difference between them? I have the following material file: texture0="abstract::alphatest.dds" blend=alpha zsort=1 As you can see this has several issues: The door doesn't have a shadow. The oildrum doesn't have a shadow when looking through the door. The color of the sky is different. Could someone shed some light on this topic? I would be a great addition for the user guide. Quote Link to comment Share on other sites More sharing options...
Pixel Perfect Posted August 16, 2010 Share Posted August 16, 2010 The alphatest and alphablend shaders from my understanding are used as follows: alphatest: To provide simple transparency where the texture is concidered to consist of opaque and transparent areas but the transparent area is concidered to be fully transparent. The shader will treat any Alpha values above a certain threshold value to be full on transparent and this is generally faster. This appears to work in the foreground world without problems. A typical example would be a leaf texture for a tree where the leaves are opaque and the surrounding texture fully transparent so it is not visible when rendered. alphablend: To provide full graduated transparency in textures where the full 8 bit alpha channel is converted into differing degrees of transparency dependent on the alpha value. This requires rendering in the transparent world to be rendered correctly. An example might be a block of ice with differing transparency dependant on the thickness or impurity distribution. Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
AggrorJorn Posted August 21, 2010 Author Share Posted August 21, 2010 thx for your answer pixel. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.