Download

Dynamic physical ocean

Very nice!!! Congratulations!!!

Very nice, now you just need a little splish splash!

amazing work!!

Started playing around with adding wakes to the boat and as much as I wanted to stick to a mostly blueprint approach, drawing to a Render Target with a canvas is working pretty well so far.

Anybody know how to draw a material to a canvas, it would help me skip a step?

Canvas has a DrawMaterialTile function, that could serve your needs.

Your overall approach is quite expensive though as you’re reading from waves in the texture to drive your gameplay - before getting too involved with what you’re currently doing, I would consider changing the technique so that you’re writing from the gameplay code to the texture instead :slight_smile:

I know this is all expensive, I’m mostly using it for rapid prototyping. The wave calculations can be changed to a mathematical approach at some point and bypass the RenderTarget read part of the project. The wakes so far are only one way where the actors draw to a texture that is then used by material

I’m actually doing this to build the rest of the game until we get nVidia’s WaveWorks or UE4 has a built in water/ocean system.

Although when I was working in XNA, which just wraps DirectX 9, the render target read was not that expensive and you could get to it’s buffer directly like you can with a texture.

Added a video tutorial on how to add buoyancy to pawns

Awesome! Thank you for making a tutorial on this, great work! :slight_smile:

I always like some good fluid dynamics.

I’ve been meaning to make a fluid simulator one day.

Good work.

Wow, the tutorial video is so useful. Thank you so much for showing the community how you achieved this. Handkor, would you mind if we made a page for your video on the Epic Wiki?

I don’t mind. I had already attached the video to my other wiki entry as this is a disconnected part 2. This technique works for anything you can get a height value from.

Hi Handkor,

I have a wiki page for your new video, here is the link: A new, community-hosted Unreal Engine Wiki - Announcements and Releases - Unreal Engine Forums

is your ocean material in first tutorial can wave? mine is like freezed.(i put it into teselated(waterplane)plane)

Did you attach a panner to your UV for the textures and are each texture using a different speed.

Hello,

Thanks for sharing the material, it looks great :slight_smile:

Only problems I have with all my water shaders are shores…

http://puu.sh/aMuXQ/c507fe7789.jpg

Do you have any idea how I could smooth correctly transitions between water and landscape without having to use transluency and depthfade? (because it removes specular lighting…)

No I haven’t tackled shores yet.

Opps i forgot the speed input.So sorry.But there is no big waves.Where we will set big waves ?

There is one or two parameters included in his material you can tweak to obtain big wave :slight_smile:
Also make sure the plane is big enough, and not only a heavy-scaled little plane shape.

I just found a hacky way to do what I wanted actually…

I create 2 different materials and place 2 big planes.
On the first plane, I apply a “far” material which is opaque and masked. If the distance from the camera is < 5000 for instance, the opacity mask is 0.

On the second plane, I apply a “near” material which is translucent and create my shores and tweak a bit the reflection so it doesn’t look that bad…
I then fade it so the transition from the near to the end material doesn’t look bad.

That way I have great reflections on the far of my ocean and nice transition between water and landscape seen from near.

Thanks alot for that 30min video tutorial. Amazing !

It seems that the OceanManager class is not included in tutorial? So basically I have to modify HeghtMapReader, I mean add those new functions?