Modifications to defensive building models needed

Improving the artwork in Warzone2100 - not for mod discussions
Post Reply
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Modifications to defensive building models needed

Post by Per »

As you have probably have noticed by now, there are two different kinds of buildings in regards to how they adapt to terrain. Normal buildings cause the terrain to be leveled, while defensive buildings adapt their lowest model vertices to the terrain. The reason defensive buildings do this, is because they can be built next to each other or normal buildings, and leveling the ground when they are built could cause cascading ripples of ground changes that might leave some buildings hanging in the air. The obvious disadvantage of this system for defensive buildings is that they can stretch badly in some cases where the terrain inclination is steep. It is not terribly hard on the eyes, but it does look funny sometimes.

The big problem is that this way of adapting to terrain does not scale well. For every frame drawn, every vertex on the model has to be gone through, compared to the map height at that exact spot, and possibly adjust it to be level with terrain. Since you can only calculate exact map height for each sub-tile position on the CPU side without considerable effort, moving this drawing to the GPU is currently not possible. We need to move it to the GPU to get decent drawing speed with more complicated models.

So what I and gerard_ have been discussing as a solution, is to add a subterranean base to each defensive structure instead of adapting vertices to the map. This means that if the defensive structure resides on uneven terrain, part of the subterranean base will become exposed. If it is on totally flat and even terrain, none of that base is visible. I think this solution will be better looking that the current one, and we can accelerate the drawing process a great deal, allowing models with much higher polygon counts. The subterranean base will be at z less than zero position in the model (or whatever is down direction) to show what is above and what is below ground.

However, it means that someone will have to go over all the defensive models and add subterranean bases :P Are there anyone who would want to do that? It does not have to look terribly pretty, and to get it implemented and accepted fast, I do not think any other changes to the models should be done at the same time. Any takers?
-Kosh-
Trained
Trained
Posts: 203
Joined: 16 Sep 2009, 23:34

Re: Modifications to defensive building models needed

Post by -Kosh- »

Why not make a bulldozer unit or make trucks flatten the ground first. That is how some other RTS games handle this.
This is a waste of space. Something important should be here.
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Modifications to defensive building models needed

Post by Per »

-Kosh- wrote:Why not make a bulldozer unit or make trucks flatten the ground first. That is how some other RTS games handle this.
Interestingly enough, it appears from unused code remains that Pumpkin originally tried it that way. I think they abandoned that for a good reason, as I can imagine that it would be a micro-management nightmare. The only RTS I can think of that did it that way was Dune2, and even there it was optional.
Kacen
Trained
Trained
Posts: 294
Joined: 19 Feb 2007, 19:28

Re: Modifications to defensive building models needed

Post by Kacen »

Two things:

1. Walls would look ugly like this, they wouldn't connect in a line if they didn't deform to the terrain. It would look horrid.

2. Looks aside, seeing as how buildings are built apparently by "beaming" materials to the location of the site and I guess building it up atom by atom using some high technology, the deformations could be easy adjustments to make in the design of the structure with such an advanced construction system. I never had an issue with it myself.
User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

Re: Modifications to defensive building models needed

Post by Zarel »

Kacen wrote:2. Looks aside, seeing as how buildings are built apparently by "beaming" materials to the location of the site and I guess building it up atom by atom using some high technology, the deformations could be easy adjustments to make in the design of the structure with such an advanced construction system. I never had an issue with it myself.
We're not talking about fluff, we're talking about that being hard to implement programmatically.
User avatar
Sekmeton
Trained
Trained
Posts: 57
Joined: 13 Sep 2009, 17:02
Location: Argentina

Re: Modifications to defensive building models needed

Post by Sekmeton »

Per wrote:Interestingly enough, it appears from unused code remains that Pumpkin originally tried it that way. I think they abandoned that for a good reason, as I can imagine that it would be a micro-management nightmare. The only RTS I can think of that did it that way was Dune2, and even there it was optional.
uhm... what about "Age of Mythology"?
I mean, when you start building something, the "foundations" flatten the ground first...

I don't know if you guys can understand what I'm trying to say xD
Maybe I should remove my location o_O
User avatar
Olrox
Art contributor
Posts: 1999
Joined: 03 Jul 2007, 19:10

Re: Modifications to defensive building models needed

Post by Olrox »

