• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Model Optimizer and Converter v1.3.0

Model Optimizer and Converter
  • Optimize, sanitize and convert models
  • Batch processing and drag and drop
  • Tooltips explaining all the options
  • Support for all model formats up to v1200
  • Reforged HD support
  • Open source

Credits

Thanks

Tools

Logo



DeveloperUsageLink
GIMP AuthorsLogo & icon designGIMP
GitLabCode repositoryGitLab
MurmeleGit clientGittyup
QtIDEQt Creator

Based on Mop from PNGimg




1.3.0
  • Note: The source code for v1.2.1 was lost, (1.2.1) marks what I've reimplemented
  • v1100 & v1200 support (thanks @Retera and @eejin!)
  • Replaced Delete Same-ish Keyframes with Delete Identical Keyframes, which no longer breaks animations
    • Ignore Tangents option for more aggressive deleting
    • You can now also set Precision to 2 which enables removal of Hive model checker "roughly the same value" notices
  • (1.2.1) Reimplemented Delete Unused Global Sequences, Delete Invalid Keyframes and Fix Self-referencing Nodes
  • New options:
    • Calculate Extents (new Tools tab)
    • Fix Negative Extents (Sanitization > Warnings tab)
    • Insert Missing Opening Tracks (Sanitization > Severe tab)
    • Delete Unnecessary Keyframes (Optimization > Sequences & Animations tab)
    • HD MDL Compatibility toggle (RMS or Hive, Output tab)
      • MOP can now read both
    • Convert Bones To Helpers (Sanitization > Warnings tab)
  • Delete Fake Triangles will now delete the geoset when all its triangles are fake instead of leaving one fake triangle in place
  • Delete Unused Geoset Animations now ignores bones that refer to them
  • Bind Pose related optimization and sanitization will now only be performed if model version >=900
  • Disable Bind Pose options when selected version <900
  • Merge Similar Geosets will now calculate a new extent
  • Delete Unused Keyframes now also deletes unused Event Object keyframes
  • Clamp Light Attenuation will now change both values with the same amount when possible
  • Added confirmation dialog when trying to close while still processing
  • Added Stop Processing, Pause/Resume Processing, Skip Model and Clear Status buttons
  • Now emits a "No changes made, skipping model." status instead of saving model when no changes are made
  • Tweaked the way status text is displayed and added an error count
  • Taskbar will now flash when the window is inactive and processing is finished or a dialog is shown
  • Option to recreate original folder structure (disabled when target path is empty)
  • Target now required to be a valid absolute path, and also not a file
  • Various small improvements
  • Bug fixes:
    • Removal of the first pivot point
    • Geosets and geoset animations with ID 0 being removed from bones
    • Memory leak where memory usage would keep increasing with each model processed (thanks @Retera!)
    • Options:
      • Delete Unused Textures deleting textures only used by Texture ID animations
      • Merge Identical Textures breaking Texture ID animations
      • Delete Unused Textures & Delete Identical/Sameish Keyframes potentially crashing the program
      • Delete Excess Sequence Extents not working
      • Delete Excess Bind Pose Matrices and Add Missing Bind Pose Matrices not counting cameras and thus potentially corrupting the model
      • Delete Unused Matrix Groups in HD models breaking animations when viewed in RMS
      • Merge Similar Geosets not working
    • Processing continuing after closing the program
    • Models not converting when optimization and sanitization are unchecked
    • (1.2.1) Options sorting (?)
    • Models not being processed when only Sanitize is checked
    • Drag and drop not processing files
    • (1.2.1) Crash when geoset has fewer UVs or normals than vertices
    • Sanitize subtab not being remembered
    • Potential crash when editing/saving models with SkinWeights
    • BindPose MDL reading and writing
    • Potential issue when comparing vertices with skinweights
    • Camera animated rotation being written as int instead of a float
    • Various small fixes


1.2.1
  • Fixed a crash that could occur when a geoset has no UVs or normals
  • Fixed options sorting
  • New options: Delete Unused Global Sequences, Delete Invalid Keyframes, Fix Self-referencing Nodes
  • Small UI tweaks

