Author Topic: Tasharen Water  (Read 112965 times)

Chu

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Re: Tasharen Water
« Reply #165 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...

voncarp

  • Jr. Member
  • **
  • Thank You
  • -Given: 13
  • -Receive: 2
  • Posts: 91
    • View Profile
Re: Tasharen Water
« Reply #166 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;

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tasharen Water
« Reply #167 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.

huevoquilmes

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 10
    • View Profile
Re: Tasharen Water
« Reply #168 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!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tasharen Water
« Reply #169 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.

huevoquilmes

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 10
    • View Profile
Re: Tasharen Water
« Reply #170 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!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tasharen Water
« Reply #171 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.

Ha7den

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Black reflection?
« Reply #172 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?



ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tasharen Water
« Reply #173 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?

neojac

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Re: Tasharen Water
« Reply #174 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?




ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tasharen Water
« Reply #175 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".

uli

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: Tasharen Water
« Reply #176 on: June 11, 2015, 05:29:02 PM »
Hi, is it possible to use the water in xy-plane?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tasharen Water
« Reply #177 on: June 12, 2015, 08:15:55 AM »
Yes, but you will need to modify the shader, uli.

uli

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: Tasharen Water
« Reply #178 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?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tasharen Water
« Reply #179 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.