Change FBX texture or texture path


is there a way to change a single texture of a FBX with Threejs?

Change ‘texture1.png’ to ‘texture2.png’
Change texture1 path from ‘textures1/’ to ‘texture2/’


You can use LoadingManager.setURLModifier() for this.

sorry iam not realy good at coding :frowning_face:

I dont get it how does it work.


Something like this:

const loadingManager = new THREE.LoadingManager();
loadingManager.setURLModifier( function( url ) {

    // this function is called for each asset request

    if ( url === './texture1.png' ) {

        url = './texture2.png'


    return url;

} );

const loader = new THREE.FBXLoader( loadingManager );


now I have loaded a FBX with Texture and Animation. All fine.
But my next question is, can I attach a second FBX to the first one?
Like a Weapon or something?

See Linking two objects in Three.js

Please invest a little bit more effort in research before posting a new question. Attaching objects to another is a very basic operation in 3D.

iam very bad at this ;/

With help I figured out to add a object with object.children[0].add(object2).
Now I want to add the object2 at a bone like this:


But object2 is not shown :frowning:


now I have to Objects. FBX2 is added to FBX1 like “FBX1.add(FBX2)”.
Is there a way that the child follow the FBX1 animation?

I invested days to search the Internet but dont solved it :frowning:

This one might help:

Hello again,

after adding my FBX to AnimationObjectGroup its kind of “transparent”.
I can look into some parts. Is there a way to fix this?