Animating Tube / LineSystem - Color / Thickness problem

I got a question about a tube animation along the path.

In this documentation, it says that the frontUVs is an array of Vector4.

https://doc.babylonjs.com/how_to/parametric_shapes#tube

But it turns out I can’t make this work with this.

It’s working fine if it’s a Vector4 but not an array of Vector4.

I was thinking I will have a texture wit color and I an show the colors by moving UVs on tube but its not working like expected in the documentation.

And also I cant update this by supplying a new set of UVs when I want to animate this.

My idea is to have the thick line animation and changing color along with the animation, but this is no working like LineSystem:

https://doc.babylonjs.com/how_to/parametric_shapes#line-system

And I’m missing functionality.

Or add thickens to the line but also keep color per segment (but not with rendering renderOutline that has only one color for the entire line) or add color control to tubes. Or maybe I’m missing here something.

Any solution will be good for me:

  1. Add thickness to LineSystem, but not with renderOutline. To keep control of segment color.
  2. How to change UVs on animation tube (so to make frontUVs array Vectr4 to work)

Let me summon the Tube Master @jerome

This is a mistake in the documentation, it is correct in the API

Will correct.

EDIT PR submitted

Thank you for spotting it.

Also the terms frontUVs and backUVs came from setting the uv ranges for the back and front of a plane, for a tube they really refer to the inside and outside of the tube. more info here

2 Likes

Probably because you did not make your tube updatable.

Here is a playground (PG) animating a texture along a tube https://www.babylonjs-playground.com/##P29XV6

Note updatable: true on line 25

4 Likes

Hi

I did set it to updatable but I was expecting to have animation option like LineMesh does. Im animating the shape of it no problem but I need to give part of it a different color and I’m searching for a easy and performance wise good option to do it.

I was not checking verticesData I will do it but if you have other option how to do it like for instance this is done in MeshLine where I just supply an array of Color3 for every segment of the line will be better.

Just like I asked in my thread. Do you have something like this ??

Sorry but I am not clear on what you want. Please post a playground showing how you achive this

together with a playground showing how far you have got with the linesSystem and exactly describe what you want to achieve with refetence to the lines in the system.

1 Like