Search Unity

Wave Creator - Real Waves in Unity!

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

  1. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    Hey Sp0kk0,

    I am buying now. I will not use any specular or fanciness in shading.

    I basically want cartoon waves so ideally Hedgehogs' Liquid v1 with your waves if that is possible...

    ...maybe...using your wave crests with some caustic textures from Hedgehog's Liquid v1. Not sure if I need Hedgehogs' scripts to swap out caustic textures to create water moving illusion or if you have a script that does the same thing.
     
  2. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    OK, I've bought and this is the example scene played 'as is' except I changed the shader to your 'FX/Waves/Waves Creator Mobile'. That added about 5 FPS.

    I'm reading the tutorial PDF now but the link to the video in the PDF is a broken link. I found a video following the link from the Unity Asset Store.

    That's not my question though: the terrain above the sea surface, dry land, has shading as if it were wet (the blue-green artifacts on the peak in the distance for example.

    I have Unity 4.3.4f1 running on Windows 8.1.

    The machine is http://www.asus.com/Tablets_Mobile/Eee_Slate_EP121/

    1st Gen i5 Mobile and 1st Gen Intel HD Graphics GPU on CPU die. Also, RAM is 4GB and SSD was replaced with 256GB. It turns out this is a good machine to develop games for mobile because it it's poor on this machine it will be poor on mobile.

    Any ideals what's wrong here?

    $Wave Creator.png
     
    Last edited: May 4, 2014
  3. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    Hey,

    OK, I make a new scene from terrain at 2000x2000x600 m, Unity Terrain default and then added Water Body. The sea scale when I created a Water Body 2000x2000 so I'll play with that later, mostly wave height.

    So what I did was shrunk Unity terrain 100x100x30 to match your default 100x100 Water Body. And that is better but I want big waves but instead of 'cresting' and 'breaking' as the water gets shallower on approach to land the waves 'go right through' the Unity terrain.

    So for now, I will only use the Unity Terrain as ocean floor and I will 'float' an island(s) in the sea using your buoyancy but it would be nice if you eventually added an approximation to make the waves crest and break as they come into shore and likewise the leeward side of an island should be comparatively calm.

    Of course my mobile won't handle a 'really good' ocean simulation but eventually mobile can do that.

    Also if you look in the picture I make of you sample scene and my newly create sample scene the foam should more line up with the wave crests and breaks as they come into shore.

    Thanks

    $Wave Creator 2.png
     
  4. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    OK, last one for a while...attached is where my Main Camera starts out. I have 'Smooth Follow' and 'Submerged Effect' attached to the camera.

    The problem is the Cartoon Night Sky' Skybox - when the main camera does the 'Smooth Follow' to the character underwater the Cartoon Night Sky Skybox is showing but I need the Submerged Effect script to switch back and forth between an above water skybox and a below water skybox.

    Before After 'Camera Follow':

    $Wave Creator 3.png

    $Wave Creator 4.png

    OK, I've been looking at another way...

    When I go above water I want to use 'Wave Creator'

    When I go underwater I want to use 'Liquid V1' (HedgeHog)

    Will changing scenes like that be too slow? Thanks.

    $Liquid_V1.png
     
    Last edited: May 5, 2014
  5. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    It shouldn't be. If you don't like the effects provided by the underwater script supplied with Wave Creator, you can adapt the script to use the caustic effects shown in your sample. I'm assuming they're just camera effects too, and you won't actually need to change scenes to see them, so all you need to do is use the trigger portion of Wave Creator's underwater script, combined with the actual effects portion from the other plugin. Or use whatever other underwater script you choose. There's no rule saying you need to use either package "as is". The advantage to using at least the trigger from the Wave Creator script is that it detects where the surface is fairly accurately already, but after that, you can make it display whatever else you want.
     
  6. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    Yes, thanks.

    I will need to look at the code because switching the skybox to an underwater skybox is lacking in Wave Creator when one submerses. It would be most convenient to adapt Liquid V1 to Wave Creator and have both effects in the same scene. I'll need to look at changing the skybox at runtime, something I'd planned on doing anyway due to wanting to change the sky from night to day.

    I need to figure study the Submersion Effect script too as there are cases, e.g. a dolphin standing on the water with it's tail where the entire camera will need to be from the perspective of the dolphin's eyes being completely overwater or a human swimming the Australian crawl with the perspective from the human's eyes partly submerged and the rest over water.

    These are things the Wave Creator probably should add in the future as examples. The waves cresting and being broke by the shoreline too and not going through the shoreline, but that will be a desktop only solution for a while I suppose.
     
    Last edited: May 5, 2014
  7. Drum

    Drum

    Joined:
    Dec 8, 2010
    Posts:
    29
    Hi,

    I'm using Unity 4.3.4f1 Pro and the latest version of Wave Creator.

    I did as you suggest and made a new project with nothing except wave creator and the standard terrain assets. I made a terrain 2000x2000x600 and then created a water body alo 2000x2000.

    I get exactly the same problem with wave height, ie nothing for any positive number, but good waves for negative values. Everything else seems to work fine. Not quite sure what to do next. I can certainly try SP0KK0's idea about the heightmap for my tiled terrain, but until I sort out what is happening with the wave height issue i don't think I'll be any further forward. Incidently, I moved the camera around so that I could see what the water body is doing under the terrain, as I gather that it' not supposed to be rendering waves beneath the terrain, but the waves are there continuous with those above the terrain.

    I'm including a screenshot first with waves set to a negative height. Then all the same settings, but with a positive wave height.

    $screenie.png

    $screen2.png
     
  8. Drum

    Drum

    Joined:
    Dec 8, 2010
    Posts:
    29
    Hmmm, screen shots didn't seem to upload. Trying again here.

    $screenie.png $screen2.png
     
  9. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    OK. I might see your problem. The default value for Waves>Wave fadeout of 75 is ridiculously small. It controls how far away from the camera you can see animated waves. Your screenshots are from a long way off if the scene is 2000 x 2000, so to see waves, you'll need to increase the Wave fadeout to several hundred at least, if not several thousand. You might want to drop a FPS character into the scene too, instead of a stationary camera, so you can actually walk up to the water.. It makes judging the look of the waves easier when you see them at beach level. Hope this helps.

    $screen2_bigger.png
     
  10. Drum

    Drum

    Joined:
    Dec 8, 2010
    Posts:
    29
    You, sir, are a gentleman and a scholar. That did the trick perfectly!
     
  11. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    Glad I could help. I'm always a little amazed when one of my suggestions actually works, but I was pretty sure about his one.
     
  12. Drum

    Drum

    Joined:
    Dec 8, 2010
    Posts:
    29
    Ok, I've hit another snag. I was trying out the float script as per the video. Did everything exactly the same, created a cube, added the script, referenced thje waterbody in the public variable, but my cube does not float. Well, actually it does float, but stationary in mid air rather than bobbing about on the waves.

    The console gives me the following error (repeatedly)

    Everything appears to be set as per the video. Am I missing something obvious?


    Thanks
     
  13. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    The script needs to know which camera you're using, and uses a tag to find it. You simply need to tag your camera as "MainCamera". Hope this helps.
     
  14. Drum

    Drum

    Joined:
    Dec 8, 2010
    Posts:
    29
    A big thumbs up for that Fargle, thanks.

    I have some questions about floating open, hollow, shapes, but I'm not quite sure what I need to ask yet. Think a floating rowing boat, however, which doesn't fill with water at ever swell.
     
  15. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    181
    Like Drum I could use some suggestions how to stop a hollow boat filling with water. Also, is there anywhere of speeding up the reaction time of the Float script? Any objects take some time to react to the water pushing them up. If the object is very buoyant it will move with the water much quicker. Any help would be much appreciated.
     
  16. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,685
    This is an interesting situation. I can see a significant problem for any open styled vessel, like a canoe or raft. Or, if there was a desire to have players venture inside a floating ship, at some point they'd find themselves submerged in water even though they are within the model.

    I suspect it is an unavoidable drawback to the system. Canoes and rafts probably can't be used, and if you want players to enter a ship they'll have to transition to a new scene or be teleported to a ship level on a different part of the scene grid.
     
  17. majoras

    majoras

    Joined:
    May 25, 2014
    Posts:
    1
    Hello guys, i have problem with the lightning. The water takes the color of the lightning. How can i make it ignore the light's color?
     
  18. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    You can't really stop boats from filling with water, but you might be able to fake it, either by using a double hull on the boat, where the inside hull is above water level, or by using a depth mask shader to cull the water surface inside the boat. The problem when you use an animated displaced water surface though is that the inner hull or mask needs to be well above the water to prevent it from poking through sometimes, especially when using large waves. This could be a problem when using a depth mask, if you want to have a character inside the boat for instance. It still might be worth looking into. See this link for details: http://wiki.unity3d.com/index.php?title=DepthMask
    Since Wave Creator doesn't use actual physics in its float script, the best you can do is adjust the Random Rotation Factor until the motion looks right for the type of object you are representing. The Offset controls how high in the water your object will float, and Random Rotation Factor controls how bouncy it will be. It ain't perfect, but with a bit of tweaking, it should improve things a bit.
     
    Last edited: Jun 5, 2014
  19. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    Water is supposed to take on the light color to some extent, but if you want to change this behavior, there are settings on the Water Body under Colors, Lighting, and Reflection, that should give you full control over how the water surface will look. Just play with them a bit to see what each one does. You can also create a reflection cube map from your Skybox images for more realism.
     
  20. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    181
    What I am really looking for is to get the exact height of the water. But the float script seems to add some bounciness into the 'cumulativeHeight'. Is there a way you can see of removing this so I could just lock the object to the height of the wave without it bobbing up and down?
     
  21. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    Sorry, but with the supplied script, No. You need to keep in mind that this is NOT physics based. It's simply pseudo-random motion that gives the impression an object is bobbing on the waves. If you want to create a proper physics based version, you'll need to add colliders and rigid bodies to your hull corresponding to its physical buoyancy properties, and then find a way to pass the local surface coordinates from the water displacement shader (handled by your GPU) to the buoyancy script (handled by your CPU). If this were an easy task, I'm sure SP0KK0 would already be doing it, but I gather it's not.

    FWIW, I've tried some other water packages, including the Community Ocean Shader, using various supposedly physics based buoyancy scripts, and wasn't entirely satisfied with them either. I did see one shader based water package that performed the buoyancy calculations in the GPU as well, but it forced you to use its supplied shader for all floating objects, which presented its own problems. This seems to be a difficult thing to get right, without adding an unacceptable overhead to a game's physics calculations, so unless anyone knows a coder who enjoys this type of challenge, we may need to wait for the technology we're using to catch up to our wishes.
     
    Last edited: Jun 8, 2014
  22. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    181
    Thanks for that info. Just so I know what I'm up against, could you let me know where the pseudo-random motion is created? The only place I can see anything random is in the PerlinVector3 function and I have disabled that.. just to let you know I am doing my own bouyancy so am trying to get to the earliest/most accurate representation of the wave height at a given point. Thanks.
     
  23. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    After looking at the Float.cs script a bit more, the Random Rotation Factor seems to control just that: the rocking motion of the object. If you don't want it to rock, set it to 0. Otherwise, give it whatever value looks best for the size and mass of your object. This is the "pseudo-random" part I was referring to. The up and down part is controlled by the transform.position line, which in turn calls the WaveFunction in the WaveCreatorHelperFunctions.cs script, and the cumulativeHeight variable you mentioned earlier. If you can get your head around what this script does, maybe you've got a shot at something more, but I've got to admit it's beyond me.

    I'm not sure if cumulativeHeight can be used as the instantaneous y position of the floating object or not, but there are so many other factors involved in making an object appear to bob properly in the waves. You need to account for its size, shape, mass (displacement), as well as its center of mass, drag, and moment of inertia. This means doing the water surface position calculations at multiple points on the floating object, especially if it's a boat hull, or anything else relatively large compared to the waves. Then you need to figure the net movement and rotation. It becomes almost as complicated as calculating the waves themselves in the end, if not more so. This is probably why SP0KK0 chose the much simpler approach he used instead. Keep in mind, he wanted to maintain good performance on handheld devices as well, not just hardcore gamer rigs. I hope this helps, but if you're doing your own buoyancy script, you might need to send him a PM for more info.
     
  24. SP0KK0

    SP0KK0

    Joined:
    Aug 18, 2012
    Posts:
    103
    Hi guys

    Sorry I haven't been on this thread for a while, I've been extemely busy recently. The random movement only effects the rotation of the object so if you set the Random Rotation Factor to 0 there will be no random movement. It may look like there is some random movement of the object if the objects pivot is not in the centre and The Random Rotation Factor isn't 0. The function for the wave generation mathematically has no random elements to it so this random bobbing movement you are describing is a bit strange. It could be because there are some smaller waves passing through the Water Body as well and if you have a large object or are looking at it from a distance it may seem random. You could try changing the number '4' on line 99 of WaveCreatorHelperFunctions (How many times it loops) to 3 or 2. This will stop the object from responding to smaller waves.

    Don't hesitate to contact me again with more info if the problem persists. Thanks
     
    Last edited: Jun 8, 2014
  25. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    181
    Thanks for that. I'd already tried reducing the loop but it didn't change the behaviour. I've probably gone down the wrong path describing the movement as random. It actually looks like a simulation of the cube having mass. So as a wave comes along the cube takes a bit of time to get moving. So the wave comes up its sides. Then the cube accelerates upwards and as the wave starts falling the cube may even be in the air, then starts to fall. (Note the offset is 0 on this cube so it starts with the water halfway up its side with no waves). The behaviour looks highly realistic to me! So I have assumed that this scripted. I just need to get rid of the effect I can lock the object to the exact wave height... Thanks.


    screen2.png screen1.png
     
  26. SP0KK0

    SP0KK0

    Joined:
    Aug 18, 2012
    Posts:
    103
    I think this could be the problem, I can see from your screenshots that you have scaled your Water Body to 1000x1000. This is fairly large and as a result the mesh is being stretched. The Wave Creator shader moves each vertex to where it needs to be on the wave but naturally there are straight lines connecting these vertices together as shown by the black line in the diagram. In contrast the float script gets the wave height at a particular point every frame so that will follow the red line in the diagram. This means there is a gap between the floating object and the wave sometimes when used with large Water Bodies. Unfortunately Unity limits the maximum size of a mesh and the 'High Res' mesh included uses as many vertices as possible. I will look into tiling Water Bodies for the next update to improve the situation, in the meantime you may have to make your Water Body smaller.

    Thanks
     
    Last edited: Jun 11, 2014
  27. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    181
    Many thanks for that - it seems to have helped. Also, the distance viewed away from the object seems to have a bearing for some reason. Keeping closer in with the camera makes the object lock more tightly to water - or so it appears..
     
  28. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    857
    I just bought this and Im assuming from my failed attempts, the shader doesnt work realistically with deferred lighting? I mean it works but the effect is on the entire ocean rather than the particular area affected by light. This isnt a slight to your product, Im finding it fits the bill quite nicely(except the glossyness of reflections/specular but this might be just me)
     
  29. SP0KK0

    SP0KK0

    Joined:
    Aug 18, 2012
    Posts:
    103
    Hi

    You are correct, Wave Creator doesn't work with deferred lighting, I hope the effect will still be ok for you. I thank you for your purchase if you have any more questions feel free to ask.

    Thanks
     
  30. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    857
    Is it possible to use a different shader in conjunction with wave creator for the water?
     
  31. SP0KK0

    SP0KK0

    Joined:
    Aug 18, 2012
    Posts:
    103
    Hi thelebaron, unfortunately it's not possible currently. In the next update I will adding a script which uses the same displacement equations as the shader so you can use another shader with it. Thanks.
     
  32. zoka23

    zoka23

    Joined:
    Jul 29, 2014
    Posts:
    2
    Hello, I am interested in buying Wave Creator... but first I would like to know if it is possible to move objects which are interactive with waves....I need to ride a boat and create a realistic floating effect...
     
  33. SP0KK0

    SP0KK0

    Joined:
    Aug 18, 2012
    Posts:
    103
    Hi zoka23, you can move objects which are floating on the waves such as a boat, however it doesn't support physics so you cant use rigidbodies and forces effectively with it. Thanks for the comment
     
    zoka23 likes this.
  34. zoka23

    zoka23

    Joined:
    Jul 29, 2014
    Posts:
    2
    Thanks for your answer... Could you please tell me also in which way do objects react to waves?
     
  35. SP0KK0

    SP0KK0

    Joined:
    Aug 18, 2012
    Posts:
    103
    When an object with the float script is over the water it will simply be moved to the height of the wave it's over (on the y axis), thus floating on the waves.
     
  36. SP0KK0

    SP0KK0

    Joined:
    Aug 18, 2012
    Posts:
    103
    Hi

    Wave Creator version 2.1 has just been released. Here is a features list:
    1. Edge Fade around the shoreline making the waves look even better. (see from page of thread)
    2. A new way to set the camera up which means you can now see objects floating in scene view when the game is playing.
    3. A bug fix so you can now use any resolution of heightmap.
    I have also reduced the price to $20 and created all new promo images. The setup is now different from Wave Creator 2 so makes sure you check out the video on the front page of this thread which show the new setup steps.

    Thanks
     
    FargleBargle and hopeful like this.
  37. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,685
    I've had WC for many months now and I really like it. The visual it provides of being submerged during a wave - with the dynamic underwater view - is wonderful!

    I don't know if you're looking for suggestions on features to add, but here are a few things I'd like to see, if possible.

    1) Reduce the tiled look of the foam. I think other assets like RTP accomplish this by adding noise to the texture. Maybe a lot of people are used to seeing tiling in games, but for me fixing this would make the water so much more attractive. Of my requests, I see this one as having the highest priority.

    2) The option for multiple wave sources and wave types. Naturally, devs aiming for less capable devices would want to keep things simple, but if the compute power is there, it seems to me it would be valuable to create more complex waves to approximate shoreline effects, ripples around stationary objects in the water, ripples around objects moving in the water, and possibly even the dynamic entry / exit of a body in the water.

    I realize there's potentially a lot of complexity in this 2nd feature request, but maybe there's some low-hanging fruit of some sort ... something that can be relatively easily incorporated.

    3) More integrated underwater visual effects. If the underwater visuals stay the same I'm okay with that, but maybe there are some relatively easy improvements that could be made, like adding an animated cookie for caustic effects, incorporating rays of light, adjusting the amount of turbidity (smallish opaque particles in the water), maybe a depth meter script that can be added to the camera (to turn off caustics and light rays if too deep), and so on.
     
  38. SP0KK0

    SP0KK0

    Joined:
    Aug 18, 2012
    Posts:
    103
    Hi Hopeful

    Thank you for your list. I will definately be trying to implement non-tiling foam for the next update as I agree that would make a large visual improvement to the waves, I have already started looking at ways it could be done and adding code to my shader. Point 2 will be difficult to do with my existing code, to make it interactive with other object I would have to recode almost all of the scripts. I'm not ruling it out but it won't be a priority at the moment. I will also be looking at improved underwater effects, such as caustics, for the next updates.

    Thanks
     
    hopeful likes this.
  39. vinhuman

    vinhuman

    Joined:
    Jul 24, 2014
    Posts:
    6
    Looks pretty cool. I'm looking for a tool like this. However, if I get one I will need to have a tool that can efficiently be used over a multiplayer network. Do you know if your tool is setup in a way where this is feasible? I imagine if I just threw the tool down the waves would be getting generated slightly different for everyone and I feel like the process of getting them to be consistent could be difficult.
     
  40. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,685
    So far as I can see, the only way to closely sync waves is to use a server which sends each wave as an event to each client. WC is not set up for use in that manner, and such events would increase net traffic. If you were doing a surfing competition game, for instance, I could see having a server event for the waves the players would ride, but for curling waves suitable for surfing you'd need something like a voxel wave generator, which is currently outside the scope of Wave Creator. (I'm not aware of any curling waves plugins in the asset store, but if you find one, please let me know. I don't need one for my game, but it would be cool to see it.)

    I agree with you that if you don't call for waves via network, even if you start the waves at the same time they will eventually fall out of sync because of clients running on different hardware, having different software loads (due to different camera perspectives, etc.), and so on. I don't think having waves out of sync would be a problem in most situations, but if you need a specific wave event - say, to capsize a ship - it would have to be a separate thing that is created and called for, and not a part of WC.
     
  41. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    Wow, THANKS! I've been checking for this update for months, and you managed to slip it in the week I was away. :)

    The lack of shoreline effects was my biggest issue with WC, so I'm glad you were finally able to address it. Otherwise, +1 on Hopeful's request to reduce foam tiling, and add caustics. I'm already very happy with Wave Creator, but each update makes me more sure my money was well spent. Keep up the great work, SP0KK0!

    (Edit: WOW! This really does look great! Now that I've played with it a bit, it matches or surpasses the look of Unity Pro's Water4. By tweaking the Color, Shallow to Deep Adjustment, and Edge Fade, you can create some really beautiful water. Thanks again SP0KK0!)
     
    Last edited: Aug 25, 2014
    hopeful likes this.
  42. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    OK. A few comments and questions now that I've had a chance to try this out. The demo works fine, and looks great, but I'm having trouble adapting it to work in a "real world" scene.

    First, my setup: the terrain is not located at 0, 0, 0. It's 2000 x 2000 units wide, by 300 high, and is located at -1000, -150, -1000, so that it's actually centered at the origin, and extends above and below sea level (located at 0). To make the water appear to extend to the horizon, I've made it 5000 x 5000 units, and I want it located at -2500, 0, -2500, so that it's also centered on the origin.

    This introduces a number of problems:
    1. In the above scenario, Wave Creator generates its water body at 2500, 60, 2500, so that the lower left corner is at the origin, sort of - I'm not sure where the height of 60 comes from.
    2. It also appears that the shoreline is scaled to match a terrain that's the same size as the water plane, so would only be correct if the terrain and water were both either 2000 units or 5000 units. In my case, 2000 units isn't enough for the water, and 5000 units is too much for the terrain, forcing me to reduce terrain detail to achieve better performance, so neither option is an ideal way of dealing with this.
    3. Moving the water to 0, 0, 0, to match the terrain, would mean the generated shoreline no longer matches up, and there doesn't appear to be a way to re-generate the shoreline after initially creating the water body.
    4. For some reason, the water ended up invisible after moving it. The mesh wireframe was still there, but no texture.
    Other questions: Generating water without a terrain in the scene causes null reference errors. Does the water require a terrain under it to work properly? What about using mesh objects for terrains instead, or combinations of mesh and terrain, such as a mesh sea wall, rock outcropping, or jetty with a terrain? Would there still be a way to create accurate shorelines?

    So right now, it looks like I'll need to:
    1. Place the terrain so that it matches where the water will be created, wherever that might be, before creating it.
    2. Make the terrain and water the same size, so even if the terrain represents a small island in a big ocean, it needs to go right to the horizon under the water. I guess tiled terrains are also out.
    3. Once the water is created, the water and terrain must always be treated as a unit if they are moved or scaled.
    4. I'm still working on the last problem, but as it may be related to the others, I'll see what happens once I fix them.
    It seems that some of these problems would go away if users could regenerate the shoreline after the water was created, much like they can do with terrain heightmaps, and if the shoreline algorithm took into account the relative sizes and positions of the terrain and water bodies. It would also be nice if users could designate multiple objects (mesh and terrain), to be included in the shoreline calculations. This would also allow a big, low-res terrain for the sea floor (running to the horizon), and one or more smaller, high-res terrains for the island or islands. I don't know how hard these features would be to implement at this point, but they'd be much appreciated if they were.

    Thanks anyway SP0KK0. I'm not griping (much), since this is still an awesome product. Just providing feedback, and possible new feature suggestions.

    (Edit: after trying this again with the terrain and water set to the same size, and located at the origin, the shoreline still didn't match where the waterline should have been on the terrain, which was half way up in this case. On a 300 unit high terrain, it always wanted to be 60 units up from the base. After checking the script, it seems Wave Creator is hard-coded to calculate the shoreline at a height of one fifth of the total terrain height. I updated my CreateWaterBody script, adding a new height variable, representing the water height as a fraction of the total terrain height, and then changed the PositionWaterBody function in the script to multiply by this height value instead of dividing by 5. Seems to work fine now. I still think there need to be more placement options exposed before creation, or some way to regenerate the shoreline after making changes.)
     
    Last edited: Aug 25, 2014
  43. SP0KK0

    SP0KK0

    Joined:
    Aug 18, 2012
    Posts:
    103
    Hi FargleBargle, I'm glad you like the latest update.

    I have just submitted a update to Wave Creator which fixes some of these problems. When this update is released (should be this week) you will be able to place your terrain in any position, not just at the origin and it will work. You will also be able to create Water Bodies without having a terrain in your scene and it won't give you an error.

    Unfortunately it would be more complicated to allow the water body to be a different size to the terrain. It would also mean that you would lose some of the wave quality near the camera. I will try and think of a way that you could see the ocean a long way out whilst still retaining the quality it had close up.

    I will also look into objects other than the terrain being detected in the heightmap, it shouldn't be too difficult to implement so it should be included in a future update.

    Water Bodies are placed 1/5 of the way up your terrain by default but once they have been placed you can drag them up and down the y axis and the shoreline effects will automatically adjust.

    Thanks
     
    Last edited: Aug 25, 2014
  44. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    Great news. Thanks for the quick response. It's good to see you're already rolling out fixes for a few of my issues, and if you manage to tackle some of the others you've identified as do-able, I'll be more than happy. I'm already changing my scene to allow the water to be the same size as the terrain, so if you can't budge on that one, it's not a big problem. In the past, I've used giant disks with the centers cut out to extend my horizon, or just brought the fog in closer, but both methods have their drawbacks, so if you ever find a way to fake a far off horizon while keeping the water body itself relatively small, I'll be happy to see it. :)

    I'll need to test it out some more, but I was having a bit of trouble with this. Mine was retaining the initial shore outline after I repositioned the water, and when I moved it up and down, the water texture would sometimes just vanish. I finally got it all to work by positioning my terrain at the origin, and modifying the water creation script to place the water at the height I wanted. I'll give it another try though when your update comes out. Thanks again.
     
  45. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    Hi James,
    I messaged you from your YouTube page with an issue I'm seeing in Unity 5.0.0b1.
     
  46. SP0KK0

    SP0KK0

    Joined:
    Aug 18, 2012
    Posts:
    103
    Hi

    I just though I should mention I now have another asset on the store. It's called Landscaper Terrain Tools (LTT) and you can view it by clicking here: Landscaper Terrain Tools

    I'm still very committed to updating Wave Creator and am currently working on less obvious foam tiling. Thanks
     
    Last edited: Aug 26, 2014
  47. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    Just bought the new LTT, video was nice and I'm just getting started.
    How do you adjust the tiling in the terrain textures?

    I am just lowering the foam tiling in WC for waves and using the current tiling values for shore only,
    the main problem for me is the water body just moves as a single object with no waves.
    Happy to look into this further with you later, right now I have an evening with out of town relatives.
    Talk to you later!

    :)
     
  48. SP0KK0

    SP0KK0

    Joined:
    Aug 18, 2012
    Posts:
    103
    Hi

    Wave Creator 2.2 has just been released, it's a small update which fixes these problems:
    • You can now have your terrain at any point not just the origin
    • You can now create a water body when there is no terrain in your scene
    Thanks
     
    FargleBargle and hopeful like this.
  49. SP0KK0

    SP0KK0

    Joined:
    Aug 18, 2012
    Posts:
    103
    Hi

    I can confirm the next update, which should be coming next week, has aperiodically tiled foam. It uses Wang Tiles as described in this article: http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter12.html

    This means the foam doesn't repeat thus creating a more realistic effect, here is a screenshot:

    Temp.png

    This is what it was like:

    Temp2.png

    Thanks
     
    Last edited: Sep 6, 2014
    FargleBargle, Don-Gray and hopeful like this.
  50. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,360


    Has this been implemented in the pack ? Can i get that exact result with the pack as it is, or need a special extra shader ?

    Also is this included as an example ?

    Thanks