Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: How to manipulate HOOKS  (Read 1868 times)

0 Members and 1 Guest are viewing this topic.

Verhängnis

  • Unofficial Heinkel Fan
  • Modder
  • member
  • Offline Offline
  • Posts: 1494
How to manipulate HOOKS
« on: February 11, 2011, 06:01:59 AM »

Is somebody able to help me in moving hooks left right up and down etc, I opened my 3d model + Hooks in 3dsmax and moved the hooks to where I want them but when exported them and took the location values and put them on CF_D0 for example they all appear in the same spot on the 3d model. I looked at the CF_D0 hooks on another model and saw that they have a local Matrix value which is for example

1 0 0
0 0 1
0 -1 0
-0.27091 0.363245 0.662331

I assume that is XYZ & xyz as in normal meshes, but how do I add these to my Hooks?

I don't understand, I need them in the right places otherwise when my model get's damaged it will have smoke coming from randomly next to it etc instead of the engine.
Thanks in advance.
Logged

Frankiek

  • SAS Team
  • member
  • Online Online
  • Posts: 2854
Re: How to manipulate HOOKS
« Reply #1 on: February 11, 2011, 07:49:02 AM »

Sometime it is easier to move the hooks using hier.him manipulation rather than in 3dmax
Logged

just champi

  • Modder
  • member
  • Offline Offline
  • Posts: 608
Re: How to manipulate HOOKS
« Reply #2 on: February 11, 2011, 10:40:42 AM »

I don't sure if I get you right, you want to have the matrix values for your hooks, haven't you? the first 9 numbers?
As you surely know, they are for orientation and scale, and the last three for position in World coordinates, for all objects, also for hooks. There's some info about that around here:

https://www.sas1946.com/main/index.php/topic,7442.0.html

Try this: (I assume you have your scene open in max)

-press F11 to open the listener
-As a test, type in the Listener:

$NameOfYourObject

(NameOfYourObject is the name of whatever object you want to choose in your scene for this short test, any would do)

you'll see that your object become selected in the viewport, so the dollar sign + object name, selects objects in the scene, good! :P

ex: $Box01

-it returns: "true" in the listener, and the object "Box01" becomes highlighted (selected) in the viewport.

you can acces also to other parameters and properties of objects through this method, typing a point and the relevant word for acces that property or value. For the matrix values of your hooks, just type:

$NameOfYourHook.transform

and the result will return the matrix coordinates for the object. (they are the array values for the TRANSFORMation matrix)

Ex: $Dummy01.transform

-it returns in the listener: "(matrix3 [1,0,0] [0,1,0] [0,0,1] [21.7306,56.6806,26.8475])"


Just pay attention on the fact that in the listener:

-the values are separated by commas, and decimal numbers are separated from units by points,


while in the .msh files:


-the values are just separated by blank spaces, and the decimal numbers by commas,

 ...wich can lead to make some mistakes if not handed carefully (I can assure you...  :-[)

hope it helps
EDIT: sorry I haved traslated wrong the ortographic signs... :-X
Logged

Verhängnis

  • Unofficial Heinkel Fan
  • Modder
  • member
  • Offline Offline
  • Posts: 1494
Re: How to manipulate HOOKS
« Reply #3 on: February 12, 2011, 04:27:59 PM »

Ok and so I copy this:

1,0,0] [0,1,0] [0,0,1] [21.7306,56.6806,26.8475])"

From max in corrected format into the hook location part of my CF_D0?
Logged

just champi

  • Modder
  • member
  • Offline Offline
  • Posts: 608
Re: How to manipulate HOOKS
« Reply #4 on: February 14, 2011, 11:24:19 AM »

yes, basically that's the idea.
BUT, (if I'm not get it wrong) normally, for hooks, orientation is very important.
Even more for hooks that has to do with effects, because the effect will align with one particular axe of the hook. I haven't mess myself with hooks and effects yet, so I can't tell you wich axe is the relevant for alignament, because I don't know, maybe you'll have to make some testing to find it out.

When you only need to know the matrix values, the Listener method is good enough, you only need to type a couple of words and you're done. But when you need to make some testing and rotations are involved, here is were you may find very handy the Kumpel's Matrix Tool, to help you in calculate rotations or matrix values.
It access the same data as the Listener, but has an interface instead, works as a traslator between matrix values/angles in both ways, back and forth, you can copy/paste values directly from Max, and you don't need to move or edit your object at all to have the result.

https://www.sas1946.com/main/index.php/topic,15.0.html

the thing will go something like:

-you place your hook in place

-you rotate it to have the effect look right (if needed)

-get the matrix coordenates and anotate them in your msh file

-check if it looks and works right

-play with the kumpels Matrix tool to have the right values if not.

I hope this make sense... good luck! ;)
Logged

Verhängnis

  • Unofficial Heinkel Fan
  • Modder
  • member
  • Offline Offline
  • Posts: 1494
Re: How to manipulate HOOKS
« Reply #5 on: February 14, 2011, 10:32:03 PM »

Ok, I'll mess around with it when I can.
Logged
Pages: [1]   Go Up
 

Page created in 0.035 seconds with 26 queries.