The JsonBlockEngine is a low-level block model creator designed for full platform compatibility (Java program) and fine-grained control of model elements. It's the author's first serious Java program, so feedback/suggestions would be appreciated. This is a work-in-progress.
Left Click for Y-rotation, Right Click for full rotation.
Twist: Flips model over (visual only).
Element List: Becomes visible after an element is created. Used to select working element.
New: Creates new element (block sized).
Name: Names element. Convenience feature, but is present in exports/imports.
Start & End: Sets start & end coordinates (0, 0, 0 to 16, 16, 16 for a block).
Rotation: Properties of element rotation (one per element).
Origin X, Y, Z: Coordinates of the rotation origin (XYZ rotation axes intersect).
x: Axis selector (which to rotate around).
0.0: Degree selector.
Scale: Whether to rescale the model as it is rotated (ingame only).
Face: Face editor.
U: Which face is being edited (Selector: U, D, N, S, E, W, for up, down, north, south, east, west).
Texture: Applies fields to selected face.
: Texture variables (Selector: variables are added with file window)
Clip : Area of the texture to use. Indexed from the top left corner and always 0,0-16,16. Higher resolution is available, but expressed as a decimal.
0: Texture rotation selector, in degrees (0, 90, 180, 270).
Null: Decides whether the face is rendered. Be warned, faces do not render from the inside, something which cannot be expressed with my current renderer.
n...: Culling selector. Face will not be rendered when there is a block touching the specified face (up, down, north, south, east, west). Set to none for constant rendering.
Model: Path to model file. Press enter while in field to bring up a file explorer window. A tilde may be used to specify the current user directory (so ~/Desktop/gnu.json would resolve to /Users/Gnu/Desktop/gnu.json or C:\User\Gnu\Desktop\gnu.json).
Texture: Path to texture, with same notation.
Texture Name: Name of texture variable to load. Press enter while in field to bring up file explorer window. The default for a face to use is particle, so use that if you only have one variable.
Internal Dir: Internal directory of the pack in which to find textures. The default is blocks, but any valid location works.
Add: Adds a new texture variable, with specified name and path. The only variable which may be entered more than once is particle.
Save: Saves model to the file specified in Model. File does not have to exist. Command- or Control-S works to save (or Cmd-/Ctrl-;, for Dvorak support).
Editor Window (WIP):
Copy: Copies the currently selected element. Element will not be visibly copied until moved, as it occupies the same space (it's exactly the same :P), so don't be distressed if it apparently doesn't work. If the copied element actually does not exist, let me know.
AmbiOcc: Whether to use ambient occlusion (Like S..., this only takes effect ingame.)
Directory of image files: Where the Engine should look for the image files to load as textures. Files are checked in their internally specified directory (For example, if the texture is in assets/minecraft/textures/blocks, put it in blocks in the selected directory.
Model file: The Json file for the model to import. If the elements in this file were named by the Engine, they will still have those names.
Go: Imports the model into the project. The texture variables defined by this are not name restricted, so be careful about name collisions.
- Voxel Sketching is an advanced feature which is not active by default. To enable, run the engine from the command line with java -jar BlockEngine.jar -V. If you use it, it is assumed you know what you're doing.
- This feature enables the user to write hundreds or thousands of cubes with high efficiency. It may be used in tandem with the standard editor.
Import Sketch: Imports the sketch files in the selected directory, with current settings.
Texture Directory: Sets the directory to find sketch files in. Click to bring up file explorer window.
- Sketch Syntax: Sketch files are a collection of .png files which are translated into voxels when writing. They must be square, must all be the same dimensions, and are indexed in the following manner: Layers are serialized north to south, and the image dimensions determine the number of possible layers (for example, 32x32 textures go up to 32 layers). The images themselves must be named layer.png, with layer1.png being the northernmost. All nontransparent pixels are converted into voxels, at the position determined by the coordinates in the texture and the layer number. Texture files are placed in the prompted directory. NOTE: The Engine will not tell you which directories are already used. You have to look this up yourself.
List Elements: Determines whether the sketch elements are included in the standard element list. You probably should never turn this on.
: List of all sketch groups, added after the group is serialized. Used for deletion.
Delete: Deletes all elements in the selected sketch group, along with their texture variables.