mirror of
https://github.com/celisej567/metaballs.git
synced 2026-09-15 20:12:36 +03:00
grammatics
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
# Unity 3D metaballs
|
||||
Unity 3D implementation of marching cubes algorithm for rendering metaballs. It can be used for gameplay purposes (gels in Valve's Portal 2), or as a decoration, as shown in the image below.
|
||||
Unity 3D implementation of marching cubes algorithm for rendering metaballs. Metaballs can be used for gameplay purposes (gels in Valve's Portal 2), or as a decoration, as shown in the image below. They can also be used to visualise various fields in physics (for example, each metaball can represent single point charge and electrostatic potetial due to point charge equation used as a falloff function).
|
||||
|
||||

|
||||
|
||||
Metaball functions are envaluated on GPU or CPU, but GPU mode performs about 10x faster. Currently there is only 1 falloff functions available:
|
||||
Metaball functions are envaluated on either GPU or CPU. GPU mode performs about 10x faster than CPU. Currently there is only one falloff functions available:
|
||||
|
||||
```f(d) = r^2 / d^2```
|
||||
|
||||
Where *r* is radius of the metaball, and *d* is distance from metaball's center to current point. Additional functions can be quickly added as a new compute shader based on the existing one.
|
||||
Where *r* is radius of the metaball, and *d* is distance from metaball's center to current point. Additional functions can be quickly added as a new compute shader.
|
||||
|
||||
## TODO list:
|
||||
* add more falloff functions
|
||||
|
||||
Reference in New Issue
Block a user