modelling with the straight skeleton

1
Tom Kelly (Glasgow & http://twak.org) Modelling with the Straight Skeleton As virtual worlds become more complicated, more and more resources are being spent creating them. Procedural tools assist artists in the creation of these environments. This poster presents an implementation of one such tool (the straight skeleton ), and details its uses. Admin Music Programming Artist 60% Staff ratios in Japanese game development companies Acornsoft's Elite (1984) Ubisoft's Far Cry 2 (2008) Over the last two decades video games have adapted with Moore's law and become increasingly complex. One of the consequences of this is that our games are more detailed. For example the number of polygons displayed on each frame once has risen from tens in the 1980's to the tens of millions today. Additional techniques such as displacement and bump mapping are adding additional detail beyond polygon meshes. As this chart illustrates, this rising demand for detail is visible in the structure of large video game developers. The majority of the man-years required to make a modern video game are spent by artists creating models for the world. Why Procedural? Unfortunately this bottleneck of creating geometry means that it costs more than ever to create video games. Development costs for the like of Ubisoft's Far Cry 2 (2008) are expected in be in the tens of millions of pounds. This leads to today's market dominated by a small number of very conservative, low risk titles. Some procedural technologies exist as intelligent tools that help artists create more content, faster. So far this has been at domain- specific level. Procedural Inc's CityEngine and IDV's Speedtree allow the procedural creation of procedural cityscapes or foliage respectively. IDV's SpeedTree s in Bethesda Game Studios' Fallout 3 The straight skeleton is a geometric algorithm for partitioning a simple polygon. It shows a lot of promise as a primitive in a procedural system. It was first described in A Novel Type of Skeleton for Polygons (Aichholzer et alia, 1995). When interpreted in 3D the skeleton is an algorithm that takes the floorplan (bird's eye view) of a house and produces the roof shape. Each edge of a polygon moves inwards in the direction of it's normal, tracing the gutters and crests between the edges as it shrinks in. Raising Roofs, Crashing Cycles, and Playing Pool (Eppstein & Erickson, 1999) is an excellent introduction to the skeleton. The Skeleton Uses of the Skeleton The algorithm I engineered proceeds in the style given by a Straight Skeleton Implementation (Felkel & Obdrzálek, 1998), modified to allow an arbitrary gradient on each edge. This produces a weighted straight skeleton. Staring from the input polygon (above, 1), a plane is defined for each edge by the associated gradient. The core of the method then uses a sweep plane that considers intersections between triplets of planes ordered by increasing height order (above 2,3). At each valid intersection (below a,b,c for example) new skeleton edges are created. This sicsa* logo was extruded using the skeleton to demonstrate some of the discussed features. Different perimeters of the logo have different sets of gradients. You can see outward-moving edges (dotting the i), many edges meeting at one location (again dotting the i), holes in the input geometry (the letter a), and the overall effect of changing the edge gradient. The skeleton computations took less than second and the 3D output was rendered as a vector graphic. Results Ambiguities of the Weighted Skeleton © 2009 twak When the planes defined by edges collide to a point we have to modify the data structures accordingly. Often we will remove old corners, insert new corners or add output edges to the skeleton. This is an involved process, and here I sketch only an outline. The collision resolution technique takes a set of planes that meet at a point as input. It processes these into lists of chains of adjacent corners that reference these edges (above, 1, blue lines show three chains). It is sufficient to process only adjacent pairs in, and between, these chains. This is much simpler and more general technique than described by Felkel. Processing the inter-edge pairs adds one new input corner, adjusts the corner pointers, (cutting out the internal corners) and adds a skeleton edge ending at the new corner (above, 2). However non-adjacent edge pairs (above, 3, the red, yellow and orange edges) take a little more thought as multiple chains can collide at one point. Intra-chain edge pairs are ordered around the collision point and processed pair-wise by the last corner in the first chain, with the first corner of the next. For each of these pairs we add one additional corner to the skeleton. This corner is at the location of the collision, and cuts out the inter-chain corners from any edge loops. The above figure shows a weighted skeleton, with two parallel and differently weighted edges that meet to form a horizontal edge. Normally the skeleton of a polygon is unique, but this case it is ambiguous. There are three resolution possibilities that make topological sense – choosing the higher or lower gradient (above, 1,3), or adding a new edge to the skeleton and taking an average (above, 2). The descriptions of the skeleton in the literature do not resolve the problem, however the best solution for procedural modeling is to allow the artist to define a solution using an edge priority system. Existing procedural architectural systems such as the shape grammars described in Procedural Modeling of Buildings (Müller & Wonka et alia, 2006) cannot work with entirely arbitrary input polygons, while the straight skeleton can. The gradient assigned with each input edge defines a face of the 3D skeleton that resembles a house-roof shape. By changing the gradient as the sweep-plane ascends, a wider range of architectural features can be modelled. Setting the gradient of a given edge to vertical, produces a straight wall, while setting it to a lower value, a roof face with a lower slope is created. More interestingly, we can set the gradient to be negative, giving an expanding polygon that can be used to model ridges (above, shows an s-shaped input polygon with gradient changes to create a ridge below the 'roof'), overhangs or the undersides of roofs. Building houses on non-flat terrains is a current area of research in procedural urban modelling. The skeleton can be adapted to create geometry on an arbitrary polygon landscape (above). By creating additional edges at different times in the algorithm, the base of the skeleton can follow the terrain. The final example of the skeleton's application is in the construction of windows. The above, left, diagram shows how a complex window can be considered a nested set of paths (red, blue and green lines). By using the skeleton to extrude the paths, ornate windows may be constructed. These paths themselves can be “grown” using the skeleton to create windows with shared borders (above, right).

Upload: twak

Post on 10-Apr-2015

7.967 views

Category:

Documents


4 download

DESCRIPTION

A poster made for the official opening do of SICSA.

TRANSCRIPT

Page 1: Modelling with the Straight Skeleton

Tom Kelly (Glasgow & http://twak.org)

Modelling with the Straight Skeleton

As virtual worlds become more complicated, more and more resources are being spent creating them. Procedural tools assist artists in the creation of these environments. This poster presents an implementation of one such tool (the straight skeleton), and details its uses.

Admin

Music

ProgrammingArtist60%

Staff ratios in Japanesegame development companies

Acornsoft's Elite (1984) Ubisoft's Far Cry 2 (2008)

Over the last two decades video games have adapted with Moore's law and become increasingly complex. One of the consequences of this is that our games are more detailed. For example the number of polygons displayed on each frame once has risen from tens in the 1980's to the tens of millions today. Additional techniques such as displacement and bump mapping are adding additional detail beyond polygon meshes.

As this chart illustrates, this rising demand for detail is visible in the structure of large video game developers. The majority of the man-years required to make a modern video game are spent by artists creating models for the world.

Why Procedural?

Unfortunately this bottleneck of creating geometry means that it costs more than ever to create video games. Development costs for the like of Ubisoft's Far Cry 2 (2008) are expected in be in the tens of millions of pounds. This leads to today's market dominated by a small number of very conservative, low risk titles.

Some procedural technologies exist as intelligent tools that help artists create more content, faster. So far this has been at domain-specific level. Procedural Inc's CityEngine and IDV's Speedtree allow the procedural creation of procedural cityscapes or foliage respectively.

IDV's SpeedTrees in Bethesda Game Studios' Fallout 3

The straight skeleton is a geometric algorithm for partitioning a simple polygon. It shows a lot of promise as a primitive in a procedural system. It was first described in A Novel Type of Skeleton for Polygons (Aichholzer et alia, 1995).

When interpreted in 3D the skeleton is an algorithm that takes the floorplan (bird's eye view) of a house and produces the roof shape. Each edge of a polygon moves inwards in the direction of it's normal, tracing the gutters and crests between the edges as it shrinks in. Raising Roofs, Crashing Cycles, and Playing Pool (Eppstein & Erickson, 1999) is an excellent introduction to the skeleton.

The Skeleton Uses of the Skeleton

The algorithm I engineered proceeds in the style given by a Straight Skeleton Implementation (Felkel & Obdrzálek, 1998), modified to allow an arbitrary gradient on each edge. This produces a weighted straight skeleton. Staring from the input polygon (above, 1), a plane is defined for each edge by the associated gradient. The core of the method then uses a sweep plane that considers intersections between triplets of planes ordered by increasing height order (above 2,3). At each valid intersection (below a,b,c for example) new skeleton edges are created.

This sicsa* logo was extruded using the skeleton to demonstrate some of the discussed features. Different perimeters of the logo have different sets of gradients. You can see outward-moving edges (dotting the i), many edges meeting at one location (again dotting the i), holes in the input geometry (the letter a), and the overall effect of changing the edge gradient.

The skeleton computations took less than second and the 3D output was rendered as a vector graphic.

Results

Ambiguities of the Weighted Skeleton

© 2009 twak

When the planes defined by edges collide to a point we have to modify the data structures accordingly. Often we will remove old corners, insert new corners or add output edges to the skeleton. This is an involved process, and here I sketch only an outline.

The collision resolution technique takes a set of planes that meet at a point as input. It processes these into lists of chains of adjacent corners that reference these edges (above, 1, blue lines show three chains). It is sufficient to process only adjacent pairs in, and between, these chains. This is much simpler and more general technique than described by Felkel.

Processing the inter-edge pairs adds one new input corner, adjusts the corner pointers, (cutting out the internal corners) and adds a skeleton edge ending at the new corner (above, 2). However non-adjacent edge pairs (above, 3, the red, yellow and orange edges) take a little more thought as multiple chains can collide at one point. Intra-chain edge pairs are ordered around the collision point and processed pair-wise by the last corner in the first chain, with the first corner of the next. For each of these pairs we add one additional corner to the skeleton. This corner is at the location of the collision, and cuts out the inter-chain corners from any edge loops.

The above figure shows a weighted skeleton, with two parallel and differently weighted edges that meet to form a horizontal edge. Normally the skeleton of a polygon is unique, but this case it is ambiguous. There are three resolution possibilities that make topological sense – choosing the higher or lower gradient (above, 1,3), or adding a new edge to the skeleton and taking an average (above, 2). The descriptions of the skeleton in the literature do not resolve the problem, however the best solution for procedural modeling is to allow the artist to define a solution using an edge priority system.

Existing procedural architectural systems such as the shape grammars described in Procedural Modeling of Buildings (Müller & Wonka et alia, 2006) cannot work with entirely arbitrary input polygons, while the straight skeleton can.

The gradient assigned with each input edge defines a face of the 3D skeleton that resembles a house-roof shape. By changing the gradient as the sweep-plane ascends, a wider range of architectural features can be modelled. Setting the gradient of a given edge to vertical, produces a straight wall, while setting it to a lower value, a roof face with a lower slope is created. More interestingly, we can set the gradient to be negative, giving an expanding polygon that can be used to model ridges (above, shows an s-shaped input polygon with gradient changes to create a ridge below the 'roof'), overhangs or the undersides of roofs.

Building houses on non-flat terrains is a current area of research in procedural urban modelling. The skeleton can be adapted to create geometry on an arbitrary polygon landscape (above). By creating additional edges at different times in the algorithm, the base of the skeleton can follow the terrain.

The final example of the skeleton's application is in the construction of windows. The above, left, diagram shows how a complex window can be considered a nested set of paths (red, blue and green lines). By using the skeleton to extrude the paths, ornate windows may be constructed. These paths themselves can be “grown” using the skeleton to create windows with shared borders (above, right).