Search Unity

SUIMONO 2.0 - Interactive Water System

Discussion in 'Assets and Asset Store' started by chingwa, Jan 6, 2015.

  1. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    You can change dererred/forward mode in your camera render that Suimono is linked to.

    Was only wondering the same thing today with UFPS and swimming. So +1 on that.
     
  2. Goldenvale

    Goldenvale

    Joined:
    Feb 26, 2015
    Posts:
    86
    Hey,

    I've been looking for a water system for a while now and yours seems to be the best choice at the moment. But from what I've seen so far it lacks some quite important features, for instance:

    - There is no edge blending. Where the water touches the objects is not smooth.
    - You can't choose a normal map for the waves/reflection.

    If these are added it would fit my game and I'd buy it.
     
  3. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @radiantboy as @John G. mentioned you can change it under "rendering path" on your scene camera, or you can also change it in the Player preference settings.

    @Goldenvale There certainly is edge blending if you adjust the settings properly... :)



    ...and you can also replace the built-in textures with your own custom files. The waves rely on a normal map and a height map texture in order to render properly in 3d, so these two textures need to be authored together for best results.

     
  4. MarcopoloR

    MarcopoloR

    Joined:
    Feb 4, 2015
    Posts:
    114
    How is it coming with getting everything to work in forward rendering mode? Setting it to deferred mode with just Unity loaded does make the ugly brown splotches on the water surface disappear. Unfortunately using this with deferred rendering mode doesn't seem to work with my Relief Terrain pack asset. I think it is because RTP requires forward rendering. Even when I load RTP and change the player settings back to deferred rendering, I still get the ugly brown foam splotches all over my water surface. Has anyone had any luck using this with the RTP and not getting the ugly brown foam?
     
  5. Karearea

    Karearea

    Joined:
    Sep 3, 2012
    Posts:
    386
    Yes- there are directions in the RTP manual, that detail how to set up for deferred lighting. It's fairly involved but worth it. I've got Suimono and RTP working together in deferred and they look fantastic together.
     
    John-G likes this.
  6. MarcopoloR

    MarcopoloR

    Joined:
    Feb 4, 2015
    Posts:
    114
    Thanks, glad to hear there is a solution. I will look into that and hopefully have both working for me.
     
  7. Therian13

    Therian13

    Joined:
    Nov 24, 2013
    Posts:
    78
    Hello chingwa!

    Thank you for your help earlier!
    Everything is working great, except now when I go underwater my terrain disappears. it still renders the trees and grass, but the actual terrain mesh becomes invisible.
     
  8. Therian13

    Therian13

    Joined:
    Nov 24, 2013
    Posts:
    78
    Hello,

    I managed to isolate the problem.
    The terrain isn't becoming invisible, the Fog Spread is covering the terrain for some reason (but not any other object).

    I have attached some photos that show the error.
     

    Attached Files:

  9. Goldenvale

    Goldenvale

    Joined:
    Feb 26, 2015
    Posts:
    86
    @chingwa

    I can still see that it has a hard edge:
     
  10. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    He means like

    I think with more wiggly edges?

    rather than the more regular sided lip


    You are limited there by a couple of things, mainly resolution on the intersecting surfaces.
    @Goldenvale assuming you are targeting Desktop you could look over the dx11 tessellation stuff and potentially use a sine/sinc vector displacement pattern over that lip to get your wobbles. (I thought I noted that work had been started/done)

    It's not basic stuff and, to be fair, @chingwa really did use the term edge blending in it's generally accepted context of intersection driven graduating transparency. :)
     
  11. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @MarcopoloR I'm making some pretty good headway on the next update and there should be much better consistancy between Forward/Deferred modes going forward. The changes I'm making are not trivial though so I can't give a release date quite yet.

    @Therian13 does your terrain shader right to scene depth? also there may have been some unintended consequences of the last code snippet I sent you... adjusting the camera depth mode might work in some cases, but it also might be causing other issues elsewhere. But see above, I think the next update will help alleviate a lot of these conflicts.

    @Goldenvale Well sure, the reflections don't fade out... they will be pretty strong actually, depending on the view angle... but the water itself fades out. I can try adding a little bit of fade to the reflections, but it would have to be pretty subtle or it wouldn't be visually believable.

    @twobob I get the feeling your showing off in that last sentence :D and yeah resolution will certainly become an issue...
     
  12. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    More "Struggling to put into words exactly what I mean", as per usual ;)

    and reading back he really was just talking about the reflection overlay. meh.
    Wiggly edges are doable :p hehehe
     
  13. Therian13

    Therian13

    Joined:
    Nov 24, 2013
    Posts:
    78
    @chingwa

    I'm not sure. I use the default Terrain shader. I've never messed with it. Shaders are the bane of my existence, so I try to avoid messing with them.
     
  14. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    I know how you feel. :D
     
  15. Therian13

    Therian13

    Joined:
    Nov 24, 2013
    Posts:
    78
    Do you have a rough date when the next update will be coming out, by chance?
     
  16. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    Well, depending on how development goes I'd say within a few weeks... but I can't really get too specific yet.
     
  17. Therian13

    Therian13

    Joined:
    Nov 24, 2013
    Posts:
    78
    @chingwa
    Ok. Looking forward to it!
    Also, it does seem that the code you gave me is causing it to act that way.
    If I change the DepthTextureMode.DepthNormals back into DepthTextureMode.Depth, it renders the terrain again (but of course the previous issue starts again).

    Do you think it would be possible to have it detect when im underwater or not? That way I could just have it switch between the two. prob not the best solution but maybe good enough until the next update?
     
  18. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    Yeah sure, you can do the following instead...

    Code (JavaScript):
    1.         //UPDATE CURRENT CAMERA WITH CORRECT DEPTH BUFFER (forward rendering)
    2.         if (setCamera != null){
    3.             setCameraComponent = setCamera.GetComponent(Camera);
    4.             if (setCameraComponent.renderingPath == RenderingPath.Forward){
    5.                 //setCameraComponent.depthTextureMode = DepthTextureMode.Depth;
    6.             }
    7.         }
    8.         if (currentTransitionDepth > 0.0){
    9.                 setCameraComponent.depthTextureMode = DepthTextureMode.Depth;
    10.             } else {
    11.                 setCameraComponent.depthTextureMode = DepthTextureMode.DepthNormals;
    12.         }
     
  19. Therian13

    Therian13

    Joined:
    Nov 24, 2013
    Posts:
    78
    Ah, I just finished doing something similar.
    I have it on line 356
    Code (JavaScript):
    1.   if (underwaterRefractRendererComponent.enabled == false)
    2.                 {
    3.                  setCameraComponent.depthTextureMode = DepthTextureMode.DepthNormals;
    4.                     }
    5.                else if (underwaterRefractRendererComponent.enabled == true)
    6.                    {
    7.                    setCameraComponent.depthTextureMode = DepthTextureMode.Depth;
    8.                    }
     
  20. Therian13

    Therian13

    Joined:
    Nov 24, 2013
    Posts:
    78
    Either does the trick it seems,
    But I like yours better.
    Thank you very much chingwa!
    Sorry for the array of problems I keep sending your way...
    You are AWESOME!! :D
     
    twobob likes this.
  21. Goldenvale

    Goldenvale

    Joined:
    Feb 26, 2015
    Posts:
    86
    @twobob
    @chingwa

    What I meant was that the edge of the water doesn't blend with the shore. Now it looks like a plane intersecting the ground. You can still see a seam between them. It should be something like this:

     
  22. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    Defferred lighting fixed my issues! Looks great. But how do you customise it? I just got it looking perfect in play mode, copied the component, but when I pasted component values they did not put it back to what it was, And I cant customise in editor because the wireframe is covering it, and it looks totally different when I hit play.
     
  23. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @radiantboy the best way to work with suimono is to play your scene, edit the settings to your liking, then go down to the presets tab and press the "+new" to make a new preset with all your current settings. Then once you press stop on your scene, go down and select your new preset from the list and it will load all your saved settings the next time you press play.

    You can also update settings on an existing preset by pressing the "+" button to the right of the preset... this will take your current settings and add them to that preset.

    and finally, it's best to work with the preset system while you're playing your scene, as there are some functions that don't work properly in the editor mode (depth and foam for example).
     
  24. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    Aha! Thanks mate! Also do you know of any tutorials to get UFPS guy swimming like your demo girl ? :)
     
  25. Therian13

    Therian13

    Joined:
    Nov 24, 2013
    Posts:
    78
    @radiantboy
    I believe Speed Tutor on Youtube does a couple of videos on underwater stuff. He might have something for swimming.
     
  26. sk8terboy4

    sk8terboy4

    Joined:
    Mar 29, 2013
    Posts:
    29
    My character is walking on the water and is not going under the water. I have a collider and the water has a collider as well. It's 3rd Person so I have my cam as the camera object and my player controller as the target object. Any help? thanks
     
  27. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    Hi Sk8terboy4, make sure that your character object/collider is NOT on the "water" layer. Suimono uses this layer for it's own purposes, and other objects on this layer will not interact as expected with the water. Setting it to "Default" or any other layer should allow you to go under the water.
     
  28. sk8terboy4

    sk8terboy4

    Joined:
    Mar 29, 2013
    Posts:
    29
    @chingwa Thanks ;) I used masked for ground detection and I forgot to un-check the water layer... This asset is so cool by the way. I honestly don't know what else you could possibly put into this asset. I plan to use it my current project:
     
  29. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    976
    I can't seem to get infinite ocean to work. It works in the scene view, but not game view. What am I doing wrong?
     
  30. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @SunnySunshine great name! If the infinite ocean is working in scene view, then likely something else in your scene is interfering with the rendering in game view. There have been issues with the TimeOfDay sky asset recently... are you using this in your project?

    Also it could be an issue simply with using the Unity skybox, and if this is the case I have a solution that works in most cases. Take a look in the _EXTRAS folder at the BetterSkyBox asset. Adding this to your camera often fixes the depth issues with the default Unity skybox.

    If neither of the above apply to you then let me know.
     
  31. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    976
    @chingwa

    It's basically an empty scene, except for the default camera, light, and of course added suimono assets.

    Yes, adding the BetterSkyBox did fix it. However, I don't want this skybox. Is there really no other solution?
     
  32. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    You can either add in your own sphere-mapped texture, or you can switch it to "Horizon Fix" mode and it should still fix the background depth issues while showing your camera background.

    This will be less of a problem in Suimono version 2.1, as it will be moving over to Unity 5 exclusively and has built-in optimizations to get around this type of error.
     
    SunnySunshine likes this.
  33. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    976
    When is suimono 2.1 scheduled for release?
     
  34. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    It'll be a few weeks at least. I don't have a set release date. Because of the many changes/additions I'll likely be putting out an "experimental 2.1" version for testing on my website before the actual release version is published.
     
    John-G likes this.
  35. DesertRaven

    DesertRaven

    Joined:
    Jul 15, 2012
    Posts:
    137
    So I am assuming you are going to include PBS in the next update as well or is that not needed?
     
  36. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    PBS is already in and working for a version or two now. It isn't using the Unity 5 Standard shader.... but it does use it's own PBS algorithms based on published research.
     
  37. DesertRaven

    DesertRaven

    Joined:
    Jul 15, 2012
    Posts:
    137
    Okay that sounds great, I'm just trying to get it working in Unity5 and all I see is foam.
     

    Attached Files:

  38. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @DesertRaven yes this is a common issue currently with 5. The first possible solution is to switch to deferred rendering. If that still doesn't help you should temporarily turn off any image effects on your camera. You can read more about ways to address this here:
    http://tanukidigital.com/forum/index.php?topic=534.0

    The next update should address this annoying problem.
     
    twobob and DesertRaven like this.
  39. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    If you guys haven't seen the latest "Little Devil Inside" trailer then need to stop what you're doing and check it right now! Oh, and of course they're using Suimono 2.0 in their project :)

    Give them some support over on their Steam Greenlight page...

     
    MaximilianPs and twobob like this.
  40. Karearea

    Karearea

    Joined:
    Sep 3, 2012
    Posts:
    386
    I saw that yesterday and had a suspicion it was Suimono! Nice!!
     
  41. DesertRaven

    DesertRaven

    Joined:
    Jul 15, 2012
    Posts:
    137
    I just got a headache reading through the Suimono2 manual on how to apply the water to a custom mesh. Is there anyway you could improve your product in the way of making it simpler for none programmers, like me, to just drag and drop a water preset to a mesh? All I'm trying to do is to have some nice water in a pool, no waves, just the reflexions/refractions, caustics and transparency. Would be great if in future releases to have some simple presets with comprehensive sliders to set the values. Maybe get some inspiration from the guys at http://lumion3d.com/new-in-lumion-5/ Drag and drop, bang! Change some settings with a few sliders. Please optimise for Unity5 soon.
     
  42. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    This is probably a case where images speak louder than words... below should really be all you need to do in order to setup water on a custom mesh...



    Sorry for any headaches. Let me know if the above doesn't do what you want it to do. I'll check out that Lumion, thanks for the link!
     
  43. DesertRaven

    DesertRaven

    Joined:
    Jul 15, 2012
    Posts:
    137
    Hi "chingwa" okay this will make it easier thanks for the help. :)

    Edit: Okay I applied all the parameters as shown in the images, somehow the mesh still displays the standard material it was imported with.
     
    Last edited: Apr 21, 2015
  44. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    So I just read on your website that you've abandoned mobile as a platform? I purchased Suimono a year+ ago because it explicitly promised better mobile performance in v2. So that's disappointing, since everything I do has a mobile version. I don't see mention of that decision here, though. Is that really a final decision?
     
  45. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
  46. DesertRaven

    DesertRaven

    Joined:
    Jul 15, 2012
    Posts:
    137
    One more thing I was trying to get a grip on is the infinite ocean plane.
    When my controller is away from the shore, inland, I still hear the ocean sound as if I'm at the beach. Am I missing something? Does the terrain stop the water plane or does it just continue as a undercurrent beneath my terrain?
     
  47. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    The infinite ocean continues throughout your scene. You can turn off the ocean sound effects by going to the "SuimonoModule-->_sound_effects" object and remove the "abovewater sound" audio clip. This will remove it throughout the level though... if you want it to modulate based on how far you are from the shoreline then you would need to write your own code for this currently. In the future I may look into a more robust sound controller for this type of thing, but for now the ambient audio functionality is rather basic.
     
    DesertRaven likes this.
  48. MS80

    MS80

    Joined:
    Mar 7, 2014
    Posts:
    346
    Hi, I would like to know if anyone has already tested Suimono with the latest Unity 5.1 beta3?
    I read that some people was successful using Suimono with the Oculus Rift, now Unity have native VR support in the latest beta. => Does Suimono work with the new VR integration ??
     
  49. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    I haven't checked out any of the recent betas, and I don't have VR hardware to really test in any case. But a few Suimono users are seriously looking at VR in their projects and I imagine they might chime in here soon. :)
     
  50. MS80

    MS80

    Joined:
    Mar 7, 2014
    Posts:
    346
    It's really easy with the latest beta, all you need to do is to check vr support in the player settings. Maybe you could provide a simple small demo build once you have downloaded the beta (/if you plan to check out the beta)? Just an idea...
    Apart from that I am sure one of your customers could report some experiences, soon!