A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Assets and Asset Store' started by scrawk, May 4, 2015.
Scrawk this is looking beautiful , good progress
That is amazing.
I am not one to buy anything till it is on sale. I am getting this immediately. My upcoming project is begging me for it.
Sounds great, would this work for objects as they cut the water surface for example a periscope rising/lowering thru water surface or the the floats of a water plane as it touches down on the water.
Yep, I can add that. Was also thinking of something for helicopter rotor wash as it gets close to the surface.
Just another foam trail with some smaller ones on each side a shorter back trail with some strips.
Fantastic, cant wait to hook this up with UnityFS and a nice float plane and a few ships too.
All it needs now is some wave dispersion from the bow wakes.
Also do the foam trails follow the larger waves.
Looking amazing scrawk, Really liking the trails!
Just curious about the underwater view of the water surface, are there any development focus on that aspect?
like in the image link below:
@John G.: Im going to look into making foam trail the waves but unsure if its possible at the moment.
@sashahush: Havnt done anymore work on the underwater stuff. Hopefully it will look like that image.
Hi @scrawk , any estimated time of when you will have an beta (a open beta please) of this asset? I think that a good ocean implementation will help a lot of people out there (like me) even in an beta stage.
Thanks, and keep the amazing work
I dont want to put a time frame on it at the moment. Have got a lot done this week and at this rate it will be sooner rather than later. It probably wont be a open beta.
If you want someone to play with getting it networkable just let us know. We are currently working on a project that does networked water with each player.
Yep, counting on you for the network testing
Trying to keep networking in mind during development.
Nice network support will be fantastic, using bolt myself so can see how that works when time to.
It would be fantastic if the ocean system (along with reading wave height for buoyancy) could be run in a headless (--batchmode) server i.e. doesn't require a Camera at all to function properly.
Regarding syncing, the simplest solution would be to allow us to specify our own time value (the network time, in this case) for the simulation so that both the server and the client can have identical simulations due to having the same network time.
I think we all put that bug in his ear a couple pages back, lol.
We currently are using the Community Ocean with a time offset and it works quite well. That system is pretty simplistic since it is just repeating tiles so all you really have to do is figure the offset from 0,0 according to tile size and then the time offset. Hopefully it will be equally as simple for this.
I really am also hoping for a headless mode so we can run the buoyancy of ships server authoritative and have it match up smoothly and not waste the resources on having to render anything at all. That way we can just send out the transforms to the clients and not have to force them to calculate the buoyancy themselves.
CaptainMurphy did ask something similar but I will give a bit of a update on that.
The way I've set thing up it can already run in a headless mode very easily. The rendering of the mesh and the generation of the wave data like displacement is separate. If you wanted a headless mode you would just not add a the projected grid component to the ocean but still add a wave spectrum component. That way the wave data will still be generated but there wont be any mesh rendered. You can then do buoyancy calculations if you want on the wave data.
The data is generated from a time value so yes I'm just going to add the ability to provide your own time value if you want. There will be a IOceanTime interface and the default implementation will just use Unity's time since start up. You can then just implement your own however you want add that to the ocean instead of the default.
Im just setting up the buoyancy code now but the way it works is that you submit a wave query to the ocean it will send a wave query result back with the information you want. The query can have different modes with each mode returning a different amount of information and the level of error and detail you want can be adjusted. I'm not sure of the performance cost of a query at the moment but its about 0.01ms and I haven't done any optimization yet. I may also add the ability to batch queries into a group and then run them on a separate thread.
Just a last though on the headless mode. If the wave data is generated on a sever then the client will need it to render the mesh at some point. The client could just generate its own data and use that or you could send the data to the client. The amount of data will vary depending on the resolution but a typical amount would be about 0.2mb for the displacement data at a medium setting. I'm not sure if that's a ok amount to send from a sever so let me know. You would need the data to be sent at lest every 3-4 frames to prevent a jerky movement of the data. The slope data for the normals is calculated separately so you could have the client generate this every frame. It runs completely on the GPU so is quite cheap to calculate. Iv noticed that this helps the wave movement look quite smooth even if the displacement data is only being generated ever few frames. Its only when you have the waves intersection the camera view that's its noticeable so if your looking down most of the time you wouldn't really notice.
I have been mulling over the buoyancy code for a while and that is a bit of a muddy thought process. I like the idea of returning a batch of data since that could then encompass the bounds of all of the buoyancy points in an object. Maybe the routing could return a grid of info with a size component passed in for client authoritative setups? Our thought was to make buoyancy server authoritative and have the client pass in the points/volume of an object that is needing to be calculated for (or set them at the start and not change them) and the server simply sets that objects transform rather than having to pass back and forth multiple times.
As far as running headless, would you be able to pass over the settings that are being used to render the ocean and then limit subsequent changes to just a time offset? I can't see changing the ocean every single frame to pass the data to render, more like passing along the current setting class and the time offset that the server is at. From there the server can just sync the time offset and the settings will be the same otherwise.
Just a bit of a update on progress. Im currently very busy with work the next week or so but am very close to have a playable demo to release. It would still be missing under water effects and shoreline effect but could make for a good demo for beta testing.
I probably made it sound more complicated than it is. Its just a way to ask the ocean what the wave height is at position xz. From there Im sure you can write a script that can handle buoyancy how ever you want. I will be providing buoyancy scripts that will be fine for the majority of users. Im sure you have much better ones already written and as long as they just need the height of the wave at position xz then they should be straight forward convert. I know you have offered your buoyancy scripts a while ago and if your still happy for me to have them feel free to PM them to me. Im sure they could be quite helpful.
Yes you can just pass the settings once and then just pass the time from there. The generated data I as talking about (the 0.2mb) is the displacement textures that are created based on the time value passed. This data is needed to render the mesh and for buoyancy calculations. Since Im not familiar with networking Im not sure if you would just generate this on the server and send it to the clients or generate it on both the sever and client so you dont need to send a texture every few frames to render.
Just a image of the larger wave conditions. The ship is 40 meter long for scale.
There are no words - cept well done! It's looking very good for such early work
Looking awesome, and looks like you have the trails following the water surface too
I was not sure how your script worked for getting the height at X/Z, whether it was just querying a texture color or if it was using a collection of vertices that were being tracked. It still might be good to have the ability to return a collection of points so that the player only has to make a single call but get back all the data they need so that you aren't making multiple single calls for an object to calculate, just cutting down the number of round trips to the script. Some of our larger ships are cut into multiple 'decks' of buoyancy and each of those are cut into segments, so we would end up making calls for all of them separate. If we could make a single call and get a collection that covers the entire area that the ship is over then we could do more of it in one shot using interpolation between the points returned.
Ah, I get it now, I was not quite sure what you were passing that was .2mb. I cannot think of a time when passing the texture would be a good thing over network. Simply having the same offset and settings would be sufficient to do the rendering as far as I have seen in most systems. I just can't imagine trying to pass a texture to 32 clients for a match every few frames for .2mb...
I would expect each machine to just look the same based on a t value for time, but I could be wrong.... then sampling would be trivial across networks (if deterministic)
That is an amazing shot. Enough to make my day.
Nice, I like the look of this as well. I've taken a look at the other offerings on the store and if this is at the right price and it's easy to pull the xy with a simple call I'll be very interested. Funny thing I was just talking with Capt. Murphy yesterday about how I need to find something to replace my placeholder water.
From our experience with other water systems it has to start with the same location (usually 0,0) so that if the system is based on tiles then that should keep the tiles lined up between clients, then have the settings matched to the server using an onChange command so that it only sends settings to clients when necessary but can also be queried for new clients joining, and finally just keep them synced with the time offset.
Usually the height at position on a system like this can be very precise since it is based on a texture (I assume) that has a high resolution for the query to look at. Usually that texture is held in memory so it isn't having to query a disk for it either so your read times are very fast.
Hey scrawk. I remember there being speak about a shoreline effect but I do not remember and am too lazy to look back. How would it be with the waves? For instance having those amazing waves in the shot above out in open sea and then coming up to an island where the waves splash against the shore and are calm in the shallow areas. Like Suimono or the awesome AC4 water. Do you plan on doing something like this or just have one wave scale for the plane?
I know it is a lot but with your waters shading and the shore effects it would be amazing.
@hippocoder: As long as all the other settings like wind speed, wind direction etc are the same then yes, same time value, same result.
@InfiniteDice: Yep, the ocean height for any world location can be quickly retrieved from any xz position.
@CaptainMurphy: Yep, its based on a texture. Im not very familiar with the community ocean project but if it works by using FFT to make the wave textures then this pretty much works the same. Im just using a different spectrum and more data is being generated.
@Baldinoboy: There will be shoreline effects but have not got to that yet. Have not decided on exactly what features to have or methods to use yet.
I had know idea I could be sexually attracted to water.
Cool. Let us know as it progresses. Really looking forward to seeing that.
@scrawk FYI, don't use a raycast and the hit.textureCoord to pull the texture x/y point, it will kill frames when you get past about 200 objects calling for height info. It will need some sort of offset figured out in code. We are running into that on another project and it is killing us right now.
Not using that method but good to know.
Will be doing some performance tests soon to see what number of height sample you could expect to do each frame.
Will post the results when done.
Good stuff! looking forward to getting my filthy paws on this.
The big lack of any whater asset in store is missing of xy plane. Dont miss it.
2D physics in unity is xy plane. So there is must be shader for xy plane.
You can easily convert the physics to xz simply by swizzling what you draw, ie y becomes Z and camera is top down, or render ocean to texture (just suggestions), or even use Physx (which is pretty damn quick in Unity 5).
Cant understand what do you mean by swizzling xz. 2D physics is only xy plane, so all of your objects must be in that plane right?
Render texture is waste of your full screen overdraw.
Physx on mobile platforms or different gpu is not a good solution.
Writing xy shader for water if you are author of it is 1-2 hours. Simply because you just know where you need to change z to y.
Yes but your problem is:
1. this isn't something thats efficient on desktop, never mind mobile
2. I'm hoping the author won't mess around trying to make this work in 2D because I think it's dumb to try and shoehorn AAA next gen techniques into tiny mobile 2D titles, but that's just my 2p
There won't be any 2D sorry. It's not something I'm interested in and the methods used for the waves and mesh are not applicable to 2D.
Thank you. I am happy to hear the asset won't be trying to tackle things outside of its scope. Especially when using a 3d water solution for 2d is overkill in the first place and I can't imagine any advantage to doing so.
I think there very affordable 2d line water things in the asset store iirc. Thinking of this system in terms of 2d made my brain go crosseyed
I totally agree!
2D and 3D water require different approaches.
There is absolutely no reason to combine them into one Frankenstein's monster.
First off, Beta version should be ready in 1 week give or take a few days.
Just downloaded the Blacksmith environment asset from Unity and dropped Ceto into it. Almost worked first time. It uncovered a few small issues. Should make a good test scene.
Those shots look splendid, will shore foam make it into the betas?
No shoreline or underwater effects will be in the beta. Just havnt had time to start on that yet.
I will try and make a start on it while people are playing around with the beta.
It's looking good even without the shore foam. I hope I get a chance to test this out!
Who will get to try out the beta?
Everyone knows that hippos have a thing for water.
How about public demo for those who not into beta.......