Ori and the blind forest GPU Water and dynamic wave

Hi Kalle_H

Thanks for your time , help and contribution on the rendering quality, is it possible to ask you "because everyone who are interesting by this topic, are not neccessary familiar with UE4, less Material and less formula “especially for 2D” , so if you have time , it will be nice to display as Ryan a Material blueprint picture showing the schema. i have in mind the creation of a sample project with a simple map where we can test the end result of everything bring here by everyone until we reach the polished result.

Oh yea I for some reason thought you were only talking about the surface of the water itself.

For the fog thing you also need to figure out if the current pixel is below the water or not. The way I have solved this in the past is by transforming the screen coords into world position and then using the Z height of the derived position to compare. If you want the sim to also affect the waterline you also need to map the sim texture to those world coordinates and use the Z height of the sim as an offset to the Z of the screenpos.

Currently if you try to do a position transform from screenpos to worldpos the engine will crash. For now you can use this as a custom node. You need to add input “ScreenPos” and “Depth”. Depth should be 10 which is the near clip plane.

float2 viewpos = (ScreenPos.xy - View.ScreenPositionScaleBias.wz) / View.ScreenPositionScaleBias.xy * Depth;

float4 pos = mul( float4( viewpos, Depth, 1 ) , View.ScreenToWorld );

return pos.xyz * (1 / pos.w);

Hey Ryan thanks :stuck_out_tongue: , i’m at the moment creating and set up a sample project with UE4.12 hope i will have something to show in 1 hour or so , but it’s already late here almost 1am , so i do my best to finish it in the next hour, at least tomorrow we could continu :stuck_out_tongue:
my idea is pretty simple , set up a mini project with some of my 2D Underwater polished assets, a basic paper character with movement, Material, and your blueprint, we could upgrade with the gpu solution as soon as you will get your test ok :stuck_out_tongue:

once my template is ready, i will add your material code and we could see together if we are good or not :stuck_out_tongue:

Sounds good


:slight_smile: funny picture, i’m excited to show you our 2D Art quality and feedback…i’m still working on the project almost done…no sleep until complete

@RyanB i sent you a private message to get back the UE4 Project so i will await while sleeping probably your next answer and tomorrow i will start to check for the material following your recommandation and the one of @Kalle_H
but great to see every day i can move forward !

Not sure if this will help any since I haven’t read the thread, but quite a while ago now @Ehamloptiran wrote a Fluid Surface plugin that was based on the old fluid surfaces of UE3, and converted it to run on the GPU.

This might be a good starting point if you want to look at doing some kind of GPU based simulation.

Do you mean via the transform node in Materials? Aww darn

Interesting, I had not seen that thread so I didnt even know James had done a CPU fluid sim either. Cool stuff.

Yes. Thankfully we have a workaround for now (the code posted in the previous post you quoted).

Hi Ryan did you get a chance to accede to my svn ? @thejamsh i took the time to check the tread you’ve mentionned, yes it was a intially a CPU Fluid simulaiton then in the last version a GPU but the plugin is no more available and the guy seem not here since long time now :stuck_out_tongue: but the good news is it was possible

I do not know what svn means, but I can tell you that I do not have any time to be opening up projects that people send me. Pretty much all my existing forum time happens in between project loads/compiles for projects I need to load on a day to day basis to keep up. I am happy to answer specific questions though.

Hey @RyanB, no problem i asked (never know) btw by SVN i was talking about tortoise SVN. on another topic did you get any news about the render target feature ? or should i await a specific unreal engine version ?

No news. if its in main now, you can be sure it will be in the next public release.

Thanks @RyanB in this case i will await the next before anoy you Again :stuck_out_tongue:

@RyanB quick question, i’ve tried to find on Unreal Engine 4 a Tutorial about How to create a FlameThrower effect using fluid, i guess i should also await the same feature :stuck_out_tongue: ?

I guess you could attempt to use that system for a flamethrower fluid sim. You would have to do quite a bit of experimentation to get it working as a weapon effect though. Traditional FX approach for a flamethrower is probably more easily doable.

If UE4 supports Alembic (or OpenVDB, since Blender supports that too), you could just run sim in Maya/Blender, mesh it, and bring it into UE4 as pre-sim’ed fluid.

This is the best I could do with one scene capture actor.
[video]Unreal Engine 4 - 2d water simulation - YouTube

at RyanB
Do you think it’ll be possible to have not only 2d, but 3d texture as render target. This way we could expand it to volumetric fluid simulation? Are you guys already doing this :stuck_out_tongue:

Yes we are working on 3d textures soon. You can already do it though by just treating it like a flipbook and using the subuv material function.