OpenFlowMap
OpenFlowMap copied to clipboard
OpenFlowmap
Generate flowmap dynamically from your scene.
Note: It is not recommended to use this in real-time, as it is quite expensive.
Installation
Manually
Clone this repository into your project's Assets folder.
Unity Package Manager
TODO: Add UPM installation instructions
Usage
-
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.
-
OuterFlow: This processor will push the flowmap in the direction of the normal of the mesh.
-
BlurEffect: This processor will blur the flowmap. useful for smoothing out the flowmap when you have a low number of rays.
-
RealisticFlow: This processor will simulate a realistic 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.
Example usage using sample processors:
https://github.com/omid3098/OpenFlowMap/assets/6388730/451b602e-d59a-4bdb-b596-2e5c0e3acdcf