Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leloctai/rock-generator
C# rock generator
https://github.com/leloctai/rock-generator
csharp procedural-generation unity unity3d
Last synced: about 14 hours ago
JSON representation
C# rock generator
- Host: GitHub
- URL: https://github.com/leloctai/rock-generator
- Owner: LeLocTai
- License: other
- Created: 2020-04-23T09:40:52.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-29T08:21:55.000Z (over 4 years ago)
- Last Synced: 2023-11-07T19:09:41.887Z (about 1 year ago)
- Topics: csharp, procedural-generation, unity, unity3d
- Language: C#
- Homepage: https://leloctai.com/rock-generator
- Size: 19.8 MB
- Stars: 140
- Watchers: 7
- Forks: 16
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Rock Generator
WIP.**Demo**: http://leloctai.com/rock-generator/
Everything in the RockGen namespace should work with netstandard 2.0, outside of Unity.
For use in Unity, some type conversion is required.
## Example```c#
// No default are provided at the moment
// Check out the demo page to see what each setings doesvar settings = new RockGenerationSettings {
GridSettings = new VoronoiGridSettings {
Size = 5,
Randomness = .75f
},
StockDensity = 8,
TargetTriangleCount = 220,
Distortion = .5f,
PatternSize = 1.35f,
Transform = Convert.FromUnityMatrix(UnityEngine.Matrix4x4.TRS(new Vector3(2, 2, 2),
Quaternion.identity,
Vector3.one))
};generator = new RockGenerator {Settings = settings};
GetComponent().mesh = Convert.ToUnityMesh(generator.MakeRock());
```Look at the Rock Fountain sample for more details.
## Dependencies
- [MeshDecimator](https://github.com/Whinarn/MeshDecimator)
## TODO
- Simpler work flow in Unity.
-## Sponsors
Me. My free Unity assets are backed by my paid one. Check them out:
- [Translucent Image - Fast blurred background UI](https://leloctai.com/asset/translucentimage/)
- [True Shadow - UI Soft Shadow and Glow](https://assetstore.unity.com/packages/slug/176322?aid=1011l4nGC)