How terrain works #2

Last time we have stopped on basic terrain appearance. How mixing surfaces and transitions between them works. Today’s the second part of the terrain being explained – decals.

terrain01

Terrain decals have their name because they more or less repeat their real world analog. You can think of them as rubber pieces attached with a glue on to a tiles surface. Key differences between objects and decals are:

– objects are rigid, they are “attached” to terrain at one single point and just change their position if tile height below them is changed;
– decals are elastic, they behave like a rubber and deform with the underlying tile.

terrain02

Decal deformed with a tile

This is the same decal from the head of the article, but now it has been severely stretched and bent with the tile it is “stuck” with.

Farmers fields are decals as well:

terrain05

Deformed winefield

The custom deformation mechanism was specifically made to preserve relative elements size regardless on overall deformation. In other words – fences height are always the same, no matter how bent the underlying tile is. Green areas popping through is a minor bug that I plan to fix later.

Fields/roads/plans decals come in a packs of 6 or 16 elements and have one interesting property – they are aware of their neighbors. So when there is only one field placed it looks like a top-left one (fenced around all 4 sides), but if there are for example 4 fields in a 2×2 block they will look like top-right decal, rotated to have fences only on the outsides. Roads, fields, house plans, house fences, all use this sort of decals sets. 6 elements are enough for any neighbor configuration if decals can be rotated, 16 when they can’t (i.e. fields always need to be aligned in one direction).

2014-04 Overlay elements

Decal elements

Decals can be even thicker, these are ideas for stone deposits decals, being as thick as a half of a tile:

terrain06

Stone deposit idea

They behave exactly the same, deforming with tiles heights.

Another variation are decals specially mean to be used on slopes. They deform differently depending on the underlying height change:

2014-03 Morphing tiles overlay

Wall corner decal

For example this is an idea for a corner section of a wall. Walls teeth are always the same height and walls lower part stretches as it is needed to cover the height change.

Summing up, these are various decals available in the NextGame so far:

terrain03

Many decals at once

As always, comments and questions are welcome!
What ideas for more decals do you have? ๐Ÿ˜‰

This entry was posted in How things work. Bookmark the permalink.

9 Responses to How terrain works #2

  1. The Dark Lord says:

    Okay I understand everything now. ๐Ÿ™‚
    Ideas for decals… Leaves? Flowers? Stretched flower tiles look really ugly. But I can’t think of anything else at the moment… Maybe I’ll come up with something later.

    • Krom says:

      Yeah, leaves and branches could be nice to add below trees, but they would need to look good when the tree is cut by woodcutter, or allow to add them only below uncuttable trees ๐Ÿ™‚
      Flowers might be good actually ๐Ÿ™‚
      Thanks for ideas, I hope to see them coming!

  2. Ben says:

    Already looks like fantastic progress, but maybe I’m just too hopeful hehe.
    Perhaps unrelated: but in RMK it seems natural for fences to disappear when fields get larger. Assuming that fields will be constructed with the same/similar method, won’t it seem strange when the 3D fences disappear?

    • The Dark Lord says:

      It doesn’t have to look bad, they could just ‘fade out’/slowly disppear.

    • Krom says:

      It wont be any more stranger than bigger objects appearing and disappearing from/to nowhere in most of the games ๐Ÿ˜‰
      Or am I getting the question wrong?

  3. Shadaoe says:

    This seems really promising, what do you think of “ruins” (destroyed buildings’ remains), as decals ?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.