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.
asked Nov 04 '16 at 08:09 AM in Rendering
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
answered Nov 04 '16 at 08:27 AM
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
found in RenderTargetReader.cpp, to:
found in RenderTargetReader.h, to:
This works in 4.13
Follow this question
Once you sign in you will be able to subscribe for any updates here