Smart Water Basic
Check http://www.smartwater3d.com for more info.
The most flexible and easy to use water. Your only limit is your imagination. Can be applied on any surface animated or not, underwater is working even on non plane surface! Works on any device that supports OpenGL ES 1.1 up to shader 3… Smart Water for all Mobile Phone can be found here.
- 8-June-2012: new video tutorial available
- 10-August-2011: version 1.69
23-June-2011: version 1.68 added new caustic animation loopadded new main water animation loopadded 4 new prefabs using the new graphicsadded 6 new example scene using the new graphicschanged the way the auto-config is working, now using #pragma so that there is no more errors and need to edit the code when you change platform.changed the way the underwater plane and spotlight are managed. Now in all the scene they can be disabled, SmartWater will enable them at will.added new feature to stretch the water textures according to your water plane size. You can now use the X/Y parameter to adjust the size.
6-June-2011: version 1.64 added support to Smart Water Mobile OpenGL ES 2.0 (new item in drop down menu for Open GL ES 2.0) fixed bugs about water plane initialization fixed bug when using several water on the screen and the underwater for each too much fixes and bugs fixes to list.
31-May-2011: version 1.6 Important improvement and support for the 1st extension of Smart Water: for Mobile (OpenGLES 1.1)new code for the editor and the brain now support several underwater for exampleall the shader patching is replaced with materialsdrop down menu to select the Smart Water platformnew button in the Setup to disable the automatic material management. Useful when you need several Water materials in the same sceme (see the manual)updated user manual, now available online in a flash viewer.the island demo has been removed because it was doing a lot of errors with the Mobile version. It will be available in download separately in the free section of http://unity3dx.com.
18-May-2011: version 1.5 Changes made to support the upcoming extensions to Smart Water.Smart Water now is working in the editor, no more need to play in order to see the change of the parameters.Bug fixes
03-May-2011: Version 1.43 Fixed the FPSCamera prefab that was broken in the last versionAdded the foam, that was missing.Small fixes in the scenes and water prefabs.
01-May-2011: Version 1.41 This version includes the Island demo modified to support Smart Water…
28-Apr-2011: Version 1.4 new FPC/FPS camera prefab, so that you can drag and drop and have an FPS shooter type of gameplay.
26-Apr-2011: Version 1.2 new presets. (DarkCity0, Darkcity1, Darkcity2, River2, IcedWater2)texture cleanup, removed unused textures.24-Apr-2011: Version 1.1 bug fix in the shaders (fog set to exp2 instead of linear)new presets (IcedWater, Tropical2, River1)22-Apr-2011: Version 1.0: Initial release.
Smart Water has been designed from the ground up to be as much flexible as possible. With Smart Water you can easily add convincing professional looking water to your project in a matter of minutes, without having to edit any scripts. The Editor is fun to use and you can experiment in game until you find the right setting, and save you result as a prefab for later use. Smart Water is the water every Unity developer is waiting for, and it works without the need to use the expensive PRO features.
Smart Basic is the basic expansion for the upcoming plug-ins for PRO & Mobiles version. Low price upgrade will be offered to the owner of a Smart Basic water. Smart Water basic will be necessary to run PRO, Mobile and other water I will release, so it makes no difference buying Smart Water basic and upgrading later.
- Drag and Drop water material that can be applied on any mesh (animated or not)
- Underwater with rays of god (even on non plane shapes)
- Total control of the refraction, reflection, caustics, transparency, colors, etc… thru a top-notch real-time editor.
- save your new waters in a prefab, you can drag and drop in any project.
- Easy insert in your project (check the tutorial)
- Simple to use even for non programmer.
- Can be used for any kind of water, Ocean and very large water surface.
- Can mix several type of water, that can interpenetrate and can have totally different look.
How to adapt Smart Water to The Island demo in 10 minutes.
This tutorial needs to be updated, new features have been added to Smart Water. However it shows you how to save and integrate your Smart Water into your project.
Smart Water Basic & Mobile
What is Smart Water? The idea is to use some unconventionnal typical gaming tricks to get the most attractive water that also will be cheap on CPU/GPU, and will work on any platforms, including Open GL ES 1 and the first generation of iPhone/iPod and Android v1.
Because Smart Water is designed from the ground up to be very efficient , it is also possible to make it compatible with all these platforms without having to make a different build. You can select the water you want at run time and make an universal build for iPhone that will support all devices.
If you select change one water, your changes are reflected in all target platform at a time.
Now it is not because Smart Water is light on CPU and GPU that it will not use all the Hi-End Shader 3 features. Smart Water PRO will be based on the same fundations but will aim to be the best and most usable middleware water available.
Simulation of Water always been a very interesting case study for me and I started working on that problem with Blitz 3D in 2004. Without using any shader and only with Directx 7, I was able to fake a lot of hi-end water features.
I was able to get refraction, sun highlight, caustics, transparency without shaders, just by adding textures with DirectX7.
This picture made with Blitz 3D in 2004 is interesting, because it shows most of the tricks of Smart Water published in 2011, and it is looking quite similar with the Tropical1 water preset for example.
After doing these research gave up on the water, because it was unusable in a real game (too slow at this time) while following the work done by Leadwerks, and some others on water.
One day I read a thread in the Unity Forum where someone was looking for an Ocean Shader and it sounded like a task for me. Toretank did a very interesting demo and I decided to plug some of my tricks on this demo and I released my version of this Ocean Shader plus this video: http://youtu.be/s8eWPtF_2vA
After the success of this video and this shader I released the source code and let other people using it I hoping that something amazing will come up from that. 2 years after, I checked the thread and nothing with the WOW factor expected was released, some underwater and some interesting features still under development but nothing like what I had imagined.
I decided to update the Ocean shader to the V3 of Unity the result can be downloaded here : http://www.unity3dx.com/index.php/products-free/
Lot of people contacted me after I release this version of the Ocean and most of them complaining that it is not working on Indie or iPhone. I decided that there was a strong need of a better water for Unity that would work for everybody and decided to take the time necessary to put all the experience and tricks I found with years in this expansion.
You want to integrate Smart Water into your project really fast? Ok just follow these simple steps.
1- Load your project.
2- Delete your camera (you can add your camera script later and replace the basic Mouselook script with yours.)
3- Import Smart Water prefab into your project
4- drag and drop one Smart Water prefab presets from the PRESET directory (Tropical1 for example)
5- drag and drop the Camera prefab from the PREFABS directory.
Now you are good to go!
If you want to adapt your camera to Smart Water, you just have to import one Camera Prefab and copy the ‘Plane’, the ‘Projector’ and the SmartWaterUnderwater.js script on the GameObject that has a CharacterController attached. Smart Water needs the CharacterController to work.
Then you need to document the empty spot in the Script, the camera, Skybox materail, Projector, Plane, the underwater speed (resistance of the water) and most importantly: the collider that will trigger the underwater switch.
Smart Water Basic is compatible with all MAC/PC/WEB devices supporting Open GL 2 (Shader 2) architecture.
Smart Water Mobile supports all mobile devices from iPhone 2G to iPad2, Android 1 and 2, iPod all generations. There are specific shaders for each platform, make sure you use the right one.
Smart Water uses 2 main components:
the Smart Water Editor.
This component refresh the shader with the correct textures animations, colors, and some mathematics made on the CPU. This editor needs you to run Unity so that it can work, because it is updating the shader in realtime and this cannot be done in editor mode.
the camera script. This script is used to manage the collisions and the underwater.
Prefabs: this is where you can find the Camera prefab that you need to use for the underwater.
Scene Exemples: where you can find the example scenes.
Material Internal: this is where the water material used are store. If something is wrong with the water, make sure that your materials are set with the correct shader.
Textures/Displacement: you can use these textures to change the bump texture and have a different looking water.
Terrain: you will find a lot of terrain seamless textures here.
Smart Water Editor
The Smart Water Editor is the place where you can customize the water. We are going to review in details the options.
Scene Camera: this is the main camera of the scene. Must be the SmartWater Camera prefab though, even if you can replace the MouseLook script with an FPS script or anything else, the camera comes with a plane attached for the faked rays of god Fx plus the Underwater Script that manages the collisions and the underwater.
Directional Sun: this must be your sun in your scene. Note that it MUST BE a directional light, not a spot. Also you need to move your light and adjust it so that it is aligned with the sun reflections on the water. Once done you can move the sun and the reflections will follow it.
Current shader: this is automatically assigned. If not there is a problem.
Current Material: this is automatically assigned. If not there is a problem.
Current GameObject: this is automatically assigned at run time. If no t there is a problem.
3rd party: Smart Water will detect 3rd party components and adapt itself to them.
Size of the plane X: the default is 1000, but if you need a very small plan, you might change these values, this will resize the textures accordinally so that your small water does not have stretched textures.
Size of the plane Y: idem
Fixed Water Plane (y=0?): if checked, the water will be forced to be at y=0 and will slightly move to simulate waves on the border. Use that only for ocean, sea, big lakes and any large water planes.
Material Independent: this button must be off if you want SmartWater to manage the materials for you (default value), however if you want to use several Water materials in the same scene, you must check this box so that you will have to set the materials by yourself ( Drag and drop in the Current Material slot). If you do not do it, you will get errors unassigned objects from Unity.
Very easy panel. When you want to save your water (because if you stop the game your real time settings will be lost), enter a prefab name and press the save button. Your newly saved prefab will be located in Smart Water/Presets/ directory.
Bump Texture (or displacement texture?): this is the main texture that is animated procedurally in the shader and is doing the wave animation effect. You have a lot of different displacement and bump textures to test in the TEXTURES/DISPLACEMENT directory, just drag and drop one and see the result. It changes dramatically the look of the water.
Reflection texture: because indies cannot use render to texture, I use a basic skybox in a cube map to get a fake reflection effect. You can change this cube map with the current skybox you will use in your level and it will look great!
Refraction texture: does affect the color of the water a little bit. I will probably rework this in the future or remove it.
Fresnel texture: you should not change that. You can use a different fresnel gradient if you know what you are doing and get some interesting result.
Caustic Size: this will change the size of the cautics as said in the name. Caustics are a 32 pre-made animation loop. This parameter will affec t the underwater animations as well.
4- Parameters panel
Main Water Color: this is the color that affects the main textures color. Changing this color will change the whole water color.
Specular Color: this will change the color of the refraction only.
Caustic Color: this affects the caustic color only.
Sun Color: this changes the color of the sun.
Transparency: this is the transparency. 0= invisible, 1=opaque.
Refraction Power: use this slider to add more or less Refraction on the water.
Sun Power: make the Sun more or less contrasted.
Sun Wide Halo: make the Sun reflection wide or narrow.
Caustic Power: add more caustics: 0= no caustics.
Water Speed X: move the water X pixels per frame (-1,1)
Water Speed Y: move the water Y pixels per frame (-1,1)
By using these 2 parameters you can change the water direction (for a river for example)
Note about Smart Water for Mobile devices.
Smart Water Mobile is working the same as Smart Water Basic. It uses all data and settings from the basic edition and translate them into the closest match for Mobile.
Smart Water Mobile has 2 shaders, one in one pass and one in 2 pass.
The number of pass affect the speed of the shader, that’s why it is advised if you need the maximum speed to use the one pass one.
However the shader in one pass lack of control on the cautics power.
All Smart Water Basic prefabs should work with the Mobile version, you just have to create the water you want and switch by using the drop -down menu in the setup Tab!
Smart Water Basic supports underwater, caustics, transparency, size of caustics, diffuse color, specular color, emissive color and you can save the setting as a prefab.
Advanced Technical Aspect.
If you want to understand and modify Smart Water, you need to read this section.
Smart Water does not touch to any shader in the editor or in game, but it only touch at the materials. These materials are stored in the Materials Private directory in Smart Water Basic folder.
Each material corresponds to a shader. If you want to customize Smart Water, the only think you need to do is to modify these materials. For example you could change the underwater shader by creating your own one and change the material SmartWater Underwater with it. If you respect the same entry points naming convention (_MainTex, _BumpMap…) then the editor will still work the same with your shader.
Actually there are 8 pre-made materials.
SmartWater2G: this is the main 1 pass Smart Water material for mobile.
SmartWater2G2Pass: is the main 2 pass Smart Water material for mobile.
SmartWaterObject1, SmartWaterObject2: are here for demonstration purpose in the examples where there is more than one Water material on screen.
SmartWaterPlane: this is the basic smart water for the Indie version.
SmartWaterUnder2G: this is the underwater for the mobile platforms.
SmartWaterUnderSkybox: this is the skybox that will be used when underwater. You can for example create a nice reef skybox and use it here.
SmartWaterUnderwater: is the underwater version of SmartWater Plane, the basic version of the underwater for SmartWater Basic.
What’s the future of Smart Water?
I will improve Smart Water to have PRO only features like real reflections and full screen shaders underwater Fx. I will also add more examples and presets. I will release plugins, for iPhone, Waterfall etc…
How to use several Smart Water in the same project.
First you have to set the “Material Independent” flag in the Setup menu. This flag will disable the automatic management of the materials from the editor so that you can set the material you want for the shaders.
Now you need to have 2 different shapes and attach a smartwater script to them, always check the Material Independent flag.
You need to have 2 fresh new materials, that you will set with the SmartWater shader you want (Indie, Pro, mobile…)
Now you can tweak your water independently for each shape.
How to change the style of the water?
Now if you want to make a river, glass of water, or whatever, I provide a lot of displacement maps, ready for you to use. In the future I might do a drop down menu for that, but right now you can just drag and drop one of these displacement map on the Bump Texture slot and the water look will change completely. The Underwater will be affected too!
IMPORTANT: this product has been updated to version 2 and now has its own website.
Check http://www.smartwater3d.com for more info.
Your CartYour cart is empty
Visit The Shop
- Smart Water 3D version 2 has its own website
- Funpoint.com marketplace beta 1.0
- Unity3d Expansion products removed from the Asset Store
- Detail Shaders updated
- Mail server fixed, you can receive your links again