Modify model after loading the model

Can I make changes to some parts of the model after loading the model with fbxloader?
For example, after loading the model, modify the face data of the model.

Yes, loaded meshes have a geometry property of Geometry / BufferGeometry type. You should be able to modify the faces / attributes there.

Models usually consist of multiple submeshes, to access geometry of each of those you can use the traverse method.

But the number of positions of the model exported by Maya is different from the number of the same model loading by three.js.

What do you mean by positions?

Also - the details / size / structure of the model may heavily depend on the exporter and model format used.


I want to change this part of data.

It’s not uncommon that the vertex count, or vertex order, in your modeling tool will be slightly different than in a file it exports. If you somehow know that you want to modify the 500th vertex dynamically, you’d need to either (a) be very careful about how you’re exporting it, or (b) mark that vertex (with UVs or vertex colors) so that you can find it again in the exported data.

Note that three.js is not a modeling program, so complex artistic tasks are better done in tools like Blender and Maya. Changes to raw vertex data in three.js are usually coded as low-level mathematical operations in JavaScript or GLSL. Depending on the type of changes you want to make, that may not be what you want.

2 Likes