Opacity or lighting effects on png's with transparency

So I have a map with some icons that are square png’s that have transparency around whatever their shape is. I’m trying to make it so that on hover (and other activation states) that the ones not of interest are grayed out in some manner. What would be the best way to do this?

I’ve tried having the visibility of the mesh changes, but this also affects the parts that are initially transparent and turns them gray. I also tried excluding some of the meshes from the light that is illuminating the diffuseTextures, but this appears to not be reversible (it works for removing them from the light, but they cant be unremoved by just removing them from the excludedMeshes array of the light it appears). It does however appear that having just the ones you want to illuminate in the includedOnlyMeshes array does work as I expected.

I imagine theres a way I can do what I want with having 2 lights and modulating their intensities and using the includeOnlyMeshes so that I can get the desired effect with transition, but I figured I would check to see if I’m misunderstanding how something works or just not seeing a better solution to the problem.

Hi Floppykittenear,

I think the GUI button has the ability to switch between two textures (for example, a hover and un-hover), but I might be misunderstanding your use case since I’m not quite sure how the lights fit in. Do you have a Playground the demonstrates your use case?

I would simply change the ambient color of the material. And this can be easily done with a single material applied to many meshes. You might also consider a second material which is applied to the target mesh at the time they are of interest; and then change the material when they are not of interest. Either way, I expect you’ll use the ambient color.

Galen

From what I’ve seen (maybe I’ve been doing it wrong), you can only use the alpha from an image if it is set to a diffuse type texture. However, your suggestion of changing the color of the material (in this case diffuse color) did have the desired effect. Thanks for the help!