Jump to content

How to hide a material/submesh completly


JonVarner
 Share

Recommended Posts

Hey all,

I am trying to get hide a material (PBR) using alpha=0. However, a problem arises with the reflections on the material still being present. I can of course set reflectivity to 0, but it seemed that there might be a better way to simply show/change visibility of a material/submesh?

Link to comment
Share on other sites

I am actually beginning to think that too. For the most part setting alpha to 0 seems to be removing most of the reflections. Here is a screen shot of what I am looking at. You have to look closely at the top of the image and you can see what looks like a "ghost" of the original material.

I am looping through all of the materials and setting:

shader.alpha = 0

 

example.jpg

Link to comment
Share on other sites

Ok so it does seem to be a bug of some sort. By setting alpha to 0 it seems that all of the properties are no longer present except environmentIntensity which remains present even if alpha is set to 0. In the end I just used:

shader.alpha = 0
shader.environmentIntensity = 0

 

Link to comment
Share on other sites

It is actually a feature ?

This is meant to simulate the reflection of the light on a windshield for instance or the tv by night on a window.

To disable it you can set useSpecularOverAlpha to false as well as useRadianceOverAlpha to false.

Else as you noticed, you could drop the environment intensity with the alpha if you need to fade smoothly.

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.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...