いつもお世話になっております。
SkeletonRenderSeparatorを反映しているモデルに対して
SkeletonRenderTextureを設定できればと考えていたのですが
以下の画像のように設定した所
以下の動画のような挙動となってしまいました。
もしこちらを正常に反映する方法があれば、教えていただけると助かります。
いつもお世話になっております。
SkeletonRenderSeparatorを反映しているモデルに対して
SkeletonRenderTextureを設定できればと考えていたのですが
以下の画像のように設定した所
以下の動画のような挙動となってしまいました。
もしこちらを正常に反映する方法があれば、教えていただけると助かります。
@nupuryu Please note that SkeletonRenderTexture
is just an example component to show how you can properly fade out a skeleton by rendering it to a RenderTexture at full opacity first and then displaying the RenderTexture
with lowered opacity. SkeletonRenderTexture
does not aim to cover every possible use-case.
Regarding rendering a skeleton to a RenderTexture which was first separated: I'm not sure I understand your scenario. If you first separate it, why do you want to render it to a single RenderTexture
then, this turns it into a single GameObject again, you can't interleave anything between parts then. Or do you want to render the skeleton parts to multiple RenderTextures, each separator-part to its own RenderTexture?
If you want to combine multiple GameObjects of multiple skeletons and other objects to a RenderTexture
, it would likely be easiest to manually create a Camera for it and set the output to a RenderTexture. Then set up the target objects to be rendered only to this camera.
Harald
Thank you for your reply!
I wanted to fade out a model that uses SkeletonRenderSeparator as if it were a single sprite. However, when I tried to use it together with SkeletonRenderTexture, it broke apart as shown in the video, which is why I created this thread.
Regarding your answer, is it correct to understand that there is no way to use SkeletonRenderTexture and SkeletonRenderSeparator together, and that I should instead prepare a separate camera and render to a RenderTexture?
nupuryu 英語でご返信いただきましたがこのフォーラムは翻訳ボタンがありますので、どうぞご遠慮なく日本語で投稿してください。
ご質問についてですが、SkeletonRenderTexture
と SkeletonRenderFadeout
はサンプルコンポーネントとして用意されているものですので、様々なユースケースに対応できるほど柔軟に作られてはいないため、これらを使う場合にはスクリプトを改造していただく必要があります。
もちろんその方法をとっていただいても構いませんが、しかしある程度複雑なスクリプトになっていますので、それを改造して使用するというよりはRenderTexture
を通常のやり方で使用していただいた方が簡単だと思われます。RenderTexture
の使い方自体についてはUnityのマニュアルの方をご参照ください:
https://docs.unity3d.com/ja/current/Manual/class-RenderTexture.html
ただ SkeletonRenderTexture
および SkeletonRenderFadeout
コンポーネントでは、描画負荷を軽減するために必要な時にだけ機能するように工夫がされていますが、ご自身でRenderTexture
とそれを使用するマテリアルを適用したQuad
を用意する場合にはそれがないので、その点にご注意ください。
nupuryu I wanted to fade out a model that uses SkeletonRenderSeparator as if it were a single sprite. However, when I tried to use it together with SkeletonRenderTexture, it broke apart as shown in the video, which is why I created this thread.
In case you're not already aware of it: Please note that if you used SkeletonRenderSeparator
to separate Skeleton A into parts A1
and A2
to insert object B
between A1
and A2
, you need to render not only A1
and A2
but A1
, B
and A2
to the RenderTexture
to display correctly. Rendering only A1
and A2
to the render texture will display A1A2
fully in front or behind B
. This would defeat the purpose of the SkeletonRenderSeparator
.