3D Model Viewer

Level 29
Joined
Jul 29, 2007
Messages
5,174
Here's a basic demo. If you want more control, someone else can waste their time.
Drag a model anywhere to load it.
Press space to start/stop recording.
Left/right arrows keys to change animations.
Mouse to rotate and zoom.
The whole canvas is recorded, so you'd probably want to resize your browser tab to something small.

I looked into making the background transparent, but it will never result in what you think it will, because of all of the different blending happening with the different material layers.
 
Here's a basic demo. If you want more control, someone else can waste their time.
Drag a model anywhere to load it.
Press space to start/stop recording.
Left/right arrows keys to change animations.
Mouse to rotate and zoom.
The whole canvas is recorded, so you'd probably want to resize your browser tab to something small.

I looked into making the background transparent, but it will never result in what you think it will, because of all of the different blending happening with the different material layers.
Hmm so the transparent background will not work? Or it just looks very different?

Because the biggeest reason i ask for this is for the alpha part :/
 
Level 15
Joined
Feb 15, 2006
Messages
851
Here's a basic demo. If you want more control, someone else can waste their time.
Drag a model anywhere to load it.
Press space to start/stop recording.
Left/right arrows keys to change animations.
Mouse to rotate and zoom.
The whole canvas is recorded, so you'd probably want to resize your browser tab to something small.

I looked into making the background transparent, but it will never result in what you think it will, because of all of the different blending happening with the different material layers.
Tested and the browser sends an error message because there's no more processing capabilities, and I'm working in a good PC.

Using Chrome latest version.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
While I can remove the background, it will not result in the clean image you have in mind. Things like team glows, particle emitters, and so on, use blending modes that will look bad with no background. For team glows, for example, you will see all of the black surrounding the glows themselves too overlayed one above another.
If you want consistent blending, the background needs the default alpha=1.
It might be possible to color-key, but I doubt it will be very consistent due to the blending, you'll need thresholds and might get false positives.

For turntable, use the up/down arrow keys to add speed in the counter-clockwise/clockwise directions respectively.

As to errors, as always, post a log, say what you did, etc....
 

Attachments

  • Arthas_Stand - 1_0.png
    Arthas_Stand - 1_0.png
    93 KB · Views: 200
Last edited:
Level 7
Joined
Nov 10, 2010
Messages
87
How do I zoom out with the 3d model viewer when viewing models??? 50% of the time the models are huge and I'm so zoomed in I can't see and I try rotating and sliding...it reminds me of this joke; a pirate walks in to a bar holding a steering wheel in front of him. A guy asks what are you doing holding a ships steering wheel, and he replies: it's driving me nuts!
 
While I can remove the background, it will not result in the clean image you have in mind. Things like team glows, particle emitters, and so on, use blending modes that will look bad with no background. For team glows, for example, you will see all of the black surrounding the glows themselves too overlayed one above another.
If you want consistent blending, the background needs the default alpha=1.
It might be possible to color-key, but I doubt it will be very consistent due to the blending, you'll need thresholds and might get false positives.

For turntable, use the up/down arrow keys to add speed in the counter-clockwise/clockwise directions respectively.

As to errors, as always, post a log, say what you did, etc....

Damn sounds like a no hope then, i guess i will have to live with this, thank you very much

This one is just asking the possibilities,
What about rendering the image that have the stuff that have particle seperate in each layer? Perhaps in psd, or other file format? That way i could convert those individual layer into black and white and use it as an alpha channel for the glow itself

Of course, just a possibilities, it sounds too complicated already.

I am planning to use after effect to composite the image, if by any chance you have an idea with this piece of information, then would be great, but just saying.

Ive been using magos with green background to key out the models, but as i work with more models, the models are getting colorful that it uses both green, red and blue, and i have no idea what color i can use to to key it
 
Last edited:
Level 29
Joined
Jul 29, 2007
Messages
5,174
How do I zoom out with the 3d model viewer when viewing models??? 50% of the time the models are huge and I'm so zoomed in I can't see and I try rotating and sliding...it reminds me of this joke; a pirate walks in to a bar holding a steering wheel in front of him. A guy asks what are you doing holding a ships steering wheel, and he replies: it's driving me nuts!

It depends on what client, but generally speaking the mouse scroll should do it.

Damn sounds like a no hope then, i guess i will have to live with this, thank you very much

This one is just asking the possibilities,
What about rendering the image that have the stuff that have particle seperate in each layer? Perhaps in psd, or other file format? That way i could convert those individual layer into black and white and use it as an alpha channel for the glow itself

