-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for graphical parameter settings. Streamline documentation. Add some renderings.
- Loading branch information
1 parent
351e194
commit 0230755
Showing
19 changed files
with
312 additions
and
460 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,211 +1,120 @@ | ||
# Eric's MagicaVoxel Shaders | ||
aka EMVS. | ||
|
||
Shaders for MagicaVoxel including Terrain Generator, Advanced Flood System etc. | ||
|
||
## Internationalization | ||
- <a href="./i18n/README-sc.md">简体中文</a> - translated by <a href="http://github.com/codingeric">CodingEric</a>, target version: `0.1.0.0` | ||
- <a href="./i18n/README-sc.md">简体中文</a> - translated by <a href="http://github.com/codingeric">CodingEric</a>, target version: `54` | ||
- <a href="./i18n/README-fr.md">Français</a> - translated by <a href="http://moiscript.weebly.com/magicavoxel.html">Pilou</a> - Authorized reproduce, target version: `0.0.7.0` | ||
|
||
## Project Info | ||
* Current version: `0.1.0.1` | ||
* Tested with `MagicaVoxel 0.99.4 for Windows` | ||
* Current version: `54` | ||
* Released under `MIT License` | ||
* Language: `GLSL` | ||
|
||
## Installation | ||
Copy the .txt files from the `shader` directory in this project to the `shader` directory of your MagicaVoxel installation. | ||
|
||
## Compatibility | ||
>Notice: The compatibility issue in older GLSL versions are thought of as issues. | ||
|
||
| Version | Is compatible | Note | | ||
| ------ | :------: | ------ | | ||
| 0.98.2 | √ | No world system supported | | ||
| 0.99 | √ | Cannot show color id in the command panel | | ||
| 0.99.1 | √ | Cannot show color id in the command panel | | ||
| 0.99.2 | √ | | | ||
| 0.99.3 | √ | | | ||
| 0.99.4.2 | √ | | | ||
| 0.99.5 and before | not compatible after EMVS version 54 | | | ||
| 0.99.5.1 and after | all EMVS versions are compatible | | | ||
|
||
## Roadmap | ||
|
||
* Cloud generator | ||
* Implement more options (turbulence and so on) to the terrain generator. | ||
* Tree randomizer. | ||
|
||
## Contribution | ||
Feel free to make a PR as long as you've followed the contributing guidelines. | ||
## Debugging | ||
|
||
## Debug | ||
See <a href="https://github.com/CodingEric/Erics-MagicaVoxel-Shaders/issues/2#issuecomment-449905598">this issue</a>. | ||
|
||
## Shaders and usages | ||
>**Note** <br> - The parameters with `<>` can be ignored. Mostly, they are set to 0 as default. <br> - The shaders are not designed for selected areas without specific explanation. <br> - The documentation of deprecated/unstable shaders can be found in their folders. | ||
### INDEX | ||
* <a href="#tergen">tergen (Terrain Generator)</a> | ||
* <a href="#tergen2">tergen2 (Terrain Generator 2)</a> | ||
* <a href="#cave">cave (3D Noise Generator)</a> | ||
* <a href="#flow">flow (Waterflow Emulator)</a> | ||
* <a href="#flow2">flow2 (A procedural closed-area filler)</a> | ||
* <a href="#project">project (3d object to 2d plane)</a> | ||
* <a href="#lifegame">lifegame (A 2d cellular automaton)</a> | ||
## Shaders | ||
Starting from version 54, EMVS **no longer** supports command execution. Please configure the relevant parameters through the graphical options provided by MagicaVoxel 0.99.5.1 onwards. | ||
|
||
At the same time, for the graphical options are very clear, the explanations of parameters are not provided in this document. | ||
|
||
### Index | ||
* <a href="#tergen">tergen</a> | ||
* <a href="#tergen2">tergen2</a> | ||
* <a href="#cave">cave</a> | ||
* <a href="#flow">flow</a> | ||
* <a href="#flow2">flow2</a> | ||
* <a href="#project">project</a> | ||
* <a href="#gol">gol</a> | ||
* <a href="#drop">drop</a> | ||
* <a href="#cubefill">cubefill</a> | ||
|
||
### tergen | ||
<a href="#index">index</a> | ||
* Usage: | ||
``` | ||
xs tergen [seed] [altitude] | ||
[noise-scale] [voxel-color] <void-voxel-color> <vertical-shifting> <x-shifting> <y-shifting> | ||
``` | ||
* Example: | ||
``` | ||
xs tergen 19260817 40 90 1 -1 10 -50 -10 | ||
xs tergen 19260817 40 90 1 | ||
``` | ||
|
||
>1. Set void-voxel-color to -1 to not remove the original scene. | ||
>2. By using the xyz-shifting of the shader & the new *world* system of MagicaVoxel 0.99.x, you'll be able to create a large terrain map. (fig. 3) | ||
* Image preview: | ||
|
||
<img src="img/tg.png" width="250px"><img src="img/tg1.png" width="250px"><img src="img/tg2.png" width="250px"> | ||
|
||
"tergen" is a 2d noise generator. | ||
|
||
* Set Air Color to -1 to retain existing voxels. | ||
* By using the xyz-shifting of the shader & the new *world* system of MagicaVoxel 0.99.x, you'll be able to create a large terrain map. (fig. 3) | ||
|
||
<img src="img/tg.png" width="250px"><img src="img/tg1.png" width="250px"><img src="img/tg2.png" width="250px"> | ||
|
||
### tergen2 | ||
<a href="#index">index</a> | ||
* Usage: | ||
``` | ||
xs tergen2 [seed] [altitude] | ||
[noise-scale] [voxel-color] <void-voxel-color> <vertical-shifting> <x-shifting> <y-shifting> | ||
``` | ||
* Example: | ||
``` | ||
xs tergen2 19260817 16 70 1 -1 -10 -50 -10 | ||
xs tergen2 19260817 16 70 1 | ||
``` | ||
>Set void-voxel-color to -1 to not remove the original scene. | ||
* Image preview: | ||
|
||
<img src="img/tg2_2.png" width="250px"><img src="img/tg2_1.png" width="250px"> | ||
|
||
"tergen2" is a modified version of "tergen", which creates terrain only above the existing voxels. | ||
|
||
Set Air Color to -1 to retain existing voxels. | ||
|
||
<img src="img/tg2_2.png" width="250px"><img src="img/tg2_1.png" width="250px"><img src="img/tg2_3.png" width="250px"><img src="img/tg2_4.png" width="250px"> | ||
|
||
### cave | ||
<a href="#index">index</a> | ||
* Usage: | ||
``` | ||
xs cave [seed] [noise-scale] [voxel-color] [void-voxel-color (-1 for not emptying the scene)] [vertical-shifting] [x-shifting] [y-shifting] | ||
``` | ||
* Example: | ||
``` | ||
xs cave 19260817 75 1 -1 10 10 10` | ||
xs cave 19260817 75 1 -1 | ||
``` | ||
>Set void-voxel-color to -1 to not remove the original scene. | ||
* Image preview: | ||
|
||
<img width="250px" src="img/cave.png"> | ||
|
||
"cave" is a 3d noise generator. | ||
|
||
Set Air Color to -1 to retain existing voxels. | ||
|
||
<img width="250px" src="img/cave.png"> | ||
|
||
### flow | ||
<a href="#index">index</a> | ||
* Usage: | ||
``` | ||
xs flow [color-index] | ||
``` | ||
* Example: | ||
``` | ||
xs flow 1 | ||
``` | ||
> The voxels with given index are water source, the shader would not automatically create them, you must attach them first. | ||
* Image preview: | ||
|
||
<img src="img/flowShader.png"> | ||
|
||
"flow" simulates the downflow of water in nature. | ||
|
||
* You may set Iteration value to a certain number to simplify the process. | ||
* The voxels with given index are water source, the shader would not automatically create them, you must attach them first. | ||
|
||
<img src="img/flowShader.png"> | ||
|
||
### flow2 | ||
<a href="#index">index</a> | ||
* Usage: | ||
``` | ||
xs flow2 [color-index] | ||
``` | ||
* Example: | ||
``` | ||
xs flow2 1 | ||
``` | ||
If you're tired of keeping executing this, consider the `-n [num interations]` parameter. | ||
> The voxels with given index are water source, you must attach them first. | ||
* Image preview: | ||
|
||
<img width="250px" src="img/flow2_1.png"> | ||
<img width="250px" src="img/flow2_2.png"> | ||
|
||
"flow2" is a modified version of "flow", by keep executing it, you can fill an enclosed area well without overflowing to the outside. | ||
|
||
* You may set Iteration value to a certain number to simplify the process. | ||
* The voxels with given index are water source, you must attach them first. | ||
|
||
<img width="250px" src="img/flow2_1.png"> | ||
<img width="250px" src="img/flow2_2.png"> | ||
|
||
### project | ||
<a href="#index">index</a> | ||
> Supports x-y plane only. (To be fixed) | ||
* Usage: | ||
``` | ||
xs project [height] | ||
``` | ||
* Example: | ||
``` | ||
xs project 64 | ||
``` | ||
* Image preview: | ||
|
||
<img width="250px" src="img/pro.png"> | ||
<img width="250px" src="img/pro1.png"> | ||
<img width="250px" src="img/pro2.gif"> | ||
### lifegame | ||
|
||
"project" enables you to project a 2d plane onto the surface of 3d objects below it. | ||
|
||
<img width="250px" src="img/pro.gif"> | ||
|
||
### gol | ||
<a href="#index">index</a> | ||
* Usage: | ||
``` | ||
xs lifegame [color-index] | ||
``` | ||
* Example: | ||
``` | ||
xs lifegame 1 | ||
``` | ||
> Designed for x-y plane. Use single color in your scene, or the shader will destroy it. (To be fixed) | ||
* Image preview: | ||
|
||
<img src="img/l1.png" width="250px"> | ||
<img src="img/l2.png" width="250px"> | ||
<img src="img/l3.png" width="250px"> | ||
|
||
"gol" is the voxel shader for Conway's Game of Life. | ||
|
||
The shader is designed for x-y plane. Use single color in your scene, or the shader will destroy it. (To be fixed) | ||
|
||
<img src="img/l1.png" width="250px"><img src="img/l2.png" width="250px"><img src="img/l3.png" width="250px"> | ||
|
||
### drop | ||
<a href="#index">index</a> | ||
> This shader simulates the drop process. | ||
* Usage: | ||
``` | ||
xs drop [color-index] | ||
``` | ||
* Example: | ||
``` | ||
xs drop 1 | ||
``` | ||
* Image preview: | ||
|
||
<img src="img/dr1.png" width="120px"><img src="img/dr2.png" width="120px"><img src="img/dr3.png" width="120px"><img src="img/dr4.png" width="120px"><img src="img/dr5.png" width="120px"> | ||
### cubefill | ||
<a href="#index">index</a> | ||
* Usage: | ||
|
||
1. | ||
``` | ||
xs cubefill [mode (0 for filling, 1 for frame)] [point1_X] [point1_Y] [point1_Z] [point2_X] [point2_Y] [point2_Z] [voxel color] | ||
``` | ||
|
||
2. | ||
``` | ||
xs cubefill [mode (0 for filling, 1 for frame)] [pointX] [pointY] [pointZ] [length of a side] [voxel color] | ||
``` | ||
* Example: | ||
|
||
1. | ||
|
||
``` | ||
xs cubefill 1 1 1 1 7 2 2 216 | ||
``` | ||
Draw the edge frame of a red cuboid between the coordinates (1,1,1) and (7,2,2). | ||
|
||
2. | ||
|
||
``` | ||
xs cubefill 0 50 50 50 10 216 | ||
``` | ||
Take coordinates (50,50,50) as the center, create a red cube with a side length of 10 units. | ||
* Image preview: | ||
|
||
<img src="img/cf.png" width="250px"> | ||
|
||
"drop" moves the dangling voxel down one unit in a single execution. | ||
|
||
<img src="img/dr1.png" width="120px"><img src="img/dr2.png" width="120px"><img src="img/dr3.png" width="120px"><img src="img/dr4.png" width="120px"><img src="img/dr5.png" width="120px"> | ||
|
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
File renamed without changes.
Oops, something went wrong.