Defensive structure stretching

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

Defensive structure stretching

Post by Per »

While Berg is working on adding proper foundations to current models (stretched dynamically to fit terrain), I am working on tweaking the code that is doing the stretching.

The current code produces results like this:
wz2100-20101109_185116-Sk-Rush.jpg
It looks at the corners of the building's tile to find the height of the structure, then pulls the vertices below zero height in the model down to match the terrain.

I changed it so that it tries to find its new height based on the points where the model would intersect with the ground, instead of looking at the tile's corners. For smaller models, this seems to give a clear improvement on uneven terrain:
wz2100-20101109_185204-Sk-Rush.jpg
Next up is to try to figure out a better way to stretch. Currently models are neatly adapted to the terrain geometry underneath, which produces uneven stretching in the model. Like this:
wz2100-20101109_184754-Sk-Rush.jpg
I tried instead to pull every vertex below zero height down to the same common denominator, to make the stretching even:
wz2100-20101109_184637-Sk-Rush.jpg
However, as you can see, the result is somewhat ambiguous. While the stretching is cleaner, the transition-to-ground part of the texture is now mostly underground, causing an abrupt and bad looking transition.

If you have some suggestions on how to improve this, please speak out :geek:
User avatar
macuser
Regular
Regular
Posts: 1052
Joined: 19 Mar 2010, 23:35
Location: USA
Contact:

Re: Defensive structure stretching

Post by macuser »

maybe you could have it stretch the model "from the waist down" ?
ArtRev Website

ImageImage

System: AMD Phenom II x4, 4GB RAM, 640GB HD, Nvidia GeForce GT 240 1GB, Mac OS X 10.6
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Defensive structure stretching

Post by Per »

macuser wrote:maybe you could have it stretch the model "from the waist down" ?
I am not sure what you mean, but it sounds like what Berg is working on. As I tried to explain above, only vertices below zero height in the model are stretched, so if you put a separate set of "foundation" vertices just below zero, that will expand into a foundation.
User avatar
effigy
Regular
Regular
Posts: 1217
Joined: 22 Jan 2010, 03:21
Contact:

Re: Defensive structure stretching

Post by effigy »

Is this an improvement to the current way, or an alternate to what Berg is working on?
This is why some features aren't implemented: http://forums.wz2100.net/viewtopic.php?f=30&t=7490&view=unread#p87241
User avatar
Mysteryem
Global Moderator
Global Moderator
Posts: 728
Joined: 22 Sep 2008, 19:44
Location: UK
Contact:

Re: Defensive structure stretching

Post by Mysteryem »

I think that I personally prefer the the second change. In a perfect world I would have it so that where the polygons intersect with the terrain, the bottom of them will gain part of the texture of the ground they're on to make them blend in. Even without something like that I still prefer the second change.

effigy, sort of both I guess, Berg is using the current system to change how it was originally intentioned while per is coming up with new systems to deal with the problem.
"...If pure awesomeness were bricks, this would be the Great Wall of China...
The glory of this has collapsed on its self so far, that even the neutrons have collapsed."
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Defensive structure stretching

Post by Per »

Me and Berg are not creating different solutions for this issue. They are complementary approaches.
User avatar
Rman Virgil
Professional
Professional
Posts: 3812
Joined: 25 Sep 2006, 01:06
Location: USA

Re: Defensive structure stretching

Post by Rman Virgil »

Per wrote:Me and Berg are not creating different solutions for this issue. They are complementary approaches.
That is how I understood it from the get-go because it made inherent sense. :geek:

- Synergistically, Rman :ninja:

.
.

Impact = C x (R + E + A + T + E)

Contrast
Reach
Exposure
Articulation
Trust
Echo
.
User avatar
effigy
Regular
Regular
Posts: 1217
Joined: 22 Jan 2010, 03:21
Contact:

Re: Defensive structure stretching

Post by effigy »

Is that to say that in the future the improved stretching will be applied to Berg's foundations, not the tower (etc) textures?
This is why some features aren't implemented: http://forums.wz2100.net/viewtopic.php?f=30&t=7490&view=unread#p87241
Post Reply