Author Topic: Tasharen Water  (Read 125820 times)

smtabatabaie

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

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tasharen Water
« Reply #106 on: March 13, 2014, 06:20:53 AM »
Ah yes, iOS... I'll PM you an alternate version that should take alpha into consideration.

capitalj

  • Jr. Member
  • **
  • Thank You
  • -Given: 5
  • -Receive: 0
  • Posts: 88
    • View Profile
Re: Tasharen Water
« Reply #107 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?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tasharen Water
« Reply #108 on: March 20, 2014, 02:42:35 AM »
Well, yes -- one of the parameters controls tiling.

ShinfoKensei

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

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tasharen Water
« Reply #110 on: March 24, 2014, 06:43:00 PM »
That just tells you that you already have a SetRenderQueue script.

ShinfoKensei

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

ArenMook

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

EvgeniyN

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



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!

ArenMook

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

EvgeniyN

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




ArenMook

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

EvgeniyN

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

Bottom one doesn't reflecting correctly.

If I put script on bottom plane - top one going crazy :-(


I'm staring to think it's impossible to fix right now :-(

ArenMook

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

EvgeniyN

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


If we turn off the script on the top water plane - bottom is back to normal, but top is going crazy:


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.