Search Unity

[RELEASE] Calm Water

Discussion in 'Assets and Asset Store' started by Phantom_X, Jan 22, 2016.

  1. Phantom_X

    Phantom_X

    Joined:
    Jul 11, 2013
    Posts:
    236
    Hey,
    The bug is on the grabPass that's responsible for the distortion and the coloring of the underwater. It is a built-in unity command and there is no way to change it. One possible solution would be to use command buffers to generate the screen grab instead, but this would require a major and not trivial change of the asset.
     
  2. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    697
    Hello Yan,

    I own your Calm water asset and I was looking at your stylized fog. Would that fog work together with your water asset in order to create a more convincing underwater fog. My plan would be to use your stylized fog gradient to create the fog closer to the surface lighter and further from the surface darker ( imitating light scattering effect).

    I work in forward path.

    Please let me know

    Regards,
    Carlos
     
  3. Phantom_X

    Phantom_X

    Joined:
    Jul 11, 2013
    Posts:
    236
    Hi,
    Unfortunately it won't work for two reasons, first StylizedFog limitation is that it works only on objects that writes to the depth buffer and CalmWater does not. Second reason is that the fog is more of a distance fog, you have no control on the height of the fog like the underwater fog from the asset.
     
  4. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    697
    Thank you Yan. I appreciate your help as always.

    Regards,
    Carlos
     
  5. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    697
    Hello Yan,

    In the last version of your water the reflection is very very low resolution, how can I change the resolution of the reflection?

    Regards,
    Carlos
     
  6. KristoferBoman

    KristoferBoman

    Joined:
    Feb 16, 2016
    Posts:
    57
    Hi,

    I recently started using Calm Water and i think it's great! However i made a iOS build yesterday and noticed it does not behave as it does in the editor (See dropbox link). I'm using Unity 2017.2.0p4 and the single sided shader, iPhone 7 iOS 11.2.

    https://www.dropbox.com/s/9oxigy17rgkghof/CalmWater_iOS.mp4?dl=0

    Thanks,
    Kristofer
     
  7. Phantom_X

    Phantom_X

    Joined:
    Jul 11, 2013
    Posts:
    236
    Hey,
    Normaly you should have a quality option on the mirror reflection script. This setting controls the resolution of the reflection texture. You can try setting it to a higher quality level to get better resolution.
     
  8. Phantom_X

    Phantom_X

    Joined:
    Jul 11, 2013
    Posts:
    236
    Hey,
    unfortunately I don't have an IOS device to test it out, but I can try to help you.
    • What are your quality settings for IOS?
    • Is there one directional light affecting the water on IOS or are your pixel lights disabled on this platform?
    • Do you have the CameraDepthMode script added to your main camera?
    • Is the scale of your water plane [1,1,1] ?
    • Does your water plane have tangents and normals generated?
    Also if you can provide me with a reproduction project including the relevant assets I will have a look!
    thanks!
     
  9. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    697
    Yan,

    I didn't have any quality options of my reflection script, but I created one for the size of the texture that is created in the script. The problem was that somehow I have to restart Unity everytime I change the texture size in order for the changes to take effect in the game view. But I already did so. Any ideas about what could be making this refleshing problem happen?

    Regards,
    Carlos
     
  10. KristoferBoman

    KristoferBoman

    Joined:
    Feb 16, 2016
    Posts:
    57
    Hi,

    • What are your quality settings for IOS?
    • A: We use custom quality settings, the Pixel Light Count is set to 10
    • Is there one directional light affecting the water on IOS or are your pixel lights disabled on this platform?
    • A: We use one direction light for the water, no other real time lights.
    • Do you have the CameraDepthMode script added to your main camera?
    • A: Yes
    • Is the scale of your water plane [1,1,1] ?
    • A: We used the "Create water plan" tool to generate it and it has [1,1,1] scale.
    • Does your water plane have tangents and normals generated?
    • A: I guess?
    I'll go ahead and try it in a empty project and if the problem exist there as well ill send it to you.

    Thanks,
    Kristofer
     
  11. KristoferBoman

    KristoferBoman

    Joined:
    Feb 16, 2016
    Posts:
    57
    I should add that everything works fine on Android so it seems to be specific to iOS. As you can see in the video the water is not rendered when looking directly in opposite to the light direction.

    Also i should mention that we use cubemaps for reflection.
     
  12. Phantom_X

    Phantom_X

    Joined:
    Jul 11, 2013
    Posts:
    236

    hey,
    if you contact me by email I will send you some debug shader for you to test so we can find what is wrong!

    Thanks!
     
  13. KristoferBoman

    KristoferBoman

    Joined:
    Feb 16, 2016
    Posts:
    57
    I sent you a DM with my email adress here on the forums.

    Thanks!
     
  14. Phantom_X

    Phantom_X

    Joined:
    Jul 11, 2013
    Posts:
    236
    hummm maybe the rendertexture doesn't get destroyed when you exit play mode and thus don't create a new one with the different resolution when you go back to play mode?

    You probably don't have the latest version of the reflection script then, if you are on unity lower than 5.6 you probably don't have access to the update, I can send you the latest version of the reflection script in PV, it should work with older version of the shader too.
     
  15. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    697
    I work with Unity 2017 2.0p1, which is the latest stable for Xbox One. Could you please send me the latest version of the Reflection Script then? I had changed the script to not use occlusion culling by the camera, since the reflections disappear straight at front of the camera which is not pretty.

    Regards,
    Carlos
     
  16. Paratope

    Paratope

    Joined:
    Jun 27, 2017
    Posts:
    20
    Hi there, I was interested in purchasing this asset, but am worried about single-pass compatibility. Has Unity fixed the bug related to single-pass rendering on their end?
     
  17. Phantom_X

    Phantom_X

    Joined:
    Jul 11, 2013
    Posts:
    236
    Paratope likes this.
  18. Paratope

    Paratope

    Joined:
    Jun 27, 2017
    Posts:
    20
    Thanks for the prompt reply. Would you be open to a refund if the asset doesn't perform in v2018.1? Or are all sales final?
     
  19. Phantom_X

    Phantom_X

    Joined:
    Jul 11, 2013
    Posts:
    236
    of course refund is accepted if you are not satisfied.
     
    Paratope likes this.
  20. erpatton

    erpatton

    Joined:
    Oct 6, 2014
    Posts:
    49
    Hi! I love the way your water looks and have it in my cart ready to buy, but I have a question before I checkout:

    Does this support holes in the mesh? I have an island in my game, and there are several parts of the landmass that go underneath the water level, but I don't want them filled with water. Can I use a custom mesh that allows me to "cut out" those sections of the water plane?
     
  21. yverde_bhvr

    yverde_bhvr

    Joined:
    Mar 30, 2018
    Posts:
    1
    Hi,
    Yes you can use custom mesh no problem! Same if you want to create only a strip of mesh with straight uv to make it look like a small river and the water will follow the curve of the mesh when it turns, you can do it!

    Just be sure to have normals and tangent in your mesh import settings and leave the scale of the mesh to(1,1,1) if you plan to use displacement.

    Don't hesitate if you have any other questions!
     
  22. Pollawat

    Pollawat

    Joined:
    Aug 27, 2016
    Posts:
    156
    Hello, I'm a newbie and also not good at English either.



    As you can see the water disappears while the other effects active. How can I fix that?

    Please...
     
  23. Phantom_X

    Phantom_X

    Joined:
    Jul 11, 2013
    Posts:
    236
    Hi,
    I'm not exactly sure what your effect is, particle system with shader that writes in z maybe?
    This seems like a z-ordering issue with your effect. You will need to either change the rendering order on your effect's material or on the water's material so that the water has a lower render order than your effect.
     
  24. Pollawat

    Pollawat

    Joined:
    Aug 27, 2016
    Posts:
    156
    Thank you very much, the problem is I can't find the render order in the water material, I scroll down to the bottom as usual but I cannot see it, where can I find those number?
     
  25. Phantom_X

    Phantom_X

    Joined:
    Jul 11, 2013
    Posts:
    236
    Hi,
    Right since it's a custom inspector it's not there by default, I will try to include this in the next update. For now you can just set the inspector in debug mode, there you will have access to the render queue.

    this video shows how to set the inspector to debug mode in case you don't know


    Thanks!
     
  26. RPowers

    RPowers

    Joined:
    May 14, 2015
    Posts:
    91
    Hi. I've been using this pack for a while now for a VR project and it looks great. Do reflections work in VR yet or is that still an issue?
     
  27. Phantom_X

    Phantom_X

    Joined:
    Jul 11, 2013
    Posts:
    236
    Hi,
    realtime reflection is still an issue as it would be very expensive for VR, however if you really need it you could use realtime reflection, you could to a realtime cubemap with a technique like this one: http://twiik.net/articles/realtime-reflections-in-unity-5

    I have been working on other features for the next release and still have other priorities before I do Realtime reflection for VR so don't wait too much for it.

    Best regards
     
  28. RPowers

    RPowers

    Joined:
    May 14, 2015
    Posts:
    91
    Ok thanks a lot for the response.
     
  29. hopoo

    hopoo

    Joined:
    Jul 26, 2016
    Posts:
    4
    Hi,

    The reflections look great. However, when I plug a cubemap into the Reflections, I seem to get these strange aliasing artifacts, like the normals are using point filtering. This is using the included water material and normals - the cubemap resolution is 1028, and looks fine when I reduce the normal strength. This is in deferred Unity 2017.
     

    Attached Files:

  30. Phantom_X

    Phantom_X

    Joined:
    Jul 11, 2013
    Posts:
    236
    Hi!
    I think it's the distortion in the reflection that is too strong and causing this. In the next release there is going to have a slider to control the amount of distortion that gets applied to the cubemap, but unfortunately there is no way of controlling that via the exposed parameters at the moment. If you need it now now, contact me in private I will show you how to reduce the amount of distortion by hand in the code.

    Thanks!
     
  31. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    225
    Hi @Phantom_X -- great asset, thanks!

    Just to let you know - I cannot access the docs site URL if I'm signed into any of my Google accounts, it gives me a weird permissions error. So I have to access via another web browser that's not signed in.

    // WildStyle
     
  32. hopoo

    hopoo

    Joined:
    Jul 26, 2016
    Posts:
    4
    Please send me a PM if possible - thanks!
     
  33. Phantom_X

    Phantom_X

    Joined:
    Jul 11, 2013
    Posts:
    236
    Hi,
    Thanks for the info!
    I double checked and the sharing setting is set to "Anyone can find and view" so that's odd, but if you still can't access it, send me your email address in PV and I will manually add you the list to see if it helps.
     
  34. Adam_Starcaster

    Adam_Starcaster

    Joined:
    Dec 7, 2012
    Posts:
    36
  35. Phantom_X

    Phantom_X

    Joined:
    Jul 11, 2013
    Posts:
    236
    Hey,
    Only shader made with the shadergraph are going to work with the HDRP and LWRD, so no for the moment.
     
  36. unity_dev3194

    unity_dev3194

    Joined:
    Apr 17, 2017
    Posts:
    45
  37. Phantom_X

    Phantom_X

    Joined:
    Jul 11, 2013
    Posts:
    236
    Hi!

    Just to be clear, instancing is giving you performance boost only if you have hundreds of water planes in your scene. If you only have a couple the overhead given by the instancing is going to make it slower. So unless you have a map composed of hundreds of different water object it's not going to help.

    What is your use case exactly?
     
  38. unity_dev3194

    unity_dev3194

    Joined:
    Apr 17, 2017
    Posts:
    45
    Right, but Single Pass Instanced stereo rendering mode is different from just instancing materials. It cuts render thread time in half for all opaques / transparent objects and also helps with the user mode driver performance. All shaders being used in the scene have to support SP Instanced render mode in order for me to use it. Oculus calls it "multi-view" and recommends it over multi-pass and single-pass.
     
  39. Phantom_X

    Phantom_X

    Joined:
    Jul 11, 2013
    Posts:
    236
    Haaa I see, I wasn't aware of this mode. I guess I can try to add it since it doesn't seems to be a big change at first glance.
     
    unity_dev3194 likes this.
  40. unity_dev3194

    unity_dev3194

    Joined:
    Apr 17, 2017
    Posts:
    45
    Great, any idea what when you can push an update?
     
  41. Phantom_X

    Phantom_X

    Joined:
    Jul 11, 2013
    Posts:
    236
    Will try more in depth this weekend and see how it goes
     
  42. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    396
    Hi - this asset looks great, does it work fully in VR?
    Are there some underwater effects in VR?

    Thank you
     
  43. Phantom_X

    Phantom_X

    Joined:
    Jul 11, 2013
    Posts:
    236
    Hi,
    Most of it work in VR, only the realtime reflection don't. There is some underwater effect, but to be honest I haven't touched the underwater effect in a while and I can't remember if it works with VR. I will be at GDC for the whole week so can't look into that right now, but will check when I come back!
     
    iddqd likes this.
  44. marcusudk

    marcusudk

    Joined:
    Nov 24, 2012
    Posts:
    8
    Anyone else having the issue where the shader shows up in "In game view" but not "Scene view"? Does it has something to do with these warning here?

    Thanks

    upload_2019-4-27_16-30-44.png
     
  45. Phantom_X

    Phantom_X

    Joined:
    Jul 11, 2013
    Posts:
    236
    I think that might be because you are in forward rendering and you did not add the cameradepthmode script on your main camera
     
    marcusudk likes this.
  46. marcusudk

    marcusudk

    Joined:
    Nov 24, 2012
    Posts:
    8
    Ok we are going to investigate this now, thanks for the quick response.
     
  47. philc_uk

    philc_uk

    Joined:
    Jun 17, 2015
    Posts:
    79
    Hi, getting some mirror reflection errors.. Unity 2017.4

    Screen position out of view frustum (screen pos 147.000000, 0.000000, 1000.000000) (Camera rect 0 0 147 79)
    0x00000001412FF2E6 (Unity) StackWalker::GetCurrentCallstack
    0x00000001412FFE8F (Unity) StackWalker::ShowCallstack
    0x00000001411BE500 (Unity) GetStacktrace
    0x00000001406DFEC3 (Unity) DebugStringToFile
    0x00000001406E06A1 (Unity) DebugStringToFile
    0x00000001403FB75A (Unity) Camera::ScreenToWorldPoint
    0x00000001403FBEB2 (Unity) Camera::CalculateFarPlaneWorldSpaceLength
    0x0000000140682FC9 (Unity) GetScriptableCullingParameters
    0x00000001403FEB79 (Unity) Camera::CustomCull
    0x0000000140401E97 (Unity) Camera::StandaloneCustomRender
    0x0000000140402818 (Unity) Camera::StandaloneRender
    0x0000000141433CD7 (Unity) Camera_CUSTOM_Render
    0x000000004D89A8ED (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Camera:Render ()
    0x000000004D8B1530 (Mono JIT Code) [MirrorReflection.cs:265] CalmWater.MirrorReflection:RenderReflectionFor (UnityEngine.Camera,UnityEngine.Camera)
    0x000000004D8AC472 (Mono JIT Code) [MirrorReflection.cs:138] CalmWater.MirrorReflection:RenderHelpCameras (UnityEngine.Camera)
    0x000000004D8ABF13 (Mono JIT Code) [MirrorReflection.cs:155] CalmWater.MirrorReflection:WaterTileBeingRendered (UnityEngine.Transform,UnityEngine.Camera)
    0x000000004D8ABD31 (Mono JIT Code) [MirrorReflection.cs:166] CalmWater.MirrorReflection:OnWillRenderObject ()
    0x000000000C6382B2 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
    0x00007FF9945764D7 (mono) [mini.c:4937] mono_jit_runtime_invoke
    0x00007FF9944C8A31 (mono) [object.c:2625] mono_runtime_invoke
    0x0000000140A3816C (Unity) scripting_method_invoke
    0x0000000140A2BADA (Unity) ScriptingInvocation::Invoke
    0x00000001409F6978 (Unity) MonoBehaviour::HandleNotifications
    0x00000001403C1211 (Unity) MessageHandler::HandleMessage
    0x00000001403C9264 (Unity) GameObject::SendMessageAny
    0x00000001403C92D2 (Unity) Unity::Component::SendMessageAny
    0x00000001403E8C55 (Unity) InvokeOnWillRenderObject
    0x00000001403E8D1F (Unity) CullSendEvents
    0x00000001403F2E28 (Unity) CullScene
    0x00000001403FED02 (Unity) Camera::CustomCull
    0x0000000140400587 (Unity) Camera::Cull
    0x000000014047B9B8 (Unity) DoRenderScreenCamera
    0x000000014048CEC3 (Unity) RenderManager::RenderCameras
    0x000000014118B2BD (Unity) RepaintController::RenderGameViewCameras
    0x000000014134CEDD (Unity) EditorGUIUtility_CUSTOM_INTERNAL_CALL_RenderGameViewCamerasInternal
    0x000000004D8A3741 (Mono JIT Code) (wrapper managed-to-native) UnityEditor.EditorGUIUtility:INTERNAL_CALL_RenderGameViewCamerasInternal (UnityEngine.RenderTexture,int,UnityEngine.Rect&,UnityEngine.Vector2&,bool,bool)
    0x000000004D8A35FB (Mono JIT Code) [EditorGUIUtilityBindings.gen.cs:793] UnityEditor.EditorGUIUtility:RenderGameViewCamerasInternal (UnityEngine.RenderTexture,int,UnityEngine.Rect,UnityEngine.Vector2,bool,bool)
    0x000000003CD83579 (Mono JI


    Any idea why?
    Thanks!
     
  48. Phantom_X

    Phantom_X

    Joined:
    Jul 11, 2013
    Posts:
    236
    Hey,
    I think this might be caused by a lot of things, have a look at this thread and try to find if any of these situations apply to you. https://forum.unity.com/threads/solved-screen-position-out-of-view-frustum.60851/
     
  49. tcourbet

    tcourbet

    Joined:
    Oct 5, 2017
    Posts:
    46
    Hi!
    Any update on potential hdrp support? (last time the question was asked was over 6 months ago :p)
     
  50. Phantom_X

    Phantom_X

    Joined:
    Jul 11, 2013
    Posts:
    236
    Hey,
    HDRP is too different to just 'support it', most of the core functions of calm water is just not available in HDRP. If I make a water shader for HDRP it will probably be a separate asset to keep it clean.