元編程參考文件

地形渲染

2 個節點

本頁內容 2

渲染地貌

函數

用 Radeon ProRender 路徑追蹤渲染地貌:在生成地貌時的晴空與太陽下,水按地貌所說的外觀繪製。

簽名
渲染地貌 -> Pixel Image
    地貌: Landscape
    寬度: 整數
    高度: 整數
    取樣數: 整數
    視角: Terrain Render View
    相機位置: Vector3
    注視點: Vector3
    焦距(毫米): 數字
PixelImage RenderLandscape(
    Landscape landscape,
    int width = 1920,
    int height = 1080,
    int samples = 128,
    TerrainRenderView view = TerrainRenderView.Diorama,
    Vector3 eye,
    Vector3 target,
    double focalLength = 35)

參數

名稱型別預設值說明
地貌Landscape—Make Landscape's or Assemble Landscape's result.
寬度整數1920Width of the image, pixels.
高度整數1080Height of the image, pixels.
取樣數整數128Paths traced through each pixel. More is less grainy and slower; there is no denoiser.
視角Terrain Render View全景Where the camera stands: one of the views fitted to the terrain, or Custom for the Eye and Target.
相機位置Vector3—With the Custom view, where the camera stands: metres east along the columns and south along the rows from the terrain's first cell, and elevation in metres.
注視點Vector3—With the Custom view, what the camera looks at, in the same terms.
焦距(毫米)數字35Lens, millimetres on a 36 mm wide frame.

返回

影像Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
地形渲染
所屬包
程序化生成

渲染地形

函數

用 Radeon ProRender 路徑追蹤渲染帶有烘焙表面的地形:由太陽和素材庫的天空照明,給出水面時把水作為水平面繪製。視角為“自訂”時使用相機位置和注視點。

簽名
渲染地形 -> Pixel Image
    地形: Scalar Field
    表面: Baked Terrain Surface
    水面: Scalar Field
    寬度: 整數
    高度: 整數
    取樣數: 整數
    視角: Terrain Render View
    太陽方位角: 數字
    太陽高度角: 數字
    相機位置: Vector3
    注視點: Vector3
    焦距(毫米): 數字
PixelImage RenderTerrain(
    ScalarField2D terrain,
    BakedTerrainSurface surface,
    ScalarField2D water,
    int width = 1920,
    int height = 1080,
    int samples = 128,
    TerrainRenderView view = TerrainRenderView.Diorama,
    double sunBearing = 247,
    double sunAltitude = 35,
    Vector3 eye,
    Vector3 target,
    double focalLength = 35)

參數

名稱型別預設值說明
地形Scalar Field—Heights in metres: the terrain the surface was baked over.
表面Baked Terrain Surface—Bake Terrain Surface's result; its maps are the ground, under the water too.
水面Scalar Field—The water surface in metres, NaN on dry ground, as Terrain Water's Fill gives it in Surface Elevation: the same that went into the bake. Without it there is no water.
寬度整數1920Width of the image, pixels.
高度整數1080Height of the image, pixels.
取樣數整數128Paths traced through each pixel. More is less grainy and slower; there is no denoiser.
視角Terrain Render View全景Where the camera stands: one of the views fitted to the terrain, or Custom for the Eye and Target.
太陽方位角數字247The sun's compass bearing, degrees clockwise from north.
太陽高度角數字35The sun's height above the horizon, degrees.
相機位置Vector3—With the Custom view, where the camera stands: metres east along the columns and south along the rows from the terrain's first cell, and elevation in metres.
注視點Vector3—With the Custom view, what the camera looks at, in the same terms.
焦距(毫米)數字35Lens, millimetres on a 36 mm wide frame. The views stand further off for a longer lens, so they frame the same.

返回

影像Pixel Image

備註

The camera is chosen by the view rather than by whether Eye is wired. A vector input always holds a value - an unwired one holds zero - so "not given" cannot be told from the terrain's corner at sea level, and a camera that moved there whenever the pin was left alone would be a trap.

所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
地形渲染
所屬包
程序化生成