[General] HD models and lag

Status
Not open for further replies.
Level 11
Joined
Jun 2, 2004
Messages
849
There's a moderately small limit on the number of polygons allowed for units and special effects on the screen (65535 I'm guessing), presumably due to an optimization trick they did with the graphics engine. Go past that and suddenly everything explodes with half the units disappearing and the remainder having their vertices go wild.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
I'm making a map where there are no more than 150-200 units fighting. If I take HD models could it lag or warcraft 3 can run it without any lag?
Depends on if all the units are visible. Off-screen the 150-200 units fighting will use more resources than the "HD models". If all 150-200 unit models are visible at the same time on-screen then it is very likely there will be graphic related performance problems.

I think the amount of polygons on screens lags WC3, and can lead into a crash
Polygons have little to do with it due to the power of modern graphic hardware. It is more the number of meshes that causes problems because each separate model mesh corresponds to dozens of graphic driver API calls.

This is why if one views a 480*480 map across the diagonal in the editor there is such poor performance. Not due to fragmenting and processing the 460,800 triangles required, trivial on a decent modern GPU, but rather the CPU time necessary to order the GPU to render 14,400 meshes of terrain each frame.

To put it in perspective WC3 requires that all 8 legacy fixed pipeline line lights be configured for every mesh rendered. Here is an example listing of WC3 1.27 rendering a single mesh running in OpenGL mode. Note this listing is technically related to reverse engineering so should not be used outside of legal reasons such as compatibility and interoperability.
Code:
glVertexPointer(3,GL_FLOAT,12,14EA7F28)
glNormalPointer(GL_FLOAT,12,14EA9D58)
glEnableClientState(GL_NORMAL_ARRAY)
glDisableClientState(GL_COLOR_ARRAY)
glDisable(GL_COLOR_MATERIAL)
glActiveTextureARB(GL_TEXTURE0)
glClientActiveTextureARB(GL_TEXTURE0)
glTexCoordPointer(2,GL_FLOAT,8,0DDFB028)
glEnableClientState(GL_TEXTURE_COORD_ARRAY)
glActiveTextureARB(GL_TEXTURE1)
glClientActiveTextureARB(GL_TEXTURE1)
glDisableClientState(GL_TEXTURE_COORD_ARRAY)
glLockArraysEXT(0,466)
glMatrixMode(GL_MODELVIEW)
glLoadMatrixf([1.000000,-0.000000,0.000000,0.000000,0.000000,0.829038,-0.559193,0.000000,-0.000000,0.559193,0.829038,0.000000,0.000000,0.000019,-1650.000000,1.000000])
glLightfv(GL_LIGHT0,GL_POSITION,0019F9A4)
glLightfv(GL_LIGHT1,GL_POSITION,0019F9A4)
glLightfv(GL_LIGHT2,GL_POSITION,0019F9A4)
glLightfv(GL_LIGHT3,GL_POSITION,0019F9A4)
glLightfv(GL_LIGHT4,GL_POSITION,0019F9A4)
glLightfv(GL_LIGHT5,GL_POSITION,0019F9A4)
glLightfv(GL_LIGHT6,GL_POSITION,0019F9A4)
glLightfv(GL_LIGHT7,GL_POSITION,0019F9A4)
glMatrixMode(GL_MODELVIEW)
glLoadMatrixf([1.000000,-0.000000,0.000000,0.000000,0.000000,0.829038,-0.559193,0.000000,-0.000000,0.559193,0.829038,0.000000,0.000000,0.000019,-1650.000000,1.000000])
glDisable(GL_CULL_FACE)
glActiveTextureARB(GL_TEXTURE0)
glClientActiveTextureARB(GL_TEXTURE0)
glEnable(GL_TEXTURE_2D)
glBindTexture(GL_TEXTURE_2D,491)
glTexEnvi(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_MODULATE)
glEnableClientState(GL_TEXTURE_COORD_ARRAY)
glActiveTextureARB(GL_TEXTURE1)
glClientActiveTextureARB(GL_TEXTURE1)
glDisable(GL_TEXTURE_2D)
glDisableClientState(GL_TEXTURE_COORD_ARRAY)
glDisable(GL_BLEND)
glDisable(GL_ALPHA_TEST)
glDrawElements(GL_TRIANGLES,885,GL_UNSIGNED_SHORT,13901BB8) Textures[ (0,491) (1,26) ]
glUnlockArraysEXT()
Most of these calls are non-trivial due to the nature of OpenGL. The D3D8 (now D3D9 but likely still using the fixed function pipeline) is no better with respect to cheap API calls.
There's a moderately small limit on the number of polygons allowed for units and special effects on the screen (65535 I'm guessing), presumably due to an optimization trick they did with the graphics engine. Go past that and suddenly everything explodes with half the units disappearing and the remainder having their vertices go wild.
The cause of this is more likely a limit with the underlying fixed function pipeline of the graphics API used. They were notorious for having limits such as number of lights (why one cannot use too many lights close together in WC3 without some going missing), number of textures, size of textures, buffer lengths, etc.
 
