Tasharen Entertainment Forum

Support => Other Packages => Topic started by: ArenMook on August 06, 2012, 12:51:29 AM

Title: Tasharen Water
Post by: ArenMook on August 06, 2012, 12:51:29 AM
By popular demand, the water used in Windward is now available as a stand-alone package.

(http://www.tasharen.com/windward/water/waterm.jpg) (http://www.tasharen.com/windward/water/water.jpg)

View the Demo (http://www.tasharen.com/windward/water/)

Features

Material Properties

Script Properties
Title: Re: Tasharen Water
Post by: catacomber on August 07, 2012, 07:00:35 PM
Hi, I just purchased this and have a problem with the water shader. It says in the Inspector that the shader has errors or is not supported by my graphics card. So my water is bright pink in the demo. I have a new Windows laptop with a pretty good graphics card. What might correct this? Is that water shader the Shader Number 3 that's required? Or is that something else?
Title: Re: Tasharen Water
Post by: ArenMook on August 07, 2012, 07:03:28 PM
Curious. Did you try the demo first? Does it run well for you, or do you also see pink?
Title: Re: Tasharen Water
Post by: catacomber on August 07, 2012, 07:15:26 PM
That was the demo I was using. Let me try it again and put up a screenshot if it doesn't look right.  Is the Tasharen Water Shader the Shader Number 3?
Title: Re: Tasharen Water
Post by: catacomber on August 07, 2012, 07:24:32 PM
I must be missing something---this is the Water Demo scene.

I have Unity Basic--does it require Pro?

I just updated my version of Unity to the latest version today.

Title: Re: Tasharen Water
Post by: ArenMook on August 07, 2012, 07:55:01 PM
Medium quality levels and higher require pro, lowest may work on Free, but it has not been confirmed. I am not certain if depth texture is accessible in the free version of Unity -- perhaps it isn't? Sounds like I need to create another fallback level to make it work on Unity Free then. :(
Title: Re: Tasharen Water
Post by: catacomber on August 07, 2012, 08:13:19 PM
Well, I will hang on---am in no rush------eventually I want to get pro but not until I get the game am working on finished. ios license and android license are enough of an investment for me until then. And I know this requires a lot of memory so not for those.   :  )  It's beautiful though in the webplayer demo. :  )
Title: Re: Tasharen Water
Post by: ArenMook on August 07, 2012, 08:20:03 PM
Yeah, unfortunately the Free version is pretty limiting. Can't do anything interesting with it. My next asset -- Fog of War -- also requires Unity Pro. :X
Title: Re: Tasharen Water
Post by: catacomber on August 07, 2012, 08:24:06 PM
Well, hoping you will put a nice quest system into Windward that will not need Pro.  :  ) )  And that I get Pro sooner rather than later.  :  }
Title: Re: Tasharen Water
Post by: ArenMook on August 07, 2012, 09:19:54 PM
Grab the latest version. I added support for Unity free. :)
Title: Re: Tasharen Water
Post by: catacomber on August 07, 2012, 09:36:11 PM
The update hasn't hit yet but I'm sure it will.  :-*

I figured you'd come through. Don't forget the quest system.  :  )  Also figured this could work on ios and android if the shader were reworked.  :  )

I will get the Pro version eventually but I can do a lot with the Basic version----  :  )  Using NGUI.  :  )  ^^
Title: Re: Tasharen Water
Post by: ArenMook on August 07, 2012, 09:37:09 PM
Hasn't it? Hmm. Version 1.2 is visible to me.

P.S. While it works now, it won't look as good. One important feature (depth texture support) is not available to Unity free.
Title: Re: Tasharen Water
Post by: catacomber on August 07, 2012, 09:50:22 PM
I have an error still---not enough temporary registers needs 9.  Is there something I can do? I'm still pink.
Title: Re: Tasharen Water
Post by: ArenMook on August 07, 2012, 09:51:01 PM
Are you targeting flash?
Title: Re: Tasharen Water
Post by: catacomber on August 07, 2012, 09:56:37 PM
No, just pc and running the demo scene. 
Title: Re: Tasharen Water
Post by: ArenMook on August 07, 2012, 10:17:43 PM
And it's positively with 1.2? o_O
Title: Re: Tasharen Water
Post by: catacomber on August 07, 2012, 10:19:20 PM
Yes. I created a new scene. Deleted the old stuff. Saved. Created a new scene added the new stuff. Saved. Let me try it again. 
Title: Re: Tasharen Water
Post by: catacomber on August 07, 2012, 10:28:24 PM
I'm still pink. Not enough temporary registers---need 9, compiling for flash at line 437 but I'm not compiling for flash. I added the demo scene to the build and built it and compiled it for Windows and I'm still pink.

I'm ok with this---I realize the depths and shadows would work best on pro. If you can fix it for basic that's good but I'm not stressed. I'll file it away for later.
Title: Re: Tasharen Water
Post by: ArenMook on August 07, 2012, 10:32:35 PM
Is the "not enough registers" warning the only thing you see? Or is it an error for you? Reason I ask is that it was a warning for me that has since disappeared.
Title: Re: Tasharen Water
Post by: catacomber on August 07, 2012, 10:37:08 PM
It's an error in the inspector if I click on Tasharen water under water---the shader with the $ sign on it.

It does disappear as a warning but I'm still pink.
Title: Re: Tasharen Water
Post by: catacomber on August 07, 2012, 10:43:50 PM
If this requires Unity Pro, don't knock yourself out. I'll just wait until I feel comfortable enough with Unity to get it.

:  )

You do wonderful work. I'm quite happy with what I have for NGUI and your other extension, except waiting for quests added to Windward.  :  ) 

Just put the Requires Unity Pro thinger in the description and leave it.  :  ) 
Title: Re: Tasharen Water
Post by: ArenMook on August 07, 2012, 10:45:27 PM
It bugs me though, I must get it working everywhere. :P

I'm installing Unity on my Macbook Air right now...
Title: Re: Tasharen Water
Post by: catacomber on August 07, 2012, 10:48:44 PM
I hope you don't have Mountain Lion.  :  )  Look at the reviews.  :  )  I think I'll keep Lion on my mac for a good long while.  :  )

If Steve Jobs were alive, I'm sure the reviews of Mountain Lion would bug him to the point that heads would roll.  You can delete this post--it's just conversational.
Title: Re: Tasharen Water
Post by: ArenMook on August 07, 2012, 11:10:11 PM
Nope, I picked it up about a month before mountain lion -- as soon as they released the updated lineup. :)
Title: Re: Tasharen Water
Post by: ArenMook on August 08, 2012, 12:35:51 AM
Alright, good news... turns out it was a simple oversight on my part -- GrabPass doesn't work on Unity Free, and although it wasn't actually used, just having it there in the shader was confusing Unity. 1.3 should work fine.

I've also noticed that the average number of draw calls for the demo scene is hovering at around 30, making me wonder what iOS/Android performance would be like...
Title: Re: Tasharen Water
Post by: catacomber on August 08, 2012, 10:46:00 AM
I can check it tonight. Thank you!  ; )
Title: Re: Tasharen Water
Post by: catacomber on August 08, 2012, 09:49:49 PM
This looks really good now. Here's a current screenshot after updating and after updating Unity to 3.5.5 tonight.

The water appears to have lights and wave movement and depths and i'm using Unity Basic.  :  )

Huzzah! It looks better than my screenshot can show.  :  )

Haven't tried it on ios or android yet but will give it a shot this week.  : 
Title: Re: Tasharen Water
Post by: ArenMook on August 08, 2012, 09:56:35 PM
Yup that's how it looks on Unity Basic. It's missing the depth-based colors, so there is no way to do soft edges. :|
Title: Re: Tasharen Water
Post by: catacomber on August 08, 2012, 10:01:17 PM
I do have some green color that is different from the blue and blends into it in some places---it looks really nice. To get something like this in Unity Basic is all one could ask I think.  :  )  And considering that the Pro version is undoubtedly gorgeous based on the web demo-----I think you should be very proud of your work--- 
Title: Re: Tasharen Water
Post by: wangzy_88 on February 05, 2013, 01:03:16 AM
I found it like standard water and work well on pc,but seems slow on mobile.
Title: Re: Tasharen Water
Post by: bendikstang on February 12, 2013, 07:40:18 AM
Hi, I would like to change the texture and tiling of the foam. I looked at the shader and the script, but could not immediately see where to edit to do this. Is the foam texture generated on runtime?
Title: Re: Tasharen Water
Post by: ArenMook on February 12, 2013, 09:17:55 AM
Foam is in the Alpha channel of the water's normal map texture.
Title: Re: Tasharen Water
Post by: bendikstang on February 12, 2013, 01:38:33 PM
Foam is in the Alpha channel of the water's normal map texture.

Ahh, so it was there it was hiding! Thanks. :-)
Title: Re: Tasharen Water
Post by: Gorgor on February 23, 2013, 06:26:49 AM
Hi,
I just bought Tasharen Water on AssetStore. It is v1.9. After importing into project I can not see the water in the water demo scene:( I saw others had similar problems but I do not understand shader programming and I can not make it running. It is a desktop project, Unity 4.0.0 Pro, latest iMac27, no graphics emulation..
Changing Quality in TasharenWater script also does not help:(

http://cl.ly/image/2z1I3y3J0A2K

Thx for reply
Title: Re: Tasharen Water
Post by: ArenMook on February 23, 2013, 06:30:04 AM
In the past I saw it caused by the ZWrite setting in the shader. Do a search for it in the shader and comment out all instances of its usage, see if that helps.
Title: Re: Tasharen Water
Post by: Gorgor on February 23, 2013, 07:13:18 AM
No sure if I did what you suggest me to do. I found 'ZWrite' four times in the shader. I commented out all four occurrences like in the screenshot.

http://cl.ly/image/44282r2i3o0K

It does not help:(
I switch project to iOS Pro and it works.. when switching back to desktop it stops working:(
So I bravely tried to delete some subShaders in your shader and when I delete all subshaders but the last one 'Lod100' it works.. but if any other sub shader remains it is not working:(

EDIT:

In fact just deleting the third SubShader (Lod 200) helps the same way as deleting all subshaders but the fourth one..
btw: I know VERY little about shaders.. just trying to delete various parts and see what happens
Title: Re: Tasharen Water
Post by: ArenMook on February 23, 2013, 05:24:53 PM
So the symptom is... Mac + Stand-Alone target using Unity 4.0?
Title: Re: Tasharen Water
Post by: Gorgor on February 23, 2013, 05:32:49 PM
Yea, my configuration is iMac27 (OSX 10.8.2), NVIDIA GeForce GTX 680MX 2048 MB, StandAlone build, Unity Pro 4.0.0, Tasharen Water v1.9...
Title: Re: Tasharen Water
Post by: ArenMook on February 23, 2013, 06:29:47 PM
Ok, I will install Unity 4 on one of my macs tomorrow and see if I can track down the issue.
Title: Re: Tasharen Water
Post by: ArenMook on February 24, 2013, 10:56:09 AM
I have identified and fixed the issue. 1.10 has the fix.
Title: Re: Tasharen Water
Post by: Gorgor on February 24, 2013, 11:24:04 AM
I can confirm the fix!
Thanks for such a quick update.
Title: Re: Tasharen Water
Post by: hexart on March 05, 2013, 02:52:05 AM
This is the TasharenWater effect which I used on Mac platform.
I opened the demo scene, the scene view is relatively normal, but when I click run, both the scene view and the game view shows the darken color of the water.
When I reposition the camera into a certain height, it shows the gradient step on the water.
I bought the newest plugin v1.10 in Unity assets store.

Help.
It's better if the wave speed and the wave depth and specular can be adjusted.
BTW, the water shader is quite difference between the ship starter kit, I wish use the shader option looks like this(except color bitmap):
Title: Re: Tasharen Water
Post by: ArenMook on March 05, 2013, 12:27:55 PM
Darker color suggests you have lights disabled in the scene view. If that's not the case, then I will need to know more details such as your videocard, version of Unity, etc. Steps you see is a depth buffer issue on the mac, it's Unity-related. It should only be like that in the scene view. Game view should look correct.
Title: Re: Tasharen Water
Post by: hexart on March 05, 2013, 04:33:54 PM
The pic I snapped is the project demo scene, so it's definitely not light issue.
I found that in the demo scene, the color of the water is affected by animation, so it's not affect by color adjustment.

I tried several times, found that the water is good in my scene. But, since how I use the camera is usually a underground camera, so the wave strength effect is not so good. Especially if the light is too dark, the gloss can not be seen in some angle.

Yes, I'm asking for too much, wish you don't mind. ;D

My unity version is unity3D pro 4.0.1f2
I used 2 different macs, one's video card is HD3000, the other is GTX660Ti.
Title: Re: Tasharen Water
Post by: hexart on March 05, 2013, 11:33:38 PM
Here we can see, there's only refraction distortion but no reflection distortion. That's different from the shader in "ship starter kit" package.
Title: Re: Tasharen Water
Post by: ArenMook on March 06, 2013, 12:36:09 AM
I think you have that backwards. There is reflection, but no refraction. Tasharen Water has several quality settings specified on the water itself. Only the higher quality water has refraction.

So I don't quite understand your previous post... is there some issue with colors, or isn't there? The water's color changes with the scene's animation.
Title: Re: Tasharen Water
Post by: hexart on March 06, 2013, 01:05:11 AM
Sorry, it's not quite clear which I said. There's no problem on mac standalone platform.
I'm just expecting for reflection distortion function and the hard strength of bump mapping effect.
Title: Re: Tasharen Water
Post by: Gorgor on March 14, 2013, 06:58:27 AM
Hi,
I have the following problem.. I have a water in my game. And I want to use Tasharen water because it look cool whenever possible. But I also need to support older machines. If I understand it correctly desktop version of TW needs Shader Model3, right? Is there any way how to lower the water quality (like for iOS) on desktops so it will not be as nice but it will not be pink on older nootebooks?

thx
Title: Re: Tasharen Water
Post by: ArenMook on March 14, 2013, 12:23:45 PM
TW shader has versions of it for SM3 and SM2 inside. You can lower the quality by selecting the water object and lowering its quality on the TasharenWater script.
Title: Re: Tasharen Water
Post by: Gorgor on March 14, 2013, 12:53:55 PM
Hmm.. strange is that if I set Graphics Emulation to ShaderModel2 in unity, not even fastest quality option gives me anything other than pink..
Title: Re: Tasharen Water
Post by: ArenMook on March 14, 2013, 04:16:13 PM
Open up the shader and find this:
  1. #ifdef SHADER_API_D3D11
  2.         #pragma target 4.0
  3. #else
  4.         #pragma target 3.0
  5. #endif
Move it from the CGINCLUDE block into each CGPROGRAM block below, except the very last one. The shader will then compile with SM2.
Title: Re: Tasharen Water
Post by: Gorgor on March 14, 2013, 07:17:07 PM
Hoho..
now it works.. thanks a lot.. your support has no match:)
Title: Re: Tasharen Water
Post by: operatioapps on June 27, 2013, 02:20:41 PM
Love this package  ;)

One thing is left and my water setup is complete: I need help to change the High-Quality water to add more normal mapping effect. I tried to change a little on the shader, but without success. Attached a few images to illustrate what I'm after.

Thanks!
Title: Re: Tasharen Water
Post by: ArenMook on June 27, 2013, 02:36:25 PM
Cubemap reflection is for lower quality water. It's not a real reflection -- it just reflects the skybox basically. Higher quality setting actually does proper reflection by reflecting the objects. The water quality was set up like this in Windward, from what I recall:

Mobile (transparent water, specular, no soft edges)
Low (soft edges, skybox cubemap reflection)
Medium (soft edges, reflects only certain objects)
High (soft edges, reflects most objects)
Ultra (soft edges, reflects most objects, higher resolution of reflection)
Title: Re: Tasharen Water
Post by: operatioapps on June 27, 2013, 02:53:08 PM
Thanks for quick reply! Yes, I know this already. But I try to alter the shader so it will give a better result for my use (flight game) when on High quality with real reflections. I changed the High quality reflection code in the shader to use the skybox cubemap to illustrate. I want more bump reflection effects on the real reflections too. Currently there is NO bump on the water reflections outside the specular, on High quality. So when viewing the water with the sunlight behind, the waves are not very visible.

Bottom line, I need more bump effect outside the lights specular on the High quality setting with real reflections. Here are the code I think needs some tweeking:
  1. // High-quality reflection uses the dynamic reflection texture
  2. half3 reflection = tex2Dproj(_ReflectionTex, projTC).rgb;
  3.  
Thats the original code.
  1. half3 reflection = tex2Dproj(_ReflectionTex, projTC+nmap).rgb;
  2.  
This is an alternate I tried with limited success, but it produced somewhat more bumped water.
  1. half3 reflection = texCUBE(_Cube, reflect(worldView, worldNormal)).rgb * _ReflectionTint;
  2.  
And this is the change thats on the attached image. This already looks better for my use than the original High quality, but I need real reflections.


Thanks again!
Title: Re: Tasharen Water
Post by: ArenMook on June 27, 2013, 05:07:29 PM
But the high quality reflection already reflects the skybox...
Title: Re: Tasharen Water
Post by: operatioapps on June 27, 2013, 06:50:40 PM
Yup, I know that too... but when rendering with skybox only it has much stronger normal map reflections in the shade areas of the water that is not hit directly by the sun (specular areas), than in the High Quality setting. If you go up close and flat on the water in high quality with real reflections, the waves look totally flat outside the specular areas. This is not the case when rendering fast with only skybox reflection. There you can clearly see the bumpiness of the waves (normals) in those areas and in those camera angles. You see what I mean?

A solution to this would be very much appreciated  :)
Title: Re: Tasharen Water
Post by: operatioapps on June 27, 2013, 07:13:51 PM
Here is a better image to illustrate in more detail what I look for:
Title: Re: Tasharen Water
Post by: operatioapps on July 13, 2013, 02:33:48 PM
I bougth other assets from you, so I think you could at least give me an answer even if it don't work. Surprisingly I found a solution to this, perfect reflection distortions in the high quality setting :)
Title: Re: Tasharen Water
Post by: ArenMook on July 13, 2013, 08:23:13 PM
I miss responses sometimes, unintentionally. The volume of posts on the forums sometimes gets the best of me. Apologies. Bumping is usually a good way to remind me though! Glad you figured it out though.
Title: Re: Tasharen Water
Post by: kurosid on July 15, 2013, 01:35:57 AM
Hello there! I just wanted to ask if the water only works with the Unity terrain, or does it also work with custom meshes?
Title: Re: Tasharen Water
Post by: ArenMook on July 15, 2013, 06:46:41 AM
Works with any objects that happen to use a shader that writes to depth.
Title: Re: Tasharen Water
Post by: scalant on August 21, 2013, 04:52:45 AM
Hi.
I bought this pack and it works in most cases, but often on computers with Windows XP water appears in "magenta/pink". On these computers Unity Editor gives the following errors: Material doesn´t have a texture property "_WaterText", "_ReflectionTex", "_Cube", "_Color0", "_Color1", "_Specular",... and others similar.

Any idea why is that?
It occurs in many computers. A five per cent of the computers I've tried, which are many.

Thanks.
Title: Re: Tasharen Water
Post by: ArenMook on August 21, 2013, 09:40:17 AM
Magenta means the shader was not compiled successfully. Do those computers support shaders? Water won't work if shaders are not supported. For example Intel GMA 950 videocard doesn't.
Title: Re: Tasharen Water
Post by: scalant on August 22, 2013, 04:50:09 AM
Well, that will be the cause. Because it happens on older computers with Intel graphics cards, yes.

I'll think about how to solve that problem, because I need you to run on all computers. Any idea? Is there any way of knowing when a card supports shader or not to turn off the water?

Thanks, again.
Title: Re: Tasharen Water
Post by: ArenMook on August 22, 2013, 09:25:55 AM
You can do that in the shader itself. The way Unity shaders work is they choose the first pass that's capable of drawing it. The water has several inside for different shader quality levels. You'd need to add a new section for "no shader support".

But in all honesty, all you will be able to get there is a flat untextured color by that point.

Unity is flat out dropping support for videocards that don't support shaders. You should too. There is no point in supporting ancient hardware from 12+ years ago.
Title: Re: Tasharen Water
Post by: scalant on August 27, 2013, 05:41:00 AM
I try to do what you say, so when the graphics card is old at least the water will not all "pink".
Thanks you very much.
Title: Re: Tasharen Water
Post by: jeaky on September 17, 2013, 02:46:54 AM
hi, ArenMook. I use 3dsmax created a plane and export to unity pro, the shader's reflection is not correct, perhaps axis problem, how to fix it? thanks.
Title: Re: Tasharen Water
Post by: ArenMook on September 17, 2013, 01:18:22 PM
Check your UV mapping. Make sure when you texture it with a regular texture it looks as you'd expect.
Title: Re: Tasharen Water
Post by: jeaky on September 17, 2013, 11:19:03 PM
Hi,ArenMook, thanks for reply. I have gave the plane unwarp uvw, but sitll not correct at High Reflection Mask.please check the fbx file in attachments, where is wrong? and if I drag the Tasharen Water prefab into scene, the prefab's high reflection mask is correct, then I try give default water shader to my plane, the reflection will change to wrong yet.
Title: Re: Tasharen Water
Post by: ArenMook on September 18, 2013, 01:28:37 PM
That FBX comes with a rotation of 270 on the X, so Tasharen water thinks that your plane is rotated and reflects everything accordingly.

You need it to be (0, 0, 0) all around. When exporting from 3ds max, change the pivot's rotation to be (-90, 180, 0)
Title: Re: Tasharen Water
Post by: jimmy3d on September 26, 2013, 06:33:29 PM
How do you slow down / speed up the waves?

Can you resize the waves?

Some global variables would be great!!!

cheers,
jimmy
Title: Re: Tasharen Water
Post by: ArenMook on September 27, 2013, 06:49:12 PM
You can adjust the speed by tweaking the shader itself.  You can resize the waves by tweaking one of the parameters on the material.
Title: Re: Tasharen Water
Post by: O4karitO on September 30, 2013, 09:21:18 AM
Great package!
Is there any way to force it to create foam not only near the terrain, but near other objects (like imported meshes etc)?
Title: Re: Tasharen Water
Post by: ArenMook on September 30, 2013, 10:39:42 AM
It does, as long as those objects use a shader that writes to depth.
Title: Re: Tasharen Water
Post by: O4karitO on October 01, 2013, 01:08:43 PM
But if the standard material shader which is used doesn't do this what should i do to receive foam? How should I modify it for foam to appear?
Thanks
Title: Re: Tasharen Water
Post by: ArenMook on October 03, 2013, 04:48:07 AM
Standard material shader for what? For your objects? Then yes. Try making a simple cube (GameObject -> Create Other -> Cube) and placing it partially submerged in water. You will see foam because it uses a depth-writing shader.
Title: Re: Tasharen Water
Post by: O4karitO on October 03, 2013, 11:15:39 AM
Standard material shader for what? For your objects? Then yes. Try making a simple cube (GameObject -> Create Other -> Cube) and placing it partially submerged in water. You will see foam because it uses a depth-writing shader.
Just checked, there is no foam.
Title: Re: Tasharen Water
Post by: ArenMook on October 04, 2013, 02:59:25 AM
What quality settings are you running it on? If you have the lowest quality (mobile), then there is no foam, and no soft edges. All other qualities will feature foam.
Title: Re: Tasharen Water
Post by: O4karitO on October 04, 2013, 09:14:18 AM
Medium quality. There is a foam around the terrain only.By the way I didn't see the foam around other objects in this plugin preview or in WindWard.
Title: Re: Tasharen Water
Post by: jRocket on October 04, 2013, 05:21:36 PM
In regard to the foam not showing up, I had that problem too with smaller objects. Its probably there but you don't notice it. Try adjusting the inverse alpha value and/or increase the tiling value in the material(or use a different foam texture). I feel that the foam should be a separate texture(not in the alpha of the normal map) or have its own tiling.

My unrelated problem- Using my custom normal map doesn't seem to work well. The stock Unity water normal map also doesn't work well. If you use the normal map from the stock unity water, there are black splotches everywhere. Is there anything special about the Tasharen Water normal map that would cause it to work better? 
Title: Re: Tasharen Water
Post by: ArenMook on October 04, 2013, 08:38:56 PM
Yes, Tasharen Water normal map is not a "normal map", in Unity's terms. It's a truecolor texture. RGB channels have a normal map in it, while the Alpha channel has the foam texture. Unity's version of normal maps are compressed textures that don't have an alpha channel, so they are not suitable.
Title: Re: Tasharen Water
Post by: tankun on December 16, 2013, 03:40:53 AM
Hi,

I'd like to ask you about the reflection distance of the mesh objects on water. They disappear as the distance from the water increases but I couldn't find way to adjust the distance. Also somehow this distance is varied. I've attached the pictures here. As you can see, the reflection looks great in the closeup image, as we go far from the object, reflections disappear. Then all of a sudden, they appear as we go further again. It seems to be an issue with the looking angle I guess. As you look more from above, the reflections appear even if you are really far from the object. Is there way to keep the reflections consistent regardless of the viewing angle?

Thanks

Tan
Title: Re: Tasharen Water
Post by: ArenMook on December 16, 2013, 09:22:26 AM
Double-check which layers your water reflects. It should not reflect itself.
Title: Re: Tasharen Water
Post by: tankun on December 16, 2013, 02:56:34 PM
I checked the layers, it's not reflecting itself (which is the "water" layer by default anyway). In fact I tried to reflect everything including the water level to jinx it but result was interestingly the same.

Actually I figured out the reason but couldn't find a solution. It's got something to do with the baked occlusion culling. When you clear the occlusion map the problem goes away. I'm trying to play around with the occlusion culling settings to sort out this issue. For instance if the occlusion culling area is as big as the tasharen water mesh, the problem worsens; the water reflections from the regular meshes disappear completely. Sky reflection is always there by the way (I'm using the high shader setting). It's never effected by this issue.
Title: Re: Tasharen Water
Post by: ArenMook on December 16, 2013, 05:13:11 PM
Ah yes, occlusion checks would indeed break it. Occlusion feature is meant for indoor scenes, not for outdoor environments (and especially not reflected outdoor environments!)
Title: Re: Tasharen Water
Post by: tankun on December 17, 2013, 12:42:53 AM
I see, ok thanks. I'll try to find a workaround. Fiddling with the occlusion area size might help.

edit: Well, it didn't. As I said in my earlier post, it doesn't break the reflection completely but only from certain angles. So I believe if there was a way in the shader to adjust the reflection settings somehow, I'm sure there would be a nice soft spot where reflection would work for certain purposes. For instance in my game, we see the ocean from one certain angle only, and that's the angle where the reflection is absent.

PS: I respectfully disagree with the occlusion feature being meant only for indoors by the way; but it's another days topic :)
Title: Re: Tasharen Water
Post by: ArenMook on December 17, 2013, 12:39:22 PM
Let me put it this way... From what I've seen, Unity didn't expect occlusion checks to be reflected. That's why it breaks. But if you figure out some way to make them play along nicely, let me know. :)
Title: Re: Tasharen Water
Post by: tankun on December 18, 2013, 01:59:34 AM
Will do, thanks.
Title: Re: Tasharen Water
Post by: Flasheart on January 18, 2014, 11:13:08 AM
Hi guys,,, very new to unity, and looking at many packages mostly as a learning tool...  Just purchased Tasharen Water, and the multi-purpose game starter kit... also have added NGUI and Playmaker packages in a new project....

I get a fatal error and can't proceed... the error is coming from Tasharen Water....  "Assets/Tasharen/Water Example/Scripts/RandomGenerator.cs(4,14): error CS0101: The namespace `global::' already contains a definition for `RandomGenerator'" also getting a warning from the MPGSK "Shader wants normals, but the mesh Laser Beam doesn't have them
UnityEditor.AssetPreviewUpdater:CreatePreviewForAsset(Object, Object[], String)" . any help or suggestions would be appreciated... thanks guys. Using Unity 4.3.3f1.  Free version, latest build.
Title: Re: Tasharen Water
Post by: ArenMook on January 18, 2014, 10:33:27 PM
You can remove one of the RandomGenerator scripts. You only need one.
Title: Re: Tasharen Water
Post by: dcparker on February 03, 2014, 05:15:26 PM
ArenMook

I am working on a flight simulator and would like to have to water appear endless, when I fly up in the air, you can see the edges of the water.

Any tricks or tips to make the water appear endless?


Title: Re: Tasharen Water
Post by: ArenMook on February 04, 2014, 04:07:17 AM
Just change the scale of the water plane to be bigger. It's 200 by 200 by default if I remember correctly.
Title: Re: Tasharen Water
Post by: gekido on February 04, 2014, 04:36:35 AM
Just tried the water out on Windows Phone, and I'm getting pink for the water - does this mean that the shader isn't playing nice?  Has anyone tried it out?

Thanx
Title: Re: Tasharen Water
Post by: ArenMook on February 06, 2014, 10:56:13 PM
I don't know if anyone has tried it on WP8, but logically it would be the same as iOS/Android. Pink implies it failed to compile. Are you seeing any errors on the shader it's warning you about?
Title: Re: Tasharen Water
Post by: creat327 on February 25, 2014, 06:35:09 PM
Hi
Is there a way to get a shader fix for render textures?
I changed the script so that it doesn't enforce "Fast" for mobile and it can go to low, medium and high if I want to. But it seems the shader completely ignores those settings because anything other than fast, won't render any water on mobile eventhough I have a mobile that is able to render suimono, water4 pro and any other package at 30 fps with reflections and real time shadows... (I think it has more power than my current laptop lol)
So it has to be on the shader side that something is messed up but I have no clue where to begin touching the shader
Title: Re: Tasharen Water
Post by: creat327 on February 25, 2014, 08:27:44 PM
I found the issue, you have this in your c#
if (imageEffects) cam.depthTextureMode |= DepthTextureMode.Depth;

That does not work on mobile. Mobile does support RenderTexture but not that camera setting so you need to use a RenderTexture and render the depth buffer into it. That's what Water4 does. Otherwise any setting that is not "fast" would not render any water.

Any way we could get this fixed?
Title: Re: Tasharen Water
Post by: ArenMook on February 26, 2014, 03:58:49 PM
I'll have a look at it, thanks.
Title: Re: Tasharen Water
Post by: creat327 on March 09, 2014, 01:11:30 PM
Any hopes on getting an update? It's been months without an update. At the end I'm using my own modified community free ocean shader but since I paid for this package and it has 4 levels of quality, I would like to have it working on mobile with those 4 levels of details and not only the crappy fast pass.
My current android is fast enough to render faster than my laptop at that quality, it's just a matter of fixing the shader/camera settings.
Title: Re: Tasharen Water
Post by: ShinfoKensei on March 09, 2014, 06:36:21 PM
How do I fix this? http://i.imgur.com/arAZjcy.png

It only happens with Tasharen Water.
Title: Re: Tasharen Water
Post by: ArenMook on March 10, 2014, 09:36:40 PM
Trees need to be using a shader that's drawn after the water. The water should be drawn first.

So adjust the render queue either of whatever is used to draw your foliage, or the water.

This script can alter the render queue for you without having to modify the shader code: http://www.tasharen.com/forum/index.php?topic=776.msg34546#msg34546 -- you can attach it to the same game object that has Tasharen Water.
Title: Re: Tasharen Water
Post by: smtabatabaie on March 11, 2014, 03:17:35 PM
Hi , is there any way to add to transparency of tasharen water ?
thanks
Title: Re: Tasharen Water
Post by: ArenMook on March 11, 2014, 08:37:04 PM
What do you mean? It has transparency.
Title: Re: Tasharen Water
Post by: smtabatabaie on March 12, 2014, 12:43:35 AM
Yes it has transparency . but I mean a parameter or a way to increase the transparency of the water. I tried decreasing the alpha of the colors but it didn't help.
is there a way to do that?
thanks
Title: Re: Tasharen Water
Post by: ArenMook on March 13, 2014, 12:38:31 AM
There are 4 parameters at the end that control a few factors, transparency depth being one of them.
Title: Re: Tasharen Water
Post by: smtabatabaie on March 13, 2014, 02:11:52 AM
Thanks , yes I've tried those , but in iOS platform I don't see any difference by changing them.
Title: Re: Tasharen Water
Post by: ArenMook on March 13, 2014, 06:20:53 AM
Ah yes, iOS... I'll PM you an alternate version that should take alpha into consideration.
Title: Re: Tasharen Water
Post by: capitalj on March 19, 2014, 03:09:48 AM
Is there a way to set the tiling so that when zoomed way out to see are large body of water it doesn't look as tiled?
Title: Re: Tasharen Water
Post by: ArenMook on March 20, 2014, 02:42:35 AM
Well, yes -- one of the parameters controls tiling.
Title: Re: Tasharen Water
Post by: ShinfoKensei on March 23, 2014, 05:45:27 AM
Trees need to be using a shader that's drawn after the water. The water should be drawn first.

So adjust the render queue either of whatever is used to draw your foliage, or the water.

This script can alter the render queue for you without having to modify the shader code: http://www.tasharen.com/forum/index.php?topic=776.msg34546#msg34546 -- you can attach it to the same game object that has Tasharen Water.

I get the error:

Assets/Tasharen/Water/waterrenderqueue.cs(3,14): error CS0101: The namespace `global::' already contains a definition for `SetRenderQueue'
Title: Re: Tasharen Water
Post by: ArenMook on March 24, 2014, 06:43:00 PM
That just tells you that you already have a SetRenderQueue script.
Title: Re: Tasharen Water
Post by: ShinfoKensei on March 24, 2014, 11:24:26 PM
Okay, well I managed to attach the script. It still had the same issue. Tried changing the value as well, to no avail.
Title: Re: Tasharen Water
Post by: ArenMook on March 26, 2014, 03:35:30 AM
Delete one of the instances of SetRenderQueue scripts, and the error will go away. Not sure how else to explain this basic concept. You have two things with the same name. Delete one -- problem goes away.
Title: Re: Tasharen Water
Post by: EvgeniyN on April 03, 2014, 08:18:13 AM
Hi there!
We've got a water mesh with two levels, with a dam between them. And we're using tasharen water. But for now we have huge problems with reflection:

(http://puu.sh/7Uo6t.jpg)

We've tried every possible method - two different meshes (no reflection on the lower one), welding meshes together (different results), smooth transition between meshes etc. Nothing worked. Is there a solution to this? Our water mesh is also attached.

Thank you!
Title: Re: Tasharen Water
Post by: ArenMook on April 03, 2014, 10:06:23 PM
All reflection in all the game engines in the world are done by reflecting the geometry by using a flat plane. In the Water's case this plane lies at the water's position. This means that your mesh must be flat, and must be directly on Y of zero for this to work properly. You can move the object itself, but the mesh must have Y of zero.

This also means that you will need two water meshes here, not just one.
Title: Re: Tasharen Water
Post by: EvgeniyN on April 04, 2014, 05:06:23 AM
2 meshes, y=0, flat, pivot point turned and centered at 0,0,0 in 3dmax. Tasharen water on one water plane (putting it on the second one doesn't change anything anyway). Still the same problem.

(http://puu.sh/7Vued.jpg)

Title: Re: Tasharen Water
Post by: ArenMook on April 05, 2014, 12:07:48 PM
When I said 2 meshes, I meant 2 separate objects, not 2 meshes in the same object. Each water object needs to be a separate plane.
Title: Re: Tasharen Water
Post by: EvgeniyN on April 06, 2014, 12:50:16 AM
Just made 2 simple separate planes. Water material on both, water material on both, Tasharen Water script on the top one:
(http://puu.sh/7XQmq.jpg)
Bottom one doesn't reflecting correctly.

If I put script on bottom plane - top one going crazy :-(
(http://puu.sh/7XQt1.jpg)

I'm staring to think it's impossible to fix right now :-(
Title: Re: Tasharen Water
Post by: ArenMook on April 06, 2014, 03:09:21 AM
Water script needs to be on both, not just one.

Also keep in mind this is horrible for performance. Each needs to reflect objects, implying your geometry count will effectively double with each water plane.
Title: Re: Tasharen Water
Post by: EvgeniyN on April 07, 2014, 04:49:43 AM
Even with default Tasharen Water prefab we can't make it work as we want:

That's two water planes with reflection script on each one. Lower water doesn't have correct reflection of terrain.
(http://puu.sh/7ZltN.jpg)

If we turn off the script on the top water plane - bottom is back to normal, but top is going crazy:
(http://puu.sh/7ZlzK.jpg)

Anyway, "horrible performance" is a very nice argument and I think we shoud just remove the second water level from our map. But I'm still interested in possible solution for this problem.
Title: Re: Tasharen Water
Post by: devogen on April 10, 2014, 04:34:58 AM
Hi, I bought this yesterday and can't seem to change quality settings...

I flip the menu, I select say, high quality and it just flips back to 'fastest' I am running an 8core amd with plenty of ram and the latest version of Unity,so it's a bit wierd...

So yeah, I basically can't use any setting other than the lowest :/ The text also turns blue which is wierd.

(http://www.devogeninteractive.com/picup/image.php?id=FC0E_5346653B&jpg)
Title: Re: Tasharen Water
Post by: ArenMook on April 10, 2014, 08:19:42 AM
What quality settings are you on, and what's your target platform?
Title: Re: Tasharen Water
Post by: devogen on April 10, 2014, 04:14:18 PM
What quality settings are you on, and what's your target platform?

Well, I thought I was on fastest trying to get to best quality. I can't seem to change from low to high...

Target platform is Windows, but.. Am I missing something then?  I sent you a screenshot of where im trying to change the quality, and you ask me what quality settings im using?

baffling..

Is there somewhere else to change the quality settings of your plugin other than the screenshot I showed? Being a public variable I dont understand why i cant change this option.
Title: Re: Tasharen Water
Post by: ArenMook on April 11, 2014, 08:22:35 AM
I was asking about quality settings, as in, in Unity itself. Quality Settings options page. Not the property on the water script.
Title: Re: Tasharen Water
Post by: devogen on April 11, 2014, 09:45:35 AM
I was asking about quality settings, as in, in Unity itself. Quality Settings options page. Not the property on the water script.

(http://www.devogeninteractive.com/picup/image.php?id=AE16_5347FF3C&jpg)

And still, every time I change the settings in your script to anything but 'fastest' it just reverts automatically back to fastest, when I have it set to max on everything.

I wanted one thing from your plugin and that was to have something,anything show reflections of static objects on water - thats it.

As I said, am I missing something? This is getting pretty frustrating I have to say.
Title: Re: Tasharen Water
Post by: devogen on April 11, 2014, 10:19:46 PM
Hello?

Sorry I'm trying to get one thing working, and it's possible it might not even work after all -so to save you the time and effort

Do reflections on water work in the free version of Unity?
Title: Re: Tasharen Water
Post by: ArenMook on April 12, 2014, 04:12:59 AM
No, reflections don't work in the free version of Unity.

http://www.tasharen.com/forum/index.php?topic=1270.msg6636#msg6636
Title: Re: Tasharen Water
Post by: devogen on April 12, 2014, 05:10:54 AM
No, reflections don't work in the free version of Unity.

http://www.tasharen.com/forum/index.php?topic=1270.msg6636#msg6636

Could you put that in the asset store description maybe? It's a tad misleading. I could have saved $45 (and both of us some trouble)  and bought another one of your plugins that actually was useful to me instead. And in advance, a response to the obvious replies... if I could afford the pro version of unity, would I be buying a $45 water asset? no. I'd be buying the $400 one.

All good,thanks for the answer, I'll just get the asset refunded. cheers.

Title: Re: Tasharen Water
Post by: capitalj on April 29, 2014, 07:51:16 PM
Hey, I've just purchased the water and was wondering if it's possible to adapt a few things to make it work in large scale? My game uses a 1:1 scale, so my play area is around 15000x12000 unity units. I have to stretch out the water to around 10000x10000.

1) The tiling option in this case is limited so even at the smallest tiling value it looks very tiled. Can I change this in the shader or some other way to match the tiling to my game's scale better? Found the value to adjust inside the shader :)

2) Is the a way to increase the shoreline size? Again at this scale the shorelines are very thin and when zoomed out barely visible. It would be great to be able to increase their "thickness" so they extend out further from the shore.
Title: Re: Tasharen Water
Post by: ArenMook on April 30, 2014, 07:23:07 PM
One of the values on the material controls the foam (what you call shoreline). Just play with them to see what each of them does.

I would also suggest you be careful with large numbers. Floating point values are quite limited, and physics will start behaving quote oddly.
Title: Re: Tasharen Water
Post by: capitalj on May 02, 2014, 01:39:41 AM
So I tried adjusting this line in the shader:
// The amount of foam added (35% of intensity so it's subtle)
half foam = nmap.a * (1.0 - abs(col.a * 2.0 - 1.0)) * 0.5;

but a higher value just makes the existing foam brighter, not wider/bigger. Is is possible to make the foam go further from the shoreline so that it is several times wider/thicker?
Title: Re: Tasharen Water
Post by: ArenMook on May 02, 2014, 09:59:24 AM
Don't modify the shader. Modify the values on the material instead. There is a set of 4 values at the end: Inverse Alpha, Depth and Color ranges. Play with those values, see what they do. The first one (inverse alpha) is what controls the foam.
Title: Android device problem
Post by: MainMe on June 30, 2014, 03:50:49 AM
Hello
I have some problem in android devices

Tasharen Water
Pos : (0.0,-1.27,500)
Scale : (3000,200,3000)

Camera
Pos : (0,0,0)

water seems slightly broken.
(http://myschoollife.freeiz.com/img/1.jpg)


However, when the position of the camera is moved

Camera
Pos : (1001.216,0,499.485)

Water seems broken.
(http://myschoollife.freeiz.com/img/2.jpg)

This problem occurs only on android devices.
Title: Re: Tasharen Water
Post by: ArenMook on July 01, 2014, 06:43:21 AM
Those look like texture compression artifacts to me. Change the water texture import settings to be Truecolor.
Title: errors when using water
Post by: frostamation on July 01, 2014, 05:31:25 PM
I am using the water and the Multi-Purpose Game Starter Kit,

i have 2 RandomGenerator.cs scripts, one inside Terrain kit/scripts/ and one inside water example/scripts/
causes this error: Assets/Tasharen/Water Example/Scripts/RandomGenerator.cs(4,14): error CS0101: The namespace `global::' already contains a definition for `RandomGenerator'


Also the TasharenWater shader is throwing an error, which is probably causing the pink water. i get : shader has errors or is not supported by vid card. Im using a firepro w5000 so im sure thats not it.

the errors it lists below are:

tex2Dproj : no matching 2 parameter intrinsic function; possible intrinsic functions are : tex2Dproj(sampler2d, float4 / half4 / min10float4 / min16float4

implicit truncation of vector type

Edit Update:

After deleating the tasharen water demo, to get rid of the extra randomgenerator.cs script, i now get 5 now errors:

Assets/MPGSK/Terrain Kit/Scripts/MergeMeshes.cs(179,33): error CS0103: The name `TWTools' does not exist in the current context

same error with same script except on different lines: 179,278,301,302,303. all with TWTools

Edit Update2 :

After i commented out the TWTools from the MergeMeshes.cs script i got the errors to go away and the TasharenWater.cs script now shows up in the inspector correctly with the available options for editing. The water is still pink and the Tasharen Water Shader still has the same two errors as mentioned above:

tex2Dproj : no matching 2 parameter intrinsic function; possible intrinsic functions are : tex2Dproj(sampler2d, float4 / half4 / min10float4 / min16float4

implicit truncation of vector type
Title: Re: Tasharen Water Android device problem
Post by: MainMe on July 02, 2014, 01:23:05 AM
Hello
This is my import setting.
Texture already true color.

When camera position is changed, more deteriorated.

Camera Pos : (0,0,0) -> Camera Pos : (1001,0,499)


(http://myschoollife.freeiz.com/img/3.jpg)
Title: Re: errors when using water
Post by: ArenMook on July 02, 2014, 06:20:15 AM
I am using the water and the Multi-Purpose Game Starter Kit,

i have 2 RandomGenerator.cs scripts, one inside Terrain kit/scripts/ and one inside water example/scripts/
causes this error: Assets/Tasharen/Water Example/Scripts/RandomGenerator.cs(4,14): error CS0101: The namespace `global::' already contains a definition for `RandomGenerator'
Delete one of the RandomGenerator scripts. Keep only one copy.
Also the TasharenWater shader is throwing an error, which is probably causing the pink water. i get : shader has errors or is not supported by vid card. Im using a firepro w5000 so im sure thats not it.

the errors it lists below are:

tex2Dproj : no matching 2 parameter intrinsic function; possible intrinsic functions are : tex2Dproj(sampler2d, float4 / half4 / min10float4 / min16float4

implicit truncation of vector type
What's the full error message?
Edit Update:

After deleating the tasharen water demo, to get rid of the extra randomgenerator.cs script, i now get 5 now errors:
Don't delete the whole demo. Just the script I mentioned above.
Title: Re: Tasharen Water Android device problem
Post by: ArenMook on July 02, 2014, 06:21:26 AM
Hello
This is my import setting.
Texture already true color.

When camera position is changed, more deteriorated.

Camera Pos : (0,0,0) -> Camera Pos : (1001,0,499)
Use the "Override for Android" checkbox to force it to be Truecolor.

If that doesn't work, open up the Tasharen Water shader and replace all instances of "half" with "float" (just global replace should work fine).
Title: Re: Tasharen Water
Post by: frostamation on July 02, 2014, 11:23:56 AM
tex2Dproj : no matching 2 parameter intrinsic function; possible intrinsic functions are : tex2Dproj(sampler2d, float4 / half4 / min10float4 / min16float4

implicit truncation of vector type

Is the full error message: see picture. There is no errors in the console, only on the shader when i click it in the inspector.

Im on a win 8 pro PC with unity pro ver:4.5.1f3
Title: Android device problem
Post by: MainMe on July 03, 2014, 04:42:54 AM
Hello

I changed texture import setting and Tasharen Water shader(replace all instances of "half" with "float").

but still Broken , When camera position is changed.
Camera Pos : (0,0,0) -> Camera Pos : (1001,0,499)

I tested Google Nexus7 and Samsung Galaxy S2.

Title: Re: Tasharen Water
Post by: ArenMook on July 03, 2014, 05:20:34 AM
@frostamation: Oh, D3D11. That would explain it. Turn off DX11 mode.

@MainMe: Is that only the case on the mobile devices? Does it reproduce on the PC? Have you tried not using such large numbers? Generally floating point precision degrades pretty quickly. In Windward my levels are no more than 512x512 for example, and the water plane is 80x80, following the camera around so that it's not noticeable.
Title: Re: Tasharen Water
Post by: frostamation on July 03, 2014, 11:04:38 AM
@ArenMook : Direct3d 11 check box is unchecked, and was unchecked, still have pink water.

I also checked direct3d 11, restarted unity, unchecked, restarted unity : same results, pink water.

unless there is another d3d11 check box somewhere? the one i found is in the player settings
Title: Re: Tasharen Water
Post by: ArenMook on July 04, 2014, 03:14:21 PM
The error that's shown there is for DX11, but if it's not used then it shouldn't be an issue. You can tell if it's using DX11 or not by looking at the program name itself (the Unity's title bar). If it's in DX11 mode it will end with <DX11>.

Do other shaders work? And I mean shaders -- actual shader code, not fallback logic. Try going to http://www.tasharen.com/windward -- do you see the water?
Title: Re: Tasharen Water
Post by: frostamation on July 04, 2014, 05:26:03 PM
Ok so fixed it now. What it was apparently was either the ShaderQuality.cs or TWTools.cs script was not present, therefor water was pink

However in my defense i deleted the "Water Example" folder, which those two scripts where in there. If in fact you need those 2 scripts, or one of them, it might be best to move those to the "Water" folder instead, so people dont delete them as i did.

Thanks for you help and hopefully this will help someone else out.
Title: Android device problem
Post by: MainMe on July 06, 2014, 04:34:15 PM
Hello

This is only reproduce andriod device. (ios and pc can't reproduced)
I tried change water scale (3000x3000 -> 80x80), still broken

Steps to Reproduce
1. make tasharen water
2. make camera
3. make directional light
4. change water postion (1000,-1.2,500)
5. change camera position(1000,6,500)
6. test android device (I tested Google Nexus7 and Samsung Galaxy S2.)

(http://myschoollife.freeiz.com/img/2.jpg)
Title: Re: Tasharen Water
Post by: ArenMook on July 07, 2014, 04:25:12 AM
If the water looks correct everywhere except your Android devices, and it happens on multiple Android devices, then this leaves only one reason: texture is not getting imported as Truecolor.

Unity is odd like that... unless you explicitly override texture import settings for a target platform (in your case -- Android) and choose to use Truecolor, it may not do it. So as long as you force override the import settings of the Water texture on an Android device to Truecolor, and the Quality is not set to Fastest, everything should work as expected.

On my end everything looks correct when I follow your steps. Tried it on my Samsung Galaxy S3.
Title: Android device problem
Post by: MainMe on July 07, 2014, 06:32:57 PM
Hello

I check texture option. and change true color.
but still broken, when I change water position.
can you tell me your email address?
I want to send my proejct file.
Title: Re: Tasharen Water
Post by: ArenMook on July 08, 2014, 01:38:20 PM
Certainly -- support at tasharen.com. Please send a dropbox download link though, as my provider will reject large attachments.
Title: Android device problem
Post by: MainMe on July 08, 2014, 10:58:06 PM
Hello
I sent email(file size is 4.7MB)
check please.
Thank you
Title: Re: Tasharen Water
Post by: ArenMook on July 09, 2014, 01:12:13 PM
Attached pic was taken on my Samsung Galaxy S3.

The only odd thing I noticed about your project is that it was targeting Android, and yet it was in DX11 mode. Not sure how you did that, but I had to switch to Stand-alone and remove DX11 mode, then switch back to Android.

P.S. Targeting Android 4.2.
Title: Re: Tasharen Water
Post by: ArenMook on July 09, 2014, 01:20:33 PM
Ok so fixed it now. What it was apparently was either the ShaderQuality.cs or TWTools.cs script was not present, therefor water was pink

However in my defense i deleted the "Water Example" folder, which those two scripts where in there. If in fact you need those 2 scripts, or one of them, it might be best to move those to the "Water" folder instead, so people dont delete them as i did.

Thanks for you help and hopefully this will help someone else out.
I actually ran into this myself, and it is some issue in Unity. I re-imported the shader and the problem went away.
Title: Re: Tasharen Water
Post by: jviloria on July 16, 2014, 04:25:09 PM
Greetings, i just upgraded Unity to version 4.5.2f1 (Pro) and now the water is pink. I tried reimporting from the asset store, but i still get the problem.

Is there another way to fix the problem? Is the current version of Unity having issues with the asset?
Title: Re: Tasharen Water
Post by: jviloria on July 16, 2014, 06:41:19 PM
I was receiving this error:
Shader error in 'Tasharen/Water': 'tex2Dproj': no matching 2 parameter intrinsic function; Possible intrinsic functions are: tex2Dproj(sampler2D, float4|half4|min10float4|min16float4) at line 131

So i fixed the problem by editing the shader in the line 130:

Before:
half3 projTC = UNITY_PROJ_COORD(IN.proj0);

After:
half4 projTC = UNITY_PROJ_COORD(IN.proj0);
Title: Re: Tasharen Water
Post by: ArenMook on July 17, 2014, 03:17:52 AM
Hmm... that must be new. You can also resolve it using this then:
  1. float3 projTC = UNITY_PROJ_COORD(IN.proj0).xyz;
Title: Re: Tasharen Water
Post by: HashbangGames on July 18, 2014, 04:23:04 PM
I have this same exact problem,  I have Unity Pro  4.5  and the Tasharen Water material is pink.   
No errors are thrown in the editor

Update:  The shader fix posted right above my post fixed the problem for me as well.
Title: Android device problem
Post by: MainMe on July 21, 2014, 10:11:21 PM
Hello!

Fortunately, I was able to borrow some smart phones.
So I had an opportunity to test.

However, some device's water was still broken.
This are not texture import setting or build option problem.

All build options are same (Minimum API Level, texutre import setting etc...)

Camera Position (1000,1,500)
Water Position(1000,-2,500)


1.
Model : SHV-E110S
Phone Name : Samsung Galaxy S2 LTE
CPU : Qualcomm Snapdragon S3 APQ8060
Result : Normal

2.
Model : SHV-E160S
Phone Name : Samsung Galaxy  Note LTE
CPU : Qualcomm Snapdragon S3 APQ8060
Result : Normal

3.
Model : SHV-E120S
Phone Name : Samsung Galaxy S2 HD LTE
CPU : Qualcomm Snapdragon S3 MSM8660
Result : Normal

4.
Model : SHV-E170S
Phone Name : Samsung Galaxy R Style
CPU : Qualcomm Snapdragon S4 MSM8960
Result : Normal

5.
Model : SHV-E300S
Phone Name : Samsung Galaxy S4
CPU : Samsung Exynos 5 Octa 5410
Result : Normal

===================================================

6.
Model : SHW-M250L
Phone Name : Samsung Galaxy S2
CPU : Samsung S5PC210 Exynos 4 Dual 4210
Result : abnormal

(http://myschoollife.co.kr/bug_1/0_SHW-M250L.jpg)

7.
Model : SHV-E210S
Phone Name : Samsung Galaxy S3 LTE
CPU : Samsung Exynos 4 Quad 4412
Result : abnormal

(http://myschoollife.co.kr/bug_1/2_SHV_E210S.jpg)

8.
Model : SHV-E250S_32GB
Phone Name : Samsung Galaxy Note2
CPU : Samsung Exynos 4 Quad 4412
Result : abnormal
(http://myschoollife.co.kr/bug_1/3_SHV_250S.jpg)

9.
Model : SHV-E330S
Phone Name : Samsung Galaxy S4 LTE-A
CPU : Qualcomm Snapdragon 800 MSM8974AA v2
Result : abnormal

(http://myschoollife.co.kr/bug_1/1_SHV_E330S.jpg)

10.
Model : SM-N900S
Phone Name : Samsung Galaxy Note3
CPU : Qualcomm Snapdragon 800
Result : abnormal

(http://myschoollife.co.kr/bug_1/6_SM-N900S.jpg)

11.
Model : SHW-M440S
Phone Name : Samsung Galaxy S3
CPU : Samsung Exynos 4 Quad 4412
Result : abnormal

(http://myschoollife.co.kr/bug_1/5_SHW-M440S.jpg)

12.
Model : SM-C105S
Phone Name : Samsung Galaxy S4 Zoom
CPU : Samsung Exynos 4 Dual 4212
Result : abnormal

(http://myschoollife.co.kr/bug_1/4_SM_C105S.jpg)

13.
Model : LG-F350S
Phone Name : LG Optimus G Pro2
CPU : Qualcomm Snapdragon 800
Result : abnormal

(http://myschoollife.co.kr/bug_1/8_LG-F350S.jpg)

14.
Model : LG-F340S
Phone Name : LG Optimus G Flex
CPU : Qualcomm Snapdragon 800
Result : abnormal

(http://myschoollife.co.kr/bug_1/9_LG-F340S.jpg)

Title: Re: Tasharen Water
Post by: ArenMook on July 22, 2014, 06:21:19 PM
What version of Unity are you running? Have you tried updating to the latest? I know I had issues with the FOW shaders until upgrading to 4.5.1, and the current latest is 4.5.2.
Title: Android device problem
Post by: MainMe on July 23, 2014, 04:52:50 AM
Hello

I tested 4.3.1, 4.5.1
but there was not difference.

this problem was influenced by position of camera.(Camera Position (0,1,0) -> Camera Position (1000,1,500))
Title: Re: Tasharen Water
Post by: ArenMook on July 23, 2014, 09:48:34 PM
Does it look fine if it's at (0, 1, 0)? What is the scale of your water mesh? The way I normally use the water is I keep its "keep under camera" flag checked so that it's always positioned underneath the camera, allowing me to keep its size relatively small. In Windward I used a scale of (80, 80, 80) for example. Keeping values small is good for float precision.
Title: Android device problem
Post by: MainMe on July 26, 2014, 10:55:08 AM
Hello

All device did not tested.

Model : SHW-M250L
Phone Name : Samsung Galaxy S2
CPU : Samsung S5PC210 Exynos 4 Dual 4210

Camera Pos (0,1,0)
water Pos (0,-2,0)
water Scale (80,80,80)

(http://myschoollife.co.kr/bug_1/11_SHW-M250L.JPG)


Camera Pos (1000,1,500)
water Pos (1000,-2,500)
water Scale (80,80,80)

(http://myschoollife.co.kr/bug_1/10_SHW-M250L.JPG)




Title: Re: Tasharen Water
Post by: ArenMook on July 27, 2014, 03:37:29 AM
Ok, so it looks like the devices simply run into float precision issues. It's likely that they are limited to "half" precision in the shader or something similar. All I can suggest is don't use such large float numbers for position.
Title: Android device problem
Post by: MainMe on July 27, 2014, 12:49:09 PM
This water seems to unsuitable in android platform.

when camera xz position value is greater than 100,  water occurs problem (even if latest phone model).
Title: Re: Tasharen Water
Post by: akagt17 on September 10, 2014, 10:54:34 PM
Hi Tasharen I am not a programmer so this is proving to be difficult but I am having pink on my sea and I have no idea how to resolve it. I am using Unity version  4.3.4f1 and bought the latest version of your shader in which u mentioned that it is still backwards compatible.
The errors I am getting are

Program 'frag_surf', incompatible types in initialization at line 130
Program 'frag_surf', invalid initialization at line 130
Program 'vert_surf', incompatible types in initialization at line 130
Program 'vert_surf', invalid initialization at line 130

Please help
Title: Re: Tasharen Water
Post by: ArenMook on September 11, 2014, 01:02:33 AM
Let me just send you the updated water version I have in Windward right now. I'm guessing you are going down the DX11 route? The one I'm using here locally should work there as expected. PM me your OR# and I'll send you the replacement shader.
Title: Re: Tasharen Water
Post by: akagt17 on September 11, 2014, 04:12:42 AM
Hi Arenmook, I've sent a personal message to your inbox in UNITY with my info , please send it there thanks
Title: Re: Tasharen Water
Post by: Chu on December 12, 2014, 11:24:31 AM
It's great! Love it! Could you explain what's mean of"Makes it possible to hide terrain edges"? I am interest in the reflection of water,can you give me some references? thank you very much! Look forward to your reply...
Title: Re: Tasharen Water
Post by: voncarp on February 02, 2015, 07:34:44 PM
On iOS the quality is stuck at fastest leaving very ordinary looking water.  Even after turning up the quality in Unity.   Is it possible to have the ability to turn it up higher?  Also, reflections do not work on IOS even with Unity Pro.  Are these all iOS limitations?  Looks good on PC/MAC.

Water starts out pink but this fixes it.

Hmm... that must be new. You can also resolve it using this then:
  1. float3 projTC = UNITY_PROJ_COORD(IN.proj0).xyz;
Title: Re: Tasharen Water
Post by: ArenMook on February 03, 2015, 11:39:10 AM
Yes, unfortunately mobile versions are quite limited by what's supported. The best way to get it to look good on mobiles is to not rely on campling camera's depth, but instead generate a terrain heightmap texture that will be sampled by water in the shader. It will be much faster than the current approach as a nice benefit, although it won't let you modify the terrain on the fly without also updating the texture.
Title: Re: Tasharen Water
Post by: huevoquilmes on April 17, 2015, 09:23:23 AM
Hello, first of all, I love you, this water is awesome, I'm using it in android and iOs for my games and is super performant and it looks great.
However, I'm porting my games to wp8 now, and I can't make it work there :/
On the editor, once I switched to wp8 it water went purple. Then I realized that If I changed to not using DX11 in web player (!?) it gets fixed in the editor. Apparently something is happening with DX11.
When I build to windows phone, the water doesn't appear at all. What can I do to detect the problem, and maybe tweak the shader so it works there?
Thanks!
Title: Re: Tasharen Water
Post by: ArenMook on April 18, 2015, 01:37:27 PM
Make sure TasharenWater's Awake() function is this:
  1.         void Awake ()
  2.         {
  3.                 mTrans = transform;
  4.                 mRen = renderer;
  5.                 mSpecular = new Color32(147, 147, 147, 255);
  6.                 mDepthTexSupport = SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.Depth);
  7.         }
I'll be releasing an update to the Water package next month after Windward ships. I made it more robust and made it look just as awesome on mobiles with no depth texture support as on desktops by using a pre-sampled depth texture.
Title: Re: Tasharen Water
Post by: huevoquilmes on April 21, 2015, 12:27:50 PM
I'm really glad to hear about the new update! :D It's already looking great on mobile, and it's by far the best water solution we found for mobile.
As for wp8, this line is not in the Awake()

mDepthTexSupport = SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.Depth);

However, mDepthTexSupport doesn't exist as well. (I have the latest version).

Let me know if there is anything I can do to make it work, or if I should wait for the update. We are currently waiting for this to be solved to finish with the porting of a couple of games to wp8 :)
Thanks for your help!
Title: Re: Tasharen Water
Post by: ArenMook on April 22, 2015, 02:41:58 PM
Just PM me with your OR# and I'll send you an updated unitypackage in advance of next month's update.
Title: Black reflection?
Post by: Ha7den on May 18, 2015, 06:52:17 PM
Hi Aren,

Thank you for sharing your great assets, I'm using your water at a very large scale and have this strange black area showing up, do you have any idea what it is or how to fix?

(http://i.imgur.com/Nb1vpN7.jpg)
(http://i.imgur.com/dwS9hQB.jpg)
Title: Re: Tasharen Water
Post by: ArenMook on June 01, 2015, 09:45:16 PM
That looks like black where there should be a specular component showing up. Does it only appear on your large map? Does the example that the water package comes with work as expected?
Title: Re: Tasharen Water
Post by: neojac on June 10, 2015, 12:50:09 PM
Hi, just got your water package and am using unity 5, in the demo the water seems to have a problem with the shader as its all black and blue mix , might be a specular problem. Any Ideas?

(http://www.neosland.com/images/WaterShaderProblem.png)

Title: Re: Tasharen Water
Post by: ArenMook on June 11, 2015, 09:29:35 AM
Select the Tasharen Water normal map texture, and change it to use Advanced Texture type, not Normal Map. It has an alpha channel, it can't be a normal map as normal maps in Unity only have RGB, no alpha. Import Type must be "Default".
Title: Re: Tasharen Water
Post by: uli on June 11, 2015, 05:29:02 PM
Hi, is it possible to use the water in xy-plane?
Title: Re: Tasharen Water
Post by: ArenMook on June 12, 2015, 08:15:55 AM
Yes, but you will need to modify the shader, uli.
Title: Re: Tasharen Water
Post by: uli on August 04, 2015, 04:28:28 PM
Sorry, but I need some help modifying the shader.

I changed
half2 tiling = IN.worldPos.xz * _Tiling;
to
half2 tiling = IN.worldPos.xy * _Tiling;

in each SubShader, but that didn't help much. Maybe it has to do with the color calculated from the camera's depth texture. Couldn't I use a custom depth texture instead?
Title: Re: Tasharen Water
Post by: ArenMook on August 05, 2015, 07:19:14 AM
You could use a custom heightmap texture, yes. In Windward the Tasharen Water samples a pre-generated terrain heightmap texture instead if the graphics quality is set to low. This avoids using the depth buffer altogether.

Just be aware that any kind of reflections won't work if you just flip XZ to XY in the shader. You will need to modify the code of the water's script to create a different reflective plane, for example. Look around line 490 where the reflection camera is created. Although if you just change the quality of the water to lowest, it will switch to be using that pre-generated heightmap texture instead, and there won't be any reflections either.

That said, I am not 100% sure if the version of the water on the asset store has the Windward-related changes I just mentioned. It's easy enough to check though -- around line 412, you should see an ifdef like "#if WINDWARD". Each #ifdef'd section should have a brief comment explaining its use.
Title: Re: Tasharen Water
Post by: uli on August 05, 2015, 03:35:14 PM
I have the latest version from Unity asset store, which is 1.2 from February. Line 412 is
  1. #ifdef USING_DIRECTIONAL_LIGHT
  2.    o.Albedo *= fresnel;
  3. #else
  4.  
An update would be nice. I got it working now in xy plane with single color, next step would be to vary the color by depth I get from a depth texture, and also edge foam. Would save me some work if that's already done. I target mobile so I only need low quality without reflections, not even cube map. And since it's a rather 2D style game, with a static top down camera perspective (only the distance varies), I don't need fresnel as well. I removed all sub shaders except the low quality shader, and from that I removed fresnel calculation. And I also removed specular, because it didn't look good. I only got specular reflections in the bottom right corner, maybe I should have tried changing the light. I also deactivated the water script, since it's only for reflection calculation!?! So at the moment I only use the animated normal map, and with depth color and edge foam that's almost all I need :-)
Title: Re: Tasharen Water
Post by: ArenMook on August 08, 2015, 11:56:43 PM
I was referring to the line in TasharenWater.cs, not the shader.

The water script does more than reflection calculations. It sets shader values, but if you've modified the shader yourself, whether you use them or not depends on your modifications.
Title: Re: Tasharen Water
Post by: uli on August 11, 2015, 04:23:29 PM
No "#ifdef WINDWARD" in TasharenWater.cs either. 
Title: Re: Tasharen Water
Post by: ArenMook on August 14, 2015, 11:29:12 AM
I'll put up an update shortly.
Title: Re: Tasharen Water
Post by: djemix on November 02, 2015, 07:59:16 AM
Hello!!
I've purchased the asset today, and in the demo scene I see the water only pink.

Attach the screenshot.

What can I do?

It's a clean and new project with Unity 5.1.4f PRO
Title: Re: Tasharen Water
Post by: ArenMook on November 04, 2015, 01:46:23 PM
Please import this package into a new project. You seem to have an "NGUI" layer there which implies you imported it into an existing project that has its own set of layers. Pink means a shader error -- what error do you see when you select the shader?
Title: Re: Tasharen Water
Post by: gensy on November 20, 2015, 04:28:22 AM
Hi, ArenMook, We also have the same problem with MainMe, our unity version is 4.6.6 and with the latest tasharen water, on samsung s6, when the camera x,z pos was 0, everything was ok, but when the camera move to large pos, the water was broken, just like the picture.
(http://120.131.2.137/Stars/Android/du2b.png)
waiting for you to reply, thank you!
Title: Re: Tasharen Water
Post by: ArenMook on November 25, 2015, 06:39:29 PM
It's likely a precision issue on mobiles. You can try opening the water shader and replacing all instances of "half" and "fixed" with "float" and see if that helps.
Title: Re: Tasharen Water
Post by: gensy on November 26, 2015, 08:32:00 PM
We tried it, but it didn't work. Did you met this problem on mobile before?
Title: Re: Tasharen Water
Post by: ArenMook on December 01, 2015, 08:19:55 AM
No, it's device-specific. Mobile devices vary greatly, and hardware designers often take "shortcuts" that speed up their devices a bit at expense of issues like these.