VOXELIZE(nged)
Takes as input a primitive or a collection of primitives, old_obj, and creates a region new_obj which is the collection of voxels(RPPs) approximating the old_obj.
β¨ VOXELIZE (nged) β¨
okay so this is a BRL-CAD User Commands page, bestie, and it's about voxelize β the glow-up your geometry gets when you turn it into a pile of lil boxes π
πΈ NAME πΈ
voxelize β takes a primitive or a whole collection of primitives (that's old_obj, hii π) and builds you a region called new_obj which is literally the collection of voxels (RPPs) that approximates old_obj. it's giving "sculpture made of legos" energy fr fr π
π¦ SYNOPSIS π¦
voxelize [[-d] | {n}] [[-s] | {"%s %s %s"}] [[-t] | {f}] {new_obj old_obj} [old_obj1 old_obj2 ...]
yes the brackets are doing a lot, i know. breathe. it's fine. π«Ά
π DESCRIPTION π
So. You hand it a primitive or a collection of primitives, old_obj, and it hands you back a region new_obj made of voxels (RPPs) that approximates old_obj. that's the whole vibe. β¨
-dβ sets the level of detail (like, the precision of the approximation of the volume, how hard it tries). default is1. if you give it an argument ofn, thenn * nrays get shot through each row, and it approximates the filled volume in each voxel region by averaging thosen * nvalues. more rays, more accurate, more time, iykyk π₯-sβ lets you set the voxel size in each direction. default is1, 1, 1in whatever your current units are.-tβ sets the threshold volume that decides whether a voxel makes it into the voxelized output. default is.5. and it should always be a value between0and1, no exceptions π
β οΈ bestie. listen. setting the voxel size too small can increase the filesize exponentially. i'm not joking around, this is a real warning in the original and i'm passing it straight to you. tiny voxels = massive file. π
π EXAMPLES π
Here's the whole thing in action β making a voxelized version of an existing object (old_object) and naming the output (new_object).
β Example 1. Create a voxelized version of an existing primitive or collection.
mged> voxelize -d 2 -s "100 100 100" -t 0.3 newregion.r oldregion.r
and here's what each lil piece is doing:
- it creates a voxelized region corresponding to the original region
oldregion.r. β¨ - the region
newregion.rconsists of the resulting voxels. that's your output, that's the moment, main character energy π -d 2means that on each voxel row,2*2(=4) rays are uniformly shot over the area, and an approximation of the volume is reached from the raytrace data of those four rays. teamwork makes the dream work π-s "100 100 100"sets the size of the voxels to100current units in each dimension. and again β setting the voxel size too small can increase the filesize exponentially π₯-t 0.3means a voxel region counts as "filled" if the approximated volume ofoldregion.rfilling that voxel region is 30% of its total volume. so, like, a third-full counts as full. slay π
π AUTHOR π
BRL-CAD Team β legends, honestly π«Ά
π BUG REPORTS π
Found a bug or a problem? don't suffer in silence, bestie β email it to devs@brlcad.org ππ
okay that's the whole page! brought to you by the BRL-CAD gang β this is the VOXELIZE(nged) manual, mwah, go forth and voxelize responsibly π§π
π¦ where this page comes from
- nixpkgs unstable: brlcad 7.44.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms