Possible trunk terrain renderer improvements.

Discuss the future of Warzone 2100 with us.
User avatar
Mysteryem
Global Moderator
Global Moderator
Posts: 728
Joined: 22 Sep 2008, 19:44
Location: UK

Possible trunk terrain renderer improvements.

Post by Mysteryem »

With the new terrain renderer there are pros and cons with the way that it works.

Currently, each texture is "splatted" depending on the terrain type. When making a map each dataset contains the information of each of the tile's default terrain types. For example, dataset1 has these: http://i33.tinypic.com/2s6a8mf.png
Here's what they all mean: Image Each terrain type gives speed advantages and disadvantages for each propulsion type. However, the terrain types used by a map can be changed by selecting a terrain type from the toolbar shown in the previous image and clicking on the texture you want to change on the left hand side, all off that type of tile will now be what you've set it to. This means that you can have impassible terrain that looks like sand (for example) and cliff tiles which can be driven over. I can make these my cliff tiles: Image

But with the way the new terrain renderer works, because Image and Image both use the "cliff face" terrain type, both will always use the rock texture which is used by that tertile set.

Considering that a large number of the tiles use the same terrain type this can lead to a large loss of detail to maps and can end up with whole areas being one texture. My proposal is that each tile, or group of tiles (similar tiles can be grouped) should decide which texture is "splatted" instead of the terrain type, this gives more freedom to map makers and will increase the detail to some maps.

There we go, any opinions or counter arguments? :ninja:
"...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."
User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA

Re: Possible trunk terrain renderer improvements.

Post by Zarel »

Sounds good. Wanna write a patch? :P
User avatar
Mysteryem
Global Moderator
Global Moderator
Posts: 728
Joined: 22 Sep 2008, 19:44
Location: UK

Re: Possible trunk terrain renderer improvements.

Post by Mysteryem »

Zarel wrote:Sounds good. Wanna write a patch? :P
If I knew how to code things I would. :stare:
"...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."
User avatar
Buginator
Professional
Professional
Posts: 3285
Joined: 04 Nov 2007, 02:20

Re: Possible trunk terrain renderer improvements.

Post by Buginator »

While it is late, and I may have misread what I read, isn't the fix just to make more textures available than the ones we use now, since we can have the 'default' ground, then if we need cliffs, just load that texture, and if we need whatever, just load that as well...Then if we need to make something 'passable' we just check for that terrain flag, and blit a different texture to get the job done? Or perhaps it is much too late, and I am not making sense... :stare:
and it ends here.
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: Possible trunk terrain renderer improvements.

Post by cybersphinx »

The problem with the trunk renderer is that it doesn't use all information the old one did. Trunk uses the terrain type to determine the texture to use, so you cannot "camouflage" terrain (by e.g. making a road with a cliff texture). Adding more textures doesn't help in itself, you need a mechanism to choose texture independent of terrain type. Possibly the most simple (and backwards compatible) solution is to have a mapping "old tile" -> texture (instead of the current "terrain tile" -> texture).
User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA

Re: Possible trunk terrain renderer improvements.

Post by Zarel »

cybersphinx wrote:Possibly the most simple (and backwards compatible) solution is to have a mapping "old tile" -> texture (instead of the current "terrain tile" -> texture).
I believe that was the original suggestion. :P
User avatar
Mysteryem
Global Moderator
Global Moderator
Posts: 728
Joined: 22 Sep 2008, 19:44
Location: UK

Re: Possible trunk terrain renderer improvements.

Post by Mysteryem »

Zarel wrote:
cybersphinx wrote:Possibly the most simple (and backwards compatible) solution is to have a mapping "old tile" -> texture (instead of the current "terrain tile" -> texture).
I believe that was the original suggestion. :P
Then why was "terrain type -> texture chosen" over tile -> texture? Because it's simpler to do?
"...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."
User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA

Re: Possible trunk terrain renderer improvements.

Post by Zarel »

Mysteryem wrote:Then why was "terrain type -> texture chosen" over tile -> texture? Because it's simpler to do?
I mean that that was your original suggestion.

As for why the other was originally chosen? I have no idea. I would have implemented it your way, myself.
User avatar
Mysteryem
Global Moderator
Global Moderator
Posts: 728
Joined: 22 Sep 2008, 19:44
Location: UK

Re: Possible trunk terrain renderer improvements.

Post by Mysteryem »

Zarel wrote:
Mysteryem wrote:Then why was "terrain type -> texture chosen" over tile -> texture? Because it's simpler to do?
I mean that that was your original suggestion.

As for why the other was originally chosen? I have no idea. I would have implemented it your way, myself.
Ah, right.

Now where's gerard_ when you need him?...
"...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."
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: Possible trunk terrain renderer improvements.

Post by cybersphinx »

Zarel wrote:I believe that was the original suggestion. :P
Now that you say it... :P