Jump to content

Fixing the MD3 Exporter for 3ds max (Bug Fixes & Unicode Conversion)


Recommended Posts

Posted

I've just tried out the 2.2 exporter on a skull map object for Circa's Haloween map.

First I applied the texture with a standard material:
075c7ccfdea2ea650a77926bf565ca68.png

 

To make sure, I also named the material as models/map_objects/lastnight/skull.png
I exported to the same folder, so, models/map_objects/lastnight/

3bb50026f8a7d935a935c10432209284.png - I very much like the look of this now :D I'll be testing the LODs soon.

Statistics:
cfc0a04f2636985e4b0e67c0ce7ab2b1.png

Everything seems to be in order, the texture later shows in md3view!
000c3564bbae51eeeb5c0e0c4407d9d6.png

Regarding those problems of mine with shaders not working, I've set my system's language to english by default and restarted; testing out now.

Smoo likes this
Posted

Update: Ok... with @@Rooxon's assistance I've found the problem causing shaders to not work correctly with 3dsMax exported MD3 files.

 

The problem is that files paths were written into the MD3 with "\" ( backslashes)... but the game requires "/" (forward slashes).

 

There currently exists a way to force forward slash usage-- which is, do not apply textures from the game folder but use a folder outside of that ..\models\ file path structure, and name the material slot with the proper relative path (using forward slashes). But I will fix the code so that it always uses forward slash regardless... so you can use whichever workflow you desire.

Rooxon and Tempust85 like this
Posted

Update: Ok... with @@Rooxon's assistance I've found the problem causing shaders to not work correctly with 3dsMax exported MD3 files.

 

The problem is that files paths were written into the MD3 with "\" ( backslashes)... but the game requires "/" (forward slashes).

 

There currently exists a way to force forward slash usage-- which is, do not apply textures from the game folder but use a folder outside of that ..\models\ file path structure, and name the material slot with the proper relative path (using forward slashes). But I will fix the code so that it always uses forward slash regardless... so you can use whichever workflow you desire.

You will make my life and so many others so much easier. When it's done, I'll update my saber tutorial and make it shorter thanks to that!

Posted

Well I had a hand in this as well, but not with the normals or LOD stuff. :P

 

Sure beats having to use Noesis. ;)

Absolutely you did! :winkthumb: I'm standing on yours, Pop-N-Fresh's, and Vortex's shoulders. I'm just your co-author in this endeavor. :winkthumb:

 

Without Pop-N-Fresh's original source code, Vortex's enhancements, and your bug fixes and Unicode conversion efforts... I doubt I would have undertaken these additional enhancements to your code base.

 

@@eezstreet was also helpful with some Snippets.

 

I plan to send you all the v2.2 source code when I'm finished.

Tempust85 likes this
Posted

Update:  Ok... so I have started the fix of replacing backslashes with forward slashes.  I have my method coded and updated it in the Max6-8 exporter code.  Everything looks good... forward slashes show up in the textures when you do a "View Loaded-Models Info" in MD3View and I also have it fixed in the stats dialog.  Now I just need to update all the other projects.

Posted

Should make sure it's in the XSI exporter as well. It took me ages to figure out that slash issue for myself. :P

Yeah, the XSI exporters purely use the material slot name-- so the artist has the ability to manually type forward slashes. I guess it couldn't hurt to have it check the material name in the XSI exporters.

Posted

Statistics of Death Saber Scythe LOD export:

D:\base\models\weapons2\dsscythe\saber_w.MD3:
    Frames:    1
    Tags:    4
    Meshes:    4
    Mesh< base_low >:  408 Triangles, 206 Vertexes ( +248 verts for EditNormals, +137 verts for UV map )
    Mesh< emitter1_low >:  430 Triangles, 217 Vertexes ( +300 verts for EditNormals, +47 verts for UV map )
    Mesh< emitter2_low >:  430 Triangles, 217 Vertexes ( +300 verts for EditNormals, +47 verts for UV map )
    Mesh< emitter3_low >:  430 Triangles, 217 Vertexes ( +300 verts for EditNormals, +47 verts for UV map )
    Geometry Total:  1698 Triangles, 2283 Vertexes

D:\base\models\weapons2\dsscythe\saber_w_1.MD3:
    Frames:    1
    Tags:    4
    Meshes:    4
    Mesh< emitter2_low_1 >:  430 Triangles, 217 Vertexes ( +300 verts for EditNormals, +47 verts for UV map )
    Mesh< emitter3_low_1 >:  430 Triangles, 217 Vertexes ( +300 verts for EditNormals, +47 verts for UV map )
    Mesh< emitter1_low_1 >:  430 Triangles, 217 Vertexes ( +300 verts for EditNormals, +47 verts for UV map )
    Mesh< base_low_1 >:  398 Triangles, 201 Vertexes ( +253 verts for EditNormals, +137 verts for UV map )
    Geometry Total:  1688 Triangles, 2283 Vertexes

D:\base\models\weapons2\dsscythe\saber_w_2.MD3:
    Frames:    1
    Tags:    4
    Meshes:    4
    Mesh< emitter3_low_2 >:  430 Triangles, 217 Vertexes ( +300 verts for EditNormals, +47 verts for UV map )
    Mesh< emitter2_low_2 >:  430 Triangles, 217 Vertexes ( +300 verts for EditNormals, +47 verts for UV map )
    Mesh< emitter1_low_2 >:  430 Triangles, 217 Vertexes ( +300 verts for EditNormals, +47 verts for UV map )
    Mesh< base_low_2 >:  392 Triangles, 198 Vertexes ( +256 verts for EditNormals, +137 verts for UV map )
    Geometry Total:  1682 Triangles, 2283 Vertexes

