|
I want to use a second camera to draw my character into a render texture. And whatever I set the background colorsI always get the texture that is my character with white background colors. How can I set my background colors to be transparent,and only show my character in the texture, which for my the GUI Showing. Thanks! And Sorry for my poor English!
(comments are locked)
|
|
I think you want to set the Clear Flags of the RT Camera to not clear everything. This should only make it draw your character, and not the background, too.
So I'm attempting exactly the same thing. I'm trying all settings of the Clear Flags field but none are removing the background from my render texture. If I set the alpha value of the render camera's background color, I can only make the entire texture, including objects the cam is rendering, uniformly transparent. If I use the "Depth Only" setting, I get garbage in the render texture during playback. Have done thorough searching on Answers and Forum but not finding anything helpful.
Jul 07 '11 at 12:45 AM
Barrett Fox
(comments are locked)
|
|
I've had problems with this and one issue is that some shaders have a Colormask of RGB only, not RGBA. Certainly you need to start with clear flags of SolidColor and the color having alpha of zero. In my specific case, I also rendered my camera twice, once with a custom replacement shader that only wrote to alpha channel, but you might not need this, depending what shaders you are already using. But if you happen to be using the render texture in a GUItexture, then you're stuck with whatever the Clear Flags options give you, right?
Jul 07 '11 at 07:21 PM
Barrett Fox
(comments are locked)
|
