#keyscript wierdness
3 messages in this thread
Hi Jonas (and fellow 3DS programmers…)
I have written a .P3D keyscript program, using The Script Extension. This
script writes a text file, similar to an .ASC file. The difference is that my
files contain the vertex/face list for EACH frame in an animation. This info is
then read into a real-time rendering application, and animated in real time.
In using The Script Extension, I have run into some peculiar behavior, which I
believe is a reflection of peculiarities in 3D Studio itself. Here is what I
have found so far, in attempting to read the POSITIONS of objects (these lists
are not exhaustive, they only reflect what I've tried so far):
Calling the keyscript function GetVerts works correctly for
1. mesh objects which don't move
2. mesh objects which are keyframed, with keys for position or rotation
3. mesh objects which are hierarchically linked to another object
The correct vertex position information is returned for each frame
Calling the keyscript function GetVerts does NOT work for
1. mesh objects which are morphing into another object
The initial vertex values are (incorrectly) returned for each frame
Calling the keyscript function InterpolateKey works correctly for
1. omni lights which don't move
2. omni lights which are directly keyframed, with keys for position
The correct x,y,z position information is returned for each frame
Calling the keyscript function InterpolateKey DOES NOT work correctly for
1. omni lights which are hierarchically linked to another object
The initial x,y,z values are (incorrectly) returned for each frame
When I look at an animation in the Keyframer, I see the meshes doing the right
thing. However, when I use GetVerts and InterpolateKey to write out the
multi-frame ascii file, I see something quite different (sometimes). The
keyframe scripter is not "what you see is what you get." This inconsistent
behavior is difficult to work with.
Nowhere in the documentation for 3DS R4, or for T.S.E., can I find a list which
explains precisely what keyframe information is accessible by the functions
(i.e. GetVerts and InterpolateKey), and what information must be manually
calculated within a script.
So I have two questions:
1. How can I access (or calculate) the vertex list of a mesh that
is being morphed? And more importantly, for future programming,
2. Where can I get a list that clearly explains what the keyscript
functions do, and what they don't do?
Thanks,
Mike
Mike:
Thank you for the exhaustive run-down. The more specific information we get,
the better we are able to investigate.
We're looking into this erratic behavior (as I write this, as a matter of
fact). I should have the facts, such as they are, within the next few hours.
Martin
Mike,
>> When I look at an animation in the Keyframer, I see the meshes doing the
right thing. However, when I use GetVerts and InterpolateKey to write out the
multi-frame ascii file, I see something quite different (sometimes). The
Keyframe scripter is not "what you see is what you get." This inconsistent
behavior is difficult to work with. <<
I've had similar problems with IntepolateKey. What InterpolateKey tells me an
object is doing ain't nothin' like what the keyframer shows me it's doing! I
sent off my mesh and script to Martin Doudoroff, and he's looking into it.