Dynamic Grid Spacing for HeighField?

   898   0   0
User Avatar
Member
83 posts
Joined: April 2014
Offline
I am importing layout geometry and I am converting it to a HeightField with a HeightField and HeightField Project sop. This is working great, however I was wondering if there was a way I could find the correct Grid Spacing values to roughly match the poly amount of the layout geometry with my new heightfield after I convert it to geo with a convertheightfield sop. I can do this manually but adjusting the grid spacing, but I want something a bit more procedural.

Right now I am find how many polygons are in the layout geometry, as well as the max x and z size, and forming an equation to try to detect this automatically, and checking my math by converting the new heightfield to polygons.

My equation I have so far is something like this
(ch(“sizex”)*(GRID SPACING VALUE)^2 * ch(“sizey”)*(GRID SPACING VALUE)^2) = (TOTAL POLYGONS)
This is of course incorrect, but I was wondering if there is a way at all to calculate this out. I can't attach a hip right now, but I can later if this doesn't make sense at all.
  • Quick Links