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!
Hey wanna ask, by any chance I could Embed my model with the model viewer on other website? Or it is not only cannot be done but also not allowed? just wondering, Because I'm Thinking of embedding some of my Warcraft model somewhere if possible (Like Sketchfab thingy?)
Hmm, interesting question. I guess the best I can do is to make a fullscreen viewer. On the other website you would need the ability to create an <iframe> tag or similar. What options do you have?
EDIT: Also, the model viewer is on Github so you can do what you want anyway.
Hmm, interesting question. I guess the best I can do is to make a fullscreen viewer. On the other website you would need the ability to create an <iframe> tag or similar. What options do you have?
EDIT: Also, the model viewer is on Github so you can do what you want anyway.
@Hayate The viewer is an open source library, you can use it however you want (this obviously doesn't include Ralle's client or all of the files stored on the Hive).
Technically yes and we have plans to do that. @GhostWolf has been working on a new viewer which is 98% done but I haven't seen him around for a while now and he seemingly lost motivation :S. Send him some encouraging rep everyone!
Does someone know where the cliff textures of TFT are placed?
RoC cliff textures are at ReplaceableTextures/Cliff/, however I cannot find the cliff textures for Icecrown Glacier / Dalaran Ruins / Black Citadel / Outland / Sunken Ruins.
Also, does someone know how water works?
I know they have 45 images per tileset water, but just looping between these images makes for a very blocky animation, rather than the more or less smooth animation in the game.
I know they have 45 images per tileset water, but just looping between these images makes for a very blocky animation, rather than the more or less smooth animation in the game.
What if they were looped at 60 fps or does it make it animate too fast? Otherwise they would need to be performing an inter frame blend to interpolate a an a water animation image.
Does someone know the logic of ribbon emitters? I don't remember how the texture is supposed to be mapped.
Is it stretched over the current amount of ribbons?
Not sure this is helpful, but they do depend on frame rate. At lower frame rates they place ribbon points less often, possibly because the points are placed every game frame or something like that. They still last the correct amount of time but at low frame rates the lack of points means they can be quite ugly as opposed to their normally smooth nature.
Unfortunatly you probably need to run a quick test. Change a ribbon texture to have unique strips of colour perpendicular to the expansion direction and cause the ribbon to expand a long distance (eg teleport triggers). If they remain the same ratio then it is expanding by wrapping the texture around. If the strips are stretch then it expands by stretching.
I have to ask something about the Hive's viewer. It really lags when I open it want to check some model. It's so slow and lagging. I have old computer so I think that's the reason. My graphic card is 128 mb and RAM memory 1 gb.
I was wonderring if there is a way to 'minimize' the lag somehow?
I still have some optimizations to do, but they mostly relate to having many models loaded. If you mean it lags for you with one model, there isn't really anything to do about it, since it's your hardware.
Out of interest, do you mean start up is slow, or the actual rendering?
I still have some optimizations to do, but they mostly relate to having many models loaded. If you mean it lags for you with one model, there isn't really anything to do about it, since it's your hardware.
Out of interest, do you mean start up is slow, or the actual rendering?
The test model used for these two errors is: Night Elf Ranger (Main model for the first error, Portrait model for the second error.)
Some textures do not load:
(These have teamcolor.)
Sometimes, models will not load:
In fact - this seems to happen often (always?) with Portrait models. Perhaps something to do with the Cameras? Or the distance from center?
The camera controls are off. Right-click no longer moves the camera (pans it), mouse wheel is either too slow or too fast, the camera starts way too zoomed out. The camera controls and settings in the original viewer are much better.
@Deolrin The texture used is not power of two and is thus invalid. I will add an error for this for future debugging (although I don't think Ralle is actually logging errors).
I cannot say anything about the error, because it doesn't happen to me, and it doesn't look like it's related to the viewer.
If you want to test it further, rather than left-clicking on View in 3D, middle click it to open in a new tab.
If the error originates in the viewer, it will be visible, rather than being obfuscated by the surrounding code.
As to the camera - that needs to be relayed to @Ralle, I no longer make the main client.
@Deolrin The texture used is not power of two and is thus invalid. I will add an error for this for future debugging (although I don't think Ralle is actually logging errors).
No it is not. You can happily make a blp texture like 111*111 and WC3 will load it, mipmaps and all. Recently it will even load textures such as 1920*1080 however it still will only load the lowest mipmap level that is less than or equal to 512 in both dimensions.
WC3 has always supported not power of 2 textures. When I first started my research into the blp format I discovered this, and that was before the latest wave of updates.
I have no idea who came up with the idea that WC3 textures must be powers of 2. It is only recommended they are powers of 2 to make mipmap generation easier. If the textures are not a power of 2 then the reduction per level can be over half (by 1 pixel), and hence cause problems with aliasing because the common anti-alias filters only work up to a half reduction. To get around this one has to use filters such as area sampling which are considerably more computationally intensive and often not available in common image APIs.
Oh, there is also another thing - do you support textures that are, e.g - 128x256? Because WC3 has a bunch of those rectangular textures, not just square ones.
I don't know about what DSG said, but I've never checked any non-power-of-2 textures.
Is there a technical reason why you cannot use a texture that is not a power of 2 directly? Is it some kind of OpenGL ES limitation? As far as I am aware GPUs do not have any issue using non power of 2 textures, just they are avoided for other reasons.
They are avoided because GPUs certainly have issues with them - one cannot use mipmapping or a repeating wrap mode with NPOT textures.
These are not needed for things like data textures (e.g. hardware skinning), but they are for diffuse textures.
A situation where you don't need it for diffuse textures is in 2D games, where you usually don't need mipmapping and repeating.
Added automatic up-scaling also to TGA and BMP textures.
I do not know the exact details of NPOT on different driver implementations, however they are problematic regardless.
It has nothing to do with supporting NPOT, and everything to do with usage limitations and performance.
Again, I do not make the main client anymore. The fact that I fix things doesn't mean you'll immediately see changes on the hive.
Latest version is 4.0.9.
The version should be printed to the browser's console. If you have any issue, please specify the version.
Note that it might not always be synchronized on all clients (Hive's model viewer, the map viewer, the sanity test, ...)
This version mostly added optimizations to the MDX handler, making rendering maps at decent frame rates much more feasible.
For example, when rendering Lost Temple (the heaviest map I tested so far), performance went from 35 FPS to 52 FPS on my computer.
Culling is currently off, so performance doesn't change if models go out of the camera's view.
Simple point culling is active again.
This mostly makes maps function much faster, by not updating and rendering things that are not seen by the camera.
This does mean the viewer will be slightly slower when you zoom all the way out and everything is visible.
It will be optimized in the future.
The map handler got updated.
Thanks to @Azsure for helping me figure new stuff out.
It is probably not a well known fact, but there is a map client at Map | HIVE
Changes are mainly focused around adding new MPQ and map code that handles also editing and saving them!
Yes, you can now manipulate MPQ archives and maps in the browser. What a day.
Some improvements to map rendering have also been made.
Added support to reading and writing most of the internal map files, technically allowing any kind of editing, but so far without any easy to use API, just raw data.
Just as an example of how it can be used, I created a function that applies a heigtmap image to a map's terrain, which someone asked for.
Fixed many issues with MDX rendering, some of which were introduced in version 4 due to the whole overhaul of the rendering code.
Most models should look a lot more correct now, especially more complex ones.
Attached two comparison images from the unit tests, although they don't quite capture the changes.
Warcraft 3 was officially designed to run on a 8 MB 3D video card (TNT, i810, Voodoo 3, Rage 128 equivalent or better) with DirectX8.1 support. I suspect that at least one of these video cards does not support power of two textures.
Quoting a small part of this post from Gamedev.net:
" [...] My problem is that I face severe graphics card limitations. I have a voodoo 3 2000, it supports a maximum texture size of 256x256 (OUCH!!), 3 multitexture layers, no pixel shaders, no vertex shaders, only power of two textures, 16 megs video RAM limit. [...]"
Warcraft 3 was officially designed to run on a 8 MB 3D video card (TNT, i810, Voodoo 3, Rage 128 equivalent or better) with DirectX8.1 support. I suspect that at least one of these video cards does not support power of two textures.
Except WC3 does not enforce the limit... Both TGA and BLP files can be loaded as non power of 2 textures. Further more TGA files are not even subject to a maximum texture size limit like BLP files are (one can easily load a 1920*1080 sized TGA as a texture in WC3). Although it might have been the case that such textures were highly bug prone in the past, that is certainly not the case anymore as all modern supported GPUs support larger than 512*512 textures and non power of 2 textures.
Is there a technical reason why you cannot use a texture that is not a power of 2 directly? Is it some kind of OpenGL ES limitation? As far as I am aware GPUs do not have any issue using non power of 2 textures, just they are avoided for other reasons.
I have no idea who came up with the idea that WC3 textures must be powers of 2. It is only recommended they are powers of 2 to make mipmap generation easier. If the textures are not a power of 2 then the reduction per level can be over half (by 1 pixel), and hence cause problems with aliasing because the common anti-alias filters only work up to a half reduction. To get around this one has to use filters such as area sampling which are considerably more computationally intensive and often not available in common image APIs.
Just answering your questions here. Power of two textures allow Warcraft 3 to run and look as intended, on the video hardware it was officially designed for in 2002.
[...] Although it might have been the case that such textures were highly bug prone in the past, that is certainly not the case anymore as all modern supported GPUs support larger than 512*512 textures and non power of 2 textures.
3D accelerator video cards from the mid-1990s up until the early 2000s were designed that way iirc. That is as simple as that. Therefore, all the textures found in video games had then to be power of two textures, in order to comply with the technical limitations of the 3D hardware of their day.
Except WC3 does not enforce the limit... Both TGA and BLP files can be loaded as non power of 2 textures. Further more TGA files are not even subject to a maximum texture size limit like BLP files are (one can easily load a 1920*1080 sized TGA as a texture in WC3). [...]
Fine, but I am guessing that the results would be... sub-optimal on some of the video hardware the game was originally designed to run on. I am guessing there would be visual glitches / artifacts, or the textures may not load, or they may look blurry, or the game engine might eventually simply crash when trying to load such textures.
Maybe in the future I will move to WebGL 2 (based on OpenGL ES 3), which supports NPOT textures with mipmapping etc.
Regardless, this isn't very relevant.
Does anyone know what exactly a line-emitter particle emitter is?
It is used in the Thunderclap Caster model to make a circle of particles.
Without it being set, the particles are spawned randomly.
Are the rules for this known? (e.g. does it simply disable randomness, or is there more to it)
For the record, even 3D accelerator video cards from the mid-late 1990s could have support for texture size larger than 256*256.
iirc, a lousy SiS 6326 AGP video card supported 512*512 textures, while an even more lousy S3 ViRGE DX PCI video card supported 1024*1024 textures iirc. The problem was that such video cards had other severe technical limitations (and sometimes also buggy drivers). Therefore, they were not really suitable for decent hardware accelerated 3D gaming.
The only ones from that era which were recommended (and suited) for 3D gaming were the 3Dfx Voodoo series of video cards (Voodoo and Voodoo 2). And both of them had a texture size limit of 256*256, by design. Same for Voodoo 3 video cards.
... and of course, none of the video cards mentioned above had Non power of 2 texture support afaik.
Is there A possibilities to have the Model Viewer to Renders the Warcraft Model Animation into TGA or PNG sequence with Alpha?
And Able to make the View to Follow an Camera In real time (For Turntable use, while having the animation played)
The ModelViewer class offers a toBlob(callback) method.
You can save the given blob as an image with standard JavaScript.
E.g. something along the lines of:
JavaScript:
viewer.toBlob((blob) => {
let url = URL.createObjectURL(blob);
});
You can get all sorts of different scripts that allow to download urls easily. For the unit tester, I use this simple function:
JavaScript:
function downloadUrl(url, name) {
let a = document.createElement('a');
a.href = url;
a.download = `${name}.png`;
a.dispatchEvent(new MouseEvent('click'));
}
You get full control over the viewer with the update(), render(), and updateAndRender() methods.
This means you can indeed move frame by frame and take screenshots if you desire.
It is a bit troublesome that toBlob() is asynchronous, so you cannot run this kind of code in a simple loop. I thought about changing it to promises at some point, which will allow you to effectively have this code:
JavaScript:
async function record(viewer, frames) {
for (let i = 0; i < frames; i++) {
viewer.updateAndRender();
// Note the async/await!
let url = URL.createObjectURL(await viewer.toBlob());
downloadUrl(url, `frame_${i}`);
}
}
I have done this in the past to make the auto-generated gif's of models when I made that demo gallery client that no one liked.
There isn't any code currently for this, however I won't mind making a quick implementation if you want. The actual recording really just takes the above tiny function if I change to promises from callbacks. The actual work here is the UI to let you select animations and what or what not to record, a way to move the camera, and so on. If I'll do it, I am not going to spend a lot of time at all on any kind of proper UI.
I am not sure what you mean by the second part.
If you mean just rotating the model or having the camera rotate around the model, you can do both with standard node operations.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.