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

Warcraft 3 HQ

Status
Not open for further replies.
Level 8
Joined
Jul 24, 2006
Messages
157
I am working on some stuff to improve the visual quality of wc3.

My approach is based on auto generated content because Warcraft has to many models/textures to start manually.
I will post my results in this thread, at the moment I am working at:

Upscaled Textures

Of course you can only make a small change with upscaling textures because you cannot generate new informations.
On the other hand it helps to make things sharper/less pixelated.
Some screenshots:

attachment.php


attachment.php

attachment.php

As you can see the difference is larger for terrain/doodads/buildings than for units.
(The castle texture is not upscaled in the image)

Animated Trees

This means I add a stand animation to the tree models:
http://webmup.com/R3ADJ/vid.webm
This animation is very simple, but I dont have any experience with animations.
The point is that it appears less static with the animations.

-Added copy of the trees as stand model for meele maps
-Added stand animation to the following Doodads: Bush, Corn, CatTail and Wheat

Download: TreeStandAnimations_v0.2


SC2 Warcraft Assets

Well, I have no access to the assets at the moment.
Most intresting part is weather the edited models use similar textures,
if thats not the case I see problems with custom maps overwriting this textures.


Problems

BLP files cannot be larger than 512*512, this means I would need to use tga instead.
But when I use tga custom maps cannot overwrite this textures anymore.
Thats why I want to release a version of the upscaled textures that use only tga for the large terrain tiles and the rest is blp.
Most customs maps do not overwrite this tiles and it is important to replace them for better graphics.
(This also means that I cannot upscale the textures of the user interface.)

Instructions

At first Im going to release the content as local files. This means you can extract the files into you warcraft folder and activate local files.
To activate/deactivate the local files feature I attached the two necessary .reg files: AllowLocalFiles
This way it is easier for me to release only parts of the planed content.
Later I can combine the files into one mpq archive.

Else

Tutorial how to use Anti Aliasing in WC3:
http://www.hiveworkshop.com/forums/miscellaneous-tutorials-456/anti-aliasing-war3-tutorial-255036/

I would like to hear some feedback.
 

Attachments

  • befor.jpg
    befor.jpg
    608.9 KB · Views: 2,344
  • after.jpg
    after.jpg
    700 KB · Views: 2,073
  • improvment.jpg
    improvment.jpg
    763.4 KB · Views: 3,494
  • TreeStandAnimations_v0.2.zip
    630 KB · Views: 457
  • AllowLocalFiles.zip
    518 bytes · Views: 488
Last edited:
Level 12
Joined
Mar 13, 2012
Messages
1,121
I love your effort, and the thread got exactly the name it should have.

Texture upscaling is rather useless imo.
Using the sc2 wc3 models sounds great (if they fit). They sure will be available in the future.
Also adding polygons is great. Many models (as the tauren in your sample image) have those realy blocky parts, your upscaled version looks much better.
 
Level 8
Joined
Jul 24, 2006
Messages
157
I am sure that adding more work to the already terribly slow engine, will end up well.
The engine is slow, but I think new computers are fast enaugh to deal with some additional polygons/animations/larger textures.

I attached a first version of the animated trees.
Known Issues:
AshenCanopyTree0.mdx is not working and I have no idea why.
Replacing the .slk files via local files only works for custom maps.
(The Slk files are necessary to turn off the leightweight model option for trees)
 

Attachments

  • TreeAnim_0.1.zip
    289.2 KB · Views: 130

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,188
The difficulty is that the volume of the model needs to be the same and there should not be any holes in the mesh.
That is because the models lack such information such as depth maps or even normal maps. The best you can do is use the vertex normals to smooth the models a bit however this does not add additional surface detail.

Automatic upscaling of textures does nothing next by itself. the only improvement in quality you will see is due to the filters applied to do the up-scaling. Specifically artificial sharpness will reduce the natural blur that occurs due to bi/tri-linear filtering however in the end it is adding information based on assumptions rather than adding any more detail.

In additional to anti-aliasing you can also use dynamic super resolutions however this will cause WC3 to crash when printing screen. You can also force tri-linear filtering instead of the normal bi-linear filtering which improves mip-map transitions of angled surfaces.
 
Level 8
Joined
Jul 24, 2006
Messages
157
That is because the models lack such information such as depth maps or even normal maps. The best you can do is use the vertex normals to smooth the models a bit however this does not add additional surface detail.
I know, but like Ezekiel12 sad wc3 models are edgy and they need some smoothing.

Automatic upscaling of textures does nothing next by itself. the only improvement in quality you will see is due to the filters applied to do the up-scaling. Specifically artificial sharpness will reduce the natural blur that occurs due to bi/tri-linear filtering however in the end it is adding information based on assumptions rather than adding any more detail.
I attached one terrain tileset upscaled with bi-linear scaling and the other with my solution.
I use nnedi3 for upscaling and some addition filters to reduce jpg artifacts and add some sharpening.

