Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Ultimate Toon Water

Discussion in 'Assets and Asset Store' started by Gobla, Apr 1, 2014.

  1. Gobla

    Gobla

    Joined:
    May 28, 2012
    Posts:
    354
    The Ultimate toon water is an all-in-one solution for Cartoon/Toon water. Suitable for Windows/Linux/Mac/Web builds as well as mobile. Suitable for Unity and Unity Pro (see features).

    Demo scenes:
    Demo Scene
    Demo MiniGame


    Asset store:
    http://u3d.as/content/peculiar-developer/the-ultimate-toon-water/74C


    Features:
    • GPU rendered cartoon based water
    • Multiple dynamic physics waves
    • Two texture mixing
    • Texture/Color mixing
    • Texture size and movement
    • Wave steepness coloring
    • Water transparency
    • Cartoon wave particles (like in Zelda – The Wind Waker)
    • Floater particles
    • Automatic mesh generation
    • Automatic target following
    • Can be placed and moved anywhere while maintaining graphics and physics
    • Shoreline FX (PRO only)
    • Demo boat and floaters script (including particle FX)
    • Easy edit inspector
    • Runtime changes possible



    $8e0aea84-058d-4b2a-b094-a987337dbce0_scaled.jpg
    $dbf47a70-7d1d-4d02-bf3d-a474774fd0cd_scaled.jpg
    $b3990ecb-c1d4-416f-950b-df27c7e08f1f_scaled.jpg
    $fed2cb01-0711-4727-93be-1911b9c716ef_scaled.jpg
    $f1230a15-3cb8-49dd-a875-65a3341cf108_scaled.jpg
     
    Last edited: Dec 20, 2014
    Gekigengar and Cogent like this.
  2. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    Looks very nice and complete... At last a serious toon water !!!
    I like the demos. Great job !
    6R
     
  3. Gobla

    Gobla

    Joined:
    May 28, 2012
    Posts:
    354
    Thank you. That was what I was aiming for indeed.
     
  4. Rod-Galvao

    Rod-Galvao

    Joined:
    Dec 12, 2008
    Posts:
    210
    Hi,

    Great work Gobla!

    Is there a way to change the shader to achieve an effect similar to this one?

    http://tomkail.com/snowbound/

    I changed the waves to be "more polygonal" but had to reduce the water plane to 500. Also I couldn't produce a vertex-colored-specular-like effect. Is it possible?

    R.
     
  5. Gobla

    Gobla

    Joined:
    May 28, 2012
    Posts:
    354
    Hi Rod Galvao,

    It is possible. Basically you can cut the shader used for this in several pieces. Replace the part that renders the textures and colors, etc. with the cell-shader. Also you might have to set the normal to a different angle (can't recall right now).

    If more people want this I can include this in the package.
     
  6. SugarSores

    SugarSores

    Joined:
    Jul 4, 2012
    Posts:
    9
    Hey,
    I just bought this; love it!
    Could you go into more detail on how to make this into an actual sea? I imagine that you'd have to divide the sea into sections, similar to how you'd make an open world terrain, correct? I tried to make two planes of this "water" default, and they just snapped together. Also, is it possible to have the sunlight refract off the water, like the actual pro water does? I don't know if that's possible with it being a toon shader and all, but that would be breathtaking!
    Anyway, you have an amazing product; I'm so relieved I found this gem on the asset store!
    Keep up the good work!
     
  7. Gobla

    Gobla

    Joined:
    May 28, 2012
    Posts:
    354
    Hey Sarmagophilis,

    The best option to make a big ocean is by letting the toon water snap to a target. This can be a camera, boat, etc.
    If you open the Ultimate Toon Water Controller in the inspector you can see two fields of interest. The first one is:
    "Snap to Target". If you check the checkbox you will also see a "Target" field in which you can set the transform you want to water to follow. Waves are automatically adjusted to the position so from there it should work fine.

    I have been thinking of sunlight refraction, but it is somewhat troubling to implement. Either it loses it toon-fx or the refraction looks like an artifact of the rendering. But if I find a good option to implement this I will surely update the package.
     
  8. SugarSores

    SugarSores

    Joined:
    Jul 4, 2012
    Posts:
    9
    Hey,
    So...there are times where the water doesn't appear correctly in the editor unless I'm in the demo...I think I'll just change the demo water to the prefab water.
    Also, can you help me with the "floater" script thing? I'm making other boats and items based on it (hope that's ok), and I'm unsure how it works.
     
  9. Gobla

    Gobla

    Joined:
    May 28, 2012
    Posts:
    354
    What do you mean with "appears correctly"? Do you perhaps have a screenshot?

    As for the floater script, what do you want to know about it? The demo boat is a great start if you want to make other boats.

    The floater principle is that you have 4 floater points for each object. The object is being pushed upwards on those 4 points relative from the height of the water. You can make a version with 3 points or more if your object requires it.
    What basically needs to happen is that the floaters you have are above your center of gravity so your object doesn't tip over. Each object has 4 floaters (which I placed on the empty transforms). The position of these floaters is being checked versus the water height. If the floater is below the surface of the water, it produces a force upwards. If it is just a little bit underwater it produces a small force while being further underwater it produces a bigger force. Then if the object is nearing to leave the water it will apply a certain drag to prevent it from launching out of the water. This is not 100% scientifically correct, but it has a realistic feeling to it. I've also implemented the sticky function. If you don't fix your rigidbody to a certain x and z position you can enable sticky to make the object slowly drift back towards to it's original position.


    Hope that this helps.
     
  10. SugarSores

    SugarSores

    Joined:
    Jul 4, 2012
    Posts:
    9
    Suggestions: Could you make the "Center of Mass" variable have a gizmo in scene view? That'd be might helpful.
    Also, I've gotten a boat to stay afloat for a little bit but it has some problems (I realize your marketing the water, and not the boat; so forgive me).
    The boat will stay afloat but if I stop moving it will begin to sink. I have it floating with 4 empty children, I think the problem is the center of mass.
    Could you perhaps give me your email? I have some inquiries I'd like to run by you in private. I feel as though, we'll be in contact quite a bit.
     
    Last edited: Sep 17, 2014
  11. Gobla

    Gobla

    Joined:
    May 28, 2012
    Posts:
    354
    Check your PM.
     
  12. 3dFoin

    3dFoin

    Joined:
    May 30, 2011
    Posts:
    631
    I played the demo and now I'm having seasickness :confused: very nice water BTW
     
  13. Gobla

    Gobla

    Joined:
    May 28, 2012
    Posts:
    354
    Haha, well thanks you and good luck with the seesickness ;).
     
  14. Gobla

    Gobla

    Joined:
    May 28, 2012
    Posts:
    354
    Updated and submitted the newest package of Ultimate Toon Water.
    The demo scene: http://peculiardeveloper.com/u3d/UltimateToonWaterDemo/ was updated.

    For existing users, there is going to be an important change:
    A more modular and optimized version of UTW was introduced in this package. This will replace the old version over time. Migration is very simple and should take no more than 10 minutes (when taking things very very slow, read every detail there is, etc.). I hope you understand that this is necessary and will result in a better version. You are of course free to use the Legacy version that will be included in the package, but doesn't receive all the updates there are.

    The manual will contain the upgrade instructions to upgrade from legacy to the latest version. I have complete faith that the upgrade will go fine in most cases, but if there are any questions you are free to ask them here. I will answer these as soon as possible.



     
  15. Gobla

    Gobla

    Joined:
    May 28, 2012
    Posts:
    354
  16. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    706
    Adding to instabuy list.
     
  17. Rod-Galvao

    Rod-Galvao

    Joined:
    Dec 12, 2008
    Posts:
    210
    Hi,

    How to turn off wave particles? I tried to set "wave particles" to "none" but it is still being created at runtime.

    R.
     
  18. Gobla

    Gobla

    Joined:
    May 28, 2012
    Posts:
    354
    Can you tell me if you use the legacy or the new version? This is a bug known to some older versions. Since I've removed the wave particles as an integrated system and is now just an additional child transform of the UTW controller I recommend updating if you still use an older version.
     
  19. Gobla

    Gobla

    Joined:
    May 28, 2012
    Posts:
    354
    It seems that Unity 5's rigidbody.AddForceAtPosition is broken. To be more precise, the torque created by the force seems to be miscalculated (wrong origin? not evenly distributed over time? perhaps even from the world origin or so?) resulting in popping, spinning, etc. This is so far out of my control to fix and regrettably we have to wait for a fix in Unity's Physics engine until this is resolved.

    Sorry for the inconvenience.
     
  20. Boercam

    Boercam

    Joined:
    Feb 25, 2015
    Posts:
    6
    Hi Gobla,

    I emailed you this before I found this thread (so disregard the email if you read this first) - has any progress been made on the Unity5 issue/upgrade?
     
  21. Gobla

    Gobla

    Joined:
    May 28, 2012
    Posts:
    354
    It works again due to an upgrade by Unity self. Unity version 5.0.1 solves the rigidbody issue but. This version has to be downloaded manually in most cases. Also if the problem still exists after installing 5.0.1 (it shouldn't but could occur), reimport the package so the code is forced to be recompiled.

    The official Unity 5 upgrade of UTW will be postponed for a few weeks since I am updating Dimensions & Portals now. This current version of UTW completely works fine in Unity 5 but requires you to set a few "Convex mesh collider" flags to remove the "Unity No Longer Supports Non-Kinematic, Non-Convex colliders" message.
     
    Boercam likes this.
  22. Boercam

    Boercam

    Joined:
    Feb 25, 2015
    Posts:
    6
    That's brilliant. I appreciate your prompt response!
     
  23. Gobla

    Gobla

    Joined:
    May 28, 2012
    Posts:
    354
    The official Unity 5 version is coming soon with Unity 4 Support as well.

    Fixes so far:
    - Fixes Unity 5 rigidbodies acting up weird.
    - Fixing shorefoam effect colliding on itself.
    - Fixed rendering of holes in water in certain render methods.
     
  24. Charles-Van-Norman

    Charles-Van-Norman

    Joined:
    Aug 10, 2010
    Posts:
    86
    Hello, I cannot get buoyancy / float to work correctly. No matter what I do the object "bobs" above and below the water surface which is very annoying. I did some debug checks and I can see that the "targetYPos = UTW.getHeightByPos(actionPoint);" in "FloatingObject.cs" does NOT return the actual height of the water at that point. I can't figure out why, but the action point does NOT match the height of the water, but instead goes above and below the water which is causing the bobbing.

    Are you aware of this issue, or do I have something in my setup I can do to make this go away? To be clear, what I want is for my object to sit exactly on top of the water at all times without bobbing up and down relative to the surface of the water. In other words, the object should never go below the surface of the water even a little bit.

    Thanks!
     
  25. Juryiel

    Juryiel

    Joined:
    Feb 15, 2014
    Posts:
    21
    I guess a solution for shore foam is not possible without pro?
     
  26. Gobla

    Gobla

    Joined:
    May 28, 2012
    Posts:
    354
    That is some very odd behavior. Do you have any screenshots that show the issue? I've tested this with a sphere that is not affected by any force and is updated in the y-position by the getHeightByPos and it follows the surface exactly.
    If it is not affected by other forces than that may be a solution. If you want other forces to interact, the demo script's for buoyancy have been made as a pseudo-buoyancy (easier to understand) than it is correct that the action point is the first point where the buoyancy starts to interact and creates an upwards force. However that is not a maximum force and thus not the position of the water-object intersection (like in real word cases). But please provide some screenshots if you can (preferably in the scene with gizmo's enabled).

    In Unity 4 using pro is the only solution. In Unity 5 you can use shore foam in personal as well.
     
  27. Juryiel

    Juryiel

    Joined:
    Feb 15, 2014
    Posts:
    21
    Great, will pick this up when Unity 5 version becomes available :)
     
  28. Fariel

    Fariel

    Joined:
    Feb 9, 2013
    Posts:
    29
    I was going to post a bug report, but it seems you're already aware of it. Any update on when a Unity 5 version will be released? =)

    Interestingly enough, I still appear to be getting holes in the water. They're not exactly holes, but they render as giant white spots in the water. If I turn on HDR they're much more visible as solid blue-colored patches.

    I've tried messing with all of the settings and discovered that if the waves are next to non-existent, then there are no holes. It appears to be created when the water dips down below its normal plane.

    Any idea on how to fix it? I love the water.

     
  29. Gobla

    Gobla

    Joined:
    May 28, 2012
    Posts:
    354
    The u5 version was accepted yesterday and should be available in the asset store.
     
  30. Fariel

    Fariel

    Joined:
    Feb 9, 2013
    Posts:
    29
    Thanks. It works wonders. :) Curious question: Is there any way to apply lighting to the water?
     
  31. Gobla

    Gobla

    Joined:
    May 28, 2012
    Posts:
    354
    I am working on making a decent version for the lighting. However expect this to be done over 2 months or later.
     
  32. ElSanto84

    ElSanto84

    Joined:
    Nov 21, 2013
    Posts:
    7
    You Wrote that you have submitted a Unity5 compatible version. But when i Open UTW in unity5 i get a lot of errors...
     
  33. ElSanto84

    ElSanto84

    Joined:
    Nov 21, 2013
    Posts:
    7
    Ok - read the whole thread now. Sorry forget my previous post :)
     
  34. raziel786

    raziel786

    Joined:
    May 6, 2014
    Posts:
    22
    Hi there,

    I purchased this asset few weeks ago but I am having a little trouble with it. I have a speed boat that I want to use. I have applied all the scripts, and floaters but the boat just sinks. I have messed around with the mass uplift and water down drag and either the boat floats, or just flies up in the air. I have emailed you but had no response. Can you give me some tips how to resolve it, or if possible can I PM you my project to look at?
     
  35. Gobla

    Gobla

    Joined:
    May 28, 2012
    Posts:
    354
    Hi there,

    My apologies, I must have missed the email. It is important to add some rigidbody drag as well. Also make sure that the y-offset is a respectable range, lower ranges give more "jumpy" boats.

    If this doesn't work, can you post a screenshot of the inspector for your boat (with the rigidbody and the simpleboatcontroller?).

    Also feel free to PM me so I can look closer into this (e.g. by sending a stripped down part of the project with just the boat and some water).
     
  36. omgketchup

    omgketchup

    Joined:
    Mar 28, 2012
    Posts:
    41
    Is it possible to sync this over a network? Two boats on separate clients riding the same wave?
     
  37. Gobla

    Gobla

    Joined:
    May 28, 2012
    Posts:
    354
    Yes. If you have the same config file and sync the time parameter for the water all clients should have the same water. It is not implemented by default but if you are experienced with networking it should be very easy to implement.