Jump to content

[Question] Materials with Alpha


Dan22
 Share

Recommended Posts

I've been trying for some time to get materials with alpha to work but it doesn't seem to work. I can see you got it in the glass material but I wonder how you guys did it.

 

From this example you can see what problem I am having:

 

3d8058f55938d217302b2c0ce2ace2bf.png

 

The wall on the left is the glass texture, you can see through it. On The right is my texture. You cannot see through.

 

I have tried .png and .jpg and also tried different blend modes and they do not work. Also for some reason alpha textures see through brushes also as you can see on the right.

 

I must be doing it wrong. If anyone knows how it would be very helpful this thing drives me abit insane and I must be doing a silly mistake tongue.png

 

I really need this as I could use this as a substitute for decals as they are not added in yet and I can make signs ect.

 

Anyway, as always thanks guys!

Link to comment
Share on other sites

As Einlander said use the diffuse_normal_spec_alpha.shader, that should fix your problem dude smile.png

 

I don't know if the shader is called that it may have 'alphamask' on the end of the name tongue.png

 

Did you make those decals yourself? Looking nice dude!

 

A little tip when working with textures as well mate, try to save them as .PNG. JPEG and other formats leave a solid background, .PNG has a transparent background. You may run into some other issue if your texture is a .JPEG, for the effect your trying to get with that sticker on your glass window there, try saving it as a .PNG :)

Link to comment
Share on other sites

Yeah I saved it as .JPG because the glass texture was also jpg so I thought that might be the problem. However I did use the alphamask shader before I wrote this and it didnt seem to work. I'll try again and see if it works still.

 

Examples:

 

Result with Shader:

 

a4b08c1815de312e2ee8ec64405e1e0e.png

 

Material Setup:

 

612f63ba007b5fcda6c1633e976befa5.png

 

.PNG Image

 

0b8d9fa85e1cdff2e7f4a3a7515a3f94.png

 

in-game:

 

5a4c106c62f97b28bb7ec2ac48777ed8.png

Link to comment
Share on other sites

Use DXT5 compression. DXT1 does not support alpha channels.

 

Also, enable z-sorting in the material.

 

Alternatively you can just use the alpha blend shader and it will discard every other pixel.

 

I don't understand what you're trying to do, though. You want a danger sign floating on a glass wall? Is this supposed to make a decal or something like that?

  • Upvote 2

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Use DXT5 compression. DXT1 does not support alpha channels.

 

Also, enable z-sorting in the material.

 

Alternatively you can just use the alpha blend shader and it will discard every other pixel.

 

I don't understand what you're trying to do, though. You want a danger sign floating on a glass wall? Is this supposed to make a decal or something like that?

 

Yeah ..... what he said :P

Link to comment
Share on other sites

Thanks! Got it working in the end!

 

I wanted this feature as I can do many things, for example:

 

a5e1cbc56ef5bc3f924eb514df2ece56.png

 

Now I can Have blood on walls and signs ect without having a completely new texture to intergrate it.

 

Also I can now fake volumetric lighting which I will demonstrate in soon!

Link to comment
Share on other sites

Now I can Have blood on walls and signs ect without having a completely new texture to intergrate it.

Also I can now fake volumetric lighting which I will demonstrate in soon!

 

Decals are usefull for terrain floor decoration/variation, to apply specific textures anywhere.

Hope some others projects will request decals the only way to see them appear in LE3.

  • Upvote 1

Stop toying and make games

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...