Big Mesh Combine !

Hi~
when I want to render industry model in babylonjs, I have some troubles:

  1. thousands of models.
  2. thousands of materials.

Usually, we collect similar material to decrease number of materials, we combine mesh with same material. In this way, we can’t move model and can not change material parameters.
I create a new mesh combine tool to combine the industry model:

  1. Model can be moved
  2. Model meshColor
  3. Model visible
  4. Material can be changed (only value type, can’t change texture)

3 Likes

You can test it in GitHub - Moriyer/BabylonjsDemo at master
Some trouble with my network, I can’t push code to github, newest version will push as soon as my network fixed.

Hi! Sorry to dissapoint you, babylon.js has something similar already avaliable:

Solid Particle System

Oh thank you!
These boxes spheres are only to simulate huge number of models which are different from each other, it just for testing.

Like an engine, it has thousands of different parts

Didn’t find the exact place where the mesh created yet, but in shader code I found a uv4 used as some sort of pre-vertex simulation of gl_DrawID. Might worth a try when WEBGL_multi_draw is available, or wait for more powerful and performant MDI in next few years (might be quite a few)

Combining meshes is a huge work, which is often make web crashed with weakness computer. My plan is combine mesh and export fixed glb file in a headless-web service, and only load and preview fixed model in user web-chrome. Because of I don’t sure could glb exporter export custom attributes, I use uv4 to store meshID and materialID. It just has a try to make old and weakness computer to preview large models.:wink:

1 Like