forked from keijiro/Swarm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2017 Keijiro Takahashi | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
Swarm | ||
===== | ||
|
||
**Swarm** is an experimental project that tries to find an interesting way of | ||
utilizing the [procedural instancing] feature that was newly introduced in | ||
Unity 5.6. | ||
|
||
There are two types of renderers in *Swarm*. | ||
|
||
**Swirling Swarm** | ||
|
||
![screenshot](http://i.imgur.com/XoOMqTIm.png) | ||
![screenshot](http://i.imgur.com/NNFsWBDm.png) | ||
|
||
*Swirling Swarm* simulates particle motion within a [divergence-free noise | ||
field] and draws trace lines along it. The simulation is reset in every frame, | ||
but the noise field keeps moving slowly, so that it gives the impression that | ||
the swirls are slowly moving around and changing their shapes. | ||
|
||
**Crawling Swarm** | ||
|
||
![screenshot](http://i.imgur.com/SkIZUAT.gif) | ||
![screenshot](http://i.imgur.com/tci4x1V.gif) | ||
|
||
The basic concept of *Crawling Swarm* is the same to *Swirling Swarm*; it | ||
simulates particle motion within a noise field, but it's constrained with a | ||
[distance field volume]. It tries to keep distances between the particles and | ||
the object surface as low as possible. It gives the feeling that the lines are | ||
crawling around on the surface and cover it. | ||
|
||
[procedural instancing]: https://docs.unity3d.com/ScriptReference/Graphics.DrawMeshInstancedIndirect.html | ||
[divergence-free noise field]: http://martian-labs.com/martiantoolz/files/DFnoiseR.pdf | ||
[distance field volume]: https://github.com/keijiro/DFVolume | ||
|
||
System Requirements | ||
------------------- | ||
|
||
- Unity 5.6 or later | ||
|
||
*Swarm* only runs on the platforms that support [compute shaders] and [GPU | ||
instancing]. | ||
|
||
[compute shaders]: https://docs.unity3d.com/Manual/ComputeShaders.html | ||
[GPU instancing]: https://docs.unity3d.com/Manual/GPUInstancing.html | ||
|
||
License | ||
------- | ||
|
||
[MIT](LICENSE.md) |