Works like a charm! I've quickly tested them in-game. Shaders appeared on the LODs, tags are on the separate LODs and everything (i've loaded them separately as map objects onto a test map)! So, it works like a charm! <3

Posted

@@Rooxon - Your LODs don't really drop the detail very much.

I kept the UV boundaries, yeah and a saber doesn't really need LODs as far as I know (none of the vanilla ones got them). I've done this just as a test, but if you wish I can do it with the e11 where there's huge drops of verts between LODs.

Posted

Update: Ok... so I have the new "About" dialog (and it's button on the Export Options Dialog) incorporated into all versions Max6-Max2017.

 

I also just compiled it for Max2017 (had to use VS2012 for C++11) and everything appears to work correctly.

 

I still need to update most versions with the "backslash" fix... but v2.2 is close to being officially released. :winkthumb:

Posted

I just emailed the Max2017 MD3 v2.2 exporter to a few people to check out (and try to break it).

 

If you already have 3ds Max 2017 installed and would like to beta test it then send me a PM.

Posted

@@Archangel35757 the new plugin works simply perfectly. This foolproofness for the slasehs is all it ever needed.

I idiotically just applied textures as diffuse bitmaps to models, standard material, exported and shaders and everything works in every instance, md3 and glm and LOD files.

If you really want, I can post you the statistics here but it works for 2016 for sure. Gonna check 2009 and 2017 tomorrow. Tho I expect the same result, unless as you said you've done a mistake somewhere.

Tempust85 and Archangel35757 like this
Posted

@@DT85, @@AshuraDX, @@Psyk0Sith, @@Rooxon, @@DoomMarine23, @@KENNITHH:

 

I just finished recompiling all MD3 v2.2 exporters for 3ds Max 6 to 2017. Functionally this latest compilation should be equivalent to what I sent you all earlier for beta testing... all I did was change some project settings to make all plugins "LargeAddressAware" and set the Version number to 2.2.

 

Looking forward to your beta reports. Thanks!

Psyk0Sith likes this
Posted

3D Studio Max 9 Statistics:

C:/Users/Rooxon/Documents/3dsMax/export/testob.MD3:
    Frames:    1
    Tags:    0
    Meshes:    1
    Mesh< Cylinder01 >:  140 Triangles, 72 Vertexes ( +144 verts for SmoothGroups, +3 verts for UV map )
    Geometry Total:  140 Triangles, 219 Vertexes

As we discussed, 2016 and 9 versions work. 2017 tho is another story.

I created an object real quick with a UV map, exported as md3. All went fine up to this point, this is the statistics:

C:/Users/Rooxon/Documents/3dsMax/export/fountain.MD3:
Frames: 1
Tags: 0
Meshes: 1
Mesh< Cylinder001 >: 284 Triangles, 144 Vertexes ( +144 verts for SmoothGroups, +15 verts for UV map )
Geometry Total: 284 Triangles, 303 Vertexes

After which I saved my scene, clicked X to exit 3ds max 2017 and got this error:
eda2ccc3c9992201f08be322ec511c01.png

After this, 3DS closed. So it's just a wierd message I get.

 

Testing out the md3, it seems to have worked fine.

EDIT: Testing out the original md3 exporter for 2017.
First of all, the error does not appear if I just open max, load the scene and close it. So it's certainly due to the exporter itself.

C:/Users/Rooxon/Documents/3dsMax/export/fountain.MD3:
    Frames:    1
    Tags:    0
    Meshes:    1
    Mesh< Cylinder001 >:  284 Triangles, 144 Vertexes ( +144 verts for SmoothGroups, +15 verts for UV map )
    Geometry Total:  284 Triangles, 303 Vertexes

Surprisingly, there's no error this time. :) So... I think you've either made a mistake somewhere in the changes from this version to the final one... or maybe you need to compile it with vs2015 as you said.

EDIT 2: I don't get what happened but I replaced the standard version exporter with the LargeAddressAware one and no error for 3 times straight.

Suddenly, it vanished.

Posted

Been testing this with GZDoom so far and plan on giving Quake 3 a go.

 

My initial thoughts are pretty good. The UI is simple but actually explains what functions do and how to use the exporter which I greatly appreciate, the MD3s themselves seem flawless and actually smaller in size than the other exporter I was using which I feel is interesting to note. Will conduct some more serious testing soon, hoping Quake 3 goes smoothly (which it will, no doubt)

Archangel35757 likes this
Posted

Been testing this with GZDoom so far and plan on giving Quake 3 a go.

 

My initial thoughts are pretty good. The UI is simple but actually explains what functions do and how to use the exporter which I greatly appreciate, the MD3s themselves seem flawless and actually smaller in size than the other exporter I was using which I feel is interesting to note. Will conduct some more serious testing soon, hoping Quake 3 goes smoothly (which it will, no doubt)

 

Thank you for beta testing... I just sent you the re-compiled final versions for 3dsMax 2012 and 2014.  Would you please remove the existing plugins and install these final ones?  I dropped the "x86" in the name on the 32-bit Max2013 exporter and the "x64" from the 64-bit 2013-2014 exporter-- because 2014 does not support 32-bit so I thought the shorter names were sufficient to differentiate them.

DoomMarine23 likes this

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...