Finding concave polygons / contours from tiled autogeometry

Discuss new features and future development.

Finding concave polygons / contours from tiled autogeometry

Postby rrakkola » Mon Oct 07, 2013 11:04 am

Hi,

Does anybody have any ideas on how one could generate concave polygons with autogeometry while using tilecache.

Problem is that the polylines you get while using tile system are not loops if they intersect tiles, therefore it's hard to get the actual contours inside a tile.

Any ideas?

[EDIT] Sorry, this might be in the wrong section. Should have posted to main forum.
rrakkola
 
Posts: 9
Joined: Thu Jun 27, 2013 3:04 pm

Re: Finding concave polygons / contours from tiled autogeome

Postby slembcke » Wed Oct 16, 2013 1:48 am

Efficiently decomposing an entire region isn't realistically possible as far as I know. At least not with real-time constraints.

What you could do is decompose each tile into concave polygons though. While you can't join loops from adjacent tiles together without potentially recomputing a huge area, you can output concave polygons for individual tiles. This doesn't have a lot of advantages though (I can think of several disadvantages).
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: Finding concave polygons / contours from tiled autogeome

Postby rrakkola » Wed Oct 23, 2013 1:26 am

Hi,

Got it to work pretty well. I found a way to generate a bunch of concave polys from individual tile. Then I combine the surfaces (filled areas and holes) with GPC (http://www.cs.man.ac.uk/~toby/gpc/) to generate triangulated polys. Finally I combine the final polys (from gpc) in unity to a single mesh per tile. Runs 60 fps on ipad 2 even when modifying/updating pretty big areas (multiple tiles per frame). And produced terrain can be effeciently culled and be used for huge environments.

Made a small vid so you can see it in action.
http://www.youtube.com/watch?v=qd-vg2YWN-Y

Thanks again for the Autogeometry functions. They are exactly what I needed and really fast!
rrakkola
 
Posts: 9
Joined: Thu Jun 27, 2013 3:04 pm


Return to Features/Development

Who is online

Users browsing this forum: No registered users and 2 guests