Skip to content

Makes things smoother by adding ramps to any voxel input. Comes with some useful tools!

Notifications You must be signed in to change notification settings

wrapperup/rampifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rampifier repository

This repo contains the rampifier library, and some useful tools using it.

Crates

Plate Rampifier


This is a sample tool created that takes plates and rampifies it. May be super useful for creating (organic) brick props like trees, rocks, terrain, etc.

Using Plate Rampifier

Download Plate Rampifier from here

Preparing in.brs

Simply make sure your build is plate aligned. Plates can be resized, and you can use microbricks as long as they are plate sized and plate shaped (so may as well use plates!) Ensure it is aligned to Plate's grid for best results. Your bricks must use a color from your save's color palette. Rampifier will not rampify bricks with custom colors outside of your color palette.

Generating out.brs

Rampifier takes two arguments, the input of the save file and the output .brs path.

For example, use plate-rampifier my_input.brs the_output.brs or any path to rampify a save. If either are not specified, in.brs and out.brs are used in the same directory as the binary file.

rampifier crate

Using rampifier in your own tools

Here is some example code for using the rampifier crate:

// Populate this with values. The u8 value usually identifies
// the color index used, and the ramp algo. will use this.
let mut grid: Vec<Option<u8>> = ...;

let mut rampifier = Rampifier::new(
    (DEFAULT_LEN_X, DEFAULT_LEN_Y, DEFAULT_LEN_Z),
    grid,
    RampifierConfig::default()
);

// Generate floor ramps
let ramps_floor = &mut rampifier.generate_ramps(true);

// Generate ceiling ramps
let ramps_ceiling = &mut rampifier.generate_ramps(false);

save.bricks.append(ramps_floor);
save.bricks.append(ramps_ceiling);

// Sets the voxels occupied by ramps to empty.
rampifier.remove_occupied_voxels();

// Move grid back out of the rampifier to do further processing.
let mut grid = rampifier.move_grid();

About

Makes things smoother by adding ramps to any voxel input. Comes with some useful tools!

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages