Author Topic: Terrains in Raw are exported with Y axis flipped (1.10.5 Pro)  (Read 261 times)

Rodolfo Calabrezi

  • Jr. Member
  • **
  • Posts: 8
  • INSANE Games Sr. Technical Artist
Hey there!

As the title says, height maps in Raw 16-bit and 32-bit formats are being exported with the Y axis flipped.

By doing the same in PNG, the Y axis is exported correctly.

I attached some pics for you guys to reproduce the bug. Anything else you need, just tell me.

Thanks!
« Last Edit: April 09, 2020, 06:57:13 PM by Rodolfo Calabrezi »

Alexis Vaisse

  • Administrator
  • *****
  • Posts: 112
Hi Rodolfo,

Thank you very much for your feedback.

After doing some tests, it appeared that the problem is on the import side when the imported file is a raw file.

We've just modified the import of a raw file. It's now consistent with both the export of a raw file and the import of other types of file.

The modification will be in Instant Terra 1.11.

Thank you for your help to build a better product.


Rodolfo Calabrezi

  • Jr. Member
  • **
  • Posts: 8
  • INSANE Games Sr. Technical Artist
Hey Alexis! Thanks for your reply!

I'm afraid the issue is actually on the export side. Try this: export a color map and a height map in Raw format, so notice they don't match each other vertically. Then export it again in PNG format and you have a match.

Another sign the height map is being exported with the Y-axis flipped happens in Unity. When I load a Raw file directly, it shows upside down in Unity Editor. If I flip the Y-axis manually during the loading, it matches the viewport in Instant Terra. Again, this is not needed if I export a terrain in PNG format.

What do you think? If you need any further assistance, I'll be here!

Alexis Vaisse

  • Administrator
  • *****
  • Posts: 112
Hi Rodolfo,

It seems that different software use different conventions.

Here is a test we did:

We exported the same mask using png and raw formats:




Then we opened both files in Photoshop and got the exact same result:


That's why we decided to modify the import nodes and not the export nodes.

Rodolfo Calabrezi

  • Jr. Member
  • **
  • Posts: 8
  • INSANE Games Sr. Technical Artist
Hey Alexis! Thanks for getting back.

That makes sense! My bad, it seems that Unity is importing Raw files with the Y-axis flipped exactly the way Instant Terra was doing it before your fix.

As always, I appreciate your support!