元編程參考文件

程序化地形

可用

高度圖:生成、侵蝕、濾波、著色、貼圖和物體佈置

Methodox Wiki 上的使用指南

40 個類別,共 527 個節點

所屬發行版
元編程(教育版)元編程(專業版)
支援等級
第 2 級(擬定)
所屬包
程序化生成
程序化生成

高度圖地形、噪聲、侵蝕、行星貼圖與紋理,以及承載它們的三維網格與場景。

高度圖操作

相加相加(就地)應用曲線應用蒙版Applies a series of HeightmapMasks to the Heightmap using a specified modification function.混合混合高度蒙版Creates a modified copy of a heightmap by applying a grayscale height mask using the specified blend mode.帶蒙版混合計算流量累積圖Calculates routed rainfall accumulation across the terrain.計算高度變化計算歸一化高度變化Calculates pixel-space gradient magnitude and normalizes the result to 0-1.計算基於法線的陡峭度Calculates normal-derived steepness.計演算法線計算物理高度變化計算歸一化物理高度變化Calculates world-space gradient magnitude and normalizes the result to 0-1.計算坡度角(度)Calculates slope angle in degrees.計算坡度角(弧度)Calculates slope angle in radians.計算坡度圖Calculates a derived slope/steepness map from a heightmap.計算地形溼度指數圖Calculates raw Topographic Wetness Index from routed flow accumulation and terrain slope.計算溼度蒙版Creates an artist-friendly 0-1 wetness mask from Topographic Wetness Index percentiles.限制範圍限制範圍(就地)複製高度圖合併蒙版Combines multiple Heightmap masks (value range 0-1) into a single union mask.對比度Adjusts height contrast relative to the current elevation range.對比度(就地)Adjusts height contrast relative to the current elevation range.建立森林蒙版Creates a forest suitability mask.建立局部起伏蒙版Creates a terrain flatness mask from local relief.建立徑向蒙版建立積雪蒙版Creates a snow coverage mask from elevation, slope retention, and settling.建立水域蒙版Creates a combined water mask from routed rivers and filled-depression lakes.建立水面Simply mask out a water plane based on specified Water Level.裁剪Crops the source scalar field to the specified rectangular region.曲線調整Applies a normalized level adjustment transfer curve while preserving the current elevation range.曲線調整(就地)Applies a normalized level adjustment transfer curve while preserving the current elevation range.相除相除(就地)均衡化Redistributes values by percentile rank while preserving the current elevation range.均衡化(就地)Redistributes values by percentile rank while preserving the current elevation range.填充(就地)按高度篩選Filters the heightmap based on a minimum or maximum height rule with an optional fade.按坡度篩選Filters the heightmap based on slope range with an optional fade.按值篩選用 1 減Invert by subtracting from 1.反轉範圍生成排水Modifies terrain in place so non-outlet cells can drain toward an outlet.生成排水(就地)Modifies terrain in place so non-outlet cells can drain toward an outlet.生成梯田Creates a terraced copy while preserving the source elevation range.生成梯田(就地)Applies terrace shaping in place while preserving the current elevation range.相乘相乘(就地)取反Negates all values.歸一化歸一化(就地)Rescale entire height field to fit in height range.冪運算替換(就地)Replace data from flattened array.調整大小Resizes the source scalar field to the specified dimensions.平滑Useful on low-resolution imports.細分Creates a more densely subdivided scalar field while preserving its overall physical dimensions.細分(就地)Subdivides the target scalar field in place while preserving its overall physical dimensions.相減相減(就地)梯田化閾值化Creates a binary mask by converting values below the threshold to 0 and values at or above the threshold to 1.

地形侵蝕設定

