Transparent CreateGreasedLine

Hello everyone, it seems that CreateGreasedLine cannot work with Color4. How can I change the color white to transparent?

1 Like

You don’t need to set vertex colors, the opacity texture does the job:

1 Like

Some more “similar” examples:
Loading/Timer circular UI - #7 by Reza_B - scroll down for more

1 Like

Is it possible to do the same with my example?

If I do the same with yor example it becomes my example so it’s not anymore your example :smiley: And actually your example is my example… I’m the author of that PG :smiley: Making a bit of fun here…

Ok, so what exactly would like me to do?

1 Like

It’s much more perfomant to rotate the mesh then to update the color buffers. If the OP wants this effect, you solution is a good one.

One more solution is to create an RGBA texture and set it as the diffuseTexture, set hasAlpha on the materIal.

Let’s wsit for the OP.

2 Likes

This is really what I need, thank you very much and all those who responded to my problem

3 Likes

Last thingL You can make this even more performant by creating just an arc instead of a circle and go with less segments:

const points1 = BABYLON.GreasedLineTools.GetCircleLinePoints(2, 40, 0, 2, Math.PI * 2 / 100)

You can the nomit the visibility: 0.25 setting when creating the line mesh.

This results into much fewer vertices.

Is it possible to make the oval not rotate? and only the transparent side moved

yesssseessseee, thanks:)

1 Like

Last question) how to make one of the edges clear?

1 Like

Thank you very much, now I understand how it works

2 Likes