1.2.0
  • Fixed a crash that could occur when a geoset has an invalid matrix
  • Delete same-ish keyframes
  • Split "Match Sequence Extents" into delete (opt) and add (sanity)
  • Added a few sanitization options
  • Improved theme


1.1.11a
  • Tweaked UI
  • External stylesheet (style.css)

1.1.11
  • Fixed nodes sometimes losing their parent node
  • Fixed missing PE2 gravity field
  • Fixed PE2 width and length fields being inverted when writing to MDX files
  • Added percentage to filesize reduction message

1.1.10
  • Added Delete Unused Bones/Helpers/Event Object options
  • Added "Pass 1/2/..." messages
  • UI style based on Hive

1.1.9a
  • Fixed crash on program exit

1.1.9
  • Implemented all animated objects
  • Delete 0-Length global sequences
  • Delete unknown chunks
  • Remember active subtab

1.1.8
  • Added Geoset Animation options
  • Implemented Lights

1.1.7b
  • Fixed MDL Geoset Extent reading

1.1.7a
  • Fixed material merging
  • Fixed global sequence unused keyframes deleting
  • Fixed node hierarchy being partially destroyed
  • Fixed crash when merge similar geosets is checked

1.1.7
  • Fixed Materials & Textures optimizations
  • Added Merge Similar Geosets option
  • Geosets left empty after deleting free vertices are now deleted
  • Adding sequence extents now takes the geoset extent if no sequence extents are available
  • Fixed Optimization options not being disabled when Optimize is unticked

1.1.6 (FIXED)
  • Fixed crash when optimizing
  • Minor fixes

1.1.6
  • Removed recursive optimization option (always recursive)
  • Delete 0-length sequences
  • Partial Linearize Anims
  • Partial delete unused keyframes
  • Partial delete empty animations
  • Delete Unused/Merge Identical Materials, Textures & Texture Animations
  • Misc fixes

1.1.5
  • Considering normals when merging vertices is now optional (default off)
  • Added "Delete 0-length Sequences" option
  • Removed "Reforged Data" checkbox (always written now)
  • Changed window title to "MOP"

1.1.4
  • Fixed 0-value Tangents and SkinWeights being written to >v800 models without this data
  • Improved RMS 0.4 Reforged MDL reading
  • Misc fixes

1.1.3
  • Fixed a bug with writing MDX files without any FaceFX
  • Miscellaneous bugfixes/crash fixes
  • Added partial support for reading Reforged MDL files written by RMS 0.4
  • Unknown tokens will once again cause MDL loading to fail
  • Moved suffix options to Optimize and Convert Options respectively
  • Magos Compatibility now only applies to v800 models
  • Magos Compatibility disabled when Version 900/1000 checked
  • Fixed CMD processing
  • Changed the way CMD options/arguments work

1.1.2
  • Fixed a crash that could occur when merging vertices
  • Merging vertices is now faster
  • Merging vertices now requires identical vertex groups
  • Fixed a bug with writing Color to Geoset Animations
  • Fixed automatic filenaming (increment & suffix)
  • Fixed ignored tokens' attributes not being skipped
  • Checkboxes are now disabled when appropriate

1.1.1
  • Changed UI layout a bit
  • Added radio buttons for preselection of file conflict handling
  • Improved messages and added filesize difference
  • It' now possible to process files when neither Optimize or Convert are checked
  • Added "suffix" option for file conflicts
  • Fixed a bug that would sometimes cause a crash
  • Fixed Reforged model optimizing causing a crash
  • Fixed Reforged data not being written to MDL files when not converting
  • Unknown tokens will no longer cause parsing MDL files to fail
  • Fixed layer TextureID token not being recognized
  • Improved floating point rounding

Previews
Contents

Model Optimizer and Converter (Binary)

I don't suppose you can explain to me which set of options tells the optimizer to not touch Particle Emitter Visibility or change Geoset Animation alphas? Those are the things that the current program likes to mess up for me.

Otherwise, so far the optimizer doesn't appear to do anything weird like the MDX / M3 tool does when squishing UVs (I'd seen a lot of cases where it makes new 'seams' at the edges so changing that can sometimes be dangerous), although I think some of the optimizations are a little too aggressive, but a least they're toggle-able.

It's also one of the few tools out there I've noticed that handles extents although I suppose it's actually the same as Magos.
 
