• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

3D Model Viewer

Updated the viewer with the new fixes, and all splats.

I didn't do a general SLK parser, because that would be a pain (not really the SLK part, but rather the asynchronous nature of loading files in the browser).

I am planning to stop working on the viewer for now. Anything beyond this would be pretty much making Warcraft (which funnily enough is kind of feasible).

Things still blatantly missing from the MDX handler are ubersplat and sound event objects.
Both aren't hard to implement, but will probably not be.

I changed a lot of the code that handles the 3D math of objects (transformations, world locations, rotations, etc.).
So far I didn't notice any bugs, but if you see something weird, you know what to do.

Just as a small plaything, I added the version with walking in /walk, e.g.:
viewer.hiveworkshop.com/?q=units/nightelf/evilillidan/illidanevil.mdx -> viewer.hiveworkshop.com/walk/?q=units/nightelf/evilillidan/illidanevil.mdx
Right click to walk, shift + left click to attack, and delete to die.

Dammit, The Walk thing is so damn Cool with Some model
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Since some people asked about textures not loading properly for some models - this is a bug in Firefox.
It seems to be fixed in later versions (tested with Nightly 38).

As to the walk - it was actually very easy to do, since you have full access to the models and camera, you can check the client. It basically took a couple of minutes.
 
Since some people asked about textures not loading properly for some models - this is a bug in Firefox.
It seems to be fixed in later versions (tested with Nightly 38).

As to the walk - it was actually very easy to do, since you have full access to the models and camera, you can check the client. It basically took a couple of minutes.

Now Make a Browser Warcraft IV (Just Kidding)
xd
 

Ralle

Owner
Level 77
Joined
Oct 6, 2004
Messages
10,098
I know we are going down /that/ path again. But it would be cool to be able to create a scene with multiple models. I know we had that before, but here's the catch. Instead of positioning them using coordinates, you select them and make them walk in a certain direction to create the scene.
 
I know we are going down /that/ path again. But it would be cool to be able to create a scene with multiple models. I know we had that before, but here's the catch. Instead of positioning them using coordinates, you select them and make them walk in a certain direction to create the scene.


You mean Warcraft 3 Machinima type?
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Changed it so that left click selects units, the arrow keys move around the camera, and closing the viewer wont clear it, so you can load as many models as you want by going back to the gallery.
Killing a unit (delete) will stop it from being controllable.

One thing to note is that selections are based on pixel-perfect color keys. This means that to select something, your cursor must be above one of its geosets (team glows are skipped), unlike WC3 which uses bounding shapes.
 
Changed it so that left click selects units, the arrow keys move around the camera, and closing the viewer wont clear it, so you can load as many models as you want by going back to the gallery.
Killing a unit (delete) will stop it from being controllable.

One thing to note is that selections are based on pixel-perfect color keys. This means that to select something, your cursor must be above one of its geosets (team glows are skipped), unlike WC3 which uses bounding shapes.

Can you make a full screen option and mouse-edge scrolling functions? You could also create a selection circle. By far, I am very impressed. This could go far enough into some online Warcraft 3. +rep
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Can you make a full screen option and mouse-edge scrolling functions? You could also create a selection circle. By far, I am very impressed. This could go far enough into some online Warcraft 3. +rep