In additional to anti-aliasing you can also use dynamic super resolutions however this will cause WC3 to crash when printing screen. You can also force tri-linear filtering instead of the normal bi-linear filtering which improves mip-map transitions of angled surfaces.
And I wanted to ask you for some screenshots :p
 

Attachments

  • Lords_DirtRough_bilinear.png
    Lords_DirtRough_bilinear.png
    793.3 KB · Views: 545
  • Lords_DirtRough_nnedi3+filter.png
    Lords_DirtRough_nnedi3+filter.png
    1.2 MB · Views: 513
Level 8
Joined
Jul 24, 2006
Messages
157
I attached .reg files to enable/disable local files to the first post
New version of the trees with stand animation is available:
-Added copy of the trees as stand model for meele maps
-Added stand animation to the following Doodads: Bush, Corn, CatTail and Wheat
Do you think I should do this to the grass/shrub models aswell?

Another Question:
I want to make a packet with some of the upscaled textures, but the filesize will be to large for hive.
Is there a way I can upload archives larger than 50MB?
For example all upscaled textures (without UI) are ~800MB large.
 
Level 21
Joined
Jul 6, 2014
Messages
6,791
Do you think I should do this to the grass/shrub models aswell?
That would be great!

I want to make a packet with some of the upscaled textures, but the filesize will be to large for hive.
Is there a way I can upload archives larger than 50MB?
For example all upscaled textures (without UI) are ~800MB large.
You could upload it to mediafire and then post the link here
 
Level 8
Joined
Jul 24, 2006
Messages
157
If the upscaling is all automatic you make a program to build it from the data archives and upload that instead of uploading the results. That way ~800 MB of textures becomes a 500kb (or less) program.
The program uses avisynth via a media player and it takes 1 hour to generate the textures.
(That was the easiest way to access avisynth via java)
Long story short: It would be complicated.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
You can probably just use ImageMagick.

And while having fast computers helps, the engine itself is still working hard and gets painfully slow (old code, etc.)
Just because a computer can easily render millions of polygons per frame, doesn't mean that something as old as Warcraft 3 can on that same computer.
 
Level 8
Joined
Jul 24, 2006
Messages
157
You can probably just use ImageMagick.

And while having fast computers helps, the engine itself is still working hard and gets painfully slow (old code, etc.)
Just because a computer can easily render millions of polygons per frame, doesn't mean that something as old as Warcraft 3 can on that same computer.
I dont think that Image Magick supports the nnedi algorithm.
Besides my goal is to add as little polygons as possible and with the larger textures/animated trees I dont have a problem. (Played some maps)

Another screenshot that shows the improvment for the tilesets:
 

Attachments

  • Screenshot.jpg
    Screenshot.jpg
    796.3 KB · Views: 443
Level 12
Joined
Mar 13, 2012
Messages
1,121
Another screenshot that shows the improvment for the tilesets:

I like that you try to push the boundaries of wc3 but I honestly can not say which screenshot looks better too me. There are only small differences.
Is the lower one the upscaled one?
 

Zwiebelchen

Hosted Project GR
Level 35
Joined
Sep 17, 2009
Messages
7,236
The problem is that the artifical sharpening of the textures introduces visual artifacts from the compression.

It's a great idea to remake all the textures for higher definition, but unfortunately, you can't just magically create detail that was never there to begin with just via applying filters. :(

What we need is a guy with enough dedication and time to remake all that textures in highres from scratch. But then we could also just wait for Blizzard to release their SC2 ports of WC3 models, which are not bound to the 512x512 texture res limit...
 
Level 8
Joined
Jul 24, 2006
Messages
157
Well, at least I like the result, look at this detail:
attachment.php

The edges of the stone look much better.

What we need is a guy with enough dedication and time to remake all that textures in highres from scratch. But then we could also just wait for Blizzard to release their SC2 ports of WC3 models, which are not bound to the 512x512 texture res limit...
The point is that we can use larger tga textures even for models, but then it would not work fur custom maps that replace the textures.
Besides for most models 512x512 is large enaugh.

For everyone who is intrested, I uploaded a bunch of textures:
Textures Upscaled 0.1
Notes:
-The archive is 730MB large
-It does not contain the User Interface textures
-I think for many textures in the pack the upscaling is useless, but I think someone would need to decide this manually.
-Tga textures for models contained in the archive are not used
 

Attachments

  • Detail.png
    Detail.png
    62.6 KB · Views: 729
Level 21
Joined
Jul 6, 2014
Messages
6,791
Well, at least I like the result, look at this detail:
attachment.php

The edges of the stone look much better.


The point is that we can use larger tga textures even for models, but then it would not work fur custom maps that replace the textures.
Besides for most models 512x512 is large enaugh.

For everyone who is intrested, I uploaded a bunch of textures:
Textures Upscaled 0.1
Notes:
-The archive is 730MB large
-It does not contain the User Interface textures
-I think for many textures in the pack the upscaling is useless, but I think someone would need to decide this manually.
-Tga textures for models contained in the archive are not used
I can clearly see a difference

Downloading :)
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,188
It only looks better because it adds "artificial" sharpness. By generating fake sharpness data it makes the texture appear to be a higher resolution because what we see has higher frequency components (unlike lower resolutions as bilinear filtering does not particularly alter the frequency information of a surface when up-scaling).

