Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Thorough Documentation for Unity Terrain Model

Discussion in 'Documentation' started by WaltN, Oct 24, 2017.

  1. WaltN

    WaltN

    Joined:
    May 18, 2017
    Posts:
    5
    I have yet to find adequate documentation for the Unity terrain model. More to the point, what precisely does the Raw Importer do to a raw value (8-bit or 16-bit) to convert it to a world coordinate value? I can't find any documentation that answers that question -- anywhere.

    Here's my situation: I know with certainty how to handle my terrain source data. It tells me the two constants, Floor and Resolution, in the following conversion formula:

    yInMeter = Floor + Resolution * yRaw

    In other words, Resolution is a scaling factor, and Floor is an offset. They convert the raw value into the actual, real-world terrain elevation for that yRaw value.

    I'm dealing with a multi-tile terrain system where it is important to properly align neighboring tiles. (There are enough tiles to make it impractical to manually adjust the y-position of neighboring tiles.)

    In my experiments to-date, my results appear to have the scaling at least approximately correct. But neighboring tiles are offset by 1-2 meters, an outrageous error. I'm certain that the fault is not in my source data because it was independently confirmed by three separate programs, where neighboring tiles are nicely lined up.

    I've searched the Manual and the Scripting API for clues (also the forums) to no avail.

    Again, my question is: What precisely does the Raw Importer do to a raw value (8-bit or 16-bit) to convert it to a world coordinate value?