GM_SetVerticalDisplayOptions - output with NO shader associated with it

codemousecodemouse Global Mapper UserPosts: 186Trusted User
edited February 2012 in SDK
Mike,

Is it possible to pass into a null or empty shader so that whatever output will not have ANY shading whatsoever (relevant for the recent VRML output you put into the SDK).

Thanks,

Brian

Comments

  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited February 2012
    Brian,

    So do you want an option to just export the ElevationGrid section and not the color section as well? That would be easy enough to add.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • codemousecodemouse Global Mapper User Posts: 186Trusted User
    edited February 2012
    Mike,

    Yes - correct. Just export the ElevationGrid (geometry ElevationGrid { }) part and exclude the entire colorPerVertex TRUE solid TRUE color Color { color [] } section. A flag/option would be great - it makes sense to me to basically specify a "null" shader for this process, but obvious whatever works for you.

    Brian
  • codemousecodemouse Global Mapper User Posts: 186Trusted User
    edited February 2012
    Mike,

    On a related feature request note, how difficult would it be to also allow to specify additional nodes in the VRML output like Appearance? Specifically Appearance.ImageTexture and Appearance.TextureTransform? Such as in the following very simple example:

    Shape
    {
    appearance Appearance
    {
    textureTransform TextureTransform
    {
    scale 1 -1
    }

    texture ImageTexture
    {
    url "1.jpg"
    }

    }
    geometry ElevationGrid
    {
    /*...*/
    }
    }


    http://graphcomp.com/info/specs/sgi/vrml/spec/part1/nodesRef.html#Appearance

    I only have a desire to work with texture and textureTransform (not material) as output:

    Appearance { exposedField SFNode material NULL exposedField SFNode texture NULL exposedField SFNode textureTransform NULL}That would mean specifying some of the following as options:
    1. http://graphcomp.com/info/specs/sgi/vrml/spec/part1/nodesRef.html#ImageTexture (3 possible value pair options for output)
    2. http://graphcomp.com/info/specs/sgi/vrml/spec/part1/nodesRef.html#PixelTexture (3 possible value pair options for output though I am not currently using this)
    3. http://graphcomp.com/info/specs/sgi/vrml/spec/part1/nodesRef.html#MovieTexture (8 possible value pair options though I am not currently using this)
    4. http://graphcomp.com/info/specs/sgi/vrml/spec/part1/nodesRef.html#TextureTransform (important for alignment and correcting axis issues - 4 possible value pair options for output)

    Material and FontStyle specifications are the other options but I am not currently using them - basically I only use ImageTexture and TextureTransform for aligning texture imagery on top of the elevation output.

    What I've been doing so far is opening up the VRML output when I'm done (re-opening the file) programmatically and parsing and adding/replacing things I need. Not exactly efficient, but it works. Obviously this is most likely a feature extension to the existing product, but I thought I'd float it by you similar to the "Exclude color from the elevation grid" request above.

    Let me know what you think,

    Brian
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited February 2012
    Brian,

    I have completed adding support for getting rid of the colors section. Just use GM_ExportElevationEx and pass "ADD_COLORS=NO" for the extra flags string. The new SDK build with this support is at http://www.globalmapper.com/GlobalMapperSDK_latest_beta.zip .

    The other stuff would be a bigger change. For now I would stick to what you are doing now and just inserting what you need in the file after it is created. You shouldn't need to do a full parse since the output from the SDK is pretty consistent. It should be easy to find where to insert what you need.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • codemousecodemouse Global Mapper User Posts: 186Trusted User
    edited February 2012
    Mike,

    Thanks - checking it out now. And yes, obviously that request was a much larger change. The only other thought I had was to somehow grab the output in stream before being written to disk (so that I'm not writing this twice), but my guess is that is complicated in an entirely different sense.

    I'll let you know how this works.

    Brian
  • codemousecodemouse Global Mapper User Posts: 186Trusted User
    edited February 2012
    Mike,

    The flag works perfectly, thank you.

    Brian
Sign In or Register to comment.