[xoreos-devel] Kotor mdl models

Sven Hesse drmccoy at drmccoy.de
Fri Aug 21 22:26:51 CEST 2015


On 2015-08-21 22:18:55 +0300, Dmitry Savchenko wrote:
> Hi developers of the xoreos,

Hej! :)

> but stuck on the animations of the placebles(not
> creatures).

Hmm, I personally haven't yet done anything for KotOR animations yet
(but it's on the TODO list). So I can only offer guess-work.

> positionkey
> 0 -0.2309760004282 -0.0177801996469498 0.010844400152564
> 
> orientationkey
> 
> 0 1.66655885251617e+036 1.81793339299717e+034 0 3.14159265358979
> 
> As I am understand first number it is a time mark, and then x,y,z in position and
> axisAngle quartet in orientation.

If we're going by how the NWN models do it (and how I assumed KotOR
would work as well), then yes, this would be correct.

Well, except that the actual orientation value in the file is a
quaternion instead of an axis-angle, but mdlops converts it. So yes,
stil correct.

> positionkey
> 0 -0.041916698217392 0.096728503704071 0 0 0 0 0 0 0 -0.0645015016198158 0 0 0 0
> 0 0 0 0 -0.0474167987704277
> 0.100000001490116 -0.041916698217392 0.096728503704071 -0.00970267038792372 0 0
> 0.0229321997612715 0 0 -0.0474167987704277 0 0 0 0 0 0 0 0 -1.90687000751495 0
> 0.200000002980232 -0.041916698217392 1.33635848760605 0 0 0 0 0
> 0.533333003520966 -0.041916698217392 0.096728503704071 0
> 2 -0.041916698217392 0.096728503704071 0
> 
> Orientation is the same as in creature's orientation, but it seems there is
> something wrong with PositionKey.

This is indeed curious. Especially seeing such a wide range of number
of values.

Maybe the placeables specify a full transformation matrix for the
position controller? But then, what to do with the missign values in
each batch? Set to 0.0? Leave them as they are?

Just as a test, I hacked in quick animation reading in xoreos' KotOR
model loader, and I can confirm that there's a variable number of
values for the position controllers. But: there's also a variable
amount of values for the orientation controllers.

So yeah, I have no idea what is going on, sorry. This needs further
experimentation. Maybe even digging through the KotOR disassembly
(always a joy). And before I can actually test any of this, I'd need
to hook up the animation system to the KotOR models proper. This could
take a while...

Unless someone else can chime in here, I'll have to note that down as
a task to investigate further, in the (near?) future. When I find out,
I can contact you again. And should you find out, please contact me in
turn. Deal? :)


Cheers,
Sven
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://xoreos.org/pipermail/xoreos-devel/attachments/20150821/769b5587/attachment.asc>


More information about the xoreos-devel mailing list