How to make water on a cube surface?(Help)

Hello, I am new to Unreal engine and I just can’t find a way to make water appear on all of the 6 cube sides(top,bottom,front.back,left and right) it’s only visible on the top and bottom of the cube and the rest of the cube just shows random stripes:

is there a way to change that?

Thanks in advance

Is this cube you made using a separate 3d software? Or you using Unreal cube? The way it looks to me its a UV map error, might have to create a cube yourself in 3ds max or something and then UV map it with different map chanels for each face.

yes I’m basically using an unreal cube, i have no experience with 3Ds max nor I have a licence to use it, is there another why that i might achieve this?

P.s the UV maps will basically allow me to use more then one material in the Unreal engine am I right?

I’ve managed to make a cube with an external program with 4 different elements and still the same problem consists

is it possible I did something wrong? if not, which other possibilities are there?

Get Blender, Its Free. Should be all you’ll need for most anything, Unless you want to pick up a copy of substance painter to paint your models with. Some people like sculptris for more organic models also free. And on the question of UV maps, Consider them like the address on your geometry for your texture. the UV maps out those addresses before hand so you can design your texture accordingly.

Cool stripes! The BSP brushes allow you to assign a different material to each face, might be a ‘quick fix’

Blender is an awesome program i played with it a little bit and it was really helpful but it still didn’t solve the problem

i tried the BSP brushes which gave me a semi solution because now the cube acted like a liquid surface but the direction the water waves were chaotic and when i tried to convert the brush to a static mesh it just acted like any other cube i created, so no real solution yet
(left is the bsp after it was converted to a static mesh, on the middle is the bsp before the conversion and on the right is the way i want the cube to look like i just gave it a slight rotation which fixes the bugs but the rotation is still a problem)

Hey, did you buy the material or can I pick it up somewhere?

It somehow seems that the water pattern it projected from above onto the cube. This way the sides are just stripes, i.e. very long stretched watern patterns, and the rotated cube renders ‘more’ correctly. Do you use any WS-expressions in your material? I assume this isn’t the water material from the starter content, so a screenshot of your material layout would help.

It is, if you ask me.
Try to edit the Ocean water from the starter content.
Change parent mat to translucent, play with values.
7430906efa8b8d0c425f802a28f4b29073f29e67.jpeg

I’m sorry, but I can’t reproduce this. I also don’t have this wave-mesh-deform / world-position-offset in the standard ocean material. I tried it with a standard UE cube and a BSP cube brush, and also set the material to translucent.

K Sir!
^^
Open launcher - Tutorials (or similar) Community, library, marketplace]
Klick on Water planes.
Migrate it to an existing project. (create one before if none).
When project with migrated content is opened, search for “Ocean” in the Contentbrowser.
There is a river and an ocean blueprint to play with.
:slight_smile:

maybe if you make 6 planes with the water texture on each one, and then you manually build a cube with them?

Okay folks, after I’ve finally found the material you were talking about, I managed to take a closer look. I want to give some background information, but if your not interested in this, simply fast forward to “What to do”.

Cause of problem:

When you open the material M_OceanWater_1 (which is hopefully the one you are talking about!), you see a lot of layouts like this:

ae0f5150e937ab1123a6448c9f24e8446a7f14b3.jpeg

It begins with the absolut world position, but then only the x and y coordinates are passed through via the Mask(R G) node. Then these xy coordinates are used as UV coordinates for the textures, which means that the side vertices, which share xy coordinates and only differ in z, are treated equally. That’s why there are these vertical stripes and it seams that the texture is projected onto the cube perpendicular from above.

Idea for solution:

The idea is to use a different pair of coordinates (xz or yz) as UV coordinates, depending on the side. So a side facing in x direction would need the yz coordinates of its vertices to be used as UVs.
The simplest way that came into my mind is to simply rotate the sides so that they are facing upwards (mathematically speaking). Then the rest can remain the same. So you simply look at the world normal of the vertex and turn it around the object center in such way that it equals the world z vector after the rotation. And luckily there’s already a material function for this.

What to do:

There are four ‘Absolute World Position’ nodes in the material. You simply extend these in following way:

2ce48cd53cd18c71a86464fde50f4e0fd99c6e2e.jpeg

This will rotate the faces upwards (mathematically speaking) and it should give you a result like this:

094b7838f973fd17aec00004acfc1ffa06ce20c5.jpeg

Displacement:

The main problem is, that the edges don’t fit together due to the displacement. So if a ‘plain’ cube is sufficient for you, you can just unplug the ‘World Displacement’ pin and you remove these gaps and everything’s fine.

But I tried something else to keep the displacement but remove the unwanted gaps. Also, the standard displacement only takes place in world z direction, but I wanted it to work in every direction. So heres the standard node layout that we need to tackle:

114177cd8d22909fffa140e61e59f5ad67034b6d.jpeg

The ‘Add’ node directly plugs into the ‘World Displacement’ pin so you should find it easily. Now we change this layout to this:

ac128ab67d9c14e8b77e4826e5da5df3e8675f41.jpeg

The idea is to create our custom displacement vector with a direction away from the object center (absolute position - object position). Then we take the z value from the standard displacement (since only this is set, as I’ve described before) and multiply it with the normalized direction vector. The right ‘Multiply’ node plugs into the ‘World Displacement’ pin.
Now the problem with that is that the heightmaps used for displacement don’t fit together. I couldn’t think of a way to do this, so I simply created a ‘RadialGradientExponential’ node and multiplied it with the last result before plugging it into the ‘World Displacement’ pin. This disables the displacement at the edges, since the gradient equals zero there (with default values, i.e. no values plugged in). Here is the result without (left) and with (right) the gradient and a ‘Displacement’ value of 5:

6f3aa69b3d4820c568d93c2c03e095d7fdfcb8fe.jpeg

I hope this helped you a bit and I would be glad if someone knows and posts a way that keeps the displacement at the edges but also closes the gaps.

OP, can’t you just select and add the water to each face separately? The sides properties just look wrong to me though I’m probably wrong.

In your material editor / Section Tessallation - check - crack free displacement
:slight_smile:

Wow, awesome! Thanks a lot!