A similar trick was used in The Elder Scrolls: Oblivion for the LoD after a few patches. Instead of increasing the LoD resolution (which would drastically raise system requirements), they instead added an "artificial noise" overlay to the LoD which was higher resolution that the underlying LoD textures. Since the noise contained high frequency components but the underlying texture did not, it made it appear higher resolution because of the added frequency information, and not that the underlying texture (which contained the real detail) was any higher resolution. You could say this approach was to add fake detail to make something look more detailed than it actually is.

With your approach the surface contains no more real detail. As mentioned previously it can also introduce artefacts as it makes everything sharper, even stuff that is not meant to be made sharper.
 
Level 8
Joined
Jul 24, 2006
Messages
157
It only looks better because it adds "artificial" sharpness
I think the main reason is because the upscaling algorithm is able to detect edges.
Whats your point?
Should I do less sharpening and add more noise?

By the way I noticed that I forgot some replaceable textures (cliffs,uberspalts) because they are hidden in archives "A.mpq", "B.mpq",....
When I have time I will make a packet that contains this missing mpqs with textures.
 
Level 8
Joined
Jul 24, 2006
Messages
157
As promised, here are the missing MPQs that fix cliffs and ubersplats for different tilesets:
TexturesUpscaled 0.1 Bonus (150MB)

Example:

attachment.php

attachment.php




After that you can also fix the editor cliff bug (Lordaeron Summer cliffs for all textures) by deleting/renaming the ReplacableTextures\Cliff folder.
 

Attachments

  • cliff_north1.png
    cliff_north1.png
    283.2 KB · Views: 682
  • cliff_north_2.png
    cliff_north_2.png
    241.2 KB · Views: 623
Level 8
Joined
Jul 24, 2006
Messages
157
I rewrote the code that adds polygons, now it is possible to enter a treshold and only if the value is larger a line is splitted, meaning a new triangles is added.
I will still need some time to figure out in which cases a split of lines is good and how much I should move vertices.

For the Tauren Model this means:
Normal: 470 vertices, 570 faces
First Approach: 1560 vertices, 1904 faces
With Treshold: 804 vertices, 797 faces

Anyone here knows what number of vertices/faces is good for the engine?
 

Attachments

  • Upscale.jpg
    Upscale.jpg
    209 KB · Views: 367

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,188
Anyone here knows what number of vertices/faces is good for the engine?
What Blizzard used?

There really is not much you can gain through tessellation of the model geometry because the per vertex normals (I think that is what is used) do not give you much additional surface information. The results will also be hard to notice in game as the normals used already provide an illusion of curvature (only can notice at oblique angles).

I would only recommend it if you planned to use the model for 3D printing. Since normals cannot be printed you need to translate them into physical geometry to prevent loss of quality.
 
Level 8
Joined
Jul 24, 2006
Messages
157
Do you know how much the performance is affected by the number of vertices compared to the number of faces?

For the Tauren we have:
Low: 384 vertices, 315 faces
Medium: 425 vertices, 363 faces
High: 470 vertices, 570 faces

But there is also a difference between roc and tft models and some models look like they dont have a high res version.
The BloodElfSpellThief with a detailed model has 623 vertices and 505 faces, much more vertices than the tauren but less faces. On the other hand the face count between the low and high res tauren model is nearly doubled.

The results will also be hard to notice in game
Of course this solution is based on the idea to find and remove only the most annoying edges.
So it depends if an algorithm can be clever enaugh or if someone would need to do it manually.

I would only recommend it if you planned to use the model for 3D printing. Since normals cannot be printed you need to translate them into physical geometry to prevent loss of quality.
Wc3 does not have a normal map, I think you are referring to the printed starcraft 2 model that looked edgy?
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,188
Wc3 does not have a normal map, I think you are referring to the printed starcraft 2 model that looked edgy?
WC3 does use per vertex normals (as did most old games, even back as far as PS1 if I recall). They are fundamentally the same idea except you can think of them as being a normal map where each vertex is aligned directly on a pixel (so they do not add surface details to faces, only general curvature).

In theory a set of 3 vertices making up a face (I think that is the correct term) with per vertex normals can be used to tessellate the face with a curvature. The idea being that one can interpolate the normals (as is what occurs during rendering I think) at any point during that face. The fundamental idea is that you try to make the geometry physically have the normals that it is shown to have through lighting trickery during realtime rendering. This means that a low vertex/face WC3 model could have its geometry smoothness increased by any order of magnitude to produce a model of any order of smoothness, possibly until it appears to be perfectly rounded during use.
 
Level 8
Joined
Jul 24, 2006
Messages
157
Ah okay, you mean the shading.
Btw I found a stupid error in the code and I added a new feature, so now you can manually limit the number of splits (for example say only the 100 most important splits are made).
Now I am at 720 vertices and 680 faces with the following result:
attachment.php

In game the changes of the body only make a minor difference, but the hooves look much better.
 

Attachments

  • Tauren.jpg
    Tauren.jpg
    73.6 KB · Views: 971

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,188
However, it's smarter to use sharpen tool of Photoshop instead of double or triple scaling them.
As far as I can tell he is making them in 2-3 steps.
1. Compression artefact reduction.
2. Resize
3. Sharpen

Sharpening without the resize would be of little benefit since you will not get "clean" edges on the textures (what we interpret as sharpness). Instead it would make some detail more clear visually but it would still appear as blurry due to the result of the bi-linear filtering.
 
Level 8
Joined
Jul 24, 2006
Messages
157
For a better overview what the algorithm is doing I wrote a tool that visualize the model while you can split the lines. Now it should be easier to improve the algorithm.
Besides I can use this tool in the future to implement some other model editing features.

Keys:
1 : less splits
2 : more splits
space : Switch between texture/wireframe

The tool is a bit large because it uses the jmonkey engine and i was to lazy to decide which jar librarys are important.


Another question, I found the enb thread http://www.hiveworkshop.com/forums/warcraft-editing-tools-277/enb-warcraft-3-a-237739/.
The directx 8 to 9 converter looks interesting, but is it possible to apply some useful filters instead of ugly bloom and some unnecessary color correction?
 

Attachments

  • Tool.jpg
    Tool.jpg
    85.2 KB · Views: 370
  • War3PolygonEnhancer_0.01.zip
    9.3 MB · Views: 197
  • Like
Reactions: pyf
For a better overview what the algorithm is doing I wrote a tool that visualize the model while you can split the lines. Now it should be easier to improve the algorithm.
Besides I can use this tool in the future to implement some other model editing features.

Keys:
1 : less splits
2 : more splits
space : Switch between texture/wireframe

The tool is a bit large because it uses the jmonkey engine and i was to lazy to decide which jar librarys are important.


Another question, I found the enb thread http://www.hiveworkshop.com/forums/warcraft-editing-tools-277/enb-warcraft-3-a-237739/.
The directx 8 to 9 converter looks interesting, but is it possible to apply some useful filters instead of ugly bloom and some unnecessary color correction?

it doesn't do anything, I'm pressing 1 or 2 still nothing.
 
Can you load a model? Maybe I should release the source code someday.

Just wanted to say that I use the texture pack myself and I enjoy it.

Yes it does. I loaded a Doom Guard model exported from MPQ and pressed 1, 2 ... it does nothing. Only the wireframe thing works using spacebar.
 
Level 39
Joined
Jul 26, 2004
Messages
1,481
Subscribing. Good stuff! But I still think using WoW tilesets (semi-legally), and converting them to a WC3-friendly style, is a better way of handling texture issues.

Admittedly, the idea is mine, so I might be biased.

Actually, HotS tiles might work better. But it seems like the goal here is to keep it as vanilla friendly as possible, so it might look out of place.
 
Level 8
Joined
Jul 24, 2006
Messages
157
Actually, HotS tiles might work better. But it seems like the goal here is to keep it as vanilla friendly as possible, so it might look out of place.
Yep, I hate the mods that simply copy some wow models and wow textures. They dont fit together with the wc3 style. WoW has smooth textures, unlike wc3.
I am not a graphic fanatic, but the original wc3 tilesets look blurred and have visible compression artifacts on an hd screen.
 
Yep, I hate the mods that simply copy some wow models and wow textures. They dont fit together with the wc3 style. WoW has smooth textures, unlike wc3.
I am not a graphic fanatic, but the original wc3 tilesets look blurred and have visible compression artifacts on an hd screen.

Your polygon enhancer doesn't work, any explanation?
 
Status
Not open for further replies.
Top