Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to make an interactive water?

I want to make a water which can have some interactions with actors. I have got some videos showing that how to make waves. But I want to make the actor trigger the wave. For example, when the actor jumps out of the water, the water begins to have the wave. In order to implement this kind of effect, I think I need to make the material communicate with the actor. But I don't know how to do this.

Thanks a lot. p.s. Sorry for my English. It's not my native language.

Product Version: UE 4.12
more ▼

asked Nov 04 '16 at 08:09 AM in Rendering

avatar image

1 1 2 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

That depends, what is your water? Is it only a material, a blueprint?

You could make a blueprint with the water and then a On Component Overlap or something like that

more ▼

answered Nov 04 '16 at 08:27 AM

avatar image

540 22 10 36

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

The question is, do you want the interaction to be one way or two way. For one way interaction, you can use dynamic material instances to feed vector parameters(like an actor location) and texture parameters(like a material drawn to a render target). For two way interaction, you need a way get the output of a material back from the GPU. This requires C++. It is very expensive, so you need to think carefully about how to implement it. Like, with the original example, does an entire heightmap need to be generated in a render target to do buoyancy calculations? Or can a much smaller CanvasRenderTarget2D(where each pixel is the location of a test point) be used as input into a wave generating material and drawn to a render target of the same size?

If you create a new c++ project, you can use the code from these files to add a render target reader component that's usable through blueprints. Just change

 #include "MaterialInteraction.h"

found in RenderTargetReader.cpp, to:

 #include "yourprojectname.h"

and change


found in RenderTargetReader.h, to:


This works in 4.13

more ▼

answered Nov 04 '16 at 09:47 PM

avatar image

249 4 5 13

avatar image momoSuper Nov 07 '16 at 01:37 AM

Thank you for your reply. One way interactive is good enough for me. I find an algorithm for calculating wave, but it needs to communicate between two textures. It will calculate the height step by step, and each step will be based on the result from the previous step. So it stores the height information in one texture, and then calculate the height of the second texture based on the first texture, next calculate the height of the first texture based on the height of the second texture. Can I use two materials to implement this kind of calculation?

Thanks again.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question