Most likely that's caused by Delete Same-ish Keyframes, but without more info I can't be sure. That option has a few issues I think, hopefully will be able to resolve it in the future.

Which options are too aggressive in your opinion?

As for the extents, it doesn't really handle them per se. Just deletes excess ones and adds missing ones by copying or adding 0-value extents. No calculation is done or anything like that.
 
Which options are too aggressive in your opinion?
Off the top of my head I disagree with removing a 0-length Global Sequence since I've found some use for that (like I said it's toggle-able, I can at least stop it from 'helping')

Okay, opening up the module personally I have everything on Materials and Textures unchecked. I have Merge Similar Geosets unchecked for the same reason (the two categories are related, but I understand why this one is in the next tab).

I don't think I understand what Delete Duplicate Geoset Animations is really about when Delete Unused Geoset Animations is right next to it (the latter in my mind should have taken care of that since each geoset can only have one geoset animation).

I think it's really just my personal practical tastes fighting with what can be optimal, and honestly it doesn't matter what I think as long as I can turn them off (because I can't say it isn't what other people want).
 
Hmm, maybe I should turn off 0-length globals by default, maybe duplicate geoanims too. The latter always deletes all of them except the first one, which may not be what the user wants.
Geosets can have multiple geoset animations, but it leads to buggy behaviour (best case scenario only one is actually used), afaik MdlVis can sometimes cause multiple geoanims per geoset (its visibility/alpha stuff is quite buggy), and in Magos you can do it manually (though I assume no one would do that except by accident).

I've thought about adding a preset feature, with safe and aggressive defaults and the ability to make custom presets. Not sure if I'll get to it though.
 
Took me a while, but I figured out that one of the settings I do have on is setting the position of Pivot Point for Object 0 at {0, 0, 0} regardless of where it was before. Obviously this does nothing if Object 0's position doesn't matter, but if it is a joint it messes up everything.
 
This is a great tool, but just wanted to point out that for some models, just processing using this tool even without optimizer or sanitization ticked on causes some animations to brake.
Might be caused by this:
Took me a while, but I figured out that one of the settings I do have on is setting the position of Pivot Point for Object 0 at {0, 0, 0} regardless of where it was before. Obviously this does nothing if Object 0's position doesn't matter, but if it is a joint it messes up everything.
Try copying back the original values into the top object and see if that fixes it.

This is first on my to do list to fix whenever I get back to work on this :p
I think it always happens, don't think it's related to a particular setting.
 
Last edited:
Might be caused by this:

Try copying back the original values into the top object and see if that fixes it.

This is first on my to do list to fix whenever I get back to work on this :p
I think it always happens, don't think it's related to a particular setting.

By copying you mean converting the model to mdl, opening it with a text editor going down to PivotPoints and reverting the 3 values back to what they where in the original model?

EDIT: Yeah, that solves the problem alright! Thanks and Good Job!
 
Last edited:
In the "Output" tab, uncheck "_opt Suffix".
Oh, my bad, thank you very much!
In this tool, some models's animaiton are broken, have any idea ?
although, this tool is very good, minus point i seem maybe is when optimizer multi models in many folder (compress units folder is a example), model only put in a folder and don't create folder like original
If it's a feature, sory about my bad!
 
In this tool, some models's animaiton are broken, have any idea ?
Make sure to uncheck "Delete Same-ish Keyframes", that option is bugged at the moment.

Otherwise it could be because of this bug:
Took me a while, but I figured out that one of the settings I do have on is setting the position of Pivot Point for Object 0 at {0, 0, 0} regardless of where it was before. Obviously this does nothing if Object 0's position doesn't matter, but if it is a joint it messes up everything.
In which case, try copying back the original values into the top object and see if that fixes it.

minus point i seem maybe is when optimizer multi models in many folder (compress units folder is a example), model only put in a folder and don't create folder like original
This is a good idea, maybe I'll implement it in the future. Right now you can only put everything in one folder or put it in the same folder as the source file.
 
Make sure to uncheck "Delete Same-ish Keyframes", that option is bugged at the moment.

Otherwise it could be because of this bug:

In which case, try copying back the original values into the top object and see if that fixes it.


