• 🏆 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

Level 19
Joined
Oct 7, 2014
Messages
2,209
Why isn't the model viewer not showing in my pc?
 

Attachments

  • model viewer.png
    model viewer.png
    328.2 KB · Views: 169
Level 29
Joined
Jul 29, 2007
Messages
5,174
The viewer's button won't show up if your browser detects it can't run it.
This can be caused by a couple of things:

1) Your browser doesn't support it (every mainstream browser should support it, if it's updated).
2) Your computer doesn't support it (old/blacklisted graphics card, old/blacklisted graphics driver).
3) Something somehow messed up, and while the viewer should be supported, the browser thinks it isn't.

If the button showed up in the past, you should restart your browser and/or your computer, and it will probably fix the issue.
Otherwise, you can open this page and see if your setup actually supports the viewer.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
I was wondering if the wireframe view mode can be changed so the actual mesh still shows and the wires just outlines the model?
Right now it often is just a big mess of lines.

You asked this in the past, however I just checked it and the wireframes aren't even showing at all for me...
Not sure what's the deal, and I am not touching the public client, since it's very old and everything changed since then, but it should be the following:
JavaScript:
viewer.setPolygonMode(3)
For reference, 0 means meshes don't get rendered, 1 means they do, 2 means wireframes get rendered, and 3 means both get rendered.
 
You asked this in the past, however I just checked it and the wireframes aren't even showing at all for me...
Not sure what's the deal, and I am not touching the public client, since it's very old and everything changed since then, but it should be the following:
JavaScript:
viewer.setPolygonMode(3)
For reference, 0 means meshes don't get rendered, 1 means they do, 2 means wireframes get rendered, and 3 means both get rendered.

Oh damn, I think you're right. My bad.

Another thing. And I think it might be impossible but here goes.
Is there any way an uploaded skin which is made for an in game unit can be transferred to the model viewer?
I was thinking, and I know this is not your job, and if possible, a "view in 3D" button in the skin section which then automatically applies the viewed skin.
 

Ralle

Owner
Level 77
Joined
Oct 6, 2004
Messages
10,101
Oh damn, I think you're right. My bad.

Another thing. And I think it might be impossible but here goes.
Is there any way an uploaded skin which is made for an in game unit can be transferred to the model viewer?
I was thinking, and I know this is not your job, and if possible, a "view in 3D" button in the skin section which then automatically applies the viewed skin.

Check out the Hive 2 beta.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,199
I didn't know that 3D Viewer cost money as Youtube does!?
It costs money in two ways. The first and most obvious is that GhostWolf could use the development time programming for a company as an actual job earning him money instead of writing the model viewer for free (lost income for him). The other less obvious one is that the bandwidth and resources used (from all the additional downloaded assets) to run the model editor costs Ralle some more money (higher running costs).

Does the model viewer correctly gamma correct? Apparently you need to adjust the linear RGB output by a gamma of 2.2 in order for the intensities and colors to be correct (more correct, since displays are mostly un-calibrated but roughly around 2.2 gamma). I am still looking into this but so far all my findings points to this being the case.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,199
I'm sorry, but I don't get it, you mean the quality or performance or...
What is there not to get? I am asking if the viewer correctly performs gamma correction as part of its pipeline.

BLP files are linear RGB texture files (gamma 1.0) and shaders operate in linear color space (gamma 1.0). Displays (monitors, TVs etc) operate in approximately sRGB color space (gamma 2.2). As such the shader results need to be corrected from linear RGB (gamma 1.0) to sRGB (approximately gamma 2.2) in order for them to be correct. If this is not done then the pixel values computed will be wrong as their brightness will be too low (under half for most values).

To show the difference, this is how WC3 is meant to look. When gamma is corrected to the average display value of 2.2.
152492d1456208019-how-produce-high-quality-warcraft-iii-screenshots-cs-corrected.jpg


This is not how WC3 is meant to look. This happens when you fail to gamma correct.
152491d1456208019-how-produce-high-quality-warcraft-iii-screenshots-cs-uncorrected.jpg
 
To show the difference, this is how WC3 is meant to look. When gamma is corrected to the average display value of 2.2.
[...]

This is not how WC3 is meant to look. This happens when you fail to gamma correct.
[...]

Wha..? So you are saying that War3 was meant to look as crappy overbrigthed as the first picture?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,199
Wha..? So you are saying that War3 was meant to look as crappy overbrigthed as the first picture?
Yes. It also makes perfect sense seeing how bright the textures really are (when viewed in sRGB color space, since they are linear RGB textures) and that the daytime lights of WC3 have a diffuse of 1.3 (1.3 times the texture brightness with a very small quadratic distance fade factor) added with ambient of 0.1-0.3 (0.1-0.3 times the texture brightness). It also makes sense from a technical point of view as there was no way to transfer darker texture detail before D3D9 and its OpenGL counter part added sRGB texture support and so all textures had to be made bright to conserve detail.

