OpenSAGE.BlenderPlugin icon indicating copy to clipboard operation
OpenSAGE.BlenderPlugin copied to clipboard

Importing textures with alpha

Open MattTheLegoman opened this issue 6 years ago • 7 comments

This is a very small issue. While Feliwir was explaining to me his attempt to add alpha it seemed like he missed the Blend Mode setting which I have circled in the screenshot.

Here is an example of the shader material nodes and settings that I use to display alpha in Blender. The default render engine in Blender 2.8 is Eeevee and this setting is only available for Eevee.

demostration of alpha setting

I recommend using either the Alpha Clip or Alpha Blend setting.

MattTheLegoman avatar Aug 19 '19 05:08 MattTheLegoman

Should be fixed with 07186b80f99ef9ad6fb84264f8152071a5dcea39

Tarcontar avatar Aug 20 '19 16:08 Tarcontar

Can not set the blend mode for all materials equal, since this causes issues with materials and textures without alpha. Need to track down a material/shader property that is responsible for this.

Tarcontar avatar Aug 20 '19 17:08 Tarcontar

Screenshot from 2020-01-04 13-40-38

This is the node setup how we need to do it

feliwir avatar Jan 04 '20 12:01 feliwir

blend mode is now set to alpha mode per default, but havent figured yet out how to set the alpha value from the texture properly, or use the texture as a alpha mask.

Tarcontar avatar Jan 05 '20 16:01 Tarcontar

Setting the Alpha texture of the PrincipledBSDFWrapper does not really solve the problem, since then we have the same texture node twice in the shader instead of connecting the Alpha value of the first texture directly.

For reference: https://github.com/sobotka/blender/blob/master/release/scripts/modules/bpy_extras/node_shader_utils.py

Tarcontar avatar Jan 07 '20 12:01 Tarcontar

image this could work if we could extract the 'alpha mask' from a texture

Tarcontar avatar Feb 12 '20 20:02 Tarcontar

image this might be the corresponding shader value (Is Zero for other materials)

Tarcontar avatar Feb 13 '20 07:02 Tarcontar