Generate flowmap dynamically from your scene.
Note: It is not recommended to use this in real-time, as it is quite expensive.
Clone this repository into your project's Assets
folder.
TODO: Add UPM installation instructions
Create a new Flowmap_Plane in your scene. (Right click in the hierarchy -> OpenFlowmap)
Drag and drop processors like RealisticFlow and BlurEffect to the Processors list. you can find them in OpenFlowmap/Data/Processors/ directory. Please note that the processors will be executed in the order they are in the list. so if you want to blur the flowmap, you need to add the blur processor after something like outer flow.
Select the Layermask to check for obstacles along the flow.
Create a RenderTexture and assign it to the render texture field in the OpenFlowmap Behaviour
You can enable ProcessEveryFrame to update the changes everyframe. like when you want to change the position of obstacles.
There are few sample shaders and materials in Sample directory. you can use them to visualize the flowmap. just drag and drop desired material to the flowmap plane.
https://github.com/omid3098/OpenFlowMap/assets/6388730/451b602e-d59a-4bdb-b596-2e5c0e3acdcf