Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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 does

var 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)