Convert 3ds files to obj with Blender


3DS is an aging binary interchange format for 3D models. OBJ is another aging, but ASCII-based format for 3D models.

Here is a simple Python script that converts one or more files from 3DS format to OBJ format using Blender:

# Convert 3ds to obj using Blender
# Run as follows:
#   blender -b dummy.blend -P -- file.3ds ...
# dummy.blend is just an empty Blender file needed as an argument.
# Put one or more .3ds files on the end of the command.
# The .obj files will be created with the same name (and path) as
# the .3ds file, but with the .obj extension.
# The export creates a .mtl file for each .obj file also.

import bpy
import sys
import os.path

for i in range(1, len(sys.argv)):
    if sys.argv[i] == "--":

for file in sys.argv[i+1:]:
    # Start with an empty scene

    # Read a .3ds file

    # Write a .obj file
    outfile = os.path.splitext(file)[0]+".obj"


Save the script code in a file named  You will also need a Blender file to use as a placeholder in the command line.  You can save an empty file from Blender, or use an existing one.  Assume it is called dummy.blend.

To convert 3DS files, use the following command:

blender -b dummy.blend -P -- file1.3ds file2.3ds file3.3ds

Tack on as many 3DS files to the end of the command as you want.

Note:  This assumes that dummy.blend and are in the same folder as your 3DS files.  If not, you will need to specify the proper path to each.

Tags: , , , , ,

2 Responses to “Convert 3ds files to obj with Blender”

  1. Kyrylo Says:

    Thank you, it works fine, but it doesn’t export textures paths to mtl file, only materials. Dow you know some fix?

  2. ellery Says:

    Probably Blender can’t find the texture map file when it is exporting the obj file, so it leaves the texture out of the material. One solution is to add the texture map to the mtl file simply by adding a line like this to the material description (at the end of the mtl file):

    map_Kd path/to/texmap/tmap.jpg

    The better solution is to make sure the texture maps have short filenames and reside in the same folder as the 3ds files. The Blender obj exporter will export the texture map if it is present (in the same folder as the 3ds file), and it has a short filename. What is short? 3ds texture names are limited to the old Windows 8.3 format. There are only 12 bytes to store the texture name, which doesn’t leave room for a long filename or a directory path.

    If the texture map is exported successfully, the mtl file should contain a map_Kd line.

Leave a Reply