Jump to content

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


Recommended Posts

@@DT85 - okay I have the normals fixed and exporting properly now and the UV texture coordinates are good...

 

normals_fixed_screenshot_zpsgvtkmogj.png

 

 

textured_zpsxd5uxp7w.png

 

... but I have done something to mess up writing the texture map name in the file-- it is only writing the texture file for one object and not the others. So I need to investigate what I messed up and get it sorted out. I hope to have it fixed in a few days; then I'll send you all of the updated project files.

Link to comment

@@DT85 - Ok... it's all fixed now. I decided not to add the export statistics as a dialog box-- too much extra coding for so little information... instead I plan to just simply write it out to the listener. I will send you the code tomorrow. Would you like me to generate a new plug-in GUID number so it can sit side-by-side with the original exporter and the Dark Places exporter-- avoiding plug-in conflict?

Link to comment

@@DT85 - I added another enhancement (thanks to @@eezstreet for the optimized code) that checks the texture size to ensure it is a power of 2 (because MD3View and game engine will give an error otherwise).

 

3dsMax Viewport:

3dsMaxScene_zpsyd520ve3.png

 

Open3Mod Viewer:

open3Dresults_zpswchip5hi.png

 

I also added code to check material slot name for "models" in the case the textures are not in the proper "models" directory-- so all options are now covered.

 

The very last thing to do is... just create some exports statistics-- true vert count due to extra normals, smoothGroups, and UVs; so artists will see the final result and not wonder why their 1000 vertex model fails in-game.

 

...sorry for the delays.

Link to comment

@@DT85 - Max6 project files sent. While removing Listener output code, I hastily made one quick code change so that statistics would show properly when only smooth groups present-- but did not have time to test compiled plugin.

 

Also, another thing I forgot to do was change "Quake III" to "Quake III v2.1"

 

Because I set the project version and dialog to version 2.1.

Link to comment
  • 1 month later...
  • 4 weeks later...

