Page MenuHome

Restore Autodesk 3DS format Import/Export for Blender 2.80
Open, NormalPublic

Description

I have legacy 3DS content I needed to import in Blender 2.80, so tried to restore the addon. Patch:

Tested it on ~200 items in my database. Didn't crash.

Notes:

  • Now creates Principled Shader based materials for Cycles/Eevee

Regressions (compared to 2.79 addon)

  • Export does not work / is not registered
  • 3DS texture mirror does not work

Questions:

  • The old addon assigned the texture/image to MeshUVLoops (I guess so that the image shows up in the UV editor). This was removed in Blender 2.80. Is there some alternative or are textures simple not applied to faces directly anymore?
  • 3DS materials has ambient color term. How should we consider it? Maybe adding it to the diffuse color in linear space?
  • 3DS materials has specular color term. How should we consider it? Maybe using its value for principled's specular input?

Maybe I'll find time to fix. the export as well, but that's not high on my priorities right now.

Details

Type
Patch

Event Timeline

Here you'll find two demo 3DS file. Suzanne, with and without texture:

Brendon Murphy (meta-androcto) lowered the priority of this task from Needs Triage by Developer to Normal.Jul 5 2019, 11:21 AM

Will try and look at this soon.

hi, committed initial fix to contrib. I tested this on your files and my own test files from varied sources.
One main issue I found was the images were not loaded unless the file was in the images folder. Maybe my error, but I think I'm right there.
@andreas atteneder (atti) are you willing to maintain this addon?
I made some minor changes to your patch, when committing, please check out the contrib version before any updates.
The code is looking quite a disaster, I understand that this is an initial "get it working" update and it's still very appreciated.
I would be happy enough if the import code was cleaned up and it worked as expected, mesh/textures. We could add that back to release and either abandon the export or work on at a later date.
Please let me know what you would like to do.

@Brendon Murphy (meta-androcto) I'd be willing to maintain it, but cannot promise to invest a lot of time to clean it up beyond fixes.
sorry for the late response. atm I'm on vacation and will be for another week.

hi @andreas atteneder (atti), This sounds ok, clean up is not highest priority. The commented out code may give other coders hints at what's missing/changed and maybe some help. As above the primary concern is not finding the image files unless the .3ds is in the same folder as the textures. Let me know how thing go. Thanks.

Hi @Brendon Murphy (meta-androcto)
I'd like to fix the image folder problem next week. Can you point me to a demo 3ds file for it?
thanks

Hi!

I tried to create test files with the Blender 2.79 3DS exporter. One with the texture in the same folder, one with the texture in a subfolder. To my surprise, the 3DS files were identical to the last byte and didn't include a (relative) path, but just the texture file's name. This way I could reproduce the behaviour, that the texture in a subfolder is not found.

I then enabled recursive image search, which solves the issue. Here's the minimum patch that enables recursive image search.

hth,
atti

Thanks I'll check it out and commit soon.

I was told to mention T50620, which is a long-standing bug report about incorrect transformations in the 3DS importer. I have posted a patch there which makes things a lot better, at least for me.

@Lawrence D'Oliveiro (ldo) thanks, I'll take a look, there's not much going on with .3ds, It's mostly unmaintained apart from @andreas atteneder (atti)'s interest. I'm happy to add fixes to keep it working whilst it's in contrib. I've been testing it with some nasa models which is fun. I'll test your transform patch with a few files from different sources. It may be another week or so before I get to this.
Keep in mind that over the many years I've used sites like archive3d for models, there was always issues with some files.
at one stage I was testing Blender against a couple of other programs to test the .3ds. some files failed either way, some were better in blender, some were better in other programs. *reading your linked task
If your bool can give us better results it's a good think I think.

I guess this is why we need various options, like the one I added, to cope with the quirks of files from different sources. If an import looks wrong done one way, try it again a different way. ;)

By the way, if anybody wants to do bulk testing of importers, perhaps this script of mine can be a useful starting point.