Page 1 of 1

Mathematics and Xdof values

Posted: 2010-10-17 16:38:59
by JanHas
I bend model parts by changing those values in the Xdof data section (X, Y, Z, i, j, k). It's more or less guess work what value I need to put in to get angle right. Is there a more mathematical way to calculate those numbers?

Re: Mathematics and Xdof values

Posted: 2010-10-18 01:45:27
by ccc
you may post a pic showing what parst to do XDOF..

i've some tampletes.

Re: Mathematics and Xdof values

Posted: 2010-10-18 12:21:22
by JanHas
You mean, you rotated a few models, then put the same unrotated models in a XDOF and figured out the numbers by trail and error? I'm looking for a to calculate those numbers (formula).

Re: Mathematics and Xdof values

Posted: 2010-10-19 11:45:02
by ccc
if you want to do XDOF on 3ds or DXM format, you should ask WaveyDave, contact him via FF board pm system.

if you are working on LOD format.. i've some DOF matrix tampletes.
for example, rotate along X axis,
1 0 0
0 1 0
0 0 1

along Z axis,
0 0 1
0 1 0
1 0 0

along Y axis,
0 1 0
1 0 0
0 0 1

of course, the more complex ones are using combination of cos/sin (angle value)..

Re: Mathematics and Xdof values

Posted: 2010-10-19 16:25:32
by JanHas
using combination of cos/sin (angle value)..

Ah, that's the right direction. I'll try that.. Thanks!

Re: Mathematics and Xdof values

Posted: 2010-10-20 01:30:31
by ccc
hehe..alright. you can try it first.
if no go, you can check existing model XDOFs for reference.

Re: Mathematics and Xdof values

Posted: 2010-10-20 12:25:19
by JanHas
I figured it out, just cosines the angle of the rotation and the do it again for 90 degrees minus the first angle.

e.g.

35 degr cos = 0.819115
90 - 35 = 55 -> 55 cos = 0.573576

Thanks for the help!

Re: Mathematics and Xdof values

Posted: 2010-12-12 18:00:01
by JanHas
I have a question that is probably to technical but I'll give it a shot anyway..

Is there a limit to the amount of XDOF's Falcon 4 can handle? I encounter crashes when a lot of DOF's are in the same subtree...

Update: After some more trail and ERROR.. I have the idea that 19 DOF's (the entire family) or subtree's is the limit for one split (originating from the root).. I had this bug before when I created the ALW weapons.. In the armament screen a CTD or the model will disappear when rotating the view followed by a CTD..

... those fraggin limits... sigh. :cry:

Re: Mathematics and Xdof values

Posted: 2011-06-06 14:27:12
by Luk
Hi all,
is there some simple way (conversion matrix?) howto convert XDOF into DOF please?

Thanks
Luk

Re: Mathematics and Xdof values

Posted: 2011-06-06 15:36:10
by ccc
what model and what XDOF?

Re: Mathematics and Xdof values

Posted: 2011-06-06 18:25:20
by Luk
what model and what XDOF?
Well - I did not studied node issue deeply yet - or rather my knowledge is likely vague, based on previous experience with various 3D programs, WRML and other realtime languages/data formats. There were always "transformations" used for animation - these are scale, move and rotation. Various node types are used in F4 world to alive the model/mesh. One type is simple ON/OFF (switches). The other types are the transformations (for animated parts), no matter they are called XDOFs or DOFs IMHO.
In my unexperienced point of wiev the XDOF does the same as DOF. Perhaps it has some advantages I dont know about yet. But in the end it rotates the wheel/landing gear around some axis.

So I asked just generic question, if it is possible to convert the node type, while the result stay the same/unchanged. Perhaps the solution is hidden in simple trick - flipped axis, perhaps the whole philosophy of XDOF is diferrent and question is pointless....?

But to be more specific - I can take your YAK38 LOD as a sample now. I integrated it into AF and it is great model. Again it works, except the gear. I just took the XDOF values for each part if I can remember correctly (it was 2 months ago). We are talking particular part of the gear - node 652 (DOF 21) for example.

I will need YAK 141 in the near future as well. I dont want to disturb you too much with each model changes. That is why I would like to learn something. I can also move into PM section if you wish.

Thanks
Luk

Re: Mathematics and Xdof values

Posted: 2011-06-07 02:19:39
by ccc
So I asked just generic question, if it is possible to convert the node type, while the result stay the same/unchanged. Perhaps the solution is hidden in simple trick - flipped axis, perhaps the whole philosophy of XDOF is diferrent and question is pointless....?
yes.. you can convert XDOF into DOF, but ya'll lose XDOF features like rotation speed/direction/range of motion limits.

the first problem is DOF matrix > sometimes DOF direction is reversed, you may add "-" to one of X/Y/Z digits, just try n error. then flip model/revere its normals with LE.

then, sinec DOF has no ROM limits, you've to control the ROM via FM.dat, or use "Nesting DOFs" to get the ROM you want. say, some DOF is limited to 30 deg via FM.dat, you want a 90deg ROM- nesting three DOFs.

btw glad yak ac is of some use in your mods.

Re: Mathematics and Xdof values

Posted: 2011-06-07 17:57:35
by Luk
Thanks for answer ccc.
It will be tricky I think - there is no editable FM.dat file in AF, the particulat models are encrypted.
But the key is in mentioned "nesting" I guess.

Luk