建立地形侵蝕設定複製設定A copy that can be changed without affecting this instance.面積指數Drainage area exponent m.基準面Sea level, in metres.基岩休止角(度)Steepest stable angle of soft bedrock, in degrees.邊界作為出口Whether the map border drains off the map.河道記憶How quickly the remembered discharge follows each pass (0..1).粗網格單元數The fluvial stage runs most of its time on a coarser grid whose longer side has this many cells, then refines at full resolution.沉積係數Dimensionless deposition coefficient G.沉積坡度Gradient (m/m) of the surface sediment builds when it fills a lake or closed basin, rising away from the outlet like a delta or alluvial plain.水滴容量Sediment capacity factor: how much a droplet can carry per unit of speed, slope and water.水滴密度Droplets spawned per square metre in each pass.水滴沉積率Fraction of excess sediment dropped per step.水滴每米蒸發率Water lost per metre travelled, as a fraction.水滴最大行程Longest distance a droplet may run from the tile it starts in, in metres.水滴輪數Number of droplet passes.水滴拾取率Fraction of spare capacity picked up per step.水滴半徑Radius of the erosion brush, in metres.水滴強度Overall strength of droplet erosion and deposition, as a multiplier.時長(千年)Simulated geological time of the fluvial stage, in thousands of years.啟用水滴階段Run the droplet stage, which adds rills, gullies and small deposits on top of the fluvial landscape.啟用河流階段Run the fluvial stream-power stage, which carves the drainage network: dendritic valleys, sharp ridges, alluvial fans and filled lakes.啟用崩塌階段Run the talus stage, which slumps slopes steeper than the angle of repose into scree and debris aprons.可侵蝕性Erodibility K of the stream-power law, in m^(1-2m)/yr.精細步數How many full-resolution fluvial steps follow the coarse pass.坡面擴散率Hillslope creep diffusivity, in m²/yr.最大執行緒數Maximum number of threads; 0 uses every core.徑流(米/年)Runoff per unit area, in metres per year, used to turn drainage area into discharge for the water depth map.泥沙可侵蝕性倍數How much more easily deposited sediment is eroded than bedrock, as a multiplier of the erodibility.種子Random seed of the droplet stage.坡度指數Slope exponent n.休止角(度)Angle of repose of loose material (deposits and debris), in degrees.崩塌迭代次數Upper bound on talus iterations.崩塌速率Fraction of the excess moved per talus iteration (0..1).時間步長(千年)Fluvial time step, in thousands of years.抬升速率(毫米/年)Tectonic uplift rate, in mm/yr, multiplied by the optional uplift map.

標量場

物理比例Meters per unit cell.標量場Initializes a new instance of the Heightmap class with the specified dimensions.相加Adds another heightmap to this heightmap, element-wise.應用Applies a custom transformation function to each height value in the heightmap.複製標量場Clones the heightmap, creating a deep copy.建立範本Creates a heightmap with same dimensions and attributes but initialized with fresh empty data.裁剪Crops the heightmap to the specified rectangular region.侵蝕筆刷Simple erosion壓平筆刷Flattens the terrain within a brush area to a target height.列數Gets the width of the heightmap (number of columns).取得資料Row-major: height (y), width (x).取得高程是否已歸一化Gets whether all values in this scalar field are valid normalized values in the inclusive 0..1 range.是否為正方形Occassionally useful due to output engine requirements - some usage scenarios require square maps.值Gets or sets the height value at the specified (x, y) coordinate.行數Gets the height of the heightmap (number of rows).用途An indicator what this heightmap is used for.取得世界深度取得世界寬度取得角度(度)Calculates the slope angle in degrees based on the gradient at a given point.取得平均高度Gets the average height value of the heightmap.取得顏色取得陣列形式的資料Gets a copy of data.取得陣列形式的資料(低精度)Gets a copy of data in floats.取得浮點值This is very slow!取得梯度Gets the gradient (partial derivatives) at the specified (x, y) coordinate.取得梯度大小取得灰度位元組取得高度變化取得最大高度Gets the maximum height value in the heightmap.取得最小高度Gets the minimum height value in the heightmap.取得法線Gets the normal vector at the specified (x, y) coordinate.取得物理高度變化取得值Gets the height value at the specified (x, y) coordinate.取得 Z插值高度Interpolates the height value at the specified (x, y) coordinate using bilinear interpolation.噪聲筆刷就地歸一化並限制範圍Normalizes every value in _heightData in place so the result is between 0.0 and 1.0 (as specified by Max Value).抬升降低筆刷Raises or lowers the terrain within a brush area.調整大小Resizes the heightmap to the specified dimensions using nearest neighbor scaling.逆時針旋轉Rotates the heightmap data 90 degrees counterclockwise.順時針旋轉Rotates the heightmap data 90 degrees clockwise.雙線性取樣(限制邊界)Bilinearly samples the field using grid coordinates and clamps samples at the outer border.世界座標雙線性取樣(限制邊界)Bilinearly samples the field using physical world coordinates.縮放高度Scales the heightmap vertically by the specified factor.設定值Sets the height value at the specified (x, y) coordinate.平滑Smooths the heightmap using a simple averaging filter.平滑筆刷Applies a smoothing operation within a brush area.細分Subdivides each heightmap cell into a finer grid while preserving the overall physical dimensions.彙總Returns a technical summary of the heightmap, one parameter per line.轉為平鋪陣列Flattened array.轉為平鋪陣列(低精度)Flattened array.轉為像素影像作為顏色資料修改建立派生圖從陣列建立生成生物群系紋理生成生物群系漸層紋理取得坡度圖用途標記Returns the canonical usage/term string for a slope map type.轉為灰度像素影像驗證物理比例

