Author Topic: Tiled build for non-square extents  (Read 1905 times)

0 Members and 1 Guest are viewing this topic.

hhildebr

  • World Machine Veteran
  • ***
  • Posts: 26
    • View Profile
Tiled build for non-square extents
« on: February 25, 2014, 03:35:47 AM »
I have a non-square terrain that I want to generate tiles for. I'd like to create 14x12 tiles @ 1024 (which gives the same m/px resolution in x and y). however, the dialog always changes the "Tiles per side" to 14 and then the tile resolution to 1024 x 878.

Is there a way around this?

Stephen

  • Author
  • World Machine Guru
  • *****
  • Posts: 2314
    • View Profile
    • http://www.world-machine.com/
Re: Tiled build for non-square extents
« Reply #1 on: February 26, 2014, 02:44:18 PM »
Hi there,

You're unfortunately correct -- non-square tiled support is a bit uncustomizable right now, mostly because of the concerns with round-tripping edge cases (if the non-square ratio is not evenly divisible with the number of tiles, the unfortunate partial tile edges need to be dealt with in a logical manner).

I'm definitely willing to extend this, but I don't know what use case is most common for people who need non-square tiled terrain extents -- what options are needed? How do you deal with partial tiles? etc.
-- Stephen Schmitt
- Creator of World Machine

hhildebr

  • World Machine Veteran
  • ***
  • Posts: 26
    • View Profile
Re: Tiled build for non-square extents
« Reply #2 on: February 27, 2014, 12:08:56 AM »
Hi Stephen, of course I can only speak for myself, but I would guess my use case is not too uncommon.

I am using the heightmaps for terrains in game engines. Most engines that I know of only allow a square, power-of-two format for the heightmap, but you can arrange several terrain tiles in a grid to create larger terrains. Which means the total terrain will always be rectangular or square and consists of squared tiles of (identical) power-of-two size. So, at least for my purposes, being able to do a corresponding tiled build would be all I need. No partial tiles or something like that.

As an example for my workflow: I use the wonderful WorldComposer and TerrainComposer add-ons for Unity, which allow you to easily download DEM data and satellite images for any region. WC and TC work on rectangular grids as described above. The overall heightmap is stored in a single file, but everything else (color map, normal map...) is stored per terrain tile. So I typically

1) Generate a heightmap for the region of interest, let's say 7x5 tiles @512, resulting in a 3584X2560 heightmap file.

2) Import that into WM, interpolate, enhance, erode it and write again a single heightmap file, let's say at double precison (7168*5120).

3) Create additional textures (eg normal map) in a tiled build, in this case 7x5 tiles @ 1024

Hope this helps a little. Would be really cool to have this functionality in WM :)