Change color of a portion of mesh

I have an elliptical mesh where i want to animate a revolving light animation.(Something like an Amazon echo led ring light).

For this animation i wanted to put frames where only partial mesh color is changed.
However not able to find a way to set material/color just to partial mesh.

Is there a way I can achieve this circulating led animation?

Something like this https://i0.wp.com/www.alphr.com/wp-content/uploads/2019/05/GUID-DF4C2188-D267-45FB-91E9-F9FEA112DF7C_en-US.gif?ssl=1

@PatrickRyan is the king for this :slight_smile:

@nitin, do you mean like this:

Babylon.js Product Page Demo (babylonjs.com)

Scroll down to the animating Material Parameters portion to see the effect. Basically, this is an emissive texture that I am animating the UVs on. This is the easiest way to accomplish this and it only takes some thoughtful setup in UV space for the mesh. You can use a very simple texture and just animate it how you like for the motion.

To see how I did it, you can take a look at the source which has the js and all the mesh assets and textures.

However, if you want it to be on a flat surface, you could also do a custom shader to animate the ring. Here is one example of animating graphics on a quad built only in a node material You can certainly apply this method to creating a colored ring like your example starting with that node material. Hope this helps.

4 Likes

All hail the King aka @PatrickRyan. Thanks a ton.

1 Like