地形水體設定

地形水體設定水床深度(米)The bed the result gives under water is at least this far below the water surface, deepening from the shore over TerrainWaterSettings.BedSlopeMetres; where the ground is already deeper it is kept.水床坡度寬度(米)Distance from the shore over which the synthetic bed reaches about two thirds of TerrainWaterSettings.BedDepthMetres, metres.河道集水面積(平方千米)Catchment at which a channel starts, km², for the height above nearest drainage (HAND, Rennó et al.檢測平水面Find water the survey recorded.填充窪地Fill closed depressions with water up to the height at which they spill (priority-flood, Barnes et al.平坦容差(米)How far a cell may lie from the level of the flat region it joins, metres.平水面抬升(米)How far the water surface of flat water sits above the flattened ground, metres, so the water's geometry does not coincide with the terrain's.平水面最小圍合度The share of a flat region's rim that must rise above it for it to count as water: a lake or a river lies below its banks, a mesa top or a terrace lies above what surrounds it.洪水位(米)Flood every valley floor to this height above its channel, metres, as HAND flood mapping does with a river stage: the water surface is the channel's height plus the stage, and every cell draining to that channel lower than it is under water.湖泊集水面積比Catchment a lake needs per square metre of its surface to stay full, the ratio of evaporation from open water to runoff from its catchment: about 2 to 10 in wet mountains, 20 to 100 in semi-arid country, several hundred in a desert.湖泊填充比例How full each lake is, as a fraction of its depth from its lowest point to its spill height: 1 is brim-full, as a lake with an outlet stream is; less leaves the lower stand of a closed basin in a dry climate.河流最大爬升(米)The highest a reach may climb above the local valley floor to join two crossings, metres.最小平水面面積(平方米)The smallest flat region taken as water, m².最小湖泊面積(平方米)A depression holds a lake only if its water covers at least this much ground, m².最小湖泊深度(米)A depression holds a lake only if it is at least this deep below its spill height, metres.最小缺口深度(米)With automatic river ends, the least depth of a border notch below its sides for the river to cross the border through it, metres.河流深度(米)Water depth over the river's thalweg, metres.河流入口 UWhere the river enters, as a fraction of the map's width (columns) and depth (rows), 0..1. NaN, here or in the exit, finds the crossings in the border instead: every notch at least TerrainWaterSettings.MinimumNotchDepthMetres deep whose floor lies within TerrainWaterSettings.RiverFallMetres of the lowest one.河流入口 V河流出口 UWhere the river leaves, as a fraction of the map's width and depth, 0..1. With the entry given, the river runs between the two whatever lies between them.河流出口 V河流落差(米)How far the river falls across the map, metres: border notches whose floor lies higher than this above the lowest notch are side valleys, not the river.河流最大半寬(米)How far the river spreads from its thalweg over ground below its surface, metres.河面平滑半徑(米)How far the river's surface is averaged over its own water, metres, 0 for not at all.僅從邊界連通海水Only ground below sea level that connects to the map's border is sea; inland ground below it, as in a polder or the Dead Sea's basin, stays dry unless a lake fills it.海平面(米)Sea level, metres.岸線柔化寬度(米)The water mask falls from 1 to 0 over this distance across the shoreline, metres.過境河流A river crossing the map, fed from off it: the cheapest paths along the valley floor between the places it crosses the map's border, filled to TerrainWaterSettings.RiverDepthMetres.谷底高度(米)Height above drainage at which the valley-floor mask has fallen to 0, metres.河谷半徑(米)Radius of the window whose lowest point is the local valley floor, metres.河谷容差(米)Height above the local valley floor that multiplies the path's cost by e, metres.溼潤河岸距離(米)The wet-bank mask is 0 this far from the water, metres.溼潤河岸高度(米)The wet-bank mask is 0 this high above the nearby water surface, metres: the height splash, seepage and floods keep wet.

儲存格地形

高度圖視覺化

地形侵蝕結果

碎屑Material laid down by slumping (scree and debris aprons below steep slopes), metres of height.碎屑蒙版0..1 debris (talus) mask: 1 − exp(−debris / 1 m).沉積體積Volume laid down by water and slumping, m³.沉積Material laid down by water (fluvial deposits, filled lakes, droplet deposits), metres of height.沉積蒙版0..1 deposition mask: 1 − exp(−deposit / 2 m).流量Precipitation-weighted drainage area, m²: how much land drains through each cell.水滴階段用時Time spent in the droplet stage.侵蝕體積Volume removed, m³.流出體積Volume carried off the map through outlets, m³.流向 XX component (columns, east) of the unit downhill flow direction.流向 YY component (rows, down the image) of the unit downhill flow direction.水流蒙版0..1 flow mask: logarithmic in drainage area, 0 at 1,000 m² and 1 at 10 km².河流階段用時Time spent in the fluvial stage.硬度The rock hardness the erosion used (0 soft ..高度變化Final minus initial height, metres; negative where material was removed.高度變化蒙版0..1 height change: 0.5 unchanged, 0 at 10 m or more removed, 1 at 10 m or more added.高度圖The eroded heightmap, metres.質量平衡誤差Volume unaccounted for (net change + exported − uplifted), m³; near zero when mass is conserved.淨體積變化Change of the terrain's total volume, m³.輸出用時Time spent deriving the output maps.泥沙通量Sediment flux carried out of each cell, m³/yr.泥沙蒙版0..1 sediment mask: logarithmic in flux, 0 at 0.001 m³/yr and 1 at 10 m³/yr.崩塌迭代次數Talus iterations run.崩塌階段用時Time spent in the talus stage.抬升體積Volume added by uplift, m³.水深Standing water depth, metres: lake depth below the spill height plus channel depth from hydraulic geometry (0.3·Q^0.4 with Q in m³/s).水域蒙版0..1 water mask: water depth, linear from 2 cm (0) to 1 m (1), so shallow channels show as well as lakes.侵蝕量Total material removed by all stages, metres of height.侵蝕量蒙版0..1 wear mask: 1 − exp(−wear / 5 m).溼度Topographic wetness index ln(a / tan β), dimensionless, with a the specific catchment area (m) and β the local slope.溼度蒙版0..1 wetness mask: wetness index, linear from 6 (0) to 14 (1).

地形分層

新增地形圖層在圖層棧頂上再加幾層。坡向蒙版朝向某一方位的坡面:積雪久留的背陰北坡,或先乾的向陽南坡。烘焙圖層棧把圖層棧烘焙成顏色、法線、粗糙度和高度貼圖。模糊蒙版柔化蒙版的邊緣。合併蒙版把兩個蒙版合為一個:取交、取並、相減,或取較大、較小者。凹凸蒙版某一尺度上的凸起地面(山脊、臺地頂)或凹陷地面(窪地、谷底、崖腳)。曲率蒙版地形在某一特徵尺度上的曲率:平坦為 0.5,山脊趨近 1,溝谷趨近 0。場蒙版把一個場作為蒙版鋪在地形上:手繪蒙版、侵蝕貼圖或任何高度圖形狀的資料。全圖蒙版處處都是。高度蒙版兩個海拔之間的地面,在兩側按距離漸隱。輸入蒙版按名稱取用烘焙時給出的貼圖:分析貼圖中的 debris、deposition、wear、water 或 wetBanks,或場蒙版所起的名字。反轉蒙版一減去蒙版。地形圖層地形表面的一層:一種材質,鋪在哪裡,以及如何與下層相接。地形圖層棧地形上的各層,第一層在最底:可以烘焙的表面。載入圖層棧把儲存的圖層棧鋪到地形上。蒙版亮度對比度提亮蒙版,並以中值為中心調整對比度。蒙版色階拉伸蒙版:低值變為 0,高值變為 1。蒙版冪對蒙版取冪:大於 1 收窄,小於 1 擴充。蒙版閾值柔和的截斷:低於一值為 0,高於另一值為 1。自然地形圖層棧烘焙地形表面以自然風格鋪設調色盤所用的圖層棧,可在烘焙前再加上自己的圖層。近輸入蒙版距某張烘焙貼圖有值之處一定距離內的地面:沿水的沙灘、水邊的岸地。近坡蒙版距坡度在兩個角度之間之處一定距離內的地面:崖腳、崩落岩石所及之處。噪聲蒙版以米為單位鋪在地面上的分形噪聲,0 到 1:讓一種材質不至於整片同色的大塊斑駁。儲存圖層棧把圖層棧存為一份小小的 JSON 文件,以後可用“載入圖層棧”鋪到任何地形上。坡度蒙版坡度在兩個角度之間的地面:平地、緩坡、懸崖。底層曲率蒙版下層材質的曲率,平坦為 0.5:石塊的邊緣、石縫。底層高度蒙版下層材質的高度,0 到 1:Mixer 的底層混合。溼度蒙版流過地形的水會彙集之處:地形溼度指數,谷底與窪地高。

儲存格地形查詢引擎

簡單水文侵蝕結果

地貌

高度圖流水線(過程式)

地形侵蝕

地形水體結果

高度圖選擇器

環境光遮蔽用途標記Usage of an ambient occlusion (sky visibility) field.坡向(度)用途標記Usage of an aspect field, in compass degrees.凸度用途標記Usage of a raw convexity field, in metres above the local mean.曲率用途標記Usage of a raw curvature field, in 1/metre.距離用途標記Usage of a distance field, in metres.計算環境光遮蔽Measures how much of the sky each cell sees, by marching the horizon in several directions: 1 in the open, darker in valleys, gorges and at the foot of cliffs.計算坡向(度)Gives the compass direction each slope faces (its downhill direction), in degrees clockwise from north.計算凸度Measures how far each cell stands above (positive) or below (negative) the Gaussian-weighted mean height around it, in metres.計算曲率Measures the surface curvature of a heightmap in 1/metre, positive on convex ground and negative on concave ground.計算距離Measures the exact straight-line distance in metres from every cell to the nearest cell of a mask.按坡向選擇Selects slopes facing a compass direction: a 0..1 mask, for north-facing snow, sun-facing dry grass, moss on shaded sides.按凸度選擇Selects ridges or gullies by convexity: a 0..1 mask that lights crests and darkens channels (Signed), or keeps one side only.按曲率選擇Selects convex or concave ground by its curvature: a 0..1 mask.按距離帶選擇Selects a band of ground at a distance range from a mask: shore strips beside water, riverbank sediment, verges along roads, scree aprons below rock.

地形表面

地形分析貼圖自然風格據以鋪設調色盤的分析貼圖:侵蝕留下的岩屑、沉積與磨蝕,水面與溼潤岸地。劣地地形調色盤劣地:臺地與緩坡上的草原,高處裸露的淺黃黏土,地勢陡落處條帶狀的黏土與軟砂岩崖壁,崖腳衝下的同樣黏土,以及溝谷平地上龜裂的黏土。烘焙地形表面把調色盤鋪在地形上,烘焙成顏色、法線、粗糙度和高度貼圖。地形調色盤調色盤:地貌中每種角色各一種材質。預設地形調色盤來自素材庫的溫帶山地調色盤。荒漠地形調色盤來自素材庫的峽谷地區調色盤:礫質沙地、砂岩崖壁、崩落岩石、淤泥色的河流。沙丘地形調色盤石膏沙丘,如白沙:近乎白色的沙,丘間平地上龜裂的硬殼,積水處的灌叢。熔岩地形調色盤新鮮熔岩,如基拉韋厄:灰黑色的玄武岩,平滑的熔岩流與粗糙的碎塊,風化處少許草和蕨。素材庫材質Divooka 素材庫中的材質(Poly Haven 的 CC0 材質集),按真實尺寸。載入紋理集從按 Poly Haven 命名的貼圖資料夾讀取材質。自然紋理設定自然風格各角色的鋪設位置,以米和度為單位。雨林地形調色盤溫帶雨林:樹下的落葉與林地,岩石和高處的苔蘚,長滿苔蘚的灰色巖壁,水邊的河礫與卵石。沼澤地形調色盤沼澤:落葉下的泥地,較幹高地上的草,水漲水落處裸露的溼泥與淤泥。地形材質由影像組成的材質:顏色、法線(OpenGL 約定,綠色朝上)、粗糙度、高度與環境光遮蔽中的任意幾種。

高度圖紋理取樣器

高度圖侵蝕(就地)

高度圖生成器

高度圖細節增強

地貌

高度圖濾鏡

高度圖侵蝕

地形侵蝕蒙版

規則式高度圖著色器

烘焙地形表面

地形散佈

高度圖讀寫

地形水體

高度圖權重圖

互動式高度圖檢視器

高度圖效果

地形渲染

植被與散佈

高度圖網格化

儲存格地形與高度圖互轉

儲存格地形查詢引擎工廠

地形河流

簡單水文

真實地形