How to scale Render Target Fluid Simulation?

Hi,

I am trying to use the Render Target fluid Simulation for my Game…

Unfortunately the Square is rather small and I need it bigger.
But scaling that square also makes the waves much bigger…see pic:

Tiling the uvs Copys the waves :frowning: same goes with copy the blueprint into to worldsee pic

I also tried to make a bigger high poly plane…but with that it completely stops working :frowning:

I Realy hope somebody can help PLAESE

The mesh size is set in the blueprint event graph, it’s the divide node (see pic). In the content examples for 415 the mesh is 1000x1000 so the divisor is 1000, this converts to texture space for the material. For other size meshes add the mesh to the blueprint and put is size in the divisor.

gonna try that thanks so far

Just like Marvelmaster, I’ve also been working with this example… I’ve been trying to get this example to work on a much bigger plane.

Zombiethatatehimself’s suggestion to modify the divisor DOES work, but there is a problem:

  • if you export the small plane as an FBX
  • scale it up in 3ds Max (say, by a factor of 10)
  • reimport it
  • increase the divisor (also by a factor of 10)

The problem is, that waves are now scaled by 10 also. I’ve tried using custom high poly planes (with the divisor scaled appropriately), but strangely only the original plane seems to work properly (as itself, or an FBX).

Can anyone help please?

Try adding these to the blueprint Event Graph,
Static mesh>get local bounds=max>break vector>divisor. Here (pic1)

and here (pic2)

To set the forcesplat add two variables, brush size and brush strength (make these editable). Then set this up like (pic3)

You can then scale mesh plus set the brush size and strength.

Zombiethatatehimself… thank you for your excellent, detailed reply. It’s working… and the effect looks so beautiful! :slight_smile:

I’m still working on figuring out a couple of things that are puzzling me. I’ll play with it for a while, see if I can figure things out by myself. If not, I’ll post here and hopefully you (or someone) will have time to respond. Thanks for your help mate! :slight_smile:

unfortunately it does not work for me…can somebody give example values for a 5x5 scaled plane`?

3rd person btw

Are you using the mesh from the content examples, if not check that your mesh is dense enough.

I struggled with this for a few days and I think I managed to get a swimming-pool sized reactive ripple effect. I’m not sure why, but only the original mesh ever worked for me. Sorry I’m not more helpful.

Example 1 the scale is set to 1. Example 2 the scale is set to 3.

Note the bp input is set to player 0 (if you don’t set this you will have no force splat).
Also the mesh needs to be dense with thousands of triangles (check wireframe view), a quad with 4 verts will not be sufficient.

unfortunately I think it does not work that way…when scaled the waves are much bigger spread…the point splash might have the right scale but the resulting waves are huge…
Maybe it depends on the texture size…but looks like the is not goot solution for me :(…best would be if you can snap these planes togehter and they form a new plane but this does not work either :frowning:
I wanted a 100x100meters plane with small waves :frowning:

If you look at the details panel of the example you will see the two variables that I added to the blueprint, Brush size and Brush strength. Scaling up the mesh will also make the force splat scale up, so the brush size will need to be set to a smaller value, but the brush strength will need to be set to a higher value.

yes…does not work…at a certain brush size the plane is just a mess of pixels

The water effect works in texture space, it’s limited by the render target resolution. A 1000x1000 render target texture on a 1000x1000 unit mesh will give you 1 pixel per unit in the world. If scaling the mesh up to lets say 5000x5000 will result in 1 pixel per 5 units in the world. This is why you lose detail. The force splat draws in texture space also, this i why it scales up when you scale the mesh up.
For a larger effect you would need to increase the render target texture resolution and increase the plane mesh density.

I worked with that today and if you don‘t need that displacement and the normal is enough for you I have a solution to present.

just ignore those mmo noises xD

that white square at the end is the original 1x1x1 size the whole plane is 20x20x20 and can basically be as large as you want it

if you are interested I‘ll post the answer tomorrow

The waves are much too big…if you get them stronger but smaller it would be nice :confused:
Like this:

The size is no problem I can fix that further. If you upload a small pack of that link example I could adjust everything perfectly for you.

hi Burning Sky… it looks really useful for my purposes… if you’d like to post a solution, I’m super-interested :smiley:

So I Posted a Water Project…please try make it 10x10 or 100x100 by saving the same Wavescale

This isn’t final and needs more tweaking and work to be perfect but it’s a start.

I took the render target resolution x4 to have some space to fade out.
I recommend going at least with a 1024x1024 res.

Now go into the “ForceSplat” material where you change the “ForceStrength” section to this.
This isn’t necessary but it’s going to make scaling the render target resolution and testing a bit easier.

We get the number of pixels in the render target and divide that by the number of pixels in the standard render target 256x256 to get how many times a 256x256 texture would fit into our new render target size and multiply this by the “ForceStrength” so the waves follow you smooth.

Now the main part, since we are going to tile the render target Output we need to manage the speed at which the ripples follow you.

Thats why we multiply the channels of the “ForcePosition” with the number of tiles.

  • Once you’ve finished doing this method changing “NumTiles” and the “TexCoord” in the water material is everything you need to change when you resize the plane.

After the multiply we ceil to get a whole number, decrement this number by 1 and subtract this from the multiply to stay in 0-1 range.

Now we modify the water shader to get rid of the tiles.
We build a distance blend, we take the distance from the camera to the absolute world position divide that by a large number to adjust the distance at which the other tiles fade out and then power it to have a sharp(>1) or smooth (<1)
Transition. we control the max alpha with a clamp.

In the lerp:

  • A is what you want to see
  • B is what you don’t want to see

Finally this step is totally optional you can create a parallax node that feeds into the normal map.
Otherwise plug the TexCoord directly into the normal.

Choose small height ratio values to get good results(make this smaller if you increase the render target Resolution).

EDIT: Totally forgot to mention that you have to adjust the TexelSize in the heightSim and ComputeNormal to 1/render target Resolution so in case you have a res of 1024 set texelSize to 0.000977

EDIT 2:

Modify the HeightSim like that and set the Default TravelSpeed to 0.44

1 Like