OSLMap: textureMap

OSLMap - superclass: textureMap; super-superclass:material - 11:2 - classID: #(2140830621L, 1875767309L) 	 

> MAXWrapper > マテリアル > テクスチャ マップ > OSLMap

   

マテリアルとマップ - クイック ナビゲーション

3ds Max 2019 の新機能: OSLMap テクスチャマップは、Open Shader Language シェーダを保持するコンテナ オブジェクトを提供します. 3ds Max に付属しているすべての OSL シェーダは、このクラスのインスタンスです。

OSLMap コンテナには、OSLMaps のすべてのインスタンスに共通する定数プロパティがいくつか含まれています。その他のプロパティ(入力ポートや出力ポート、シェーダ オプションなど)は、シェーダ コードによって動的に作成され、インスタンスによって異なります。

コンストラクタ

OSLMap...   

プロパティ

これらのプロパティは、すべての OSLMap インスタンスに共通しています。

<OSLMap>.OSLAutoUpdate     BooleanClass    default: false   --  boolean; OSL_Auto_Update

OSL シェーダ コードがディスク上のファイルにリンクされているのか(true)、それともシーン内の OSL マップによって個別に保持されるのかを指定します。このパラメータは、OSLMap UI 内のファイル名の横にあるリンク アイコンに対応しています。

<OSLMap>.OSLCode     String      --  string; OSL_Code 

OSL シェーダ コードを含む文字列です。既定は、新しいシェーダを作成するための開始点として使用できる単純なシェーダです。

既定のシェーダは 2 つの入力カラー(またはマップ)をミックスして、単一のカラー出力を生成します。

// Simple Example Shader with three inputs two outputs, to demo the syntax.
// For more information read the OSL Language Specifictaion:
//    https://github.com/imageworks/OpenShadingLanguage/blob/master/src/doc/osl-languagespec.pdf 

shader Example
	[[ string help="Example shader with three inputs and two outputs<br>" ]]
(
	// Inputs
	color Input_A = 0.5 [[ string label = "A"]],
	color Input_B = 0.5 [[ string label = "B"]],
	float Mixer   = 0.5 [[ float min = 0.0, float max = 1.0 ]],
	// Outputs
	output color Out = 0.0,
	output color Mix = 0.0)
{
	Out = Input_A + Input_B;            // Sum
	Mix = mix(Input_A, Input_B, Mixer); // Mix
}

<OSLMap>.OSLPath     String    default: ""   --  filename; OSL_Path

OSL コードがファイルからロードされる場合、このパラメータにはそのファイルのパスが保持されます。このパラメータは、(.OSLAutoUpdate を false に設定して)ファイルがリンクされていない場合も、維持されます。

<OSLMap>.numIMultipleOutputChannels     Integer    default: 2   --  integer; Read-only

シェーダの出力ポートの数を指定します。

<OSLMap>.numInputs

入力ポートの数を指定します。

OSLMap のサンプル プロパティ

次に示すプロパティは既定のサンプル OSLMap 上にあり、サンプルの .OSLCode 文字列で定義されています.

<OSLMap>.Input_A     Color    default: (color 127.5 127.5 127.5)   --  animatable; fRGBA color; Controller Scaling: ([1,1,1,1] : (color 255 255 255)); WeirdScaled ([1,1,1,1])
<OSLMap>.Input_A_map     UndefinedClass    default: undefined   --  texturemap
<OSLMap>.Input_B     Color    default: (color 127.5 127.5 127.5)   --  animatable; fRGBA color; Controller Scaling: ([1,1,1,1] : (color 255 255 255)); WeirdScaled ([1,1,1,1])
<OSLMap>.Input_B_map     UndefinedClass    default: undefined   --  texturemap
<OSLMap>.Mixer     Float    default: 0.5   --  animatable; float
<OSLMap>.Mixer_map     UndefinedClass    default: undefined   --  texturemap

OSLMap インタフェース

インタフェース: IMtlRender_Compability_MtlBase

プロパティ:

メソッド:

アクション:

インタフェース: iMultipleOutputChannelsWithValues

プロパティ:

 .numIMultipleOutputChannels : integer : Read		  

OSLMap の出力ポートの数を取得します。

メソッド:

 <TSTR by value>getIMultipleOutputChannelLocalizedName <index>index 
		   getIMultipleOutputChannelLocalizedName - no automatic redraw after invoked 

指定した出力チャネルのローカライズ名を表す文字列を返します。

 <TSTR by value>getIMultipleOutputChannelName <index>index 
		   getIMultipleOutputChannelName - no automatic redraw after invoked 

指定した出力チャネルの名前を表す文字列を返します。

 <enum>getIMultipleOutputChannelType <index>index 
 		  getIMultipleOutputChannelType enums: {#float|#integer|#rgb|#point3|#string|#filename|#material|#texturemap|#bitmap|#node|#maxObject|#matrix3|#paramblock2|#point4|#frgba 
     getIMultipleOutputChannelType - no automatic redraw after invoked 

指定した出力チャネルのタイプを返します。

 <fpvalue by value>getIMultipleOutputChannelValue <index>index time:<time> 
		   getIMultipleOutputChannelValue - no automatic redraw after invoked 
     time default value: 0f 

指定した時間における指定した出力チャネルの値を返します。

アクション:

インタフェース: iMultiOutputConsumer

このインタフェースは MAXScript に公開されていますが、ここに示されたプロパティおよびメソッドは実装されていないため、使用できません。

プロパティ:

 .numInputs : integer : Read 
		  

メソッド:

 <bool>SetOutputToInput <index>input_index <maxObject>output_rtarg <index>output_index 
		  
 <maxObject>GetOutputRefTargetFromInput <index>input_index 
		  
 <index>GetOutputIndexFromInput <index>input_index 
		  
 <bool>CanAssignOutputToInput <index>input_index <maxObject>output_rtarg <index>output_index 
		  
 <TSTR by value>GetInputName <index>input_index 
		   GetInputName - no automatic redraw after invoked 
		  
 <TSTR by value>GetInputLocalizedName <index>input_index 
		  GetInputLocalizedName - no automatic redraw after invoked 
		  

アクション: