| |
Ball mesh generator
Script to generate a mesh file defining a simple ball of the given radius and
with orientation given by the three angles. If the angles are left blank a
random value is used.
The angle values can be found from the comment at the top of the XMF file.
You only need these if you want to generate the same orientation twice.
Warning: Recently I have found one (only one) IMVU user who could not view
objects that had orientation comments. For this reason I would advise editing
the comment out.
A note on offsets:
The offset is the location of the centre of the ball. There are probably four
common ways to set this:
- You are replacing the mesh of an existing object. Since you know nothing
of the details of the object you attach your mesh to a bone at the foot of
the object. Therefore the offset values are the position of the center of
the ball.
- You are replacing the mesh of an existing object. You do know the details
of the object and the offset is the value of the bone's "localtranslation"
reversed. If no rotations are applied then this means the values but
negated.
- You are making your own skeleton but cutting corners, so you set all the
localtranslation values to zero and give the ball an offset of zero. The
skeleton shifts the ball up from being stuck in the floor.
- You are making your own skeleton and doing it "by the book". The
offset is where you want the center of the ball, and the skeleton is
designed so the localtranslation cancels out the translation.
Example: bteballoon.xsf
This consists of three bones
| Root, no.0, at 0,0,0 |
| Animate, no.1, at 0,0,1500 |
| Sphere, no.2, at 0,0,1500 but with a localtranslation of -500 |
If you use the script with the standard values you obtain a 500 radius sphere
standing on the floor. Attaching it to bone 2 gives you a sphere floating 1000
units above the ground. Animation can be applied to bone 1 or bone 2.
|