Issues with Y Axis Orientation

Hey Remnant,

Having a great time with WM now that I really understand how to use it for a change :slight_smile: and some of the effects and scene’s I am coming up with for Unity3d are quite amazing and I cannot wait to show case it soon. However I’ve come across a bug that I am hoping you can put in the upcoming maintenance release or if there is a way I can fix it myself that would be even better.

Whats happening is this, in the Project World Parameters settings is an option to Flip the Y axis orientation when doing tile builds, this helps me with how unity handles imports of the bitmap files created by my splat-map device. However the issue is that I have to build the world twice in order for it to work right as only the bitmap exports need to be flipped, the .r16 height map files do not need to be as unity imports them properly.

Now as you can imagine the amount of builds required in order to get things exactly right for the world ca reach in the hundreds easily, and of course having to build things twice is a big PITA :slight_smile:

So then I found the Flipper device in the Filter devices and thought I could use that to just flip the bit maps themselves and that way I just need to build things once. Well it works, sort of, what it does is flip the height map when it goes into the Splat-map device and the bitmaps get generated. However when they come out the other end tiled yes the Y is flipped on import but so is the X axis and so it doesn’t match up quite right.

So there is a difference between the Tile Build Y axis flip and the Flipper device Y axis flip but I am not sure how to go about fixing it really as the device isn’t editable of course.

Any thoughts on how to get the Flipper device to work the same as the PWP? Or is there a way to do change the behavior of the tile world builds so that we can pick what gets flipped and what doesn’t?

Thanks again for an awesome product :slight_smile:

Oh and I did also try just flipping the output for the R16 height map however that to didn’t come out looking right either.

The Flipper device is one of those problematic ones that doesnt always behave the way you expect.

To elaborate:

The Flipper takes a heightfield its given, flips it, and outputs that. Simple, right? except this operates quite wrongly with tiled terrains, as its not just flipping the terrain but the entire coordinate system being operated on.

This doesnt work well with Tiling because Tiled Output knows where things lie because of that embedded coordinate system, and so when it tries to blend edges things go horribly wrong.

What you need is a true per-file flipping parameter, which takes place after all blending operations are done (as the option in the tiled output dialog does) This is not currently possible.

There is a workaround available thats faster than building twice, although you have to jump through a couple hoops:

  1. Build your world tiles, but the tileset that needs flipping make sure you add a “preflip” extension to the name.
  2. Create a new world that contains only a Tiled File Input, and a File Output (or Bitmap out if you’re needing to flip bitmaps).
  3. In this new world, setup your tiled output settings so they match your primary world
  4. Load your tileset that needs flipping in the TFI device, and setup the output device to export to your desired filename
  5. Build this world. It will build (much!) faster than doing a second native build of a complex build

If your # of tiles and resolution is always in flux keeping this “postprocessing world” in synch is a PITA, but if your requirements are relatively steady it can be of use.

Hmm didnt think of that, I will have to check that workaround out.

Thanks Remnant