Tuesday, June 20, 2006

OK, I lied last night I tried to make a skeleton animation this morning and ran into two more issues (right). They were both really hard to track down, and I'm not sure they are correct for all cases. By lunch time i had a working implementation that would animate nicely. So here it is - you can finally clearly see the effect of changing the weight of a side. The skeleton is simialar to Mayas bevel function, but it treats corners gracefully.

While that was rendering out I was thinking about the roads. The inital road making algorithm to create the roads should be something like:
  • drop many points at regular intervals
  • take each point for a random walk to shuffle them up as much as we want
  • perform a Voronoi (fun link) triangulation routine to create a set of roads from the dots. Set the size of each road.
  • (maybe: perform a down-hill iterative operation over the roads to shufty them around a bit giving preference for large roads that go straight ahead)
  • Find the shape of each block between the roads
  • Shrink the blocks in using my (now with added bug-free(tm)) straight skeleton to leave room for the roads. The weight of each edge change the width of the roads.
  • project the whole thing onto a hillside to make it work in 3D

Hmmm....youTube isn't that good quality. Googles started needing verification for its video (update google video for comparison is here) posts, so its pants for blogs. You can still kind of see the near side edge at the start change as the animation progresses.

Turns out using Voronoi diagrams for streets wasn't as original as I thought it was.

No comments:

Post a Comment