JK and MotS Editing >> Modeling >> His legs are in the floor!     (Moderator: Admins) Previous Topic | Next Topic
Page 1 of 1
 Author 
 Post 
Post 24-Sep-2010 00:48        

Ok I'm in need of help.
I'm implementing a custom walkplayer for a new level set.
However his legs are in the floor.
The center of the 3DO is the "torso" as is with the Kyle walkplayer.
I can seem to figure out the issue.
Another similar model works fine. 3DO heirarchy is the same, only difference is the backpack. Otherwise its the same as the other model. Attached is a pic of his legs in the floor.

http://forums.massassi.net/vb3/showthread.php?p=1102877#post1102877[/img]
Post 24-Sep-2010 22:08        

Open the 3do in Notepad and find the INSERT OFFSET. This should be near the beginning of the file, shortly after the list of materials.

Most likely, it will be "0 0 0" (or "0.000000 0.000000 0.000000"). If so, change it to "0 0 0.12". As you may have guessed, this will "insert" your model 0.12 JKUs higher than its previous centerpoint/offset.

If your model is having problems with the position of its right hand we can fix that as well (though judging by the screenshot, that looks all right)



Eventually, somebody (maybe I?) will write up a tutorial on the hub for this process. (That is, unless there is already a tutorial/article for this and I just didn't see it?)
Post 27-Nov-2011 07:31        

I was hoping I could just lurk and someone else would also have this problem but ... OK how do you fix the hand on the walkplayer? It has been bugging me for long enough.
Post 02-Dec-2011 03:15        

I'm kinda surprised this hasn't come up more often. Anyway, the trick is to have the right 'pivotx/y/z' values for the rhand in the 3do hierarchy (a kind of 'skeleton' for the model). These 'pivot' values offset the geometry of the weapon mesh, as well as where the lightsaber blade begins. ZED zeroes out these pivot values and applies the offset to the geometry directly.

To bore you with technical details Razz , given a pivotx/y/z of "0 0 0", the JK-rendered lightsaber blade extends out of the position of the k_rhand node. The weapon models are constructed such that, when attached to the player model, the end of the lightsaber handle is at that same position, so the lightsaber blade will come out of the end of the handle. The actual position of the k_rhand node is in the middle of the wrist, so this is why the weapon model appears lower than it should with zero pivot offset. A pivotx/y/z offset needs to be applied to shift the model (and the lightsaber blade endpoint) to the correct position.

The player model will have a 3do hierarchy node called 'k_rhand'. This node might have geometry (surfaces, vertices, etc.), or it might be an empty node. In either case, the k_rhand node is the one where the weapon models are attached.


(The first set of steps)

If your model has no k_rhand geometry (like the original LEC models -- the player model has no hand, and the hand is part of the weapon model), then you just need to do the following after exporting your model:

  • Open the model in a text editor and scroll all the way to the bottom (labeled SECTION: HIERARCHYDEF)
  • Find the k_rhand node and set the last three values (pivotx/y/z) to "-0.002488 0.009120 -0.005542". For example, change
     12: 0x0000 0x00004  13  11  -1  -1  0  0.001632  0.003386 -0.028002  0.000000  0.000000  0.000000   0.000000  0.000000  0.000000  k_rhand
    to
     12: 0x0000 0x00004  13  11  -1  -1  0  0.001632  0.003386 -0.028002  0.000000  0.000000  0.000000  -0.002488  0.009120 -0.005542  k_rhand

  • Save the model file



If your model includes geometry for the k_rhand node (like the JKE models -- the player model has the hand, and the weapon models have no hand), then it gets a little more complicated.


(The second set of steps)

We'll "prepare" the model so the rhand is un-offset (I.e. the hand will line up with the weapon). This is a one-time step, and, despite being called the "second" set of steps, you actually carry these steps out first.

  • Open the model in a text editor and scroll to the bottom (SECTION: HIERARCHYDEF)
  • Find the k_rhand node and set the last three values (pivotx/y/z) to "0.002488 -0.009120 0.005542". Note that these are the negated offset values that will be in the final version. For example, change
     12: 0x0000 0x00004  13  11  -1  -1  0  0.001632  0.003386 -0.028002  0.000000  0.000000  0.000000   0.000000  0.000000  0.000000  k_rhand
    to
     12: 0x0000 0x00004  13  11  -1  -1  0  0.001632  0.003386 -0.028002  0.000000  0.000000  0.000000   0.002488 -0.009120 0.005542  k_rhand

  • Save the model file
  • Import the model into ZED and export again

Now, ZED has zeroed the pivot values and shifted the geometry. If you view the model in ZED, the rhand will appear "below" the wrist, like the weapon model does in JK. This is ok, because setting the the pivotx/y/z again to the original values will push the hand back to where it should be when JK renders it.

When you want to use the model in JK, make sure it has the pivotx/y/z values set to "-0.002488 0.009120 -0.005542" (follow the first set of steps above).

When you want to import the model into ZED for editing, make sure it has the pivotx/y/z values set to "0 0 0" so ZED doesn't offset the rhand. If you forget, you just need to follow the second set of steps again.


I realize this is rather wordy. As always, I'm finding this procedure difficult to explain clearly. If you have trouble, just post back and I'll try to clarify.

Maybe someday I'll write a script or a plugin that fixes player model offsets...
Post 05-Dec-2011 18:11        

YAAA! I was sure it had to have something to do with the nodes except I was playing with the x,y,z instead of the x,y,z pivots. I was starting to get frustrated because it seemed to have no effect. I didn't even have to change your numbers! But I must have moved the insert offset of the actual hand because with fists his hand is closer to his face than his arm. With weapons its perfect. Easy fix, but I'll do that later. This has been frustrating me since I took the stupid shoulder pad off of Kyle a long time ago. Thank you so much!!
*** Post commands are unavailable for guests. ***