If one dims the day/night model you can get brightness more closely matching how WC3 is not meant to look but looking how it should.
152581d1456554344-how-produce-high-quality-warcraft-iii-screenshots-b-dim-real-big.jpg

Without the gamma the computed pixel brightness is wrong. Most noticeable is that individual color channels will have the wrong brightness resulting in color shift when mixed together because the color mix ratio changes, even more noticeable when using tinted lights as they amplify the effect. Diffuse lighting results are incorrect as they are not computed to factor in non-linear pixel response. Texture blend operations such as from bi-linear or tri-linear filtering are also incorrect and can result in considerably darker values than intended.

Gamma correction is not a matter of "it looks good" or not. It is a matter of correctness.
 

Ardenian

A

Ardenian

When I drag around a model and I move the mouse outside the Viewer, stopping pressing left mouse key,
is the dragging supposed to lock even though I do not press the left mouse key anymore ?
 
Level 28
Joined
Feb 18, 2014
Messages
3,580
Make sure features such as WebGL and such are enabled. They might be disabled by default for security reasons.
Well, In the Internet Explorer I can find the WebGL option but I can't find in Google Chrome but I'll take a look in the security setting.

It requires very advanced capabilities in your browser. Which browsers are you testing?

I'm using both Chrome and Internet Explorer, As I said Chrome doesn't support 3D Model Viewer and for some reason my browser is poor of capabilities?

Edit : I just find a solution : if I access "about:flags" I can find WebGL option and activate her but still the 3D Viewer doesn't appear in Chrome, something is missing I think?

DSG can you tell me what options do I need to activate in order to solve this?
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,199
DSG can you tell me what options do I need to activate in order to solve this?
Do not personally know about Chrome but this should be able to help.

Do note that WebGL may not be supported on some graphic drivers, graphic hardware and for other reasons. I would recommend you are using the lattest release of Chrome with the latest graphic driver for your graphic hardware.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
WebGL is enabled by default on every browser nowadays, as far as I know, no need to manually set flags anymore.

You can try opening the viewer's page manually (e.g. this). If it works, maybe the check is bugged.

Otherwise, WebGL in general seems to sometimes get bugged for people, and upon restarting the browser/computer it suddenly works again.

Lastly, your GPU and/or drivers might be blacklisted, which browsers do for known buggy GPUs and drivers.
 
Level 28
Joined
Feb 18, 2014
Messages
3,580
Warseeker, if you use Internet Explorer you are begging to get hacked. Stop using it please. Even Microsoft doesn't care about it.

Don't worry, I don't longer use Internet Explorer for browser, I was using it before for the 3D Viewer but now that I can use this 3D Viewer on Chrome, then I won't longer bother myself with Internet Explorer anymore.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,199
Warseeker, if you use Internet Explorer you are begging to get hacked. Stop using it please. Even Microsoft doesn't care about it.
Even hackers do not bother with IE any more when there are far more out of date Chrome and Firefox versions with known exploits sitting out there installed on people's machines. That said there really is no reason not to use Edge though.
 

Kyrbi0

