x


Show a WebCamTexture with alpha

Hi. Is there any way of displaying the output of a WebCamTexture half transparent ? This is what I'm doing:

webcamTexture = new WebCamTexture();
deviceCamera = new GameObject("Camera output");
deviceCamera.transform.position = Vector3.zero;
deviceCamera.AddComponent<GUITexture>();
deviceCamera.guiTexture.enabled = true;
deviceCamera.guiTexture.pixelInset = new Rect(0f,0f,Screen.width,Screen.height);
deviceCamera.guiTexture.texture = webcamTexture;
webcamTexture.Play();

Funny thing is, when I change the alpha property in the inspector it actually works but only in the Scene view, not in the Game view (see picture attached). I assume it's setting a blue background automagically somewhere.

alt text

cameraAlpha.jpg (102.9 kB)
more ▼

asked Jun 07 '12 at 04:08 AM

Agustin Petrini gravatar image

Agustin Petrini
114 6 7 12

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

I needed to change the alpha value of the GUITexture colours.

more ▼

answered Jun 07 '12 at 04:14 AM

Agustin Petrini gravatar image

Agustin Petrini
114 6 7 12

cool! can you post more info about this app you're building?

Oct 23 '12 at 03:52 AM ina

Hey Ina. It was a prototype for a social platform I made for a client back a few months ago. It was a very interesting concept, but we are still looking for investors to continue the development.

Oct 23 '12 at 04:54 AM Agustin Petrini

Looks really Cool h.. Whats the concept? Can you elaborate it in brief? @Agustin.Petrini

Oct 23 '12 at 05:22 AM harschell

Hey harschell. No, not really. I cannot say much more here sry. You are welcome to contact me in skype fr a chat though. My ID is agustin.petrini

Oct 29 '12 at 11:03 AM Agustin Petrini
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x340
x252
x185
x59
x27

asked: Jun 07 '12 at 04:08 AM

Seen: 1104 times

Last Updated: Oct 29 '12 at 11:03 AM