[] Ocean surface simulation (VaOcean)

Any progress?

Heh, few days I was afk :slight_smile:

[QUOTE=ren3d;71340]
Ufna. Maybe if you compile the again with the new “Dll”, fix the problem.

I’ll make “binary release” update in two weeks.

[QUOTE=;71790]
That looks great, how would one get the buoyancy component? I downloaded the full source and the release binary, but I can’t find it?

You should build from develop branch, and you’ll see it :slight_smile:

[QUOTE=n00854180t;72804]
Is the capable of collision/buoyancy for larger meshes, such as ships?

Absolutely yes! I’m using it for my own game about warships (very large steel ones :slight_smile: )

[QUOTE=Acenth;72921]
Any plans to add white cap support?

Yes, but not in priority. Currently I’m using not-fft version of ocean which already has minor caps (you can find it in develop branch).

great news ufna. And thanks for great .

Now we need something to make water shader more watery and less jelly looking.

[QUOTE=;77028]

Absolutely yes! I’m using it for my own game about warships (very large steel ones :slight_smile: )

Awesome! Very impressive. Makes me want to work on one of my back-burnered ideas rather than the one I’m currently doing, which has no oceans.

Have you had any luck getting characters that can move around on the ships working? The backlogged idea requires the players to be able to run around on the large ships while they are on the ocean.

Thanks . I’m waiting

[QUOTE=n00854180t;77609]

Have you had any luck getting characters that can move around on the ships working? The backlogged idea requires the players to be able to run around on the large ships while they are on the ocean.

What do you mean exactly? :slight_smile:

so… is this for modifying existing meshes, or does it create its own? Was wondering cuz this would be a great base to try and recreate the ‘melding wall’ effect in the game Firefall.

[QUOTE=Knobbynobbes;81204]
so… is this for modifying existing meshes, or does it create its own? Was wondering cuz this would be a great base to try and recreate the ‘melding wall’ effect in the game Firefall.

Currently you can use the materials from with any mesh you want :slight_smile:

Hi ufna!

First off, great work so far! I’m really interested to see how far you take this project!

I was looking through your code and wanted to offer some suggestions/fixes that I noticed:

There are some race conditions in your code related to rendering features. See ://docs.unrealengine.com/latest/INT/Programming/Rendering/ThreadedRendering/index.html for the documentation on how UE4 handles threaded rendering. A couple rules of thumb to apply:

Code executing on the game thread cannot call RHI functions (with a few rare exceptions).
Refcounting an RHI resource from the game thread is not thread safe and may cause the resource to be destroyed from the wrong thread.
All RHI resources should be managed by a subclass of FRenderResource. That interface works with RHI to ensure that your resources will be initialized and released properly during engine startup and shutdown via the InitRHI and ReleaseRHI callbacks.
Your component holds a direct reference to RHI resources. In most cases you should not do so. UObjects are typically for “game side” functionality

I’d suggest adding an FVaOceanSimulatorResources class that derives from FRenderResource. In InitRHI you can create the various RHI resources you need and in ReleaseRHI you can call SafeRelease on them.

To create and initialize an FRenderResource, on the game thread you would allocate a new instance of the class and call BeginInitResource. Usually you’d call this function from PostLoad.

To destroy an FRenderResource, you’d call BeginReleaseResource on it, usually from BeginDestroy. You’d then use a rendering fence to know when it is safe to delete in IsReadyForFinishDestroy() and actually delete the object in FinishDestroy().

An alternative that is a little easier, if your structure is purely rendering thread data you can delete it on the rendering thread by enqueuing a command to do so after BeginReleaseResource.

Dealing with the rendering thread can be daunting at first – let me know if that isn’t clear or you have any questions!

A few other miscellaneous suggestions:

Your shaders, uniform buffers, etc. are declared in the public classes folder. I’d suggest putting them in a private header as they aren’t really part of the API.
The main component header includes the private PCH which means all of your private headers will be exposed outside of your .

[QUOTE=;80986]
What do you mean exactly? :slight_smile:

Just wondering if you have a large ship (say, a sailing ship, pirate ship style, big enough for players to walk around on) do players inherit motion of the ship/can they walk on it without being launched off due to weird physics?

[QUOTE=nick_p;82449]

I was looking through your code and wanted to offer some suggestions/fixes that I noticed:

Hi Nick!

Thank you so much for the detailed and usefull feedback!! :slight_smile: I’ll take a closer look to fix my code.

[QUOTE=n00854180t;82557]
Just wondering if you have a large ship (say, a sailing ship, pirate ship style, big enough for players to walk around on) do players inherit motion of the ship/can they walk on it without being launched off due to weird physics?

It should work okay, motion will be inherited.

Please Please Please make a Update for 4.2.1 :frowning:

[QUOTE=orgertot;83123]
Please Please Please make a Update for 4.2.1 :frowning:

Actually really easy to build from source. Instead of copying the binary version into your game’s Plugins folder, pull down the repo into that folder. Rebuild game. It’ll work just fine.

Hi,
version is 0.4-a6 the DLL is builded with 4.2.1.

thanks so much for this. really helpful and great . i got it working with 4.2 no problem with the compiled version above the post. just put the whole folder in a directory in my project folder and the shaders into the ue4 engine section.

my question is, is could anyone give directions for dummies how to make the water look like in the youtube videos? mine looks okay when the sun is shining on it from far away. up close, it is totally flat and dark.
i know ufna already gave these instructions:

“There are two static meshes in . Just place (the big one) on scene and apply <…>_Flat material instance to it. Then you can place blueprint of “detail ocean lod” on scene, and that’s all. To make the detail lod to be always near the player, it can be attached to the XY location of player camera.”

but i really don’t understand them. how do you get those huge waves? i put the big mesh down, applied different materials in the material folder, i placed a blueprint on the scene above the big mesh…didn’t make any difference. where is the detail lod and how do we attach it to the xy location of player camera? will it always be there then? or just when the player is looking at the ocean?

thanks so much for any help!! and thanks again for the awesome !

[QUOTE=treebykooba;83226]

but i really don’t understand them. how do you get those huge waves?

To be clear, what huge waves exactly do you mean? I’m using two different approaches in develop branch. Also, please show screen of your local look :slight_smile:

thanks so much for the help! sure here is a jpg of me up close to the large mesh with a material applied (every material looks pretty much the same when applied for me):

it’d be great to get it like in the preview you have: ://./
with those big waves right up front.

[QUOTE=;82635]

It should work okay, motion will be inherited.

Great news. I wish I were working on the idea of mine that needs an ocean XD

[QUOTE=treebykooba;83242]
thanks so much for the help! sure here is a jpg of me up close to the large mesh with a material applied (every material looks pretty much the same when applied for me):

it’d be great to get it like in the preview you have: ://./
with those big waves right up front.

It looks like Render Targets are not updated. Do you use blueprints and materials from content folder, or you copied it to your project Content folder?

[QUOTE=
It looks like Render Targets are not updated. Do you use blueprints and materials from content folder, or you copied it to your project Content folder?

i copied the shaders files (VaOcean_CS, VaOcean_FFT, VaOcean_VS to the engine/shaders folder

then everything else i put in myproject/Plugins/VaOcean/…the VaOcean folder looks like this:
/Binaries
/Content
/Resources
LICENSE
README.md
VaOcean.uplugin

i am pretty new to ue4 as I’m sure you can tell. not sure what updating Render Targets means.
you can see from my screenshot where the shows up in my content browser.:

Thanks so much again!