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, 2011 at 05:39 PM

JJAPrograms gravatar image

JJAPrograms
99 22 17 24

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, 2011 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, 2011 at 05:18 PM JJAPrograms

Did you figure it out?

Jul 11, 2011 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, 2011 at 10:32 AM

Kos Dvornik gravatar image

Kos Dvornik
1.9k 3 8 44

aw dude thank you so much! This helped!!

Aug 25, 2012 at 06:15 PM r3d5

+1 This is perfect!

May 27 at 09:08 PM ChristianHaase
(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:

x443
x262

asked: Mar 07, 2011 at 05:39 PM

Seen: 5420 times

Last Updated: May 27 at 09:08 PM