• Advertisement
Sign in to follow this  

Curved and sloped 3D tiles

This topic is 990 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've gotten the basic systems for my engine written already. Now I'm contemplating exactly what I want to do for it's levels. The entire game will be played out in an over the top perspective with the camera set at an angle by default, and can zoom in and out. The world will be fairly large and seamless. Not "Open World", as you still have some paths to follow and the like.

One of the thoughts I had was why not tiles? After taking a look at Dota 2 Reborn, Dungeon Siege, and Sword Coast's E3 footage, I began contemplating the plausibility of it. It seemed fairly straight forward to create a level with it. And Navigation mesh is nearly automated. But I began to see a more prominent problem.

How would you go about making slopes and curved tiles?

Share this post


Link to post
Share on other sites
Advertisement

Tiles need not be flat, also not at its perimeter. Make sure that neighbored tiles have the same kind of edge at the common seam, i.e. they use the same sequence of intermediate vertex positions. If you do this in the manner of module assembly you still have a limited set of shapes what probably makes the level design easier.

 

Some details to be considered are:

 

* There need to be a height information for every point where a dynamic game entity can be placed.

* In dependence on the camera height and pitch as well as the modeled slope, depth test and/or backface culling may be needed.

* The camera height need to be adjusted if the player character impends to leave the upper display edge.

* The simple top-down texture mapping looks ugly if the slope gets stronger due to texel stretching. You may support extra texture tile sizes.

Share this post


Link to post
Share on other sites

You could even apply some kind of transformation afterwards. Look at Warcraft3's system, for example. The terrain is certainly composed of tiles ( mostly flat tiles, cliffs at certain places ). However, you can also apply height to them. Basically, you have a mesh composed of tiles, and then offset the vertices' z values by a heightmap. 

Sorry, I can't provide an image right now, but if you search a bit, you will definitely find some. 

 

Also, it's worth noting that you can do any sort of transformation you wish. Just provide the editor with some way to control that transform, and preview it. ( Assuming you have some kind of level editor ) 

Share this post


Link to post
Share on other sites
In WC3, for instance, every grid node had two height values, one used for vertical cliffs (and slopes), and one for slight changes in altitude. Then a 'special' algorithm built the level mesh based on the first height, and the second height is just a Z offset for every vertex. Grid cells that are marked as a slope simply connect the altitudes at the four corners, while the rest can create various kinds of vertical cliffs depending on the four heights. It wasn't perfect, you could easily get black gaps in the mesh if you played around with the map editor, but it seemed to handle most of the cases quite nicely. There are no curved tiles, everything that looks kind of round is just the output of the mesh generator (the pathing map still uses the original square tiles).

Share this post


Link to post
Share on other sites

Alright... and what about curved areas?

Such as a spiralling staircase. Or a stair case That doubles back on it's self in a curving shape. Would I just have to make that one big tile piece of varying sizes? Or Are there other options.

Share this post


Link to post
Share on other sites


Alright... and what about curved areas?

 

Such as a spiralling staircase. Or a stair case That doubles back on it's self in a curving shape. Would I just have to make that one big tile piece of varying sizes? Or Are there other options.

I'm not sure what you mean. Do you have some example pictures?

 

In general: The module approach requires that each module has a closed perimeter of a defines shape. Any module showing the inverse of that perimeter can be attached then. Any as abstruse as wanted perimeter can be defined, although for the sake of sane level design the used perimeter shapes should be clear and well defined. The inside of the tile again can have any form you want. It is even possible to have a 2nd perimeter within it, e.g. for a hole, door, or cave entrance. However, the more arbitrary things you want, the more you drift away from tile based modeling towards individual modeling. Another degree of freedom is to place objects onto the tile, of course.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement