Sunday, April 15, 2012

Earth Moving part II

Well...I had some modicum of success in conceptually representing digging in one place and depositing dirt in another.  While I am not happy with the texturing of the placed dirt (too jaggedy along the edges), I did solve some of the slow 'brute force' techniques I was using to determine vertices under the dozer.
  Using a variation of the "Manhattan Distance" algorithms that I saw used elsewhere, I essentially calculate the nearest vertice under the x,z of the dozer and then walk a 'circle' of radius whatever to grab the vertices I need to either elevate or depress.  It sucks having to deal with true pixel x,y,z in some places and deal with triangulated mesh vertices in others...but so far it is manageable.

Note the new red 'circle' under the dozer...just playing with some schemes for equipment selection and such.  Probably will be using a rectangle selection tool of some kind for area selection when giving 'orders' to equipment.

No comments:

Post a Comment