Thread: Scenery [OpenGL]

  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    27

    Question Scenery [OpenGL]

    Ok, so I'm having problems thinking about how I should program scenery and geometries for a game. I dont know where to begin or anything. I have an understanding of loading textures from bitmaps, plotting 3D polygons etc etc, but I have no idea how exactly I should make the scenery, so any ideas? For the record, I'm using OpenGL in C/C++.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    A flat or undulating "ground", along with a "horizon" which is usually done as a "billboard". Look up the term "billboard". Clearly, the horizon should be far enough from the player that it's not "obvious" as a billboard.

    Add decorative & natural objects, such as trees, houses, rocks, roads, space-ships or whatever makes sense for the secene of your game, and place them statically on your "ground". Obviously, tree-clad mountains in the distance that aren't part of the "Billboard" can be made from texture maps.

    The ground may consist of multiple sections, so that your texture can be made simpler [otherwise you may need a ginormous texture map].

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    A flat or undulating "ground", along with a "horizon" which is usually done as a "billboard". Look up the term "billboard". Clearly, the horizon should be far enough from the player that it's not "obvious" as a billboard.
    Horizons are not billboards. The terrain is some type of mesh, the 'horizon' is usually a skydome or skybox, tree's and other vegetation are normally 2 billboards that cross each other at right angles but recently they have gotten more complex than that, and clouds are normally billboards or texture splatted billboard textures that are rendered.
    Last edited by VirtualAce; 10-22-2007 at 11:58 PM.

  4. #4

    Join Date
    May 2005
    Posts
    1,042
    A good place to start may be to look into heightmaps. Heightmaps are bitmaps (which you know how to load) where the value of the color of the pixel represents a height. From this data you can build your terrain. Heightmaps are typically grayscale (shades of black and white).

    There are many many ways to do this mind you, based on what you know so far this may or may not be an appropriate next step (you are likely going to need to learn a lot regardless to accomplish what you are seeking).

    G'luck.
    I'm not immature, I'm refined in the opposite direction.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. [OPENGL] RGBA16 e BGRA16 Textures
    By Lionel in forum Game Programming
    Replies: 2
    Last Post: 03-03-2006, 05:59 AM
  2. [OpenGL] Texture size
    By Snip in forum Game Programming
    Replies: 4
    Last Post: 08-25-2005, 04:10 AM