Shaders for MagicaVoxel including Terrain Generator, Advanced Flood System etc.
- 简体中文 - translated by CodingEric
- Français - translated by Pilou - Authorized reproduce
- Current version:
0.0.7.0
- State:
LTS
- Tested with
MagicaVoxel 0.99.2 for Windows
- Released under
MIT License
- Language:
GLSL
Copy the .txt files from the shader
directory in this project to the shader
directory of your MagicaVoxel installation.
Notice: The compatibility issue in older GLSL versions will be think of as bugs, please post them in the issues of the project.
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 | √ |
Note
- The parameters with<>
can be ignored. Mostly, they are set to 0 as default.
- The shaders are not designed for selected areas without specific explanation.
- Terrain generator
- Flow
- Flow2
- Project
- [Unstable] Hyperflood
- Life game
- Blanket
- Cube filling
- Flood
- Darker
- File name:
tergen.txt
- Command-line usage:
xs tergen [seed] [altitude] [noise-scale] [voxel-color] <void-voxel-color> <vertical-shifting> <x-shifting> <y-shifting>
- Command-line e.g.:
xs tergen 19260817 50 20 1 0 -10 10 10
- Minimal edition e.g.:
xs tergen 19260817 50 20 1
- It is recommended that you set the scene size to 126x126x126 for the best view.
This shader will empty your scene.Set void-voxel-color to -1 to not remove the original scene.- 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)
This shader emulates the waterflow mechanics in the nature.
- File name:
flow.txt
- Command-line usage:
xs flow [color-index]
- Command-line e.g.:
xs flow 1
The voxels with given index are water source, the shader would not automatically create them, you must attach them first.
In fact, it's a replacement of the unstable
hyperflood
shader.
In the fig.2 of preview section, you can see the shader does provide a solution for the closed areas.
- File name:
flow2.txt
- Command-line usage:
xs flow2 [color-index]
- Command-line e.g.:
xs flow2 1
The voxels with given index are water source, the shader would not automatically create them, you must attach them first.
Project the color of a given x-y plane to the suface under it.
- File name:
project.txt
- Command-line usage:
xs project [height]
- Command-line e.g.:
xs project 64
UNSTABLE. DO NOT USE.
GO TO FLOW2 INSTEAD.
Unlike the classic flood shader, this shader provides a solution for closed water area.
- File name:
hyperflood.txt
- Command-line usage:
xs hyperflood [x] [y] [z]
(The parameters represent the coordinate of the water source.) - Command-line e.g.:
xs hyperflood 3 5 3
- The color of water is controlled by selected color in the palette.
- DANGER - READ BEFORE USE
- THE SHADER ONLY SUPPORTS SCENES WITH LESS THAN 40 UNITS OF XYZ-VOLUMESIZE. (You can change line 17 to remove the limit, but think over first.)
- LIMITED BY THE INNER EXPLAINATOR OF MAGICAVOXEL, THE SHADER IS NOT STABLE. IF THE FILLING SPACE IS TOO LARGE, MAGICAVOXEL MAY CRASH.
- File name:
lifegame.txt
- Command-line usage:
xs lifegame [color-index]
- Command-line e.g.:
xs lifegame 1
Designed for x-y plane. Use single color in your scene, or the shader will destroy it.
- File name:
blanket.txt
- Command-line usages:
xs blanket [voxel-color] <noise-seed> <noise-scale> <threshold (0~2 recommend)>
- Command-line e.g.:
xs blanket 1 1248343 20 1.4
- Minimal edition e.g.:
xs blanket 1
- The shader will only cover the areas that are not covered. (Like snow)
- Esp. if both Terrain Generator & Blanket Shader have the same noise seed as well as scale, and the xyz-shifting of the Terrain Generator is zero, the result of the two shaders mixed together will be like realistic snow cover of high mountains. (fig. 3)
-
File name:
cubefill.txt
-
Command-line usages:
xs cubefill [mode (0 for filling, 1 for frame)] [point1_X] [point1_Y] [point1_Z] [point2_X] [point2_Y] [point2_Z] [voxel color]
xs cubefill [mode (0 for filling, 1 for frame)] [pointX] [pointY] [pointZ] [length of a side] [voxel color]
-
Command-line e.g.:
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).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:
This shader will not empty your scene.
- File name:
flood.txt
- Command-line usage:
xs flood [height] [color]
- Command-line e.g.:
xs flood 60 169
- File name:
darker.txt
- Command-line usage:
xs darker
This shader requires you to set the palette id to 0.