**
Voxel Bounds**

*Submitted by ArgCmdr*

What are bounds?

Bounds are the space in which voxels are represented. They are defined in
the header section of each voxel, and are independant of its size (which means
you can actually resize voxels through bounds). There are six parameters:

MinX ; bound unit at which the last voxel, from right to left, will be drawn

MinY ; bound unit at which the last voxel, from forward to back, will be drawn

MinZ ; bound unit at which the first voxel, from bottom to top, will be drawn

MaxX ; bound unit at which the first voxel, from right to left, will be drawn

MaxY ; bound unit at which the first voxel, from forward to back, will be
drawn

MaxZ ; bound unit at which the last voxel, from bottom to top, will be drawn.

Notice than in VxlSe III, this is inverted. This means all MinY and MaxY are
MinZ and MaxZ and viceversa.

What you can do with these beauties? Well basically, you can resize voxels,
align them properly without any HVA work, set the correct location for trailer
animations and logics, and realise if the voxels will or not overlap themselves.

I. Resizing through bounds

This is quite important, if you, for example, made a voxel out of a 3ds file
and then lost the source. Hows this done? Well, basically, you grab the output
voxel, and take percentage values of max and min bounds. I must notify, that
the process isnt exactly accurate, it seems the constant used to draw the
bounds isnt linear, as direct proportion percentages seem to affect more if
close to 100% and less if close to 0%. Basically, the biggest you want your
voxel to be, being it inferior than 100%, the less proportional itll be to
your calculations. At any rate, it should be easy to get it working, but its
worth to tell this isnt completely uncovered (i have to calculate how that
constant works actually...im quite sure its exponential, but not cuadratic)

Basically: Min Y = -50 Max Y=50, makes the draw area 100 in the Y axis. If
you want the draw area to be 20% smaller, then itd be 80. So MinY would be
-40 and MaxY would be 40. Same proportion would be applied with the rest of
the axis.

This has been tested and verified, however, notice that note about the drawing
constant.

**II. Aligning **

Ive noticed VxlSeIII does a direct -(axissize/2) ; (axissize/2) calculation,
and found out how if you export something off 3ds2vxl directly, and apply
that calculation with no HVA modifications, youll eventually get the voxel
offcentered in the Z axis (Y in VxlSeIII).

I was told by Gilbear that with no HVA editing, voxels looked best centered
when MinZ(Y in VxlSeIII) was close to 0. As a result, i always set MinZ=0
, and MaxZ to be the maximum height of the voxel.

**III. Trailer fix **

I bet at least one of those who will read these have tried to make aircraft
with trailers. And failed to do it well, as the ignition of the trailer, was
on the voxel. Well, guess what. The trailer lines and trailer animations,
by default, start being drawn at bound coords 0,0,0, all you have to do, is:

a) Set MinY (Z in VxlSeIII) as 0, and MaxY (Z in VxlSe III) as the total Y
axis length. As a result, the trailer line will be drawn at the end of the
voxel, here the afterburner/engine, etc would be. Same would go for the rest
of the axis hat may need fixing. Youll notice that this modifications will
make the craft misplaced in the selection box. This would be fixed with HVAPosition
modifications, used as offsets.

The only drawback possibly in there, is crash animations behaving oddly. This
needs a minimal test to be verified.

IV. Overlapping, FLH Determination

According to my calculations, approximately:

1 Cell = 256x256x256 leptons (as cell unit, extras are allowed and considered
inbound, yet not normal) [X,Y,Z] 1 Cell = 64 bounds (as far as my eyes can
tell, anything above 64 bound units starts overlapping) 1 bound = 4 leptons
This would mean that FLHs can easily be determined by just looking at a voxel´s
bounds without trying it ingame and do the classic tril and error. Ive been
managing this idea for over a year with fairly good results, yet was waiting
to find out more about bounds to say anything about it.

>
Back to Tutorials