- Home /
How do I change the transparency of Unity's Daylight Simple Water ?
Hi
How do I change the transparency of Unity's Daylight Simple Water in order to make for example rocks be visible below the surface ?
Answer by AlucardJay · May 19, 2013 at 05:02 PM
http://answers.unity3d.com/questions/131829/a-little-more-realistic-water-on-unity-indie.html
http://www.youtube.com/watch?feature=player_embedded&v=VGZji8lYxoo (I really like this video for the Moonlight Sonata audio!)
I don't think I got much from watching the video on YouTube as it very hard to figure out what the dude is doing (at least for me) the other link leads to links on how to make realistic water which is not my concern right now.
I tried to follow this Transparent Water Effect - Free version Unity3D 3.x
and it almost do it, however, I have problem with the scaling part - it looks like it is really suitable for making small lakes and rivers, but not an ocean...
I have also tried to set the shader in Daylight Simple Water to Transparent => Parallax Specular, but that made the scene completely black !
I simply don't understand why it is see$$anonymous$$gly not possible to apply some transparency to the water that comes with Unity right out of the box ?
Water and Shadows are usually considered as 'Pro Only' features, that's why transparent water is not available out of the box.
Regarding your link :
it looks like it is really suitable for making small lakes and rivers, but not an ocean... I think you should experiment with the scale of the plane, and the tiling of the textures. But yes, animating the whole plane to move up and down probably wouldn't look great for a whole ocean.
If you are going to use this method, you'll need a semi-transparent texture for the water. I have no idea why your scene turned black! I never saw that video before but all the steps worked in my test.
Regarding my video link :
Import Water (Pro)
Drag in Water4Example(Advanced)
Disable Edge Blend (UnTick the box)
Scroll down to Planar Reflection
Set Reflection Layers to Nothing
Disable Use Skybox (UnTick the box)
Disable the Planar Reflection Component - UnTick the box next to Planar Reflection(Script)
$$anonymous$$ake the Refraction colour lighter than the main Reflection colour
There's lots of other ways that you can make your own water. Use a plane in the same way that your video link does. Ins$$anonymous$$d of animating the whole plane, you can write a script that animates the vertices on that plane mesh.
You can also offset the UV coordinates of the texture and normal map using http://docs.unity3d.com/Documentation/ScriptReference/$$anonymous$$aterial.SetTextureOffset.html
Hi
I think you misunderstood me regarding the screen turning black:
The black mesh happened when I tried to set the Parallax Specular option on Daylight Simple Water in the options for the shader - it is not related to video I linked to.
I'm not interested in the up and down movement of the ocean which is shown in the video.
I have also been in touch with a programmer who suggested to use something like:
------qoute-----
Blend SrcAlpha One$$anonymous$$inusSrcAlpha
after the first Pass{
and then you can control the transparency inside the unity inspector using horizontal color key and adjusting the alpha level. Hope that helps. The water plane may disappear at first, but once you adjust the plane it will show up
------/qoute----
However, I'm not really sure what he means and I'm a little too embarrassed to ask him because I don't want to waste his time too much as he is very busy.
EDIT
After doing some more search I found this thread in Unity's forum:
I have dowloaded the package which eko1892 has made available and I must say that it looks quite alright
Direct link to the package:
I hope this can be helpful for others as well.
I'm sorry if I have offended you in any way, by not being grateful enough, as it wasn't my intention and also thank you for the links you have provided.
I think it ought count for something that I did try to find a solution myself while I was asking for help and not just sitting back and expect to have it served to me on a silver platter - don't you ?
Fair enough. It just seemed like there was no positive feed back, and the comments really don't read well, that was the tone I got. It was hard guessing what you actually wanted, so I tried to cover all aspects of water : textures, texture and bumpmap scrolling, wave animation. After your programmer quote, and re-reading the question, I can only guess you were more interested about the shader aspect rather than water as a whole substance. So I guess it's my bad for misconstruing the question.
So here's one more link just for fun :
Your answer
Follow this Question
Related Questions
Realistic Water effects 1 Answer
Underside of water not transparent? 1 Answer
Adjusting the Transparency of the basic Island Demo water 0 Answers