I thought about adding selection circles in the past, however this will push it too much out of generic model viewer realm (heck, it's already pretty far stretched).
Sure, it could be cool to make something more similar to a game, as a tech demo, but it will take a long time, and not really benefit me in any real way in life, except for being cool.
This is also why I am not adding sounds, even though with recent browsers you can easily add 3D sounds.
 
I thought about adding selection circles in the past, however this will push it too much out of generic model viewer realm (heck, it's already pretty far stretched).
Sure, it could be cool to make something more similar to a game, as a tech demo, but it will take a long time, and not really benefit me in any real way in life, except for being cool.
This is also why I am not adding sounds, even though with recent browsers you can easily add 3D sounds.

well, those selection circles could only be visible in /walk mode only.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Again - that means changing the library and adding game-like capabilities. Which is fine, it just wont be a model viewer anymore, and I really should work on other more important things than this right now (the fact that I am still updating it is so illogical, it's beyond my understanding, and yet at the same time I want to make a web warcraft...ugh).
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
I don't really see how it's useful, but either way it wont have UI.
Unless one day, someone will design UI.

Added it as Model[Instance].getPolygonCount().
So in the normal version: instance.getPolygonCount(), and in the walk version: selectedUnit.instance.getPolygonCount().
 
Level 49
Joined
Apr 18, 2008
Messages
8,421
http://viewer.hiveworkshop.com/?q=236279
Hey, are the runes on this model screwed up because they have animated color\opacity or is it because the texture didn't load properly? Opacity seems to work, but they all display as black planes. They're supposed to be individual runes from the texture: "Doodads\Cinematic\GlowingRunes\GlowingRunesColor.blp".
Screenshots of how it should look like -
http://www.hiveworkshop.com/forums/...g-contest-22-mimic-possesed_tome_ingame_1.png
http://www.hiveworkshop.com/forums/...g-contest-22-mimic-possesed_tome_ingame_2.png
http://www.hiveworkshop.com/forums/resource_images/13/models_12790_screenshot.jpg
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
It looks like it does in your screenshots (or rather it doesn't, the runes are always colored, but whatever).
Actually there are multiple issues with it, but those are unrelated to the texture not loading.

Like I previously stated at least twenty times in this thread alone, if you have issues, open the console (F12) and see what errors it shows. If no errors are shown, it probably failed to load the texture in an odd way like Firefox.
 
Level 19
Joined
Oct 7, 2014
Messages
2,209
Mozilla Firefox v36.0.1

The Web Console logging API (console.log, console.info, console.warn, console.error) has been disabled by a script on this page.

This???

Edit:
attachment.php
 

Attachments

  • Error.png
    Error.png
    574.8 KB · Views: 108
Level 29
Joined
Jul 29, 2007
Messages
5,174
Yes. I can assume you are using a laptop with an Intel iGPU that has been blacklisted because of bad drivers.

First of all, if your drivers aren't updated, update them.

If it still gives you the same error, you can try forcing it to run WebGL either way (but do this at your own risk).
To do this, go to about:config (type that in the address bar), search for "webgl", and double click "webgl.force-enabled" to set it to true, and restart the browser.
 
So, i take it this is the place to post feedback on the model viewer?

I'd like to make some suggestions:
  • Add support for vertex coloring. Right now, geosets with vertex coloring (tinting) do not show up correctly, this should be the easiest thing in the world to fix.
  • It would be awesome if the viewer had some more particle support, perhaps even tail particles. The fact that you already support ribbon emitters is really impressive though imo! You beat magos on that aspect.
  • Some ingame texture paths fail to load, such as those from the UI folder, which ruins it for people who use textures from the gluescreens.
  • It is awesome that you support spawn objects, but please make it so that they are cleaned out when you change or repeat the animation.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
So, i take it this is the place to post feedback on the model viewer?

I'd like to make some suggestions:
  • Add support for vertex coloring. Right now, geosets with vertex coloring (tinting) do not show up correctly, this should be the easiest thing in the world to fix.
  • It would be awesome if the viewer had some more particle support, perhaps even tail particles. The fact that you already support ribbon emitters is really impressive though imo! You beat magos on that aspect.
  • Some ingame texture paths fail to load, such as those from the UI folder, which ruins it for people who use textures from the gluescreens.
  • It is awesome that you support spawn objects, but please make it so that they are cleaned out when you change or repeat the animation.

Geoset animations are supported. Can you give an example of where they don't work properly?

Pretty sure I left the tail particles buggy implementation there, which looked ok in most cases.

There is nothing I can do about textures that fail to load. The cause is usually AdBlock [Plus] blocking the requests for some textures, I have no idea why. If you open the console (F12) and you don't see a ERR_BLOCKED_BY_CLIENT error, you can give me a link to the model and I'll see if there's an actual error (for example, someone linked to a model that didn't work, and the texture just wasn't power-of-two, which is unsupported).

As to the last point, I prefer it to stay the way it is. Both for the walk version, and because it's not worth the time it will take to change it.
 
Geoset animations seem to work except for the vertex coloring. Here is an example, notice how the glows are white, whereas they are supposed to be red and orange.

I don't have AdBlock installed for my browser, yet some textures still fail to load. Here is an example - the white walls turn up black for me. I noticed it might not be related to the UI folder though, since Kitabatakes attachments load flawlessly despite using textures from the Night Elf glue screen.

Mostly, i don't see particles at all - for example here. I have a theory that the viewer might not support animated emission rate for particles, which is what i used for all my old models, but not for my new ones (where instead i used animated visibility, and the particles show up fine).
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Seems like I forgot to change the geoset color part when I changed stuff around, fixed it.

The texture fails to load because of a server-sided thing that was left over from ages ago, when the viewer couldn't yet parse BLP images, and relied on PNG conversion on the server.
Asked Ralle to remove it.

The particles didn't show because, for some reason, I removed the case when an emitter doesn't have a visibility track, added it back.
 
Great to hear, i look forward to seeing it work!!

EDIT: By the way, another thing overlooked in the viewer is particle priority layers. Particles with higher priority should be rendered on top of particles with lower priority, regardless of depth. I wouldn't stress too much of this ofcourse, but it is still something, if you want to accurately show how the models would appear ingame.
 
Last edited:
Level 49
Joined
Apr 18, 2008
Messages
8,421
GhostWolf, will you consider adding simple attachment functionality? Basically let users 'attach' any model they want (import it using the Hive Workshop ID or WC3 path) to the currently viewed model. Let the user choose an attachment point (those already exist in WC3 as nodes), and then just stick the model there and make it permanently loop Stand. It would be incredibly helpful with the thousands of attachment models on the Hive, as well as testing all of those weaponless 'attach your own gear' models.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Added a simple experimental implementation of a texture rendering function.
This allows to do a couple of things without messing with the viewer, such as rendering selection circles, rendering arbitrary textures in the 3D world (something that some people requested for some reason), and possibly making an intuitive attachment system.

Added selection circles to the walk version, and a small demo of said attachment system.
Press P to enter/exit parenting mode, which should highlight all possible attachment points on every unit (except the selected one). Press on an attachment to attach.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
For the last time, nothing was removed from the viewer (in fact, new things were added), however there is no UI for anything.
If you want something old or new to have UI, suggest how to make it.
I attached an image with a possible new client, that works kind of similarly to the world editor, in regards to adding new units.

If all you want to do is complain, go away.
 

Attachments

  • possibleclientorwhat.jpg
    possibleclientorwhat.jpg
    485.7 KB · Views: 127
Top