I have two questions. I’ve seen this sample source code here: https://www.babylonjs-playground.com/#2Q4S2S#0
The problem is I have to work with the vertex. I need the following workflow, see pic1.
How to use multi / sub material from max? How to program/realize it? When I use this code:
Using the inspector, you may seen that your gltf exported mesh is divided into separate meshes during the import : one per material, and your object is handled as a TransformNode
So, if your mesh is named “wonderfullTeapot” in 3dsMax, and the material you want to replace “myGorgeousMtl”, you can detect the separate mesh like this, for example:
Can you post the gltf somewhere on github and create a repro of your code on the playground? That should work so I just want to be sure we do not have a bug:)
Before going further, is your mesh inside 3dsmax cleaned? (transform, scale, xform especially) And don’t forget to disable backfaceCulling too, so as to be sure your normals are OK.
I see your mesh is an editable mesh, I’m not sure if the exporter take it well into account, but I’m sure that Autodesk doesn’t update this since many, many years. Prefer using editable poly instead for your safety.
I tested collapse stack in 3ds max, also export from editable poly - not edit mesh…, also I tested only simple box for exporting but result is the same like you can see on the pictures up…
There was a little mess with a metal material var I think, but actually your last playground was working: your material was black because you’ve simply set it as nearly black