Almost needless to say, this is going to be made when me and MaNGusT start to make the defensive structures for AR. :D
However, due to the objectives of AR, I for myself don't feel much like redoing the original art considering we are going to remake them anyway, with better graphics :P

I like to make brand-new models (or textures for the models), but I think this is more about adding faces to the pies and using original textures, right? :rolleyes:
User avatar
Olrox
Art contributor
Posts: 1999
Joined: 03 Jul 2007, 19:10

Re: Modifications to defensive building models needed

Post by Olrox »

Sekmeton wrote: uhm... what about "Age of Mythology"?
I mean, when you start building something, the "foundations" flatten the ground first...

I don't know if you guys can understand what I'm trying to say xD
If the foundations occupied an entire tile (or entire tiles) and where flat, with height fixed at the highest point of the original terrain's tile, it would look very ugly, and it would look like waste of material on most cases.
User avatar
psychopompos
Trained
Trained
Posts: 470
Joined: 08 Nov 2007, 09:18
Location: UK

Re: Modifications to defensive building models needed

Post by psychopompos »

the foundations idea sounds interesting.
have them added automatically when building on steep inclinations.
in the the case of walls, use a corner wall for changes in height.
MOTHERBOARD - MSI P7N PLATINUM¦-¦PROCESSOR - C2D E7300 @ 4.00GHZ
MEMORY - 4 Gig (2x2gig) ddr2 1066mhz¦-¦OPERATING SYSTEM - WINDOWS 7 (ULT)
GRAPHICS - BFG GTX 260 OCX (requires ForceWare drivers for good openGL)
Kacen
Trained
Trained
Posts: 294
Joined: 19 Feb 2007, 19:28

Re: Modifications to defensive building models needed

Post by Kacen »

Zarel wrote: We're not talking about fluff, we're talking about that being hard to implement programmatically.
I was speaking of how things already are...and why added fluff (which is already implied by the "beaming" building technology) should negate any issue someone has with deformed defenses that "mold" to the terrain...

...since the material is beamed and built on the spot through I'd assume construction computers building at the atomic level, I'd imagine you could make such adjustments during the building process to accommodate uneven terrain.
User avatar
Olrox
Art contributor
Posts: 1999
Joined: 03 Jul 2007, 19:10

Re: Modifications to defensive building models needed

Post by Olrox »

Yeah - If we are not considering the mentioned impact on performance, things should really stay as they are.

However, if the game has to be downgraded in a small part for us to be able to heighten all of the other parts' quality, I say: let's stick with somewhat weird walls and get everything else better.
User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

Re: Modifications to defensive building models needed

Post by Zarel »

Sekmeton wrote:uhm... what about "Age of Mythology"?
I mean, when you start building something, the "foundations" flatten the ground first...

I don't know if you guys can understand what I'm trying to say xD
No, it's that you don't understand Per.

When you start building something, the "foundations" flatten the ground automatically. Per is saying he can't think of any situation when you have to flatten the ground yourself before you can build on it.
Kacen wrote:I was speaking of how things already are...and why added fluff (which is already implied by the "beaming" building technology) should negate any issue someone has with deformed defenses that "mold" to the terrain...
"How things already are" is slowing down the game so much we can't improve the graphics. That's why we're changing it.
BulletMagnet
Trained
Trained
Posts: 99
Joined: 10 Nov 2006, 12:04

Re: Modifications to defensive building models needed

Post by BulletMagnet »

what about extending the models down and just clipping through the terrain?

...or is that what is being proposed?
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Modifications to defensive building models needed

Post by Per »

BulletMagnet wrote:what about extending the models down and just clipping through the terrain?

...or is that what is being proposed?
Yes. That is what I am suggesting.
User avatar
Sekmeton
Trained
Trained
Posts: 57
Joined: 13 Sep 2009, 17:02
Location: Argentina

Re: Modifications to defensive building models needed

Post by Sekmeton »

Zarel wrote:No, it's that you don't understand Per.

When you start building something, the "foundations" flatten the ground automatically. Per is saying he can't think of any situation when you have to flatten the ground yourself before you can build on it.
So, it is not possible to make an Automatic terrain flat?

And, I'm ok with the
Per wrote:to add a subterranean base to each defensive structure instead of adapting vertices to the map.
idea, but I'm not sure of how it would look like...
Maybe I should remove my location o_O
Post Reply