Arena Moderator
Level 45
Joined
Jul 29, 2008
Messages
9,502
I know this is more of a question for GhostWolf (and sorry if it's been asked before), but what happened to the Model Viewer? Specifically the one with all the bells & whistles (options to modify team-color, or look at the geosets used, or show/hide parts of the geometry)?

I miss it. :<
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
It's under viewer.hiveworkshop.com/old/, if I remember correctly (that is, simply add the old directory for any valid viewer link).
I am not a designer, so I stopped bothering with creating the clients, Ralle can do it, or whoever wants to can - the viewer is just a library you can link to whatever UI you want.
The old viewer uses a very old version of the library, so transferring the UI (which is bad either way) to the new code means rewriting all of it, which I am not going to bother with for the above reason.
 
Last edited:
Level 29
Joined
Jul 29, 2007
Messages
5,174
There might be some updates regarding the viewer sometime in the near future.

In the meantime, I want to create an automated sanity check, that will take a model, and check for any issues that might bug it.
I split these to errors that will cause the model to completely fail (WE can't load it, WE crashes, etc.), and warnings, which are things that might mess up, but not necessarily, or not in a way that actually ruins something (e.g. missing a death animation).

So, I would appreciate it if you people can write causes here. This is similar to the thread I opened, however here I am solely interested in issues with the model integrity (e.g. a geoset animation referencing an invalid geoset), and not logical issues (e.g. extents needing to be recalculated, although I guess this can go in the warnings category?).

Right now I take care of these cases:
  • Error: An animation with length <= 0.
  • Error: A geoset animation referencing an invalid geoset.
  • Error: An event object has no keys.
  • Warning: A model containing no death animation
  • Warning: A light using attenuation values that are not min=80 max=200.

So far this does nothing but print nicely in the browser's console, but it might do more in the future.

I am considering adding program-specific warnings (e.g. if a model has particle emitters type 1, warn about loading and saving it with Magos, and such things).
 

Attachments

  • SanityCheckFailure.jpg
    SanityCheckFailure.jpg
    19.2 KB · Views: 79
Last edited:
I actually created a thread about how model doesnt work a long time ago,

Reasons Model Crashes Warcraft (That I know)

Not sure if it helps but i think most of it are already written here

Im not sure but model contain no death animation should be able to work properly, just that it will stay in warcraft for a while when it dies and looks ugly thats all
 
Last edited:
Level 29
Joined
Jul 29, 2007
Messages
5,174
That's why having no death animation is a warning and not an error. It's something that might mess up in certain situations, and maybe someone just isn't aware, or forgot about it.

Taking notes from your thread, thanks.

About stand - does it matter what kind of tags are used? E.g. is Stand First (or whatever the building version was) also considered ok for units?

Are you sure that multiple geoset animations referencing the same geoset causes a crash?
I can almost swear I once encountered a model with this issue, and had to change the viewer's code to adapt to it (of course, I never try models in WE, so I have no idea if it worked or not).
 
Last edited:
Level 29
Joined
Jul 29, 2007
Messages
5,174
Added these cases:
  • Error: A texture uses an unknown replaceable ID.
  • Error: Multiple geoset animations referencing the same geoset.
  • Warning: No animations.
  • Warning: No stand animation.
  • Warning: A texture uses both a file path and a replaceable ID (is this valid? what happens in WE?).
  • Warning: A vertex is attached to an invalid number of bones (below 1 or above 4).

I especially like how UI/Glues/SinglePlayer/Undead3D_Exp/Undead3D_Exp.mdx has whole geosets with vertices attached to 5, 6, 7, and 8 bones.

I don't know what you mean by "Event Object without any Sequence". Do you mean the event object's global animation is -1? ("None" in Magos).
"Two Geoset attached to 1 bone at once" - this again makes no sense to me, geosets are not attached to bones, vertices are, and vertices can be attached to multiple (up to 4) bones.
"Use "Replaceable ID 0" as a texture in the Material Manage" - I assume you mean when the file path is empty, otherwise it SHOULD be 0.
 

Attachments

  • SanityCheckFailure2.jpg
    SanityCheckFailure2.jpg
    120 KB · Views: 65
Last edited:
Level 29
Joined
Jul 29, 2007
Messages
5,174
It depends on how the game works.
If, like every other game in existence, they limit to 4 bones per vertex, then this is pretty silly.
If it supports any number of bones, it's still silly, because anything above 4 is basically useless in the grand scheme of things, and just requires more calculations.

That it works doesn't actually say which one is true. My viewer also works, by only taking the first 4 indices. It doesn't mean that the game does this as well (after all, if its done on the CPU side, it's the same loop regardless of how many bones you have, so I can see someone being lazy and just letting it run for however bones there are instead of 4).
 
Im not really sure about those, those are mainly observe from magos

For the stand, im not sure but it should work, any tags should be fine from my experience, but might be a lil buggy

One simple way to cause a WE map to die and unable to open with WE anymore is by having the geoset having multiple geoset animation, (well need to place the model in the map to cause a crash), it doesnt cause any error if just import in

I might be wrong tho since its kinda long time ago since i last time fiddle with magos

Event object without any sequence i think is same as what you mean by event object has no key
Is like if you check it in magos, if you created an event object, and you didnt add any keyframe (or framenumber) or maybe key is what you use, then it will have problem, i remember it will not cause a crash but it will make the model act abit like texture not import properly (empty model with shadow)

Two bone attach to one geoset that one i also not really sure, i remember it happens when i dealing with it in magos or sumthing, this one i really not sure,

Replaceable id 0 is basicly in Magos, right click in texture manager and create replaceable id, default is 0 when you just created it (which might cause error, tested this ling time ago but i dont remember) replaceable 1 is team color and replaceable 2 is team glow, and the other im not sure but some are for trees variation,
 
Last edited:
Top