All Projects → federicocasares → unity-plumber

federicocasares / unity-plumber

Licence: MIT License
A component to procedurally generate pipe-like meshes in Unity

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to unity-plumber

roadifier
Open Source road mesh generator script for Unity
Stars: ✭ 30 (-45.45%)
Mutual labels:  gamedev, generator, mesh, mesh-generation, meshes
ofxCorkCsg
A constructive solid geometry (mesh boolean) addon for openFrameworks.
Stars: ✭ 43 (-21.82%)
Mutual labels:  mesh, mesh-generation
Entitas Sync Framework
Networking framework for Entitas ECS. Targeted at turnbased games or other slow-paced genres.
Stars: ✭ 98 (+78.18%)
Mutual labels:  gamedev, generator
Meshlab
The open source mesh processing system
Stars: ✭ 2,619 (+4661.82%)
Mutual labels:  mesh, mesh-generation
Building Blocks
A voxel library for real-time applications.
Stars: ✭ 140 (+154.55%)
Mutual labels:  gamedev, mesh
skeletor
3D skeleton extraction from meshes.
Stars: ✭ 115 (+109.09%)
Mutual labels:  mesh, meshes
Point2Mesh
Meshing Point Clouds with Predicted Intrinsic-Extrinsic Ratio Guidance (ECCV2020)
Stars: ✭ 61 (+10.91%)
Mutual labels:  mesh, mesh-generation
intersection-wasm
Mesh-Mesh and Triangle-Triangle Intersection tests based on the algorithm by Tomas Akenine-Möller
Stars: ✭ 17 (-69.09%)
Mutual labels:  mesh, meshes
SkeletonBridgeRecon
The code for CVPR2019 Oral paper "A Skeleton-bridged Deep Learning Approach for Generating Meshes of Complex Topologies from Single RGB Images"
Stars: ✭ 72 (+30.91%)
Mutual labels:  mesh, mesh-generation
zig-opengl
OpenGL binding generator based on the opengl registry
Stars: ✭ 29 (-47.27%)
Mutual labels:  gamedev
GLFW-CMake-starter
Use CMake to create a project with GLFW - Multi-platform Windows, Linux and MacOS.
Stars: ✭ 53 (-3.64%)
Mutual labels:  gamedev
yii2-rest-doc
Yii2 REST doc generator
Stars: ✭ 35 (-36.36%)
Mutual labels:  generator
ScriptableObjectMultiSelectDropdown
Multi Select Dropdown for ScriptableObjects
Stars: ✭ 18 (-67.27%)
Mutual labels:  gamedev
combustor
MVC code generator for the Codeigniter framework.
Stars: ✭ 31 (-43.64%)
Mutual labels:  generator
yang-schematics
Yet Another Angular Generator - based on @schematics/angular
Stars: ✭ 16 (-70.91%)
Mutual labels:  generator
bitECS
Functional, minimal, data-oriented, ultra-high performance ECS library written in JavaScript
Stars: ✭ 372 (+576.36%)
Mutual labels:  gamedev
username-generation-guide
A definitive guide to generating usernames for OSINT purposes
Stars: ✭ 38 (-30.91%)
Mutual labels:  generator
currender
Currender: A CPU renderer for computer vision
Stars: ✭ 26 (-52.73%)
Mutual labels:  mesh
3ddensenet.torch
3D DenseNet(torch version) for ModelNet40 dataset
Stars: ✭ 43 (-21.82%)
Mutual labels:  mesh
jfastnet
Fast, reliable UDP messaging for Java. Designed for games.
Stars: ✭ 26 (-52.73%)
Mutual labels:  gamedev

UnityPlumber

(a component to procedurally generate pipe-like meshes in Unity)

Screenshot

Important Information

This repository contains an example project. These files are distributed here only as part of the example scene to demonstrate the capabilities of UnityPlumber. If you are not interested in that and only want the component itself to test it out in your own project, feel free to proceed to copy only the PipeMeshGenerator.cs file and the Math3D.cs file to the Scripts directory and nothing else.

Installation

Getting UnityPlumber running is pretty easy. You simply need to get a copy of the PipeMeshGenerator.cs and Math3D.cs files in the Scripts directory and copy them to your project. Once there, simply add the PipeMeshGenerator component to an empty GameObject, set the options and you are good to go!

What do the options mean?

Almost all of the settings are pretty much self explanatory, but here are the details:

  • points: A list of Vector3 containing all points the pipe should connect.
  • pipeRadius: The radius for the cross section of the pipe.
  • elbowRadius: The radius for the elbows that are automatically generated between each segment.
  • pipeSegments: The number of faces in each pipe segment. Higher numbers mean smoother (rounder) looking pipes. Recommended values: 8 to 16.
  • elbowSegments: The number of cross-sections to generate in each elbow where the pipe bends. Recommended values: 6 to 10.
  • pipeMaterial: An Unity Material that will be applied to the MeshRenderer component in order to render the mesh.
  • flatShading: Enabling this option will disable smoothing and make a flat-shaded low-poly style pipe. Enabling this will increase vertex count greatly!
  • avoidStrangling: Enabling this option will cause the algorithm to try to avoid twists in elbows. This usually fixes some problems and causes new ones, so experiment to see what works best in your particular case.
  • generateEndCaps: Enabling this option will automatically generate circular end caps on each end of the pipe.
  • generateElbows: Enabling this option will make pipe segments be connected by toroidal arc elbows. If the option is off, only the straight segments of the tubes will be generated.
  • generateOnStart: Enabling this option will make the component generate the mesh automatically when started. Disable it if you need to set the points manually in runtime first and generate the mesh later.
  • makeDoubleSided: Duplicates all faces with inverted normals so your pipes will be visible not only from the outside but also from the inside. What matters is what's on the inside, after all.
  • colinearThreshold: The algorithm will automatically remove any colinear points in your points list in order to improve performance and avoid ending up generating elbows that would require an infinite radius. Change this value to determine how sensitive the removal of those almost-colinear points should be. The higher the value, the higher the number of points that will end up being removed.

Public Methods

RenderPipe()

Generates the pipe mesh with the specified options. Automatically adds MeshFilter and MeshRenderer components to the object if they are not present.

Math 3D Helper Class

This project makes use of the Math3D.cs file, which has been obtained from https://github.com/kristofe/UnityVolumeOculus, another project distributed under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].