# MeshBuilder Not Work With Custom Mesh On Ubuntu18 Tauri Webkit

**URL:** <https://forum.babylonjs.com/t/meshbuilder-not-work-with-custom-mesh-on-ubuntu18-tauri-webkit/47800>\
**Category:** Bugs\
**Created:** [February 4, 2024, 2:54am UTC](https://forum.babylonjs.com/t/meshbuilder-not-work-with-custom-mesh-on-ubuntu18-tauri-webkit/47800 "2024-02-04T02:54:24Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rocan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/rocan/32/36298_2.png) [@Rocan](https://forum.babylonjs.com/u/Rocan)\
**Post date:** [February 4, 2024, 2:54am UTC](https://forum.babylonjs.com/t/meshbuilder-not-work-with-custom-mesh-on-ubuntu18-tauri-webkit/47800/1 "2024-02-04T02:54:24Z")

</div>

On **Ubuntu18.04** and Tauri **webkit** framework, **PointCloudSystem** and **MeshBuilder** can not render at the same time. **PointCloudSystem only render in initialization frame,** but the mesh of MeshBuilder is rendered normally.  
The following is my useragent, babylonjs version is **6.41.0**  
`mozilla/5.0 (x11; ubuntu; linux x86_64) applewebkit/605.1.15 (khtml, like gecko) version/14.0 safari/605.1.15`  
I created a PG, but it cannot be reproduced.

> **[Babylon.js Playground](https://playground.babylonjs.com/#Y8KCUM%231)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

The following is the actual comparison between Webkit and Webgl.

 ![WX20240204-103431](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/2/6/263feeeb5a554342e3df086bcab0ee3114ca0a9c.png)

I even test on Ubuntu22.04, Macos and Windows. Everything is normal in Webkit/WebView2/Webgl under these system environments.

---

<div class="post-metadata">

**Author:** ![Rocan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/rocan/32/36298_2.png) [@Rocan](https://forum.babylonjs.com/u/Rocan)\
**Post date:** [February 4, 2024, 8:26am UTC](https://forum.babylonjs.com/t/meshbuilder-not-work-with-custom-mesh-on-ubuntu18-tauri-webkit/47800/2 "2024-02-04T08:26:00Z")

</div>

After some searching and trying, I can basically confirm that **pointcloud mode** cannot be supported in the target environment.

```auto
customMeshMaterial.pointsCloud = true; // not work
 // customMeshMaterial.fillMode = BABYLON.Material.PointFillMode; // not work
// customMeshMaterial.fillMode = BABYLON.Material.LineListDrawMode; // Work
// customMeshMaterial.fillMode = BABYLON.Material.TriangleFillMode; // Work

```

As a newbie, I’m not sure if this is a babylonjs bug or a webkit bug

As a compatible alternative, I must consider using **Solid Particle System** to complete point cloud display. Compared with manually implementing Custom Mesh, how is its performance?

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [February 4, 2024, 7:01pm UTC](https://forum.babylonjs.com/t/meshbuilder-not-work-with-custom-mesh-on-ubuntu18-tauri-webkit/47800/3 "2024-02-04T19:01:53Z")

</div>

It’s probably not a bug with Babylon.js, if other modes than “Point” work, and if it also works on other systems.

Using SPS is a good alternative, and you will get the same performance than doing it yourself with a custom mesh, as it’s basically what SPS does (it fills a vertex buffer for position, color, … and draws everything in a singled draw call).

---

<div class="post-metadata">

**Author:** ![Rocan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/rocan/32/36298_2.png) [@Rocan](https://forum.babylonjs.com/u/Rocan)\
**Post date:** [February 5, 2024, 2:18am UTC](https://forum.babylonjs.com/t/meshbuilder-not-work-with-custom-mesh-on-ubuntu18-tauri-webkit/47800/4 "2024-02-05T02:18:57Z")

</div>

My description may be a little misleading. If you **only use Point Mode** (such as PCS, Custom Material) and **do not use MeshBuilder** (such as ground, sphere), then the point cloud will be displayed and refreshed normally（Color is abnormal）.  
 ![WX20240205-101753](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/6/e/6e8a60fc56390ac2c2e6c0d6f7a80b36da0bf477.png)

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [February 5, 2024, 11:03am UTC](https://forum.babylonjs.com/t/meshbuilder-not-work-with-custom-mesh-on-ubuntu18-tauri-webkit/47800/5 "2024-02-05T11:03:33Z")

</div>

Could you setup a small repro in the Playground so that we are able to test it?

---

<div class="post-metadata">

**Author:** ![Rocan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/rocan/32/36298_2.png) [@Rocan](https://forum.babylonjs.com/u/Rocan)\
**Post date:** [February 6, 2024, 1:45am UTC](https://forum.babylonjs.com/t/meshbuilder-not-work-with-custom-mesh-on-ubuntu18-tauri-webkit/47800/6 "2024-02-06T01:45:16Z")

</div>

I can’t reproduce it in the Playground, You can see that this PG contains the same code, but it’s normal. **It basically only happens in Ubuntu18 native apps**

> **[Babylon.js Playground](https://playground.babylonjs.com/#Y8KCUM%231)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

I created a minimal project(use tauri + babylonjs).  
[tauri-babylonjs.zip](https://forum.babylonjs.com/uploads/short-url/AfgeN7iHLBLC9xwVrzAbRZoSc5W.zip) (214.1 KB)

If you have an Ubuntu18 system or virtual machine and installed **node16** and **yarn** , it can be easily reproduced. You only need to execute

```auto
yarn install
yarn tauri dev

```

Thank you very much for this

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [February 6, 2024, 9:36am UTC](https://forum.babylonjs.com/t/meshbuilder-not-work-with-custom-mesh-on-ubuntu18-tauri-webkit/47800/7 "2024-02-06T09:36:29Z")

</div>

Sorry, I don’t have such OS. Maybe others will be able to reproduce and help finding the problem, but it really looks like a bug of your system (maybe a driver problem?), unfortunately.

---

<div class="post-metadata">

**Author:** ![Rocan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/rocan/32/36298_2.png) [@Rocan](https://forum.babylonjs.com/u/Rocan)\
**Post date:** [February 6, 2024, 9:43am UTC](https://forum.babylonjs.com/t/meshbuilder-not-work-with-custom-mesh-on-ubuntu18-tauri-webkit/47800/8 "2024-02-06T09:43:36Z")

</div>

Thanks for the help, I’ll be using SPS as an alternative, hopefully someone in the future can identify the problem

---

<div class="post-metadata">

**Author:** ![Rocan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/rocan/32/36298_2.png) [@Rocan](https://forum.babylonjs.com/u/Rocan)\
**Post date:** [February 18, 2024, 6:25am UTC](https://forum.babylonjs.com/t/meshbuilder-not-work-with-custom-mesh-on-ubuntu18-tauri-webkit/47800/9 "2024-02-18T06:25:11Z")

</div>

After some efforts, I have no way to use SPS and customize the Shader at the same time  
For this I had to try to use Threejs for test, surprisingly it is almost no problem at all, the following is a screenshot of my test and the corresponding code

 ![1708236832555](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/c/2/c2a89e62e1134dbc4f760d85c77b41f0c5910d75.jpeg)

```auto
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Babylon Template</title>

    <style>
      body {
        overflow: hidden;
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
      }
    </style>
  </head>

  <body>
    <div id="canvas-holder">
      <canvas id="maincanvas" width="300" height="300"></canvas>
    </div>
    <button id="btnRepeat" style="position: absolute; margin: 5px;">Repeat</button>
    <script type="module">
      import * as THREE from "three";
      import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
      var scene = new THREE.Scene();
      var camera = new THREE.PerspectiveCamera(
        60,
        window.innerWidth / window.innerHeight,
        1,
        1000
      );
      camera.position.set(0, 8, 13);
      camera.lookAt(0, 5, 0);
      var renderer = new THREE.WebGL1Renderer({
        antialias: true,
      });
      renderer.setSize(window.innerWidth, window.innerHeight);
      renderer.setClearColor(0x101010);
      document.body.appendChild(renderer.domElement);
      window.addEventListener("resize", onWindowResize, false);

      var controls = new OrbitControls(camera, renderer.domElement);

      scene.add(new THREE.GridHelper(10, 10));

      var rMin = 5;
      var rMax = 15;
      var hMin = 0;
      var hMax = 5;

      var centerH = 6;

      var delayMax = 1; // seconds
      var colors = [0xd50f30, 0x039bdc, 0xfc5411, 0x1a2683, 0xfbe23d, 0x12923b];
      var c = new THREE.Color();
      var MAX_POINTS = 5000;
      var pointsCount = 0;
      var points = []; //3

      var delay = []; //1
      var color = []; //3
      var turns = []; //1
      var turnsMin = 5;
      var turnsMax = 10;
      var angle = [];
      while (pointsCount < MAX_POINTS) {
        let a = THREE.MathUtils.randFloat(0, Math.PI * 2);
        let vec = new THREE.Vector3().setFromCylindricalCoords(
          THREE.MathUtils.randFloat(rMin, rMax),
          a,
          THREE.MathUtils.randFloat(hMin, hMax)
        );

        points.push(vec);

        delay.push(THREE.MathUtils.randFloat(-delayMax, 0));

        c.set(colors[THREE.MathUtils.randInt(0, colors.length - 1)]);
        color.push(c.r, c.g, c.b);

        angle.push(a);

        turns.push(THREE.MathUtils.randFloat(turnsMin, turnsMax));

        pointsCount++;
      }

      var pointsTornadoGeom = new THREE.BufferGeometry().setFromPoints(points);
      pointsTornadoGeom.setAttribute(
        "color",
        new THREE.BufferAttribute(new Float32Array(color), 3)
      );
      pointsTornadoGeom.setAttribute(
        "delay",
        new THREE.BufferAttribute(new Float32Array(delay), 1)
      );
      pointsTornadoGeom.setAttribute(
        "angle",
        new THREE.BufferAttribute(new Float32Array(angle), 1)
      );
      pointsTornadoGeom.setAttribute(
        "turns",
        new THREE.BufferAttribute(new Float32Array(turns), 1)
      );

      var pointsTornadoMat = new THREE.PointsMaterial({
        vertexColors: THREE.VertexColors,
        size: 0.2,
        map: new THREE.TextureLoader().load(
          "https://threejs.org/examples/textures/sprites/ball.png",
          (tex) => {
            tex.center.setScalar(0.5);
            tex.rotation = -Math.PI * 0.5;
          }
        ),
        alphaTest: 0.5,
      });

      var uniformsTornado = {
        time: { value: 0 },
        centerH: { value: centerH },
        duration: { value: 10 - delayMax }, // seconds
        turnsMax: { value: turnsMax },
      };

      pointsTornadoMat.onBeforeCompile = (shader) => {
        shader.uniforms.time = uniformsTornado.time;
        shader.uniforms.centerH = uniformsTornado.centerH;
        shader.uniforms.duration = uniformsTornado.duration;
        shader.uniforms.turnsMax = uniformsTornado.turnsMax;

        shader.vertexShader =
          `
    uniform float time;
    uniform float centerH;
    uniform float duration;
    uniform float turnsMax;
    
    attribute float delay;
    attribute float angle;
    attribute float turns;

    varying float vRatio;
` + shader.vertexShader;

        shader.vertexShader = shader.vertexShader.replace(
          `#include <begin_vertex>`,
          `#include <begin_vertex>
    
    float t = time + delay;
    t = t < 0. ? 0. : t;

    float tRatio = 0.;
    tRatio = clamp( (t * (turnsMax / turns)) / duration, 0., 1.);
    vRatio = step(0.01, tRatio) - step(0.999, tRatio);
    
    float durationA = PI * 2. * turns * tRatio;;
    float A = angle + durationA;    

    transformed.x = cos(A);
    transformed.z = sin(-A);
    
    float l = length(position.xz);
    transformed.xz *= l * mix(1., 0., tRatio);

    transformed.y = mix(position.y, centerH, tRatio);
   
`
        );

        shader.vertexShader = shader.vertexShader.replace(
          `gl_PointSize = size;`,
          `gl_PointSize = size * smoothstep(0.01, 0.1, tRatio);`
        );

        shader.fragmentShader =
          `
    varying float vRatio;
` + shader.fragmentShader;
        shader.fragmentShader = shader.fragmentShader.replace(
          `#include <clipping_planes_fragment>`,
          `
    if (floor(vRatio + 0.5) < 1.) discard;
    #include <clipping_planes_fragment>`
        );
      };

      var pointsTornado = new THREE.Points(pointsTornadoGeom, pointsTornadoMat);
      scene.add(pointsTornado);

      var clock = new THREE.Clock();
      var t = 0;

      btnRepeat.addEventListener(
        "click",
        (event) => {
          t = 0;
        },
        false
      );

      renderer.setAnimationLoop(() => {
        t += clock.getDelta();
        uniformsTornado.time.value = t;
        renderer.render(scene, camera);
      });

      function onWindowResize() {
        var width = window.innerWidth;
        var height = window.innerHeight;
        camera.aspect = width / height;
        camera.updateProjectionMatrix();
        renderer.setSize(width, height);
      }
    </script>
  </body>
</html>

```

So maybe it’s not a system/driver issue? Do you think I have to use Threejs because of this problem?

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [February 19, 2024, 9:49am UTC](https://forum.babylonjs.com/t/meshbuilder-not-work-with-custom-mesh-on-ubuntu18-tauri-webkit/47800/10 "2024-02-19T09:49:38Z")

</div>

I think Threejs doesn’t use uniform buffers, so maybe that’s the problem.

You could try disabling the use of uniform buffers in Babylon.js by doing `engine.disableUniformBuffers = true;` right at the start of your program and see if that helps.

---

<div class="post-metadata">

**Author:** ![Rocan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/rocan/32/36298_2.png) [@Rocan](https://forum.babylonjs.com/u/Rocan)\
**Post date:** [February 19, 2024, 1:48pm UTC](https://forum.babylonjs.com/t/meshbuilder-not-work-with-custom-mesh-on-ubuntu18-tauri-webkit/47800/11 "2024-02-19T13:48:02Z")

</div>

Tried your code, unfortunately still not right

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [February 19, 2024, 5:25pm UTC](https://forum.babylonjs.com/t/meshbuilder-not-work-with-custom-mesh-on-ubuntu18-tauri-webkit/47800/12 "2024-02-19T17:25:49Z")

</div>

I can see you use a WebGL1 renderer in Threejs. Can you try the same in Babylon.js, by doing something like `const engine = new BABYLON.Engine(canvas, true, { disableWebGL2Support: true });` to create the engine?

---

<div class="post-metadata">

**Author:** ![Rocan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/rocan/32/36298_2.png) [@Rocan](https://forum.babylonjs.com/u/Rocan)\
**Post date:** [February 20, 2024, 2:08am UTC](https://forum.babylonjs.com/t/meshbuilder-not-work-with-custom-mesh-on-ubuntu18-tauri-webkit/47800/13 "2024-02-20T02:08:29Z")

</div>

Still not working, so frustrating 😮‍💨  
I did some searches and found similar issues related to threejs,

> <https://github.com/tauri-apps/tauri/issues/6559>
>
> \### Describe the bug
> 
> When I try to implement three.js scenes into my tuari ap…p it doesn't work at all in the app window, but it works when I open the app in the browser directly.
> 
> My console of the desktop app is spammed with \`WebGL: context lost\` and my CPU usage skyrockets
> !\[image\](https://user-images.githubusercontent.com/32067841/227728231-eeb5bc10-5fce-4949-ba82-29c7caf781f0.png)
> 
> 
> \### Reproduction
> 
> 1. Clone ~~https://\<i\>\</i\>github.com/AsgrimS/dice-nexus~~ -\> https://github.com/AsgrimS/tauri-webgl
> 2. \`pnpm install\`
> 3. \`pnpm tauri dev\`
> 
> \### Expected behavior
> 
> Working WebGL render in both browser and desktop app
> 
> !\[image\](https://user-images.githubusercontent.com/32067841/227728587-14bbb98c-0b83-41d8-9d2a-1d5a7b120e71.png)
> 
> 
> \### Platform and versions
> 
> \`\`\`text
> Environment
> › OS: Arch Linux Unknown X64
> › Node.js: 18.12.1
> › npm: 8.19.2
> › pnpm: 7.30.3
> › yarn: 3.3.1
> › rustup: 1.25.2
> › rustc: 1.67.1
> › cargo: 1.67.1
> › Rust toolchain: stable-x86\_64-unknown-linux-gnu
> \`\`\`
> 
> 
> \### Stack trace
> 
> \_No response\_
> 
> \### Additional context
> 
> \_No response\_

but for ubuntu18.04, I checked the following version, which can use threejs normally.

```auto
demo@ubuntu:~/Downloads/tauri-babylonjs$ dpkg -l|grep libwebkit2gtk
ii libwebkit2gtk-4.0-37:amd64 2.32.4-0ubuntu0.18.04.1 amd64 Web content engine library for GTK+
ii libwebkit2gtk-4.0-dev:amd64 2.32.4-0ubuntu0.18.04.1 amd64 Web content engine library for GTK+ - development files

```

---

<div class="post-metadata">

**Author:** ![Rocan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/rocan/32/36298_2.png) [@Rocan](https://forum.babylonjs.com/u/Rocan)\
**Post date:** [February 20, 2024, 5:41am UTC](https://forum.babylonjs.com/t/meshbuilder-not-work-with-custom-mesh-on-ubuntu18-tauri-webkit/47800/14 "2024-02-20T05:41:19Z")

</div>

For comparison, I wrote similar code using threejs and it works fine under ubuntu18.04. Both Sphere and PointCloud render normal.

 ![截屏2024-02-20 13.42.08](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/8/8/88494cddfe0b17e6eec6df1acffe40f606929c50.jpeg)

```auto
import * as THREE from 'three'
import { OrbitControls } from 'three/addons/controls/OrbitControls.js'
import Stats from 'three/addons/libs/stats.module.js'
let scene: THREE.Scene

function generate_points() {
  const points = []
  for (let i = 0; i < 10000; i++) {
    const x = THREE.MathUtils.randFloatSpread(10)
    const y = THREE.MathUtils.randFloatSpread(10)
    const z = THREE.MathUtils.randFloatSpread(10)

    points.push(x, y, z)
  }
  return points
}

function test_point_cloud() {
  const vertices = generate_points()

  const geometry = new THREE.BufferGeometry()
  geometry.setAttribute('position', new THREE.Float32BufferAttribute(vertices, 3))
  const colorAttribute = new THREE.Uint8BufferAttribute(vertices, 3)
  colorAttribute.normalized = true // this will map the buffer values to 0.0f - +1.0f in the shader
  geometry.setAttribute('color', colorAttribute)

  const material = new THREE.RawShaderMaterial({
    uniforms: {
      time: { value: 1.0 }
    },
    vertexShader: `
                    precision mediump float;
                    precision mediump int;

                    uniform mat4 modelViewMatrix; // optional
                    uniform mat4 projectionMatrix; // optional

                    attribute vec3 position;
                    attribute vec3 color;

                    varying vec3 vPosition;
                    varying vec4 vColor;

                    void main()	{
                        gl_PointSize = 2.0;
                        vPosition = position;
                        vColor = vec4(color, 1.0 );

                        gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );

                    }`,
    fragmentShader: `
                    precision mediump float;
                    precision mediump int;

                    uniform float time;

                    varying vec3 vPosition;
                    varying vec4 vColor;

                    void main()	{

                        vec4 color = vec4( vColor );
                        color.r += sin( vPosition.x * 10.0 + time ) * 0.5;

                        gl_FragColor = color;

                    }`,
    side: THREE.DoubleSide,
    transparent: true
  })

  const mesh = new THREE.Points(geometry, material)
  scene.add(mesh)

  setInterval(() => {
    const vertices = generate_points()
    geometry.setAttribute('position', new THREE.Float32BufferAttribute(vertices, 3))
    geometry.attributes.position.needsUpdate = true
  }, 100)
}

export function init_scene(canvas: any) {
  scene = new THREE.Scene()
  const camera = new THREE.PerspectiveCamera(
    60,
    canvas.clientWidth / canvas.clientHeight,
    0.01,
    10000
  )
  camera.position.set(0, 8, 13)
  camera.lookAt(0, 5, 0)
  const renderer = new THREE.WebGL1Renderer({
    canvas: canvas,
    antialias: true
  })

  const stats = new Stats()
  document.body.appendChild(stats.dom)
  renderer.setClearColor(0x101010)
  window.addEventListener('resize', onWindowResize)
  renderer.setSize(canvas.clientWidth, canvas.clientHeight)

  const controls = new OrbitControls(camera, renderer.domElement)

  scene.add(new THREE.GridHelper(10, 10))

  const geometry = new THREE.SphereGeometry(1.5, 32, 16)
  const material = new THREE.MeshBasicMaterial()
  const sphere = new THREE.Mesh(geometry, material)
  scene.add(sphere)

  test_point_cloud()

  renderer.setAnimationLoop(() => {
    stats.update()
    renderer.render(scene, camera)
  })

  function onWindowResize() {
    camera.aspect = canvas.clientWidth / canvas.clientHeight
    camera.updateProjectionMatrix()
    renderer.setSize(canvas.clientWidth, canvas.clientHeight)
  }
}

```

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [February 20, 2024, 3:24pm UTC](https://forum.babylonjs.com/t/meshbuilder-not-work-with-custom-mesh-on-ubuntu18-tauri-webkit/47800/15 "2024-02-20T15:24:05Z")

</div>

Unfortunately, I don’t have Ubuntu 18.04, so I’m a bit lost.

cc @sebavan in case he has any ideas.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [February 20, 2024, 8:43pm UTC](https://forum.babylonjs.com/t/meshbuilder-not-work-with-custom-mesh-on-ubuntu18-tauri-webkit/47800/16 "2024-02-20T20:43:44Z")

</div>

Could you share both samples in jsfiddle for instance or wherever we can use them online in order to ensure the setup is identical ?

---

<div class="post-metadata">

**Author:** ![Rocan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/rocan/32/36298_2.png) [@Rocan](https://forum.babylonjs.com/u/Rocan)\
**Post date:** [February 21, 2024, 7:28am UTC](https://forum.babylonjs.com/t/meshbuilder-not-work-with-custom-mesh-on-ubuntu18-tauri-webkit/47800/17 "2024-02-21T07:28:10Z")

</div>

As I mentioned before, this is a problem that only occurs under ubuntu18.04 webkitgtk. It is completely normal in the browser, and even firefox of ubuntu18.04 is completely normal.  
I can’t reproduce the problem in a browser environment, sorry about that  
If you are interested in using a virtual machine to install the ubuntu18.04 system, I think this problem will be easy to reproduce.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [February 21, 2024, 9:37pm UTC](https://forum.babylonjs.com/t/meshbuilder-not-work-with-custom-mesh-on-ubuntu18-tauri-webkit/47800/18 "2024-02-21T21:37:08Z")

</div>

It would still be great to have both the broken PG and your threejs example so we can figure which webgl feature might be the cause.

cc @Cedric who might have a linux VM to try out ?

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [February 22, 2024, 10:02am UTC](https://forum.babylonjs.com/t/meshbuilder-not-work-with-custom-mesh-on-ubuntu18-tauri-webkit/47800/19 "2024-02-22T10:02:55Z")

</div>

Unfortunately, I don’t have a linux box atm. Moreover, I try to keep up with versions so I don’t think I had older than 20.04.

---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [February 24, 2024, 12:33am UTC](https://forum.babylonjs.com/t/meshbuilder-not-work-with-custom-mesh-on-ubuntu18-tauri-webkit/47800/20 "2024-02-24T00:33:42Z")

</div>

I got it running using [WSL + GUI](https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps) using Ubuntu 18.04.6 LTS. The instructions are pretty thin. I had to figure out how to install a bunch of dependencies before it built. For future reference: [Getting Tauri working in WSL (penner.me)](https://penner.me/getting-tauri-working-in-wsl) and [Prerequisites | Tauri Apps](https://tauri.app/v1/guides/getting-started/prerequisites/#setting-up-linux).

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/b/5/b50fe5996730dab93dbebe33d625a6253cf26543.png)

Someone tell me what I need to debug.

[Next page](https://forum.babylonjs.com/t/meshbuilder-not-work-with-custom-mesh-on-ubuntu18-tauri-webkit/47800.md?page=2)
