Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mattatz/unity-teddy
Teddy algorithm implementation in Unity.
https://github.com/mattatz/unity-teddy
Last synced: 20 days ago
JSON representation
Teddy algorithm implementation in Unity.
- Host: GitHub
- URL: https://github.com/mattatz/unity-teddy
- Owner: mattatz
- License: mit
- Created: 2016-09-10T11:00:39.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-04-20T05:03:39.000Z (over 1 year ago)
- Last Synced: 2024-11-13T20:05:52.682Z (30 days ago)
- Language: C#
- Size: 7.85 MB
- Stars: 467
- Watchers: 31
- Forks: 66
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - mattatz/unity-teddy - Teddy algorithm implementation in Unity. (Unity3d / Miscs)
- awesome-unity-open-source-on-github - unity-teddy - Teddy algorithm implementation (Generator)
README
This repository is deprecated.
[The official release version](https://www.assetstore.unity3d.com/#!/content/99075) is in the asset store![Teddy](https://www.assetstore.unity3d.com/#!/content/99075)
unity-teddy
=====================Teddy algorithm (converting 2D polygon into 3D model) implementation in Unity.
## Usage
```cs
// input points for a Polygon2D contor
List points = new List();// Add Vector2 to points
points.Add(new Vector2(-2.5f, -2.5f));
points.Add(new Vector2(2.5f, -2.5f));
points.Add(new Vector2(4.5f, 2.5f));
points.Add(new Vector2(0.5f, 4.5f));
points.Add(new Vector2(-3.5f, 2.5f));// construct Teddy
Teddy teddy = new Teddy(points);Mesh mesh = teddy.Build(
MeshSmoothingMethod.HC, // select mesh smoothing methods : None, Laplacian, HC
5, // count of smoothing
0.25f, // alpha value for smoothing
0.5f // beta value for smoothing
);
// GetComponent().sharedMesh = mesh;
```## Demo
[Demo](https://mattatz.github.io/unity/teddy)
## Compatibility
tested on Unity 2018.2.6f, windows10 (GTX 1060).
## Sources
- Teddy: A Sketching Interface for 3D Freeform Design - http://www-ui.is.s.u-tokyo.ac.jp/~takeo/papers/siggraph99.pdf
- mattatz/unity-triangulation2D - https://github.com/mattatz/unity-triangulation2D
- mattatz/unity-mesh-smoothing - https://github.com/mattatz/unity-mesh-smoothing