guest    Login  Signup


home news about media forums community download
Forums . Development Blogs . Technical Blog #5 - Real-time Triangulation of Convex N-Sided Polygons

Development Blogs

Design and Technical Posts from the Development Team

Currently: 7 Topics, 39 Posts

Technical Blog #5 - Real-time Triangulation of Convex N-Sided Polygons

Lead Developer
Jen: M
I have what might be described as a natural curiosity and enthusiasm when it comes to math, programming, and engineering. When designing complex computer programs these interests are extremely helpful. When choosing topics to write a brief update on, well, just look at this post's title.

Last month and into July I will be focusing my programming efforts on our Landscape Editor. The first week and a half was spent on brainstorming how the editor would work. Like Toi Canvas, the Landscape editor will be vector-based. This was not as easy a decision as I thought it would be. The original justification was that it would minimize the amount of data that would need to be synchronized between developers. In practice we'll still need to convert the vector data into a height-map, and with a large enough map that conversion takes a considerable amount of time.

((The title refers to an algorithm that takes a random set of lines and converts it into a set of triangles that your computer's 3D hardware can render. When I first tried it, it didn't work correctly.))

What ended up being the deciding factor for me was the possibility of terrain "styles". With this single notion, Toi Canvas and the new "Toi Landscape" share a common design philosophy. In both editors you can draw out a line or polygon in the "map" view, and then apply a style to that shape. In the case of the Landscape editor, instead of "stroke" or "fill" styles, we would have "river" and "region" styles.

((In cases like this I don't usually need to create the algorithm myself, in this case I could use the Ear Clipping Method. I created a set of test shapes to determine which part of the algorithm was failing.))

I'll continue to share more as Toi Landscape develops. For now I just wanted to observe that for some weeks the most important things that occur in Antilia's development is the filling in of implementation details where there was only a rough concept before. Of course, an idea by itself doesn't get me any closer to my ultimate goal - Antilia. It made whole an incomplete picture of the terrain editor, so that I knew what I was building and what parts it would have.

To actually build Toi Landscape as I now pictured it, my next task was obvious. I needed a real-time solution to perform triangulation of convex n-sided polygons.

((The corrected algorithm. For testing purposes I rendered each of the calculated triangles in a random color.))
Tuesday, June 27, 2017 3:15pm
Jeff Leigh - Lead Developer - Right Brain Games
Page: 1

You are not currently logged in. You must first log in to post a reply.
Frequently Asked Questions Development Team

Antilia - Copyright © 2017 right brain games