Last edited:
Level 6
Joined
Jun 4, 2017
Messages
172
Thank you all guys for all of these informations, I hope Blizzard's classic team will add soon a patch which remove all of these limits like polygons in screen, number of lights and all of these things however, I guess it's better for now to use those HD models in other maps with less units and decorations.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
Thank you all guys for all of these informations, I hope Blizzard's classic team will add soon a patch which remove all of these limits like polygons in screen, number of lights and all of these things however, I guess it's better for now to use those HD models in other maps with less units and decorations.
That is not possible without major engine changes.

One can always use StarCraft II which does not have such limits.
 
Level 6
Joined
Jun 4, 2017
Messages
172
That is not possible without major engine changes.
We can still hope in a warcraft 3 remastered after starcraft 1 remastered.
One can always use StarCraft II which does not have such limits.
I have sc2 wings of liberty but, if I remember correctly from last time I opened sc2 editor, in sc2 editor there are some limits if you haven't legacy of the void which I'm not gonna buy because I don't like too much protoss and because I would unlock a campaign which I can't win so, it doesn't make too much sense buy legacy of the void XD.
But then you'd be using SC2. Ick.
XD
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
We can still hope in a warcraft 3 remastered after starcraft 1 remastered.
Such engine changes would likely break a lot of maps and greatly raise the system requirements. This was no problem with SC1 because even after making the changes it could still run on a toaster and all the remaster does it use larger textures, one can even press a button to change quality to the old textures mid game.
I have sc2 wings of liberty but, if I remember correctly from last time I opened sc2 editor, in sc2 editor there are some limits if you haven't legacy of the void which I'm not gonna buy because I don't like too much protoss and because I would unlock a campaign which I can't win so, it doesn't make too much sense buy legacy of the void XD.
The editor should not have such limits as each of the campaigns is stand alone. As long as you own one it should be enough for all.
 
Level 6
Joined
Jun 4, 2017
Messages
172
Such engine changes would likely break a lot of maps
Probably, but even if that happen we only need to copy all the triggers and the terrain from our maps to the warcraft remastered.
This was no problem with SC1 because even after making the changes it could still run on a toaster
XD
The editor should not have such limits as each of the campaigns is stand alone. As long as you own one it should be enough for all.
I can't put any heroes in the editor. I think it's probably because I haven't got legacy of the void. Legacy of the void unlock almost everything like tournaments, classified games, you also unlock some heroes in the coop.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
Probably, but even if that happen we only need to copy all the triggers and the terrain from our maps to the warcraft remastered.
Who said any of that might be possible? Be careful what you wish for when a game is already in 3D.
I can't put any heroes in the editor. I think it's probably because I haven't got legacy of the void. Legacy of the void unlock almost everything like tournaments, classified games, you also unlock some heroes in the coop.
No one can put coop commanders into their map. All coop commander assets can be used but the data that drives them is missing (although you can look it up with a bit of hackery).
 
Level 6
Joined
Jun 4, 2017
Messages
172
Be careful what you wish for when a game is already in 3D.
I wish in a warcraft 3 and a diablo 1 remastered, and if a warcraft 3 remastered is going to break all maps, I have no problem in remaking all the maps which I made and the ones which I'm making now.
No one can put coop commanders into their map. All coop commander assets can be used but the data that drives them is missing (although you can look it up with a bit of hackery).
I didn't know that, good to know that I'm not the only one who can't use those heroes XD

However sorry for the very late answers but I couldn't be online in these days.
 
Status
Not open for further replies.
Top