Of course, just a possibilities, it sounds too complicated already.

I am planning to use after effect to composite the image, if by any chance you have an idea with this piece of information, then would be great, but just saying.

Ive been using magos with green background to key out the models, but as i work with more models, the models are getting colorful that it uses both green, red and blue, and i have no idea what color i can use to to key it

Yeah, that's the issue with color keying. I experimented with it, but there isn't any actual rule that I could think of. This is due to how things like team glows are blended, which is not based on alpha but rather on color.
Being able to split layers would require to change the whole way the viewer renders things to be very specific for this.

Forgot to mention, to record a single frame you can press the enter key.
 
It depends on what client, but generally speaking the mouse scroll should do it.



Yeah, that's the issue with color keying. I experimented with it, but there isn't any actual rule that I could think of. This is due to how things like team glows are blended, which is not based on alpha but rather on color.
Being able to split layers would require to change the whole way the viewer renders things to be very specific for this.

Forgot to mention, to record a single frame you can press the enter key.
Very Well.. hey btw, any chance I can have the transparency version, with the Glow things have the Black Box is fine.

Edit: And the Spacebar Download does work, but it will crash my browser because it's download image one by one and it seems it spammed to hard, not sure if there is any solution in this :/ I cant stop the recording either because of the "Save Image" popup

Edit2: to load custom texture, do i drag the texture in as well? doesnt seem to work
 
Last edited:
Level 29
Joined
Jul 29, 2007
Messages
5,174
Not sure what you can do without the background.

Changed recording so it accumulates the recorded images. Press ESC to download all of them in a zip file.

I started thinking before how to support custom textures, not quite sure yet. Up until now I always only really supported them via Hive resource urls. Might be possible to track all textures that fail to load, and compare their names to some arbitrary custom texture that can be dropped onto the page. Care to give me a test model?
 
So you mean I can't use the one that without the background? (Im Fine with the Black Plane that comes with the glow, if thats the problem)


I am using Anduin Lothar by Tauer to test.
here's the link: Anduin Lothar
Just download it and try to import it or something for testing? or should I send another model.

Edit: Just a suggestion to the Hive Model Section, since you already make screenshot possible, Perhaps you can add a "Take Screenshot" button on the upload section when people is uploading resource. where it will open this thing that you just create while loading the uploaded model where the uploader can have option to directly take screenshot while uploading.

As in something like this

Capturess.PNG
 
Last edited:
Level 29
Joined
Jul 29, 2007
Messages
5,174
I can enable the translucent background, it does require changing something small at the core of the library though, so I am wondering how it helps you.

Added basic support for custom textures. Given a model that is already loaded, all of its texture names will be matched against the custom one, and every match replaces the original one whether it was actually loaded or not.

That suggestion should be directed at Ralle, not me.
 
I can enable the translucent background, it does require changing something small at the core of the library though, so I am wondering how it helps you.

Added basic support for custom textures. Given a model that is already loaded, all of its texture names will be matched against the custom one, and every match replaces the original one whether it was actually loaded or not.

That suggestion should be directed at Ralle, not me.

I figure that i could try and key out the minor part with the black box that is with the glow while i dont have to worry the rest, im not exactly sure it will work tho. So if you think its not worth your time it's fine for me.

Aside from that, its not like every single model have hero glow and particle

I already very appreciate for what you did.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
The background itself you can remove with a direct color-key / magic select / etc., it's not the issue, and can be done as easily with the code without any changes to the library.
What can you do about a team glow going darker and darker as you get to the edges, rather than it becoming more translucent?
 
Last edited:
Black Color is quite hard to key out in After effect because i cannot use Magic Wand like in Photoshop. (This is intended to be used to make a video)
The Reason is because there are quite alot of Models (That I wanted to use in this case) are dark in colors, or have alot of dark colors.

For the Glow, I can just target the small area with the glow. I found out that I can Key Out the Glow Really well by Shifting Saturation to Alpha (Because glows usually rich in color)

Screen Shot 2018-03-30 at 5.02.34 PM.png



I am Able to Key out the Glow Quite Well but not so much on the actual model itself, so if the rest part of the body is already have transparency, I only need to target the part that I need to focus on.

Of course that might be because of my incompetent in keying out Background, Im not sure
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Latest version is 4.2.1.

