GreasedLine Disabing LookAt

Hello!

It seems it can work. I’ve used a Ribbon to draw the mesh and applied a modified version of the GreasedLinePluginMaterial. The values are hardcoded for the given mesh for now.

        const myPoints = [
            new BABYLON.Vector3(.1, -6, 0),
            new BABYLON.Vector3(.1, 6, 0),
        ]

        const myPoints1 = [
            new BABYLON.Vector3(.1, -6, 1),
            new BABYLON.Vector3(.1, 6, 1),
        ]

        const mesh = BABYLON.MeshBuilder.CreateRibbon(
            "mesh",
            {
                pathArray: [myPoints, myPoints1],
                sideOrientation: BABYLON.Mesh.DOUBLESIDE
            }
        );

        const material = new BABYLON.StandardMaterial("", scene);
        const greasedLineMaterial = new GreasedLinePluginMaterial(material, scene, initialMaterialOptions);

        mesh.material = material

Flat ribbon - simulates a non camera facing line - with animated dashing:

The same with a color table:

Mushroom like ribbon with animated dashing:

@sebavan @Evgeni_Popov @Deltakosh
Guys, is it worth to create an universal wrapper class which can be used theoretically with any mesh (or maybe just for the Ribbon) and which will use the GRL Plugin material’s modified shaders so you can have dashing, colors, visiblity %, etc? Thanks!

1 Like