• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

flowtsohg's Model Viewer

Level 2
Joined
Jul 3, 2025
Messages
4
Hello,
I've looked at flowtsohg's mdx-m3-viewer. Is it the model viewer that is used on this website? I was wondering if it could be used in addition to other WebGL renderers, such as three.js. As far as I understand, the viewer uses its own renderer, so at first glance it seems we can't use it with other renderers.
That's my question. Aside from that, do you know if there would be any other library that could make use of war3 assets to be displayed in correlation to other WebGL/GPU libraries?
And, if not, what about a model converter? I used Biturn to convert .mdx and .blp to .obj and .tga respectively, extracted via Ladik's MPQ editor. Not sure if this is because of the conversion, but I can't figure out how to display transparency properly (again, wiith three.js) even though the TGA texture seem to have proper alpha channel (the transparent part is visible).
Now the other question is how about models that have more than one material (visible with retera model studio tab "tracks")?
Thanks in advance if you have some insight to share.
 
Last edited:
I made an almost 1 to 1 port of mdx-m3-viewer that was a desktop Java program instead of a JavaScript web program (these are different languages). I dumped this port inside of a LibGDX game engine container, and I combined this with UI components drawn using LibGDX Scene 2D. What this means is that the mdx-m3-viewer model instances in the scene can combine into a cohesive output that also contains a LibGDX library's ExtendViewport with some LibGDX Scene2D stuff rendering to the same output GPU context. So there is literally an mdx-m3-viewer Camera object, and all of its associated math, and also a LibGDX Camera object.

So I know this is possible and it may be sort of similar to what you are doing, although it took quite a bit of effort/expertise.

Here are some videos of the resulting program running:


In each of these videos, whether we are rendering some units and UI that are masquerading as if they were Warcraft III:

1751594342122.png


or units and UI that were masquerading as if they were some primordial version of WoW

1751594412279.png


or even something that has a bunch of Reforged models loaded and was trying to look a little bit like Reforged

1751594060182.png



... I can nevertheless assure you that all of the provided videos are recordings of this spinoff of mdx-m3-viewer dumped into LibGDX game engine and not recordings of Warcraft III, nor of WoW. This starts to become apparent if we look at my render's minimap, which shows my own units in player color without coloring them white, does not have minimap controls such as ping or formation rank, etc. Similarly the toy WoW UI that I threw together is missing the correct targeting frames and a bunch of stuff isn't loading properly and the "Action Bar" doesn't do anything. Hence why in one of the videos I just disabled it entirely:

1751595427940.png


This technology was also copied from fhowtsohg's repo to create the render systems on Retera Model Studio itself and so there are obviously similarities there, and that's an example of how you can dump the logic of the rendering into some crappy Java UI, although I would gather that might not be exactly what you're trying to accomplish. For my purposes, the actual code from Retera Model Studio was unusable for the purpose of rendering many models simultaneously (as in the above videos) because it was a very non-performance sensitive "bad" port of the mdx-m3-viewer repo. And that inspired my "second" port of the viewer into the same language, which allowed me to build off of that and make this one that I mostly use for simulating game experiences for fun as a hobby.

The biggest challenge you're probably going to have is the issue of the software and what the computer is doing because although I can paste a somewhat interesting and prolific showcase above, and all of these are derivative works of mdx-m3-viewer, it is nevertheless the case that none of these solve the problem of accurately converting Warcraft III assets to some other format.

Rather than converting these programs are rendering directly. And so as an example of the kind of bugs that you might have, in one of my initial drafts of trying to use this in combination with LibGDX there was a problem where the mdx-m3-viewer based GPU commands were leaving some OpenGL state (failing to clean it up) before then calling into the LibGDX Scene2D render pipeline to render the UI, and as a result all fonts that rendered on the screen were exploded graphical visual errors instead of putting text on the screen. The error was that prior to calling into the font shader, the LibGDX stuff was assuming that other OpenGL function calls in the same program didn't leave behind stale OpenGL state.

If you go the other direction of a model port where we try to parse the Warcraft III model and then save it as a different model instead of using it as a basis for OpenGL calls, doing that often loses information because almost nobody has successfully documented everything that's really going on in a Warcraft III model. The above visual renders are the result my eccentric devotion to MDX/MDL format for 20 years as a hobby rather than going and learning other technologies. I don't know how to use Blender, I don't know how to use Unity, I've never used Biturn, I don't recall ever using three.js, and lately I wasn't using Windows and as a result Ladik's MPQ editor didn't work here. But because I used to spend hours playing in Warcraft III World Editor and trying to get custom 3D models to load, and I would run into insane undocumented errors (such as models with two layers on one material that animate one layer and not the other, having issues with the animation of one bleeding into the other, such as maybe here) and these gradually made me accustomed to understanding if I see a visual error when rendering a model outside of the original game what the likely misinterpretation of the data might be.
 
Last edited:
I get it. My knowledge is way too low to even consider to modify or even understand mdx-m3-viewer. As for model conversions, ok. Thanks for your reply. I'll try to look into your code there is certainly something I can learn from and apply for javascript. I've been aware of warsmash for not a long time, but since then, it pumped in me a revived interest in Warcraft.

Is it really the same mdx-m3-viewer that hive is using? Unmodified?
 
Is it really the same mdx-m3-viewer that hive is using? Unmodified?
So, I'm not really a super genius at all. This folder called viewer5 in Warsmash puts all the files in basically the same places as mdx-m3-viewer relative to each other, and with the same names, but in a Java style instead of JavaScript: WarsmashModEngine/core/src/com/etheller/warsmash/viewer5 at main · Retera/WarsmashModEngine

That is an extremely brainless and not super genius thing to create. The super genius thing to create would be like the original mdx-m3-viewer where it is clean code, written specific to its intended purpose. My code is not particularly clean code.

I modified the render system to include lighting and shadows, fog filters, animation blending, and one or two other things. In comparison to the original technology, that is a small handful of stuff.

Unmodified?

So it is not technically unmodified. But it is not very different -- to an extraordinary and brainless degree.
 
Back
Top