- Almost all of the viewer's code was changed to make it a bit more modern and clean.
- ES5 support was removed. If you have a really outdated browser, update it.
- Replaced the MDX parser with MDLX, which supports both reading and writing from/to MDX and MDL.
- The viewer was updated to use the new parser, and can load MDL files too.
- The MD(L)X sanity tester was updated to be more modern, but mostly to give far more information. Expect changes in the sanity test client.
- Added an experimental Jass runtime. This includes parsing Jass code, access to globals and functions, calling functions and natives, tracking handles and references, etc.
- Added experimental WEU handling for the war3map.wtg parser.
- Lots of small fixes.
 
Last edited:
Level 29
Joined
Jul 29, 2007
Messages
5,174
Latest version is 4.3.2.

- The way all things render and update changed, to make it both more consistent (rendering), and a whole lot more performant (updating). This includes most of the changes, but you will likely not see them directly in any way.
- Added support for rotation and scale texture animations. Thanks to Retera for reminding me they exist.
- Added experimental support for sound event objects. It is off by default, and can only be enabled after user interaction (browser policies). The sounds sound different from the game, but I don't know anything about audio.
- Improved the behavior of all emitters, but they are still not quite there.
- Added sphere culling, where the spheres bound the model extents. This is mostly relevant to maps, and will stop models from popping in and out.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
I want a custom model that uses only custom textures, and does not use any event objects or model attachments that would refer to game resources.

This is so I could add it to the viewer's repository, to make a more realistic example of how to use the library.
The current example just shows how to load an OBJ model and a BMP texture, which are very not interesting indeed.
Preferably it should be an interesting unit with an interesting animation to show off.
A bonus if the model has more than one variation with different textures, so I could show it side by side with different textures.

Anyone got suggestions? Any modeller interested?
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Latest version is 4.4.0.

There are too many changes since the last update to list, but almost all of them are behind the scenes stuff, or related to non-viewer things like the sanity tester and WEU converter.

The one big change that is relevant to the viewer itself is the removal of the very old and experimental map handler, in favor of a specialized map viewer class that is updated with the specs me and eejin figured out since I first wrote this code a long time ago. It's a lot faster, terrain, cliffs, and water are more or less accurate.
Doodads still don't render correctly and are not animated at all, ramps are not loaded, cliff shadows aren't smooth, the camera isn't so much usable yet, etc.
You can see its test run at Map | HIVE.

In addition, due to eejin asking, I made a small page that links to all of the currently active pages and viewer clients I have, located at GhostWolf's Garbage Bin.
 
Last edited:

Ralle

Owner
Level 78
Joined
Oct 6, 2004
Messages
10,175
You are putting words in my mouth. You know what I’m doing. Porting the site to XF2. Your viewer is very important to me and Hive. I’m just so busy with family and the house that updating things on the current site is low priority so I can finish this migration as fast as possible. I’m sorry if this comes off as not caring.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Last version is 4.5.1.

- Changed and fixed some small things that bothered me for a long time.
- Remade the camera, so you could have a proper camera if you'll make a new client (supports orbiting, FPS, and look-at).

I am not putting words in anyone's mouth, in fact words matter to me far less than actions in the first place. If you want to see a project that people care about, go help with HiveWE. You don't need to be defensive, this isn't any kind of accusation or attack, it's simply the truth. Sometimes the truth hurts, but people move on.

Good luck.
 
Last edited:
Level 29
Joined
Jul 29, 2007
Messages
5,174
There is some information on the github readme, and a simple example in the examples folder. Although come to think about it, maybe the example will not work now because I forgot to update it for the new camera. It still gives you the general idea, but doesn't show how to load an MDX for the reason mentioned a few posts ago.
I could update the readme and/or example if you want to use it.
If someone provides a Blizzard-free model, I may be persuaded to add more examples, like actual MDX loading, camera setups, etc.
 
Last edited:
Level 46
Joined
Jul 29, 2008
Messages
9,634
Well, the problem with "actions > words" is that it's not always easy to show. You kinda have to trust in words, at that point.

So I can't 'show' you that I use your Model Editor nearly every day, for every model I look at, often multiple times per model to really cement it in my brain. I also can't 'show' you how your Model Editor has, in a roundabout way, made me a better & more successful modder.

See, I like to have custom resources, but I don't like to make a big deal about Requesting. So instead I've spent a great deal of time around the (Model) Resource forums, reviewing & posting (often at length) about custom models I enjoy, & enticing artists to enter into collaboration with me.