@@DT85 - I have just finished updating the MD3 exporter code (rolled version # to 2.2) that restores two export option features: (1) checkbox and field to export specific named objects beginning with specified string and (2) export option to only export specific named tags.

For these two field just enter mesh object base names separated by comma [no spaces] (e.g.: box,sphere,plane,etc). And for the named tags you do the same (full tag name, e.g. "tag_flash," separated by commas with no spaces.

 

New in v2.2 is the option to export LODs to separate MD3 files-- automatically does this... all the user has to do is create the LODs with proper LOD suffixes in the 3ds Max scene. I've verified these changes in MD3View... and it switches LODs in MD3View as expected.

 

Note: Maximum number of MD3 LODs is 3 (base.md3, base_1.md3, base_2.md3).

 

I will be emailing you the code shortly.

Link to comment

May as well have this as your project, @@Archangel35757. You did the majority of the work and I have no time frame when I'll get around to updating it. When you do upload your versions, @@Circa can remove my download.

No, I'm happy to help you and the community. If you need me to update the other versions I'm happy to help you do that as well. If you could re-send me the dropbox link to all your latest project folders... I'll start helping you update them next week.

Link to comment

No, I'm happy to help you and the community. If you need me to update the other versions I'm happy to help you do that as well. If you could re-send me the dropbox link to all your latest project folders... I'll start helping you update them next week.

I can switch the author of the file page so you can edit them instead, if needed. Just let me know.

Link to comment

Sorry to jump in.

 

Not overly sure if this is the right thread but seeing as I'm attempting to use this plugin thought it'd be as good as any to start.

 

Currently in the process of trying to convert a GLM to a MD3,

 

I have a reskinned backpack from the snow trooper model. [image] and wish to incorporate it within a map. Either lying on the floor or on a table.

 

I've split it from the model in 3DS max.  [image]

 

Used this tool and it seems to be working in MD3 view except I have no textures. [image]

 

I've read around it and it seems to about applying a 'standard' material only? Not overly sure what these means, and was wondering if someone would mind explaining or even just link me in the right direction? I've tried googling around, but can't see anything about applying a pre-existing UV map?

Link to comment
  • 4 weeks later...

So I've updated the source code for the 3dsMax MD3 exporters for Max6-Max2012 (for both 32 & 64-bit versions).  I'm starting to compile them within the hour.  I still need to add all the source code changes I made (that restored a couple of export options and added option to export LODs to their own MD3 files) from Max6 to the Unicode Max2013, 2015 projects.  I also will attempt to compile it for Max 2017 (I'm currently downloading Visual Studio 2015-- which Max2017 requires... but I could try VS2010 to see if it works first I suppose).

Link to comment

Update:  So after incorporating all of the code changes in the Max2013 code base for better LOD support, I got it to compile (after cleaning up some Unicode conversions I missed).  Good news is that it works as expected when you deselect exporting of LODs.  Here are the statistics from a test:

D:\base\models\map_objects\ships\2013_noLODs.MD3:
	Frames:	1
	Tags:	2
	Meshes:	7
	Mesh< boxCOD >:  108 Triangles, 56 Vertexes ( +40 verts for SmoothGroups, +0 verts for UV map )
	Mesh< Plane01 >:  2 Triangles, 4 Vertexes ( +1 verts for EditNormals, +0 verts for UV map )
	Mesh< Plane02 >:  2 Triangles, 4 Vertexes ( +2 verts for EditNormals, +0 verts for UV map )
	Mesh< myBox >:  32 Triangles, 18 Vertexes ( +6 verts for SmoothGroups, +31 verts for UV map )
	Mesh< boxCOD_1 >:  48 Triangles, 26 Vertexes ( +28 verts for SmoothGroups, +0 verts for UV map )
	Mesh< boxCOD_2 >:  12 Triangles, 8 Vertexes ( +16 verts for SmoothGroups, +0 verts for UV map )
	Mesh< myBox_1 >:  12 Triangles, 8 Vertexes ( +4 verts for SmoothGroups, +15 verts for UV map )
	Geometry Total:  216 Triangles, 267 Vertexes

But attempting to export LODs immediately causes 3dsMax to crash and close.  So I'm going to have to make a Hybrid build and do some debugging to find where and why it is crashing.

 

Exporting of LODs works great for the Max6-8 plugin... and I don't expect there will be any issues in compiling versions up thru 2012-- but dat Unicode conversion is a minefield. :(

 

@@DT85 - I saw you had changed the "Total:" line to "Scene Total:" -- but since you can do "Export Selected" it may not represent the full [3dsMax] scene.  So I changed it to "Geometry Total:" since that is what the file contains.

Link to comment

Take a look at my code for what I did for the Unicode - it works fine and includes eezstreets string conversion for texture paths etc. Should be on my Dropbox still in that link I gave you.

Yes, I started with all of your project repositories. The crash is occurring in the code I added for LOD export. I should be able to resolve it by doing a hybrid debug session. I just need time... hopefully I can resolve it tonight after work.

Link to comment

Update:  @@DT85 - Ok... the one bug that was causing the crash has been found and squashed!  The Max2013 exporter results match the Max6 results for my test scene.  But I found two other issues...

 

  1. The ProgressBar messages looked like Chinese because they are still "ASCII" and were not converted to Unicode; so I need to fix that.
  2. Something isn't working with the restored features of specifying only named objects and tags.  It works in Max8 but says "No data to export." in Max2013.

 

So I need to resolve those two issues.

 

EDIT:  I just did a quick compile and test of the Max2012 x64 plugin and all features (see #2 above) are working (Unicode issue #1 above doesn't apply).  So more Hybrid-debugging required to resolve #2 for the Max2013 build.

 

My goal is to have all versions (Max6 to 2017) compiled and tested for the new LOD support and restored "named objects only" features in a week or so.  It should go quickly once I resolve the issues above for Max2013.

Edited by Archangel35757
Link to comment

I believe I had to fix the results window displaying Chinese writing by running it through Eez's Unicode fix, which is the same fix for texture paths etc.

HmmK... well the ProgressBar will be an easy fix... I simply forgot to change that in the huge LOD-handling block of code I added... since it comes from Max6 and was not in your base 2013. But the fixes I added to restore the "named objects" export options isn't making Unicode 2013 happy...

Link to comment

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...