Render To Texture - Alpha Issues

Hello Unity Community!

I´ve got a Problem witch is similar to this one:
http://forum.unity3d.com/viewtopic.php?t=7597

I Render an Object to a Texture with the Common Bumped Specular Shader. Now the alpha channel is really used to create Translucent, but it shouldn´t

At the Topic above they postet a code witch will fill the alpha of the rendered Image, but i only want to see the object not the background.

I got this problems in other Environments like Conitec 3DGS or XNA. But im an Artist and only want to see the things working, not bring them to work, thats not my job and i wasted to much time for that.

There are guys whose job it would be, but thats beside the point.

As an artist, your job includes understanding the tools and principles of your medium. Alpha channels are not just used for transparency. If you look at your scene view you can switch from RGB to Alpha view to see what is drawn to the frame buffer’s alpha channel. In Unity, frame buffer alpha is used (by default) to store overbright information so that the fullscreen glow effect works.

If, instead, you render to a rendertexture and then pass that to another shader, you need to respect the alpha channel’s intended use, or ignore alpha entirely. In this case, you are using overbrightness information as transparency, and it doesn’t look good. Render it with a non-transparent shader, and you’ll see just the original colour information.

I use the default Bumpmap Material, there should no transparency. The Alpha i was talking about is the SpecularMap.

I also have an idea why that problem results.
But i dont know how to change it.

What do you mean with “ignore Alpha entirely”, that sounds like what i´m looking for.

I´m sory but I don´t know the answer for you problem but I wonder about that “render to texture” you wrote here. I know this technique cann be used for creating textures and also for creating normal maps. And that´s why I write here. I cann make this render to texture in 3ds Max. I was making noemal maps with this techniqu but can be this used in Unity? I mean can I create render to texture in Unity? And how should I give the normal maps to my object in Unity?

yes you can create render textures in unity pro (and pro only) through code, just create it (class RenderTexture)

Can you perhaps post a screen shot of the problem? I’m not sure exactly what your set up is.

Thing is i can´t post something of the Project.
But now i recognised the problem by setup the part by myself. I Uploaded that Screen.

Sure, the target planes need to be Transperent and use the Alpha channel of the screen.

Now i thought about rendering a 2nd time only with a solid color to use that result as the Alpha channel, but in my opinion its to indirect, is there a other way?

@ Peter11
There musn´t be any code, you can also create a “Render Texture” Asset in the Project Window and stick this into a Camera´s Target Texture.

Can you explain what the set up is for that screen shot, what you expect to see and what you are actually seeing?

In the editor View you see the Object witch is rendered by the Cameras with a Target Texture. In the Game View are 2 Planes with the Material applied in the Inspector.
The Editor view is on Alpha mode witch represents a specular Texture.
And i want to have the real shape of the object as Alpha, not includeing the SpecularMap.

The Cube simply should be 100% Visible.

Does Nobody have an Idea?
Another way, can you tell me how i can change a Shader (in my case it is “Normal-BumpSpec.shader”) so that the Output-Alpha is 1 , or higher if recommended?

I tried it but nothing seem to be effecting anyting, i know the very basics of HLSL btw.

You are rendering your plane with Transparent/Diffuse. If you don’t want transparency on your plane, use Diffuse instead.

I thought i explayned my problem clearly.
There must be Transparency on the planes because i want the Cube to be cut-Out. But as you can see it hase holes like the grayscale image above. I only want to have a 100% White AlphaChannel at the cube.

(Cue cut-Out, the cutout shader would work, but i think there might be artifacts at the edges)

Hi,

Did you find any solution or workaround of this porblem???

-VJ

Why don’t you use a transparent cutout shader?

Did you ever fix this? I am having the exact same problem!

Hi, need to save alpha values from render texture canvas(blending of lots objects with the different alpha like painting brushes) to use in the analysis shader. So I think I have some problems with storing alpha. Camera shader material maybe? any suggestions for this?