Creating normal maps from elevation data using the SDK

pgane
pgane Global Mapper User
edited July 2009 in SDK
Hi,

I was wondering if there is an easy way to create normal maps using the SDK and standard elevation data. Otherwise there is a hard way of sampling each pixel for the normal map resolution and then doing the math but that's going to be a pain. Any ideas welcome.

Cheers,
Pascal

Comments

  • global_mapper
    global_mapper Administrator
    edited July 2009
    Pascal,

    I'm not entirely sure what you mean by 'normal' maps? You can easily sample the elevation values from loaded elevation data using the GM_GetPixelElevation and GM_GetLocationElevation functions. If you want to create your own custom elevation layer from your own in-memory array of elevation values you can do that using the GM_CreateCustomElevGridLayer function.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Frank2
    Frank2 Super Moderator
    edited July 2009
    I believe he's referring to surface normals.

    Surface normal - Wikipedia, the free encyclopedia
  • Frank2
    Frank2 Super Moderator
    edited July 2009
    Or more specifically:

    blender.org - Normal Maps
  • global_mapper
    global_mapper Administrator
    edited July 2009
    Ah, if that is what they want, then no, there is not a direct way to create those. They could of course use GM_GetPixelElevation to calculate surface normals at each location in a loaded file, then save those out however they see fit.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Robyn Donna
    Robyn Donna Global Mapper User
    edited July 2009
    Hi,

    I was wondering if there is an easy way to create normal maps using the SDK and standard elevation data. Otherwise there is a hard way of sampling each pixel for the normal map resolution and then doing the math but that's going to be a pain. Any ideas welcome.