Search Unity

Wave Creator - Real Waves in Unity!

Discussion in 'Assets and Asset Store' started by SP0KK0, Sep 21, 2013.

  1. SP0KK0

    SP0KK0

    Joined:
    Aug 18, 2012
    Posts:
    103
    Hi shahzad.naseem, I haven't tested Wave Creator on Android, the performance is on IOS is shown in this video:

    .

    Unfortunately there is currently an issue where if you look at the water from a short distance pixelation is apparent, I am in the process of fixing this issue and have had some good results so a fix should be on the way soon.
     
    Eric2241 and hopeful like this.
  2. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    There was a discussion here earlier about the pixelation issues on mobile devices, beginning at post #125, and SP0KK0 responded in detail in post #136. It seemed to be a Unity issue that affected other water packages as well. As for mobile performance, WC comes with several mobile optimized shader options that should provide acceptable performance. If you need specifics though, you'll need to wait for SP0KK0 to weigh in.

    Edit: Oops, looks like he beat me to it
    .
     
  3. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    181
    Hi
    I have been using WC for a while have just tried the new version - good work! A couple of questions:

    1) I want a large area of sea. 1000x1000 or bigger ideally. However if I go this big even the high res mesh has too low a resolution. I assume that having a bigger mesh would be OK if the fade out is set to a reasonable level - say 100 - in terms of performance? If I make a bigger mesh is there anything I need to be aware of?

    2) I'm having a problem with the reflection map. I have a sunset and the reflection is always offset. I have the SetCamPos script on the camera.

    Any thoughts?

    Thanks
     
  4. Andy3D

    Andy3D

    Joined:
    Jan 31, 2015
    Posts:
    42
    Hey James,
    Just bought your Wave Creator asset for a project that I need to deliver this week. Need to show an aerial scene with waves & shoreline effects on the coastline, and your asset looked like it would be absolutely perfect. Problem is, Im using WorldComposer for the terrains, and unfortunately it looks like they dont play well together at all.. Hopefully Im just missing something, and they can work together! Is there a particular order or knack to importing or creating terrains with waves, that I need to follow?
    I particularly need the waves, shoreline foam and edge effects. Ive got the waves working with a single terrain, but the transparent edge & foam effect dont show up - it cuts off sharply, with no fade.

    If there is no workaround, do you know of another realworld terrain builder that works off satellite imagery and heightmaps, that will work with WaveCreator? I need to deliver so am prepared to buy into a new asset to get this out of the door. Does your Landscaper Terrain Tools handle realworld terrain?

    thanks a lot for any advice
     
  5. SP0KK0

    SP0KK0

    Joined:
    Aug 18, 2012
    Posts:
    103
    Hi guys, thanks for buying Wave Creator.

    Redrag, Unity seems to limit the number of vertices in a mesh to 65536. This means you may be able to scale up the mesh a bit but not so much. I'm working on a way to create multiple Water Bodies at have them sync up, with the heightmap and the waves. In the meantime they may be a way for you to move the water body to the cameras position when the player isn't looking at the water body. In regards to your reflection map problem, can I have a screenshot of the offset so I try and diagnose the problem.

    Hi Andy3D, sorry about this problem you are having with WorldComposer. Wave Creator only works with one terrain, I'm not sure why the foam and edge fade effects are not showing up for you when using only one terrain. What does the heightmap Wave Creator generates of your terrain look like for you? (Landscaper Terrain Tool doesn't support realworld terrain)

    Thanks
     
    hopeful likes this.
  6. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    181
    Hi - here is a screen shot, showing offset reflection.
    sea.png
     
  7. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    Just curious, but how closely does your sun light object match your skybox sun? If you haven't already got it, you might want to get this script:

    Direction Helper Script

    Save it as DirectionHelper.cs, and place it in the Editor folder inside your project. You can then access it from the new Helpers menu. To use it, just rotate your scene view until the sun in your skybox is dead center. Select your sun object, run the script, and it will align the angle of the sun to its apparent direction in the skybox. Even though a directional light isn't supposed to care about location, I also like to move it so its apparent location, from the POV of the game area, matches the sun as well. This should help line up your reflection, and make sun flares appear in the right place as well. Hope this helps.
     
  8. unit102

    unit102

    Joined:
    Nov 13, 2014
    Posts:
    26
    Hi,

    Can you please try to fix wave creator for unity 5 while in beta before the final build ? my project needs it very badly :(
    so far I see unity 5 (reached over beta 20+), I don't use fog in my scene and there is no glitches, I think the script that gets attached to the Main camera is not working in Unity 5 as it supposed to be in Unity 4, the submerged script seems to be working fine, I test it a while ago)
    Everything looks great in Oculus DK2 in Unity 5 except wave creator (in Unity 4 Wave creator was the main event! I raised the waves and it was breath taking, quiet amazing to watch in every time I run my demo)

    I am using (beta 18)
    Please help, thanks.


    thanks.
     
  9. unit102

    unit102

    Joined:
    Nov 13, 2014
    Posts:
    26
    I found a bug, in Unity 5, if I enabled the "submerged script" it will causes shadow flickering in my scene (models, terrain regardless of raising the the overall Quality unless I disable shadow from the light..) in DK2 screen (i can see it happening in both, in Unity's editor and after building the project)
     
  10. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    Try editing the SubmergedEffect.cs script, and where it says "Camera.main.nearClipPlane = 0.01f;", increasing the value to something like 0.05 or 0.1. Having a near clip that low is great for instantly responding to surface transitions, but causes wicked z-fighting on everything else. I needed to change it with Unity 4 as well. This number should really be exposed in the Inspector, since it can have a huge impact on everything.

    +1 on fixing the WC Unity 5 fog issue. The fog in Unity 5 looks amazing... on everything except the water surface. It would be nice if it behaved like everything else in the scene. I did find this thread on the subject, if you want to take a crack at editing the shader yourself, but it would probably be better for all if SP0KK0 looked into it.
     
    Last edited: Feb 11, 2015
  11. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    181
    Thanks for the script - a good idea to keep everything lined up. Unfortunately it didn't change anything. I had a look at the tiling under 'Reflection' - thinking that i could maybe add an offset - but changing the parameters seems to make no difference. Any other ideas?
     
  12. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    I just tested this using the same skybox as your example, lined the sun up, refreshed the reflection cube map, and the reflection lined up fine with the sun. The only problem is that, unlike real sun reflections, it doesn't really follow the player's POV. Real reflections always form a straight line from your eyes to the sun, whereas in the game they are at a fixed angle. So when you move to the right of center, the reflections appear to angle off to the left a bit, and vice versa. I don't know what to do about this, as it appears to be a design limitation. You could make the sun always look at the player, but then you'd need to abandon using baked reflections, and do them all real time, which could slow things down a bit. It's always a trade off between total realism and performance.
     
  13. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    181
    I just tried your example scene and even there got the same problem. So I replaced the side of the skybox with the sun, with some test shapes. It clearly shows the reflection is offset - well actually it is squashed on one side. It doesn't matter how I move or rotate the camera, the reflection is always like this...

    sea2.png
     
  14. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    It looks like the light is still coming from where the sun is located on the original skybox image, even after you've replaced it. Have you tried using a totally different skybox, with the sun located somewhere else, and re-baking the reflections? I know this isn't really a solution, because presumably you want to use the skybox shown, but at least it would add more data, and tell us whether it's WC or the skybox that's acting weird. Other than that, I've got nothing. You may need to wait for SP0KK0 to get back to you with an answer.
     
  15. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    181
    I tried different skyboxes but most are so amorphous (is that a word?) that it doesn't really matter where the refection is. I would really like to sort this out - the reflections look great if they could just be in the right place!
     
  16. TheOneFreeMan

    TheOneFreeMan

    Joined:
    Feb 14, 2015
    Posts:
    2
    Is there any solution yet to the glitch where any light source between the camera and water suddenly illuminates the entire water shader? The water is absolutely stunning but it may be difficult for me to use it if this isn't fixed, as there are multiple necessary light sources in my scene, and my character uses a flashlight. It wouldn't be an issue if the affect on water was more localized to the light source, but it's like one light just brightens up the whole ocean in my case.
     
    Eric2241 and FargleBargle like this.
  17. KB

    KB

    Joined:
    Dec 9, 2012
    Posts:
    18
    Nice asset and, on a half decent PC I have a nice big square area with waves (no terrain, just sea) which is nice.

    It would be nice to have a few options/tweaks with the Float script as I find that I sometimes have things that should stay floating on the surface either noticeably above or below it, (& it's nice if scripts behave as you need them, out the box). Another option would be to have something where you can give the bow & stern (& even weight?) of a ship so it can react more realistically as obviously the float script just makes the whole thing lift up which becomes more unbelievable with massive ships.

    I added this empty script, WaterBodyID, to the Water Body object so I could then add a simple thing to find it without having to make my spawners tell prefabs etc. about the Water Body object:

    using UnityEngine;
    using System.Collections;

    public class WaterBodyID : MonoBehaviour {
    // This script is just so we can attach it to the Water Body object and then find it in the Float script
    }

    I then added these few lines to the Float.cs script so I don't have to tell it where the water body is because now I can easily find it (perhaps there's a better way). I guess you could have multiple water bodies in a scene in which case you could add a number or name to the WaterBodyID.

    void Awake()
    {
    if (waterBody == null)
    {
    WaterBodyID wbID = FindObjectOfType<WaterBodyID>();
    waterBody = wbID.gameObject;
    }
    }​

    Maybe there's a better way than that but it works so hope it helps someone.

    As for the problem with the Float.cs script, it looks like it should really interpolate along the direction of the wave to generate the correct height, (bearing in mind I have a massive ocean with quite large waves) so the error with a single point seems quite large? A buoy meant to be floating is repeatedly fully submerged to fully floating in the air!

    The only other point I like to ask about is that it seems I can have nice foam but (what I think is the sky box reflection) seems to wiz by as if the clouds are doing about mach 2. I tried blending out the sky box but the water looks too shiny & the foam is not as nice. Is there a tweak for how fast the clouds & foam move?
     
  18. KB

    KB

    Joined:
    Dec 9, 2012
    Posts:
    18
    OK, I twigged that one of the problems is giving the sea a big dimension. I assumed that the mesh would add vertices (or give an option to do so) but it doesn't. A variable mesh would be nice for bigger platforms. I'm wanting a sea size around 100K square but things seem not to look so good beyond about 2K square as the distance between vertices is too large.

    I tried having a second water body but it just sat there doing nothing so I can't multiply up that way it seems.

    I appreciate that a mesh as large as I'm talking about above is likely to cause a massive hit but I'd like to be the judge of what is acceptable on my applications (as some times I get work for a specific machine that has loads of grunt rather than a mobile or whatever). So, I'd like to see a variable mesh size when I create the water body without having to do the job myself please as it will benefit all your customers & I can get on with other stuff (& you know your product better than me so can probably code it really quickly... how about it?
     
  19. KB

    KB

    Joined:
    Dec 9, 2012
    Posts:
    18
    Just tried Wave Creator in the same project converted to Unity 5 and the mesh no longer deforms although the Float script is still moving stuff up & down as if the mesh has deformed. :-(
     
  20. TheOneFreeMan

    TheOneFreeMan

    Joined:
    Feb 14, 2015
    Posts:
    2
    I noticed the same thing. Everything else about Wave Creator's water seems intact in Unity 5, but there are no waves at all.
     
  21. cjrussel14

    cjrussel14

    Joined:
    Jun 20, 2014
    Posts:
    69
    when it will update to unity 5?
     
  22. Wilbert-Blom

    Wilbert-Blom

    Joined:
    Aug 13, 2011
    Posts:
    111
    I'm having a problem with Wave Creator in combination with Global Fog.
    When I switch to Direct3D 11 the whole ocean surface turns grey. When I turn off Global Fog, the waves reappear.

    More importantly, one of my clients is using this project on a computer with an ASUS HD7770 1GD5 graphics card and then the oceansurface is always grey (when Global Fog is on) even with Direct3D 11 off.
    This is a 'bare bones' project that shows the 'Direct3D with Fog' problem on my system: http://mbf.co/t7sauY
    Using Unity 4.6 and a GeForce GTX 660 Ti
     
  23. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    I'd really love this. Got an ETA on it?
     
  24. stigmamax

    stigmamax

    Joined:
    Jun 30, 2014
    Posts:
    312
    Hi,
    Do Wave runs unity 5 ?
    Thks
     
  25. Calebsem

    Calebsem

    Joined:
    Mar 17, 2015
    Posts:
    4
    Hi,

    Unity 5 seems to break the shaders : mobile ones don't even compile properly and the "desktop" one works but doesn't produce any waves, much like what @KB and @TheOneFreeMan described. So it's unfortunately unusable for Unity 5 :(

    going back to 4.6 makes it work, so this is really 5 specific. Any idea on when we could get a fix?

    Thanks
     
  26. SP0KK0

    SP0KK0

    Joined:
    Aug 18, 2012
    Posts:
    103
    Hi guys

    I have sent off a version which works with Unity 5, so it should be up this week. Calebsem, TheOneFreeMan and KB I will send you a link to download the Unity 5 version straight away.

    Wilbert Blom I will get round to working on your problem soon.

    Thanks
     
    hopeful and Calebsem like this.
  27. Calebsem

    Calebsem

    Joined:
    Mar 17, 2015
    Posts:
    4
    Wow that was fast! Waiting for your version then SP0KK0, thanks!
     
  28. stigmamax

    stigmamax

    Joined:
    Jun 30, 2014
    Posts:
    312
    Hi
    I would like more ocean than my land but if I enlarged the Water Body, the shape of my initial field appears and is distorted. How to proceed? I installed the latest version for Unity 5
    thank you


    Edit :
    For a great ocean, I followed the advice of FargleBargle but I do not make a black heightmap. If I edit putting black, the texture don't appears. Sorry for My bad english.

    Edit2:
    It's ok for me. I exported my land, I have expanded then I imported again. I have a lot of work to recover from the grass. But I Still have no waves !
     
    Last edited: Mar 23, 2015
  29. stigmamax

    stigmamax

    Joined:
    Jun 30, 2014
    Posts:
    312
    Float don't work. I have this message
    NullReferenceException: Object reference not set to an instance of an object
    WaveCreatorHelperFunctions.WaveFunction (Single x, Single z, UnityEngine.GameObject waterBody, Boolean fadeout) (at Assets/Wave Creator/Scripts/Other Scripts/WaveCreatorHelperFunctions.cs:74)
    Float.Update () (at Assets/Wave Creator/Scripts/Other Scripts/Float.cs:14)
     
  30. SP0KK0

    SP0KK0

    Joined:
    Aug 18, 2012
    Posts:
    103
    I think that float error is created because you set the water body variable of the float script to the water body asset not the water body object. When you click the variable to change it make sure you click 'scene' in the top-left on that window, this will show a list of gameobjects, then select the water body.

    I will send you an updated version of WC to fix the wave problem.
     
  31. MSFX

    MSFX

    Joined:
    Sep 3, 2009
    Posts:
    116
    Hey, this looks great, is the version for Unity 5 up on the AS yet? If I purchase today would you be able to send me the version for Unity 5, would need it quite quickly...

    Thanks!
     
  32. stigmamax

    stigmamax

    Joined:
    Jun 30, 2014
    Posts:
    312
    thank you SP0KK0, It's ok for Waves, Float and Underwater !!!!!
     
  33. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    I'd like to know when the version recompiled for the Unity 5 API will be put out to the Asset Store too. I mean Unity 5 does update it but with the new improvement to Unity 5 Personal & Professional Editions I think you can improve this product for your product.
     
  34. MSFX

    MSFX

    Joined:
    Sep 3, 2009
    Posts:
    116
    I'm quite interested/concerned regarding the mobile (phone) performance of this shader... your video shows it getting 30fps on an iPhone 4s/5s... it's quite common for games now to run at 60fps, even higher for VR... are you able to get this package running at 60fps on iPhone?
    Thanks,
    Matt
     
  35. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    Can you create a more cartoony ocean style with some transparency through to the bottom? I got one once that was well good using a combination of your product and Liquid v1 but I, duh, didn't save it as a prefab or anything. Not even sure how I did it now. :-(
     
  36. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    This shouldn't be much of a problem. You've got full control of transparency, for both shallow and deep water, and can use whatever texture you like for the water surface, from photo-realistic to hand painted to cartoon. So just replace the surface texture with whatever you have in mind, and adjust the transparency.
     
  37. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182

    Thanks, I've actually replaced your textures with others & it looks good even without your waves but now I need to figure out how to add back just the waves to the low res water texture your asset created (not that script that rocks the ocean back & forth) and later I need to add buoyancy. Those are the only two things I need to add yet.

    I can't seem to get the actually ripple of the waves in the water mesh working...the toony part of making ocean waves textures I've got.

    Like the ripple that is the waves in this video:




    Hmmm, OK, I looked at the video closer & the waves are an optical illusion. I wish I had kept a prefab earlier when I got it right. :-(

    The ones you have in that video are sufficiently 'cartoony' if you'd upload a prefab of the waterbody in that video for mobile & I can use that after I fix the broken references.

    Otherwise, I'll just keep my old setup, that looks like waves from afar but not when you get closer.

    Thanks.

    I made a new setup that's good for me...I'll try more authentic looking waves again in that future. Ciao.
     
    Last edited: Mar 30, 2015
  38. stigmamax

    stigmamax

    Joined:
    Jun 30, 2014
    Posts:
    312
    Hi,
    Underwater works, but sometimes the effect is disabled for several seconds in some waves.
     
  39. Wilbert-Blom

    Wilbert-Blom

    Joined:
    Aug 13, 2011
    Posts:
    111
    It's still Version: 2.3 (Sep 09, 2014) on the store? (almost 2 weeks later)

    Any luck with my 'problem' ?
     
  40. MSFX

    MSFX

    Joined:
    Sep 3, 2009
    Posts:
    116
    any ETA on Unity 5??
     
  41. studio-g9

    studio-g9

    Joined:
    Mar 23, 2015
    Posts:
    3
    hello
    i was purchased this plugin but it doesnt working on unity 5
    please send me lastest version
     
  42. studio-g9

    studio-g9

    Joined:
    Mar 23, 2015
    Posts:
    3
  43. unit102

    unit102

    Joined:
    Nov 13, 2014
    Posts:
    26
    I don't see any updates yet :(
     
  44. Wilbert-Blom

    Wilbert-Blom

    Joined:
    Aug 13, 2011
    Posts:
    111
    Hail to the Store Gods!
    The update has arrived!!:)
     
  45. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    845
    Unity 5, just updated today, in the example everything works great, but in my own scene I can't get any waves, I can adjust height negatively which I do not want, but anything over 1,stays flat.. any suggestions, used this in my old scene with 4.6 and worked great.. so sounds like a Unity 5 issue..
     
  46. unit102

    unit102

    Joined:
    Nov 13, 2014
    Posts:
    26
    Great job SP0KK0,thanks for the update.

    I see it needs few fixes,
    for one, the settings are different than 4.6.. I had to change the values to get close to what I had in Unity 4.6
    its hard to describe because I use for example (terrain slicing) in 4.6 wave creators if I generate the terrain height map it all becomes gray so I decided to copy the wave creator images from 4.6 project to unity 5 folder.
    the edge fade doesn't seems to work for me, if I increase the transparency it makes the entire ocean transparent! so the edge fade needs fixing.

    maybe the wave surface (foam texture) needs to be more brighter..? I might need to tweak something...
    well that's my experience shifting the wave creator from 4.6 project to Unity 5.

    As of now, I will leave it working as it is in unity 5 :) and that is great by itself... for the rest of the problems I will wait to hear from you SP0KK0

    thanks.
     
  47. Wilbert-Blom

    Wilbert-Blom

    Joined:
    Aug 13, 2011
    Posts:
    111
    Wave Creator doesn't work at all on Windows Phone 8.
    Water surface is completely black. 16-4-2015 10-30-06.jpg
     
  48. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    Any ETA on this fix?
     
  49. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    845
    still broke for me, been waiting on a fix.... works in the example, but no where else, i even made new project, same issue, sometimes when I add a water body, it shows nothing.. then if i DO a few times, it shows.. so ts buggy. Also no waves... I need this fix soon or i WLL be forced to stop using all together and I want refund if thats the case.. tired of some of this assets with little to no support.... going to stop buying them.. this is not a hobby!@@

    I even sent you an email twice. with screenshots!! I been patient , but as I said I have dead lines..
     
  50. shardnzl

    shardnzl

    Joined:
    Jan 2, 2015
    Posts:
    8
    Awesome plugin - the final result is just awe-inspiring :) In unity 5 I am having difficulty though as it's an Oculus Demo and the SetCamPos fails to get the transform position from the camera (cause it doesn't have a renderer I think). Any clues as to how I could manually add the camera pos to the setcampos script (it does move though)? Also the skybox doesn't get recognized (issue with double cameras again I think).
    Any help greatly appreciated - I am of course assuming I can manually set the cam pos so that my waves come back.