XNA Creators Club Online
Page 1 of 1 (4 items)
Sort Posts: Previous Next

Varying terrain question - please help

Last post 8/9/2007 2:15 PM by Zoozooka. 3 replies.
  • 8/7/2007 2:36 PM

    Varying terrain question - please help

    Hello all,

    In my game I want to have different levels of terrain. Thanks to Lord Ikon I know that all I have to do is figure out the height of the map and move the player to that position, but I don't know how to read in the height data from my blender model. If anyone can help, please do. Thanks.

    I work for Him, in His government, as an agent, of grace.
  • 8/7/2007 4:00 PM In reply to

    Re: Varying terrain question - please help

    You could check the Billboard Sample. I can't remember if the camera walks along the terrain. Otherwise there is the Picking Sample. You would simply want to manipulate it so that you are casting the ray not from the mouse cursor, but from your character or camera's position straight downward. You could use the returned position as the point on the ground directly below your character. Hopefully one of those two samples pushes you in the right direction.
  • 8/7/2007 8:24 PM In reply to

    Re: Varying terrain question - please help

    Reading height from a model would probably require reading in all of the vertices, which means you'd have to create your own vertex reader.

    I would do a google on heightmaps, or check the tutorial at www.riemers.net. A heightmap can simple take a bitmap file (greyscale is easiest) and use that to create a terrain. With a heightmap, XNA lets you read the color information on the bitmap file and you can use that color value as an elevation or height. Again, the tutorials show this.

    XNA QuickStart Engine (3D Game Engine for XNA) | My site
    "I'll be whatever I want to do!", Philip J. Fry
  • 8/9/2007 2:15 PM In reply to

    Re: Varying terrain question - please help

    Thanks all. I am not up to testing terrain so soon, but thanks for the help so I can use it when I need it☺

     

    I work for Him, in His government, as an agent, of grace.
Page 1 of 1 (4 items) Previous Next