X-Ray effect over a texture

Hi, I want to achieve some kind of a x-ray effect on a model. The idea is to have two textures on a model and circle cursor (with some radius) which will make first texture transparent when it’s over a certain area of a model. I found a great example of it here: Making Gooey Image Hover Effects with Three.js | Codrops, however I have another thing to handle. I also want to “reveal” some parts of a model on click (using raycasting I suppose).

I was thinking that I can use alphaMap but as far as I know it can be applied only to a whole mesh and there’s no way to move it with mouse coordinates.

It would be great if you guys can suggest some ideas on how I can achieve it. Many thanks!

Hi!
Recently, I’ve made an example with kind of X-Ray. Maybe it will be helpful for you somehow:

Picture:

Example:

10 Likes

Hi! Thanks for sharing this great example, looks like almost exactly what I needed.

Does this need anything special to work on a skinned mesh ? Can’t seem to get it to work correctly…would greatly appreciate the help if you have the time