Coder Social home page Coder Social logo

openflowmap's Introduction

OpenFlowmap

image

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)

    image
  • We need an OpenFlowmap configuration. Create a new one in your project (Right click in the project window -> Create -> OpenFlowmap -> OpenFlowmapConfig) and assign it to the OpenFlowmap object. You can set the layer mask, number of rays, ray processors to use, etc.

    image
  • Now you need some processors to affect the flowmap. So far I have implemented these processors:

    • OuterFlow: This processor will push the flowmap in the direction of the normal of the mesh.
    • GlobalFlowDirection: This processor will push the flowmap in a global direction.
    • BlurEffect: This processor will blur the flowmap. useful for smoothing out the flowmap when you have a low number of rays.
    • FlowmapRenderer: This processor will render the flowmap to a texture.
  • Add the processors you want to use to the OpenFlowmap object. 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. or putting the flowmap renderer at the end of the list.

  • Or use available ones in Sample->Data->Processors directory (drag them into the processors field of the configuration file)

    image
  • You can Render the flowmap to a texture by adding a FlowmapRenderer processor to the OpenFlowmap configuration. it will create a texture at the same directory as your scene file. (feel free to change it)

There are few sample shaders and materials in Sample -> Shaders directory. you can use them to visualize the flowmap. just drag and drop desired material to the flowmap plane.

Example usage using sample processors:

HowToUse.mp4

openflowmap's People

Contributors

omid3098 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.