x


Make Water Transparent?

I need to make water transparent, without losing the fx\water shader! Any help?

I've got a script for when you go underwater as well:

var fog = false;
var fogColor = Color (0, 0.4, 0.7, 0.6);
var fogDensity = 4;
var skybox : Material;


function OnTriggerEnter(other : Collider) {
    fog = true;
    RenderSettings.fog = fog;
    RenderSettings.fogColor = fogColor;
    RenderSettings.fogDensity = fogDensity;
    RenderSettings.skybox = skybox;
}
more ▼

asked Mar 07 '11 at 05:39 PM

JJAPrograms gravatar image

JJAPrograms
69 8 8 16

can you include some more info about whether u want the water to be transparent when your in it or when your over it? what texture is in the water shader? have you tried editing the opacity of the texuture?

Mar 07 '11 at 06:17 PM AngryOldMan

ok. i have the basic water textures (come in the Water (basic) package) I would like to know how i could change the Opacity of the water...

Mar 10 '11 at 05:18 PM JJAPrograms

Did you figure it out?

Jul 11 '11 at 07:36 PM Dan the Man
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

You need to add just one line in fx/water shader. In Pass statement( next line after "Pass{") add "Blend SrcAlpha OneMinusSrcAlpha". After that you can control opacity with alpha of HorizontColor property. You can also do it via script.

more ▼

answered Oct 09 '11 at 10:32 AM

Kos Dvornik gravatar image

Kos Dvornik
83 1 1 4

aw dude thank you so much! This helped!!

Aug 25 '12 at 06:15 PM r3d5
(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:

x397
x237

asked: Mar 07 '11 at 05:39 PM

Seen: 4801 times

Last Updated: Aug 25 '12 at 06:15 PM