This is the testing Godot forums! All forum posts unique to this forum will be deleted! Please use the main forums here for any posts you want to keep. All forum rules still apply.

How i can make a material partially transparent?

giannis996giannis996 Posts: 41Member

Hello everyone!

I am asking to learn how i can make a material partially transparent, what if i want a material to have 25% alpha so we can see from inside it?

Thank you!!

Best Answer

  • SIsilicon28SIsilicon28 Posts: 693
    Accepted Answer

    Oh, well the albedo color has an alpha variable. Click on the parameter and use the alpha slider. Changing that won't be enough though. You also have to enable transparency with the transparent flag.

Answers

  • SIsilicon28SIsilicon28 Posts: 693Moderator

    I'm assuming you are working with a shader, so all you have to do is just set the ALPHA variable in the fragment shader to 0.25.

    ALPHA = 0.25;
    
  • giannis996giannis996 Posts: 41Member

    @SIsilicon28 said:
    I'm assuming you are working with a shader, so all you have to do is just set the ALPHA variable in the fragment shader to 0.25.

    ALPHA = 0.25;
    

    I'm working with spatial material
    I can't find alpha variable there.

    Do you know how to do that on spatial material?

    Thanks!

  • SIsilicon28SIsilicon28 Posts: 693Moderator
    Accepted Answer

    Oh, well the albedo color has an alpha variable. Click on the parameter and use the alpha slider. Changing that won't be enough though. You also have to enable transparency with the transparent flag.

  • giannis996giannis996 Posts: 41Member

    @SIsilicon28 said:
    Oh, well the albedo color has an alpha variable. Click on the parameter and use the alpha slider. Changing that won't be enough though. You also have to enable transparency with the transparent flag.

    Yes that was is, thank you!

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.