Difference between revisions of "Overgrowth Levels"

From Wolfire Games Wiki
Jump to: navigation, search
Line 1: Line 1:
 
<!-- Intro taken from this blog post: http://blog.wolfire.com/2010/12/Overgrowth-graphics-overview -->
 
<!-- Intro taken from this blog post: http://blog.wolfire.com/2010/12/Overgrowth-graphics-overview -->
 
The base for every scene is the land and sky. The sky is [http://blog.wolfire.com/2009/02/creating-our-own-skydomes/ based on a panoramic photo], which is converted to a skybox at run-time. The terrain is based on a heightmap, which is then [http://blog.wolfire.com/2009/06/offthegrid-revisited/ simplified] using quadric error metrics and divided into patches for frustum culling. Finally the terrain and sky are combined into a new [http://blog.wolfire.com/2009/07/blending-land-and-sky/ skybox], and the edges of the terrain are [http://blog.wolfire.com/2009/02/terrain-edge-fading/ faded to blend in]. This new skybox is then blurred to use as a lookup for [http://blog.wolfire.com/2008/12/sky/ lighting and fog color]. The terrain also has [http://blog.wolfire.com/2009/12/Detail-textures four normal-mapped detail textures], which are blended based on a weight map, and [http://blog.wolfire.com/2009/12/Detail-texture-color-matching automatically tinted] to match the base color map. The detail textures [http://blog.wolfire.com/2009/12/Fading-detail-textures fade away in the distance] to avoid any visible tiling, but the heightmap normal mapping keeps the [http://blog.wolfire.com/2009/12/Close-up-and-distant-terrain-lighting large-scale detail]. This same technique is also used for some large objects, like buildings, cliffs and boulders.  
 
The base for every scene is the land and sky. The sky is [http://blog.wolfire.com/2009/02/creating-our-own-skydomes/ based on a panoramic photo], which is converted to a skybox at run-time. The terrain is based on a heightmap, which is then [http://blog.wolfire.com/2009/06/offthegrid-revisited/ simplified] using quadric error metrics and divided into patches for frustum culling. Finally the terrain and sky are combined into a new [http://blog.wolfire.com/2009/07/blending-land-and-sky/ skybox], and the edges of the terrain are [http://blog.wolfire.com/2009/02/terrain-edge-fading/ faded to blend in]. This new skybox is then blurred to use as a lookup for [http://blog.wolfire.com/2008/12/sky/ lighting and fog color]. The terrain also has [http://blog.wolfire.com/2009/12/Detail-textures four normal-mapped detail textures], which are blended based on a weight map, and [http://blog.wolfire.com/2009/12/Detail-texture-color-matching automatically tinted] to match the base color map. The detail textures [http://blog.wolfire.com/2009/12/Fading-detail-textures fade away in the distance] to avoid any visible tiling, but the heightmap normal mapping keeps the [http://blog.wolfire.com/2009/12/Close-up-and-distant-terrain-lighting large-scale detail]. This same technique is also used for some large objects, like buildings, cliffs and boulders.  
 +
  
 
A detailed explanation on how to create and import terrain maps can be found here: http://forums.wolfire.com/viewtopic.php?f=16&t=12568
 
A detailed explanation on how to create and import terrain maps can be found here: http://forums.wolfire.com/viewtopic.php?f=16&t=12568
 +
 +
 +
This is also an exceptional thread describing in great detail most aspects of level creation: http://forums.wolfire.com/viewtopic.php?f=16&t=14869#p157052
  
 
===XML File===
 
===XML File===

Revision as of 01:37, 8 October 2017

The base for every scene is the land and sky. The sky is based on a panoramic photo, which is converted to a skybox at run-time. The terrain is based on a heightmap, which is then simplified using quadric error metrics and divided into patches for frustum culling. Finally the terrain and sky are combined into a new skybox, and the edges of the terrain are faded to blend in. This new skybox is then blurred to use as a lookup for lighting and fog color. The terrain also has four normal-mapped detail textures, which are blended based on a weight map, and automatically tinted to match the base color map. The detail textures fade away in the distance to avoid any visible tiling, but the heightmap normal mapping keeps the large-scale detail. This same technique is also used for some large objects, like buildings, cliffs and boulders.


A detailed explanation on how to create and import terrain maps can be found here: http://forums.wolfire.com/viewtopic.php?f=16&t=12568


This is also an exceptional thread describing in great detail most aspects of level creation: http://forums.wolfire.com/viewtopic.php?f=16&t=14869#p157052

XML File

<?xml version="2.0" ?>

<Type>saved</Type>
<Name></Name>
<Description></Description>
<Shader>post</Shader>

<Terrain>
    <Heightmap>[path here]</Heightmap>
    <ColorMap>[path here]</ColorMap>
    <WeightMap>[path here]</WeightMap>
    <DetailMaps>
        <DetailMap colorpath="[path here to image with color info]" normalpath="[path here to image with normal info]" materialpath="[path here -- to something in the material.xml format]" />
        <DetailMap colorpath="[path here to image with color info]" normalpath="[path here to image with normal info]" materialpath="[path here -- to something in the material.xml format]" />
        <DetailMap colorpath="[path here to image with color info]" normalpath="[path here to image with normal info]" materialpath="[path here -- to something in the material.xml format]" />
        <DetailMap colorpath="[path here to image with color info]" normalpath="[path here to image with normal info]" materialpath="[path here -- to something in the material.xml format]" />
    </DetailMaps>
    <DetailObjects> //for grass and stuff
        <DetailObject obj_path="Data/Objects/Plants/Groundcover/Grass/WildGrass.xml" weight_path="Data/Textures/Terrain/scrubby_hills/scrubby_hills_grass.png" normal_conform="0.900000" density="20.000000" min_embed="0.000000" max_embed="0.400000" min_scale="1.000000" max_scale="2.000000" view_distance="20.000000" jitter_degrees="10.000000" overbright="0.000000" />
    </DetailObjects>
</Terrain>

<Sky>
    <DomeTexture>Data/Textures/skies/FILE.tga</DomeTexture>
    <SunAngularRad>0.123456</SunAngularRad>
    <SunColorAngle>6.8534</SunColorAngle>
    <RayToSun r0="0.123456" r1="0.123456" r2="0.123456" />
    <ExtraAO>0</ExtraAO>
</Sky>

<Objectives>[objective here]</Objectives>
          //possible objectives: reach_a_trigger, reach_a_trigger_with_no_pursuers, collect

Header

<Type> - Always equal to saved

<Name> - Map name, for use in some menus. Currently only used in challenge maps

<Description> - Map description. Some metadata (possibly for menus?). Currently only used in challenge maps

<Shader> - Shader that is used in this map. Nearly always set to post, unless you want to use a custom shader

Terrain

<HeightMap> - A 16-bit grayscale image in the png format, with the value of each pixel corresponding to an elevation in the terrain.

<ColorMap> - A .tga file which maps the color of each pixel to the color of a point on the terrain. This is used for rough texture, and can be used for example to make valleys green and mountain peaks grey.

<WeightMap> - A .tga in which colors (RGB + Black) are used to define which DetailMap to use on which part of the terrain.

<DetailMap> - DetailMaps are used to tile various objects across the terrain, for example of a patch of gravel: a local change in terrain color to grey, a normal map that gives the impression of gravel, and the corresponding materialobject which generate a "gravel" sound when interacted with.

Sky

<DomeTexture> - Filepath to the texture of the skydome. Some already exist in Data/Textures/skies/

<SunAngularRad> - Size of Sun in Radians?

<SunColorAngle> - ??

<RayToSun/> - This Tag has 4 Attributes, r0, r1, and r2. NOTE: Range? they have floating point values, generally close to 0. what do they do?