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:
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:
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:
I tried instead to pull every vertex below zero height down to the same common denominator, to make the stretching even:
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
Defensive structure stretching
Re: Defensive structure stretching
maybe you could have it stretch the model "from the waist down" ?
ArtRev Website
System: AMD Phenom II x4, 4GB RAM, 640GB HD, Nvidia GeForce GT 240 1GB, Mac OS X 10.6
System: AMD Phenom II x4, 4GB RAM, 640GB HD, Nvidia GeForce GT 240 1GB, Mac OS X 10.6
Re: Defensive structure stretching
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.macuser wrote:maybe you could have it stretch the model "from the waist down" ?
Re: Defensive structure stretching
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
Re: Defensive structure stretching
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.
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."
The glory of this has collapsed on its self so far, that even the neutrons have collapsed."
Re: Defensive structure stretching
Me and Berg are not creating different solutions for this issue. They are complementary approaches.
- Rman Virgil
- Professional
- Posts: 3812
- Joined: 25 Sep 2006, 01:06
- Location: USA
Re: Defensive structure stretching
That is how I understood it from the get-go because it made inherent sense.Per wrote:Me and Berg are not creating different solutions for this issue. They are complementary approaches.
- Synergistically, Rman
.
.
Impact = C x (R + E + A + T + E)
Contrast
Reach
Exposure
Articulation
Trust
Echo
.
Impact = C x (R + E + A + T + E)
Contrast
Reach
Exposure
Articulation
Trust
Echo
.
Re: Defensive structure stretching
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