Proper Format for Custom Height Color Map

Home Forums AR Sandbox Forum Proper Format for Custom Height Color Map

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #102765
    Tom Durkin
    Participant

    Hi all,

    Tom here from the Children’s Creativity Museum in San Francisco, CA. We’re also adding a sandbox at our museum, but are looking at other creative/artistic activities for this really wonderful platform. My team and I got our box up and running before Thanksgiving, and I just got all of the custom shader scripts for lava/snow/etc working over the past couple days.

    What I would like to try next is to implement a custom color map to mimic the landscapes in the Dr Seuss book, “Oh the Places You’ll Go.” I’m having trouble getting my own color map to work, I keep getting an error saying when trying to launch the box. When I look at the default HeightColorMap.cpt file in a text editor it’s just an array of numbers. The last three numbers are obviously RGB, but what is the first number? I was assuming that is some sort of Z offset, but I haven’t been able to change this number with any success.

    -40.0 0 0 80
    -30.0 0 30 100
    -20.0 0 50 102
    -12.5 19 108 160
    -0.75 24 140 205
    -0.25 135 206 250
    -0.05 176 226 255
    0.0 0 97 71
    0.25 16 122 47
    2.5 232 215 125
    6.0 161 67 0
    9.0 130 30 30
    14.0 161 161 161
    20.0 206 206 206
    25.0 255 255 255

    Is there a certain format to the decimal or spacing placement? Does there have to be the same amount of colors as the original map? I also noticed that the first numbers are not equally spaced. If this is some sort of Z offset, can I change this so that the topo lines are even stripes? Any insight into this file would be really appreciated!

    Tom

    #102784
    Oliver Kreylos
    Keymaster

    The first number in each line is the elevation, relative to the sandbox base plane, to which the following red, green, blue color triplet applies. All elevation values are in centimeters.

    For example, the following color map file would create a solid blue color 10cm below the base plane, then smoothly change to white at the base plane, then to red at 10cm above the base plane:

    -10.0 0 0 255
    0.0 255 255 255
    10.0 255 0 0

    The elevation values do not have to be equidistant. You could insert a very thin green band, indicating, for example, a sedimentary layer, at 5cm elevation like so:

    -10.0 0 0 255
    0.0 255 255 255
    4.9 255 128 128
    4.9 0 255 0
    5.1 0 255 0
    5.1 255 128 128
    10.0 255 0 0

    (Repeating an elevation value, like 4.9 or 5.1 here, causes a discontinuous change in color.)

    The only requirement is that the elevation numbers are monotonically increasing from the first to the last line.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Comments are closed.