UDN
Search public documentation:
GFxUsingRenderTargetsJP
English Translation
中国翻译
한국어
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
中国翻译
한국어
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
レンダリング ターゲットの使用方法
概要
次は、ゲームから 3D メッシュをキャプチャして、シーンキャプチャ アクタを用いて Flash にレンダリングするための基本的な設定です。
var TextureRenderTarget2D MyRenderTexture; function SetRenderTexture() { SetExternalTexture("MyRenderTarget",MyRenderTexture); } defaultproperties { MyRenderTexture=TextureRenderTarget2D'MyPackageName.MyRenderTexture' }
ExternalInterface.call("SetRenderTexture");
Flash ファイルにはムービークリップが含まれています。そのムービークリップに MyRenderTarget_mc という名前を付けます。そのムービークリップには、PNG ファイルが含まれていなければなりません。(置き換えられることになるので、どのような画像でもかまいません)。この PNG は、最終的に、ゲーム内のレンダリング ターゲットによって置き換えられることになります。PNG ファイルのリンケージは、Export for ActionScript および Export in frame 1 に設定する必要があります。また、このテクスチャのための識別子は、 MyRenderTarget にセットする必要があります。(これらは、[Library] パネル内で PNG を右クリックして、プロパティを選択することによって確かめることができます)。
レベル内で、SceneCapture2DActor を設定して、オブジェクトを指すようにします。コンテンツブラウザ内で新たな TextureRenderTarget2D を作成し、UnrealScript ですでに指定しているものに合わせて名前を付けます。新たなレンダリング ターゲットを選択し、キャプチャアクタの Texture Target フィールドに進み、緑の矢印をクリックすることによって、TextureRenderTarget2D'MyPackageName.MyRenderTexture' を挿入します。
外部のテクスチャが透過的にレンダリングされる!
- SceneCapture2DActor 画像に置き換えられるべきテクスチャを含むムービークリップを選択します。
- Color Effect (カラーエフェクト) を Advanced (高度) にセットします。
- Alpha (xA +) を 255 にセットします。
- 保存、パブリッシュ、再インポートします。