Difference between revisions of "Heightmap Editing"

2,789 bytes added ,  18:25, 20 January 2011
→‎See also:: Added Creating Large Worldspaces
imported>Erstam
(How height values relate to actual terrain height)
imported>Bruneauinfo
(→‎See also:: Added Creating Large Worldspaces)
 
(27 intermediate revisions by 5 users not shown)
Line 4: Line 4:


=='''Heightmap Editor'''==
=='''Heightmap Editor'''==
[[image:heightmapeditor.jpg|thumb|right|Heightmap Editor Window]]
[[image:heightmapeditor01.jpg|thumb|right|Heightmap Editor Window]]
The [[:image:heightmapeditor.jpg|Heightmap Editor]] is the tool used for massive landscape terrain alteration. With this program it is possible to create, sculpt, refine and even erode large sections of landscape cells for a [[:Category:World Spaces|world space]]. Additionally, LOD landscape geometry and normal map textures can be generated through the Heightmap Editor. Local, or high detail landscape editing functionality is still retained in the [[:Category:Landscape|landscape editor]]. The Heightmap Editor window (accessible from the '''World/Heightmap Editing''' pull down menu in the main menu bar, or from the [[Buttons|globe icon]] on the main editor toolbar) is divided up into 3 main sections: [[#Main Menu/Editing Toolbar|Editing Toolbar]], [[#Brush/Erosion Parameters|Brush Parameters]], and [[#Editing/Overview/Preview/Color Masking Windows|Editing Window]].
The [[:image:heightmapeditor.jpg|Heightmap Editor]] is the tool used for massive landscape terrain alteration. With this program it is possible to create, sculpt, refine and even erode large sections of landscape cells for a [[:Category:World Spaces|world space]]. Additionally, LOD landscape geometry and normal map textures can be generated through the Heightmap Editor. Local, or high detail landscape editing functionality is still retained in the [[:Category:Landscape|landscape editor]]. The Heightmap Editor window (accessible from the '''World/Heightmap Editing''' pull down menu in the main menu bar, or from the [[Buttons|globe icon]] on the main editor toolbar) is divided up into 3 main sections: [[#Main Menu/Editing Toolbar|Editing Toolbar]], [[#Brush/Erosion Parameters|Brush Parameters]], and [[#Editing/Overview/Preview/Color Masking Windows|Editing Window]].


Line 24: Line 24:
::*'''DeleteAllCells''' This option will flag all cells for that world space as deleted.
::*'''DeleteAllCells''' This option will flag all cells for that world space as deleted.


::*'''Import''' This option allows you to use 1024x1024 16-bit RAW format images as a starting template for heightmap painting. These should be located in your "Oblivion\Data\HeightField" directory and named according to [http://cs.elderscrolls.com/constwiki/index.php/Image:Overviewgrid.jpg this grid] (ex: Oblivion\Data\HeightField\0_0.raw). The files should also have been saved with these Raw Option settings: Count: 1, Depth: 16 Bits, Byte Order: IBM PC.
::*'''Import''' This option allows you to use 1024x1024 16-bit RAW format images as a starting template for heightmap painting. These should be located in your "Oblivion\Data\HeightField" directory and named according to [http://cs.elderscrolls.com/constwiki/index.php/Image:Overviewgrid.jpg this grid] (ex: Oblivion\Data\HeightField\0_0.raw). The files should also have been saved with these Raw Option settings: Header: 0, Non-interleaved Order, Count: 1, Depth: 16 Bits, Byte Order: IBM PC.


::*'''Export''' This option allows you to export heightmap sections in 1024x1024 16-bit RAW format images. The files are created to "C:\Program Files\Bethesda Softworks\Oblivion" and named "Q1.raw" through "Q4.raw". These files can be opened in Photoshop with these Raw Option settings: Count: 1, Depth: 16 Bits, Byte Order: IBM PC.
::*'''Export''' This option allows you to export heightmap sections in 1024x1024 16-bit RAW format images. The files are created to the main Oblivion folder ("C:\Program Files\Bethesda Softworks\Oblivion" with default installation) and named "Q1.raw" through "Q4.raw". These files can be opened in Photoshop with these Raw Option settings: Count: 1, Depth: 16 Bits, Byte Order: IBM PC. (Paint Shop Pro does not seem capable of handling 16bpp .raw files.)


::*'''Generate LOD''' This option allows you to generate LOD meshes, in Gambryo's .NIF file format, for use in the game world. Additionally, the LOD generation process will create normal maps based off of the terrain height information for the LOD terrain textures, as well as combining the terrain LOD mesh normal maps with any potential user-made terrain LOD texture normal maps. The final results for the texture combinations are saved out as .DDS format files, with an _FN suffix in the file name. There are two LOD generation options, which vary only in generation speed and accuracy. They are '''Quick Prototype''' and '''Full''' and are less accurate but faster, and more accurate but slower, respectively. Diffuse maps for LOD terrain textures are generated through the right-click menu in the editor's [[Render Window|render window]].
::*'''Generate LOD''' This option allows you to generate LOD meshes, in Gambryo's .NIF file format, for use in the game world. Additionally, the LOD generation process will create normal maps based off of the terrain height information for the LOD terrain textures, as well as combining the terrain LOD mesh normal maps with any potential user-made terrain LOD texture normal maps. The final results for the texture combinations are saved out as .DDS format files, with an _FN suffix in the file name to Oblivion\data\textures\landscapelod\generated\. There are two LOD generation options, which vary only in generation speed and accuracy. They are '''Quick Prototype''' and '''Full''' and are less accurate but faster, and more accurate but slower, respectively. Diffuse maps for LOD terrain textures are generated through the right-click menu in the editor's [[Render Window|render window]].
 
:::(Note: There seems to be an issue with the TESCS Generate LOD function. If it is run more than once during the same session, the LOD mesh becomes corrupt. If this occurs, close the TESCS, reopen it, and try again)


::*'''Exit''' This option simply closes the Heightmap Editor.
::*'''Exit''' This option simply closes the Heightmap Editor.
Line 35: Line 37:
[[image:overviewgrid.jpg|thumb|right|Overlay Grid Breakdown]]
[[image:overviewgrid.jpg|thumb|right|Overlay Grid Breakdown]]


::*'''Show Overlay''' This option enables you to superimpose any 1024x1024 .JPG format [[:image:overviewgrid.jpg|overlay images]] on top of the heightmap editing window, to aid in painting. The opacity of the overlaid image is controlled via the '''Overlay Alpha''' slider under the erosion settings dialogue. The farther the slider is to the right, the more the overlay image is visible.
::*'''Show Overlay''' This option enables you to superimpose any 1024x1024 .JPG format [[:image:overviewgrid.jpg|overlay images]] on top of the heightmap editing window, to aid in painting. The opacity of the overlaid image is controlled via the '''Overlay Alpha''' slider under the erosion settings dialogue. The farther the slider is to the right, the more the overlay image is visible. ''The overlay feature is no longer supported.''


::*'''Gridlines''' This toggles the grid line overlay on and off in the heightmap editing window. Each square represents one exterior cell.
::*'''Gridlines''' This toggles the grid line overlay on and off in the heightmap editing window. Each square represents one exterior cell.
Line 71: Line 73:
:*'''Lasso''' This button allows you to draw a curvilinear selection shape around specific pixels for more controlled heightmap editing, eroding, or for pixel copying.
:*'''Lasso''' This button allows you to draw a curvilinear selection shape around specific pixels for more controlled heightmap editing, eroding, or for pixel copying.


:*'''Flatten''' This button toggles as brush that will clamp all pixels inside the cursor to be the same color as the pixel directly under the cursor's center crosshair in the heightmap editing window. Shortcut: A
:*'''Flatten''' This button toggles a brush that will clamp all pixels inside the cursor to be the same color as the pixel directly under the cursor's center crosshair in the heightmap editing window. Shortcut: A


:*'''Raise''' This button toggles a brush that will paint white to the pixels under the cursor in the heightmap editing window. With this brush selected, the left mouse button acts as raise, and the right mouse button acts as lower. Shortcut: S
:*'''Raise''' This button toggles a brush that will paint white to the pixels under the cursor in the heightmap editing window. With this brush selected, the left mouse button acts as raise, and the right mouse button acts as lower. Shortcut: S
Line 109: Line 111:
::*'''Random Seed''' Enable this checkbox to ensure that a new, random seed number is used for each automatic noise generation pass.
::*'''Random Seed''' Enable this checkbox to ensure that a new, random seed number is used for each automatic noise generation pass.
::*'''Persistence''' Use the slider and/or the number field to specify how the frequency value is modulated by the amplitude per each octave. Higher numbers usually equate to a noisier pattern. Affects only the noise brush. Range: 0-100
::*'''Persistence''' Use the slider and/or the number field to specify how the frequency value is modulated by the amplitude per each octave. Higher numbers usually equate to a noisier pattern. Affects only the noise brush. Range: 0-100
::*'''Octaves''' This is the number of successive noise function passes involved in final noise generation. The higher the number, the more passes, or layers are involved in the noise generation and the more complex the patter will appear. Affects only the noise brush. Range: 0 to ∞
::*'''Octaves''' This is the number of successive noise function passes involved in final noise generation. The higher the number, the more passes, or layers are involved in the noise generation and the more complex the pattern will appear. Affects only the noise brush. Range: 0 to ∞
::*'''Generate!''' Use this button to automatically generate a noise pass onto the currently selected heightmap section. This button will take into account the frequency, amplitude, base offset, additive, subtractive, seed# and random seed parameters and flags. The area of generation can also be further controlled by the lasso and marquee selection tools.
::*'''Generate!''' Use this button to automatically generate a noise pass onto the currently selected heightmap section. This button will take into account the frequency, amplitude, base offset, additive, subtractive, seed# and random seed parameters and flags. The area of generation can also be further controlled by the lasso and marquee selection tools.


Line 117: Line 119:
::*'''Sedimentation''' Use the slider and/or the number field to control how much of the eroded land will deposit at the base of eroded gullies and canyons. The higher the number, the more land will be cut away and deposited at the base of eroded areas. Range: 1-100
::*'''Sedimentation''' Use the slider and/or the number field to control how much of the eroded land will deposit at the base of eroded gullies and canyons. The higher the number, the more land will be cut away and deposited at the base of eroded areas. Range: 1-100
::*'''Land Smoothing''' Use the slider and/or the number field to control how smooth the heightmap will be after an erosion pass. The higher the number, the more that rough surfaces will be evened out and smoothed down during an erosion process, to better simulate weathering. Range: 1-100
::*'''Land Smoothing''' Use the slider and/or the number field to control how smooth the heightmap will be after an erosion pass. The higher the number, the more that rough surfaces will be evened out and smoothed down during an erosion process, to better simulate weathering. Range: 1-100
::*'''Erode''' Press this button to start an erosion pass based off of the iterations, erosion rate, sedimentation and land smoothing parameters. The area of erosion can also be further controlled by the lasso and marquee selection tools.
::*'''Erode''' Press this button to start an erosion pass based off of the iterations, erosion rate, sedimentation and land smoothing parameters. The area of erosion can also be further controlled by the lasso and marquee selection tools. By setting Erosion Rate and Sedimentation to 0 and only enabling Land Smoothing, this is also a quick way for smoothing the entire map, as opposed to using the Smooth or Smudge tools in the toolbar.


----
----
Line 126: Line 128:
:*'''Preview Window''' This window offers a 3D visualization for the currently selected heightmap section. To bring up the preview window, press the camera icon on the Heightmap Editor toolbar. To navigate around the preview window, press and hold the left mouse button while dragging to spin the landscape mesh inside the viewport. Press and hold the middle mouse button to zoom the view in and out. Press and hold the right mouse button to pan the landscape mesh laterally around the window. To quickly update or refresh the preview window after a heightmap change, press the Spacebar, or press the '''Refresh''' button. Holding down the Ctrl key while moving the mouse will adjust the point of origin for the preview window lightsource. Holding down the Left or Right Shift key while moving the mouse will update the position of the magenta scale reference character. This simple 3D box is a rough representation of a person, or 128 [[exterior cells|units]] of vertical height. The 3 radial buttons at the top of the preview will switch the viewport display between '''Solid''', '''Wireframe''' and '''Points''' modes. The preview window can be resized and moved if desired. Note that the preview window will reflect the current selection within the loaded heightmap section. For a finer granularity (more accurate) preview mesh, try selecting a smaller section in the heightmap edit window with the marquee or lasso tools to preview. In order for the preview mesh to reflect this change, the preview window must be closed and re-opened so that the mesh can be redrawn to the new size.
:*'''Preview Window''' This window offers a 3D visualization for the currently selected heightmap section. To bring up the preview window, press the camera icon on the Heightmap Editor toolbar. To navigate around the preview window, press and hold the left mouse button while dragging to spin the landscape mesh inside the viewport. Press and hold the middle mouse button to zoom the view in and out. Press and hold the right mouse button to pan the landscape mesh laterally around the window. To quickly update or refresh the preview window after a heightmap change, press the Spacebar, or press the '''Refresh''' button. Holding down the Ctrl key while moving the mouse will adjust the point of origin for the preview window lightsource. Holding down the Left or Right Shift key while moving the mouse will update the position of the magenta scale reference character. This simple 3D box is a rough representation of a person, or 128 [[exterior cells|units]] of vertical height. The 3 radial buttons at the top of the preview will switch the viewport display between '''Solid''', '''Wireframe''' and '''Points''' modes. The preview window can be resized and moved if desired. Note that the preview window will reflect the current selection within the loaded heightmap section. For a finer granularity (more accurate) preview mesh, try selecting a smaller section in the heightmap edit window with the marquee or lasso tools to preview. In order for the preview mesh to reflect this change, the preview window must be closed and re-opened so that the mesh can be redrawn to the new size.
[[image:colormasking.jpg|thumb|right|Color Masking Window]]
[[image:colormasking.jpg|thumb|right|Color Masking Window]]
:*'''Color Masking''' The color masking window allows the grayscale heightmap to be shaded in color, to better help visualize and spatially organize the height range of the heightmap editor. Through its interface, one can also filter and isolate specific height ranges to work in. To bring up the color masking window, press the color mask icon, between the grid and marquee icons, or choose it from the View pull-down menu. With the window open, you can see that there are 10 mask ranges - all of which can be individually scaled and adjusted to shade the pixels within the defined height range of that particular mask. To change the color for a mask, simply click on the swatches below the sliders to adjust the color respectively through the standard Windows color picker. The color mask system will specify that any pixel in the heightmap at that height, in [[exterior cells|units]], will be shaded that color, and will interpolate smoothly to the next masking step above or below. For example, suppose you wanted to have all pixels below the water level be blue. You could simply set one masking level to be blue and to have a height value that is the same as the sea level. Simply set the next masking step to be one unit above the masking level, and to have a different color. There should now be a clear distinction on the heightmap of what is below and above the water line. It is also possible to use the color masking tool to temporarily prevent certain height ranges from being edited. In the previous example, you could block all pixels below the water level from being editable by making sure the minimum value for all of the 10 masks was at or above the water level height. This temporarily tells the editor that there are no alterable pixels below the specified height. Later, this height can be readjusted via the color masking to open it back up for editing. To set a height range for any mask, simply adjust the sliders or enter in a numerical value, in [[exterior cells|units]], within the number fields above each mask. It is also possible to change the colors of the grid overlay and the edit cursor in this window by clicking on their respective swatches, and choosing a color through the Windows color picker. Press '''OK''' to accept the changes and close the color masking window. Press the '''Cancel''' button to discard any changes and close the color masking window. Press '''Reset''' to revert back to the default settings. Range: 0-65535
:*'''Color Masking''' The color masking window allows the grayscale heightmap to be shaded in color, to better help visualize and spatially organize the height range of the heightmap editor. Through its interface, one can also filter and isolate specific height ranges to work in. To bring up the color masking window, press the color mask icon, between the grid and marquee icons, or choose it from the View pull-down menu. With the window open, you can see that there are 10 mask ranges - all of which can be individually scaled and adjusted to shade the pixels within the defined height range of that particular mask. To change the color for a mask, simply click on the swatches below the sliders to adjust the color respectively through the standard Windows color picker. The color mask system will specify that any pixel in the heightmap at that height, in [[exterior cells|units]], will be shaded that color, and will interpolate smoothly to the next masking step above or below. For example, suppose you wanted to have all pixels below the water level be blue. You could simply set one masking level to be blue and to have a height value that is the same as the sea level. Set the next masking step to be one unit above the masking level, and to have a different color. There should now be a clear distinction on the heightmap of what is below and above the water line. It is also possible to use the color masking tool to temporarily prevent certain height ranges from being edited. In the previous example, you could block all pixels below the water level from being editable by making sure the minimum value for all of the 10 masks was at or above the water level height. This temporarily tells the editor that there are no alterable pixels below the specified height. Later, this height can be readjusted via the color masking to open it back up for editing. To set a height range for any mask, simply adjust the sliders or enter in a numerical value, in [[exterior cells|units]], within the number fields above each mask. It is also possible to change the colors of the grid overlay and the edit cursor in this window by clicking on their respective swatches, and choosing a color through the Windows color picker. Press '''OK''' to accept the changes and close the color masking window. Press the '''Cancel''' button to discard any changes and close the color masking window. Press '''Reset''' to revert back to the default settings. Range: 0-65535
It's important to know how the height units in the heightmap editor relate to the actual terrain elevation when the map is saved to the plugin. Water level (defaults to z=0 in exterior cells) corresponds to z=4096 on the height map. Moreover, all differences from this value are doubled in the generated terrain. For example, z=4196 doesn't give a terrain height of 100, but 200 instead. Following this formula, the default height in the heightmap editor (3072) results in an ocean depth of -2048 units.
It's important to know how the height units in the heightmap editor relate to the actual terrain elevation when the map is saved to the plugin. Water level (defaults to z=0 in exterior cells) corresponds to z=4096 on the height map. Moreover, all differences from this value are doubled in the generated terrain. For example, z=4196 doesn't give a terrain height of 100, but 200 instead. Following this formula, the default height in the heightmap editor (3072) results in an ocean depth of -2048 units.


----
===Notes===
:*'''Mesh errors''' The heightmap editor frequently creates some errors in the generated landscape mesh. These are most frequently located in cell 0,0 and the corners of each quad. These are rips in the mesh that cause errors when saving the esp. When you save it and get error messages about the CS being unable to create the mesh for a cell, write down the cell cordinates (don't hit "yes to all"). If you quit before fixing these errors, on reloading your mod the entire cell will be "missing" e.g. be set to elevation 0, which is hard to fix. To avoid this, load up the cells with errors in the render window, switch to wireframe view (w), and turn on the cell borders (b). Look around the edges of the cell (most often its the lower left corner), and if you find the anomaly, use the soften or flatten vertices tool to mend the mesh. In general, it is best to correct these errors with the local landscape editing tools as corrections done with the heightmap editor can re-introduce the same errors during the saving process - even after initially fixing them.
:*'''Go easy!''' It's very easy to overdo it with raising land, creating huge unnavigable mountain ranges instead of the nice hilly landscape you planned, especially when using the standard color masking options. Go easy when raising the land, keep the intensity low, and maybe adjust the color masking options to something more sensitive for the lower elevations. The values and colors depicted in this [[:image:colormasking.jpg|image]] were used to generate and shape Cyrodiil for TES:IV Oblivion.
:*'''Raw files''' The heightmap editor will automatically load any .raw files in your HeightField folder into the canvas window, so if you have been using .raw files and you want to work on a new heightmap that does not use .raw files you will have to remember to remove them to access your new heightmap.
====See also:====
:*[[Creating_Large_Worldspaces|Creating Large Worldspaces]]
:*[[World_Space_Tutorial|World Space Tutorial]]
:*[[WorldBuilding_101|World Building 101 Tutorial]]
:*[[Landscape_LOD_Tutorial| Landscape LOD tutorial]]
[[Category:World]]
[[Category:World]]
Anonymous user