This is a good idea, maybe I'll implement it in the future. Right now you can only put everything in one folder or put it in the same folder as the source file.

thank you!
 
Those are bugs in the model itself. I believe the tool just ignores these, if the model is still being written it should be ok. Otherwise you will have fix it some other way.
I still have error in animation and model (in few models) and....a model was miniature, very small compared to the original size.
except for them, all is fine
upload_2020-12-26_9-41-46.png

upload_2020-12-26_9-45-9.png
 
Last edited:
Hmm, could be Delete Unused/Duplicate Geoset Animations, in some rare cases it is a bit bugged. The miniature one, maybe delete 0-length global sequences?
I don't have much knowlegde about model, but.... do you have any idea to fix miniature model ?

edit : i was fix model
 
Last edited:
After using this tool, it reduces the size of the model alot better than mdx optimizer without distorting the face, too.

However, I ran into a problem, which option causes certain geosets to no longer be hidden during specific animations though?
 
After using this tool, it reduces the size of the model alot better than mdx optimizer without distorting the face, too.

However, I ran into a problem, which option causes certain geosets to no longer be hidden during specific animations though?
That's probably because of the "linearizing animations" option that exists both in Mdlvis program. It causes the same problems. I'd suggest you tinker with the geoset animations and particle emitters after optimizing the model.
 
Getting corpses under units whenever they're doing anything other than standing. Not sure what I'd doing wrong.

Does carve down on the size of units heaps though.
 
This tool feels excellent to me, have used plenty of time to optimize models, the only hiccup I had recently is 1 option messing up geoset animation (Delete same-ish keyframe).
You took the time to wrote tooltips for the options when you hover the cursor over them, that really nice.
I'd like to use the command line to test some stuff but I don't know/understand how to reproduce the settings from the GUI.
 
If I understand correctly, it changes the precision of some of the binary data, which almost certainly won't be added in this tool.
The deleting of useless keyframes may be added here, and linearizing animations definitely will be. It depends on how much time I end up putting into this.

This tool optimizes by deleting useless data and merging duplicate data (e.g. identical vertices). Both tools can be used together.
How would one use both tools together?
 
What option causes models to stretch their bones/bodies after using this tool?
If this is models stretching across the screen, then some vertexes must not be connected to a bone. Try unchecking the delete unused bones and helpers

also is this in game, the editor, or a model editor? I seen stretching in magos/mdlvis before where in game, it does not occur.
 
If this is models stretching across the screen, then some vertexes must not be connected to a bone. Try unchecking the delete unused bones and helpers

also is this in game, the editor, or a model editor? I seen stretching in magos/mdlvis before where in game, it does not occur.
It's in all three so I will try that though the squisher helped so much more by reducing its size by 75% when inside a map, but every penny counts.

Edit: Yup that was exactly the problem, thank you.
 
Optimizing without/with any options appears to be causing some model's animations to break. For instance, after optimizing even without any options checked caused my walk animation to swap left to right.
 
Last edited:
No, this does alot more stuff than RMS does in terms of optimizing. I use them both together though since their methods of deleting key frames seem to be different.
 
For my own methology, thought I will suggest experiment to what work best for you, I utilize RMS, then this then mdx squisher last.
 
There appears to be some models where the thing will just keep passing forever. If anyone or maybe if the creator ever comes back, please reveal what possibly reason could be causing this, is it the complexity of the model?
 
overall very useful tool but one thing:

Delete same-ish keyframes breaks geoset animation such as visibility (screen 1) and sometimes moves bone_head to the origin attachment aka XYZ 0,0,0. Also sometime deletes for example rotation of bones on first frame such as bone_root (on screen 2, bone_root unanimated) and if any scaling was used, it descends to 0
 

Attachments

  • изображение_2024-06-04_221958117.png
    изображение_2024-06-04_221958117.png
    57.3 KB · Views: 57
  • изображение_2024-06-04_222017929.png
    изображение_2024-06-04_222017929.png
    28.2 KB · Views: 55
Delete same-ish keyframes
Yeah this option is completely broken. I think I forgot to account for adjacent keyframes from different sequences, or something. Unfortunately I'm not planning on working on this anymore. Thanks for the rating!
 
Back
Top