Thing is, I'm the kind of the guy that if there's even the tiniest obstacle to my doing something, I tend not to do it. If I had to download every model & test it, even in Magos (not even the World Editor proper), that amount of 'work' alone would almost certainly have quashed my drive to test & review models. Just simply not enough time/motivation. And in a world without your Model Viewer, that's exactly what would've happened; nothing.

So while I can't 'show' you any of that, I hope you'll trust me when I say: Thank You for coding & maintaining that awexome Model Viewer.
 
I know official repo of this project is ahead of what is on Hive, and I did not yet test the latest branch to compare, but I noticed issues in the Hive version of "View in 3D" when I use that to view models -- and when I was using a non-Windows computer for the browsing.

1.) On an NVIDIA 2080 Ti as my rendering hardware, but Ubuntu Linux 20.04 LTS as my operating system, Firefox will show the 3D model preview as a spherical form that I have to zoom in to see. So, it seems the X Y Z location of the 3d mesh is getting normalized on that system even though it's fine on Windows on Firefox.

2.) On an Android Samsung Galaxy phone, running Android Chrome, the model is the right shape (not crushed to a sphere like ubuntu) but the shape doesnt show textures
 
you might be the best person to fix it at this point in time
I looked into it and although the android phone thing is harder for me to test, I was able to confirm that the Ubuntu linux problem is not present on the "viewer.hiveworkshop.com/check" build. So it would appear that GhostWolf already fixed it in the past, but not in the version in use by Hive.

Is that really something I can fix to make Hive update? Seems more like some internal technical Hive thing. I guess I could try to research the commit logs to find for example what exactly fixed it, if you wanted to be a bit of a scrublord and copy one exact things, but to be honest the sanity checker 3d viewer is also able to render HD surfaces including normals in ways that the current Hive "View in 3D" option doesn't do well last time I checked. So there are other updates missing in the live Hive version.
 
I saw in the Ralle Development Update that he considered:
I started with a bit of a false start of taking it upon myself to update the model viewer to support MDX version 1100. But I decided to give up on it considering I know practically nothing about 3D.
If I think from the standpoint of what I can do for Hive instead of what Hive can do for me for just a moment, it may be the case that by transcribing Ghostwolf's repo twice to Java (once to conform to Retera Model Studio APIs and then another time to more directly port it to create Warsmash), it might be, for all I know, that I would be the most capable person to do the MDX 1100 update for the Hive viewer. However, I have never compiled mdx-m3-viewer on my own. Instead, I transcribed it from JavaScript to Java based on a belief that it would work (per the Hive Viewer system embedded in the Hive) and then I ran the transcription that was written based on my faith in the original.

So, I am no Ghostwolf, but I may be able to help with it. This afternoon before seeing the Ralle development updates, when simply idling in my afternoon, I found myself posting complaints on the Blizzard forum because it's been almost a year since MDX 1100 was publicly available, and the Warcraft III game's handling of MDX 1100 is still broken to this day. So, even the "professionals" on payroll don't have the time/energy to learn this stuff.

If we want an ETA for how soon I might offer this contribution to Hive now that I was thinking of it, we could base the ETA on how quickly I was able to update Retera Model Studio to support the MDX version 1100. Based on records that I could find, it seems that from the moment MDX 1100 went public to the time when I did a huge refactor of the Retera Model Studio internal systems to support the change, it was several months. The internet records are telling me it was 2 months but that feels low. So, especially given that I never actually compiled and ran my own local build of mdx-m3-viewer, it seems logical to me that if I took on the task of trying to be serious about contributing support for this to Hive, that given my lazy schedule I might end up doing it in about 4 months, so possibly by September 2023 I might have a branch of mdx-m3-viewer that could properly handle MDX 1100 while being backwards compatible with MDX 800/900/1000 (which Reforged isn't, so generally I think we hold ourselves to a higher level of standard than what Activision has to do because we also support Patch 1.26 users).

However, notably the 2 months of development time in a repo where I was exceedingly familiar with all the code was also based on the shared secrets of being told by @BogdanW3 how to interpret the basic changes on MDX 1100, which he had already been working on a parser for. So, for example, if @Ralle was going to update this thing himself without input from "experts" in the field telling him what to do (or giving him code to copy from, as Bogdan did for me) then I would expect this might take longer than my September 2023 estimate.

But maybe I'm just making things up. There are probably people hoping that by September, the ChatGPT system would be able to rewrite the entire mdx-m3-viewer from scratch. No idea.
 
Top