Author Topic: Tasharen Water  (Read 125750 times)

ArenMook

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

hexart

  • Guest
Re: Tasharen Water
« Reply #46 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.
« Last Edit: March 06, 2013, 03:01:52 AM by hexart »

Gorgor

  • Guest
Re: Tasharen Water
« Reply #47 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

ArenMook

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

Gorgor

  • Guest
Re: Tasharen Water
« Reply #49 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..

ArenMook

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

Gorgor

  • Guest
Re: Tasharen Water
« Reply #51 on: March 14, 2013, 07:17:07 PM »
Hoho..
now it works.. thanks a lot.. your support has no match:)

operatioapps

  • Guest
Re: Tasharen Water
« Reply #52 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!

ArenMook

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

operatioapps

  • Guest
Re: Tasharen Water
« Reply #54 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!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tasharen Water
« Reply #55 on: June 27, 2013, 05:07:29 PM »
But the high quality reflection already reflects the skybox...

operatioapps

  • Guest
Re: Tasharen Water
« Reply #56 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  :)

operatioapps

  • Guest
Re: Tasharen Water
« Reply #57 on: June 27, 2013, 07:13:51 PM »
Here is a better image to illustrate in more detail what I look for:

operatioapps

  • Guest
Re: Tasharen Water
« Reply #58 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 :)

ArenMook

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