SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SHIII Mods Workshop
Forget password? Reset here

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 08-14-07, 01:50 PM   #24
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by ref
Quote:
Originally Posted by Racerboy
00 = Tag for Timing #0x0
00 = Seperation byte between timings
I think that you can probably join those two instead of two 1 byte values use a word (two byte integer) for the keyframe number.

How did you convert the word values of the vertices that follow to floats ?

Ref
Ref,

You are probably correct, the designers may have given the Timing Tags two bytes. I'll change Silent Animator to look for two bytes for the Timing Tags.
At the start of each keyframe there are two floats. The first float is the scale value, the second float is the offset value. What follows them are the vertices: two bytes for vertice x, two bytes for vertice y, and two bytes for vertice z. This is repeated for x amount of vertices.
I'll use vertice x as an example:

take the two bytes for vertice x and convert them to an UInt16 value
Multiply this by the float value of the first float in the keyframe
add the second float value of the keyframe to this
you now have the float32 value for this vertice

now do this for all the axis's of the vertices, for every vertice in that keyframe, then for every keyframe for that node. Hence why I made Silent Animator

Racerboy
TheDarkWraith is offline   Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 06:48 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.