Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.
Felix edited this page Feb 11, 2017 · 4 revisions

VoxelDesc is a voxel editor driven by a command line, for Java 6 and 7, with 2.5D graphics and powerful scripting.

Typical voxel editors would have you place every single voxel by clicking with the mouse, which is slow, repetitive and error-prone. All the tedium of Minecraft with none of the fun! By contrast, VoxelDesc allows you to say things like scene.color(red).from(-2, -2, -2).fill(4, 4, 4). This is not for everyone. But in the right hands, it should enable the creation of sophisticated scenes.

Quick start

Type the following at the command line (press Enter each time):

camera.moveTo(0, 15, -30);
scene.color(red).from(-4, -4, -4).fill(4, 4, 4);
scene.color(green).from(-2, -2, -2).fill(4, 4, 4);
scene.color(blue).from(0, 0, 0).fill(4, 4, 4);

Ta-daa! You're off to a good start! Now go click all the buttons and see what they do.

Features and limitations

VoxelDesc is a pure voxel editor. A full description of voxels is outside the scope of this manual. Suffice to say, just as an ordinary picture (say, a GIF) is made of little colored squares arranged in a grid -- called pixels -- a voxel scene is made of little colored cubes which just happen to have a depth as well. That's it. No lighting or other fancy effects. You make voxels stand out from each other by giving them different colors, just like you would in pixel art.

In theory, VoxelDesc supports scenes of up to 16.7 million voxels (256x256x256). In practice, 10K voxels already slow down the app noticeably. Then again, I have an old machine. YMMV.

The scripting language used in VoxelDesc is Javascript, the same as in any web browser, except without the baggage. You can use it to do anything, even write completely unrelated applications on top of VoxelDesc. That's of course pointless, but I saw no reason to restrict this power.

Advanced example

Open the scripting console and paste in the following code:

camera.moveTo(10, 30, -40);
for (x = 0; x <= 20; x += 2)
        for (y = 0; y <= 20; y += 2)
                for (z = 0; z <= 20; z += 2)
                        scene.color(x * 10, y * 10, z * 10).dot(x, y, z);
canvas.repaint();

Now press Alt-R, or click the "Run" button on the console toolbar. (You can't use the Enter key because you need it to edit scripts here.)

Note the call to canvas.repaint() at the end; we need that in the console, because the console lacks certain conveniences; it's a "backstage access" to VoxelDesc and assumes you know what you're doing.

The scripting language used in VoxelDesc is Javascript, because that's what the Java platform provides by default. A tutorial is outside the scope of this manual, but feel free to experiment. Try out the various operations described these pages, and change the examples to suit your needs. You can't break anything.

Table of contents

Clone this wiki locally