GithubHelp home page GithubHelp logo

forge's Introduction

forge

Procedural Modeling plugin for Unity3D.

Creating procedural assets

Procedural Assets are created by subclassing Forge.ProceduralAsset and overriding the Build() method which should return a Geometry instance. Forge.ProceduralAsset itself subclasses MonoBehaviour, meaning that you can add the script to an empty Game Object.

Exposing public parameters works perfectly as a way to parameterize your procedural asset via the built-in Unity editor.

The classes are designed to work well with a node-based visual editor, where the connections are instances of Geometry being passed from one class instance to the next.

When appropriate, they can receive one ore more geometries as input by implementing Input(), have public fields to parameterise their actions and must implement Output() to pass on the resulting geometry.

Primitives

  • Point
  • Line
  • Triangle
  • Square
  • Cuboid
  • Circle
  • Cylinder
  • Hemisphere
  • Sphere

Filters

  • Bridge: Connects adjacent polygons in the input geometry with triangle faces. Ex. two or more circles positioned vertically creates a cylinder.
  • Converge: Adds a vertex at the specified point and creates triangle faces from every two original vertices to that new point. Creates shapes like pyramids and cones.
  • ExtractFaces: Outputs only the faces (and their vertices) specified by an array of face indices.
  • ExtractVertices: Outputs only the vertices specified by an array of face indices.
  • Fuse: Fuses vertices together based on a threshold distance, creating contiguous surfaces and averaging their normals. Results in a "smooth" shaded surface. For now this is a naive, expensive O(n^2) operation.
  • Manipulate: Manipulate the geometry basic transforms: Position, Rotation and Scale.
  • Merge: Merges one or more geometries into one.
  • Mirror: Outputs the mirrored image of a geometry along a specified axis.
  • Polygonize: Outputs a polygon with line segments connecting all the vertices of the input geometry in their index order.
  • Reverse: Reverses the order of vertices in each triangle face, inverting the face normal.
  • Triangulate: Triangulates a 2D polygon.

forge's People

Contributors

rev087 avatar

Watchers

 avatar  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.