Search code examples
3dsmaxfbx

Exporting a FBX file with only one map texture


I'm completely new to 3D modelling and 3ds max, so I will be trying to make as much sense as possible.

I am currently trying to export a FBX file from a 3ds project. The scene simply consists of one object, which originally consisted of two objects that I attached together:

https://i.gyazo.com/b1507aeeb46328a8183a8cc2bb6eda2d.png

Everything seems to be fine so far. However, the FBX file I export comes with two textures; one for the trunk and one for the leaves:

https://gyazo.com/ba05e4fc427fa0dda7cdf1846156b579.png

The problem here is that I am trying to import this FBX file on a platform that only accepts ONE texture, so the issue is that the first texture it finds will be used on the whole model. In my case, the leaves texture is used everywhere including the trunk (ignore the black color behind the texture on each polygon):

https://gyazo.com/89630f90d801954845f6522d7ba237c7.png

https://gyazo.com/1e5e9441e43811851068a06543720141.png

Is it possible to combine these two textures together so the platform detects them as one and applies the trunk AND the leaves texture to the right area?

Hopefully I'm being clear, thank you in advance!


Solution

  • You can do this manually by editing the textures image together into one wider image, and then editing the UVs so the "trunk" geometry of the final object uses the "trunk" part of the texture, and the "leaves" geometry uses the "leaves" part.

    Here's a mini walkthrough,

    • In Photoshop, open both images, and combine them into a single wider image, trunk on the left and leaves on the right. You'll have to decide whether to resize the result, to a power-of-two for example.
    • In 3ds Max, start the following steps before combining the objects (operation is possible after combining, but a little more complicated). Open the material editor, and reassign all references to the old image (probably via Bitmap Texture) to the new image.
    • Apply a Unwrap UVW modifier on both the truck and the leaves object. With the trunk object selected, open the Edit UVW window, go into Vertex sub-object mode (see buttons on the lower-left of the editor). Horizontally scale the and move vertices so they fit into the left part of the image matching the trunk. You can set the texture as the window background using the dropdown in the upper-left. You'll have to carefully align the verts, but you should be able to move and scale them all at once, and should not have to move individual vertices. Repeat this for the leaves object, moving and scaling the verts to right cover the part of the image matching the leaves.
    • Make sure the final object uses a single material, and does not use a Multi-Subobject material. Multi-Sub is used when you have multiple textures per object, typical in many games.
    • Check that everything looks right in the viewport, and combine the trunk and leaves together. It should now export as expected.

    There might be a script or tool to perform all this automatically, you could check on ScriptSpot.com.