render
指定の RenderMap を再作成します。 このスクリプトは、RenderMap プロパティ エディタの[Regenerate
Map]ボタンをクリックする操作と同じです。 RenderMapを追加するには、「AddProp "RenderMap"」コマンドを使用します。
RenderMap により、複雑なテクスチャリングおよびレンダツリー情報を 1 枚のテクスチャ イメージに取り込めます。このテクスチャ
イメージは、テクスチャ表示モードのテクスチャのプレビュー、ゲーム用のテクスチャ作成、リアルタイム
レンダリングに利用できるほか、一般的にはレンダリングを高速にします。
注:
テクスチャイメージにテクスチャプロジェクションが適用されない限り、オブジェクトのレンダマップは作成できません。また、このテクスチャイメージでは空間テクスチャプロジェクションを使用できません(代わりにUVプロジェクションを使用します)。
RegenerateMaps( [Properties], [TileSize] ); |
| パラメータ | タイプ | 詳細 |
|---|---|---|
| Properties | 文字列 | 再作成する RenderMap のリスト。
RenderMap はプロパティです(例: sphere.RenderMap)。
デフォルト値: 現在選択されている値 |
| TileSize | Integer | レンダでサテライト マシンが使用される可能性を高くしたり低くしたりします(タイルの詳細については、「
Softimage ユーザ ガイド」 を参照してください)。 推奨する値は 8、16、32、64 です。 許容可能な値の範囲は、8 ~ 512 です(最初と最後の値をそれぞれ含みます)。 デフォルト値: 32 |
'
' This example creates a sphere with a rendermap, and then connects a rendermap
' using a UV projection to the sphere and regenerates the map.
'
NewScene , false
' Add a sphere to the scene
Set oSphere = CreatePrim( "Sphere", "NurbsSurface" )
' Create a rendermap on the sphere; the AddProp command returns the output
' object as an XSICollection of 1, so you can get the actual RenderMap as
' a Property object by resetting the object pointer to the first member
' of the returned collection
AddProp "RenderMap", oSphere, , , oRMap
Set oRMap = oRMap(0)
' Specify a destination directory and name for the new image file
' Note: You must specify the image filename with an extension
oRMap.Parameters( "imagefile" ).Value = InstallationPath( siUserPath ) _
& "\temp\rendermap.pic"
'
' Tip: You can also use the SetValue command instead of accessing the
' parameter through the object model:
' SetValue oSphere & ".RenderMap.imagefile", InstallationPath( siUserPath ) _
' & "\temp\rendermap.pic"
'
' Add a texture projection to the sphere and attach the rendermap to it
CreateProjection oSphere, siTxtUV, siTxtDefaultSpherical, sSupport, sProj
SetInstanceDataValue , oRMap.Parameters( "uvprop" ), sProj
'
' Tip: You can also use the SetInstanceDataValue command instead of
' accessing the parameter through the object model:
' SetInstanceDataValue , oSphere & ".RenderMap.uvprop", sProj
'
' Regenerate the rendermap with a tile size of 16
RegenerateMaps oRMap, 16
|