Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- What values to use to transform and translate a polygonized raster layer to overlay TB heightfield
- Raster Resolution: 4096px
- Heightfield Scale: 16,384m
- Cell Size: 4
- Cell * Raster = Scale (at 1px/m)
- Scale รท Raster = Cell
- To calculate the necessary scaling for the vector at 1px/m simply multiply the cell times the resolution of the raster (not the heightfield)
- For position, x + 200,000, and y + Heightfield Scale.
- To check if it is aligned, import your heightfield (exported from TB) and apply transformation to the shapes. They should overlay properly.
- Parameters:
- a: Scale X
- e: Scale Y
- d: Rotation X
- b: Rotation Y
- c: Translation X
- f: Translation Y
- //////////////////////////////////////////
- // Transformation Matrix //
- // x = [a] x + [b] y + [c] //
- // y = [d] x + [e] y + [f] //
- //////////////////////////////////////////
- Calculations: (In This Order!)
- 16,384m heightfield with 4096 mask rasters:
- Mirror-y: (Only if shapes if flipped)
- e = -1.00000
- (Everything else at default values)
- Scale + Position:
- a = 4.00000
- e = 4.00000
- c = 200000.0
- f = 16384.0
- (Everything else at default values)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement