官术网_书友最值得收藏!

Setting up sockets

Sockets are points on the model where elements that are not part of the character can be fixed on it, such as weapon points, particle emitter points, or any other kind of contact point that you can think of. Typically a character in UDK needs to have two weapon sockets to work as a player character and also two jump boot sockets and a neck gore socket because they are defined in the default player class, at least for UTGame. They should be defined, but they don't need to actually have anything assigned to them.

Getting ready

Make sure the Packt package is fully loaded, and open Packt_Character_AddSocket in the AnimSet Editor. This mesh is different to Packt_Character, which already has the sockets added.

How to do it...

  1. Choose from the menu Mesh | Socket Manager or click its icon [ How to do it... ]. In the dialog window that pops up press New Socket. You will be prompted to select a bone name from the bones that comprise the active skeleton to add a socket to.
  2. In this example choose b_RightWeapon. You will be prompted to label the socket. Enter WeaponPoint.
  3. Other common sockets are as follows: b_LeftWeapon = DualWeaponPoint, b_Neck = HeadShotGoreSocket, b_LeftAnkle = L_JB which is a jump boot designation, and b_RightAnkle = R_JB which is the other jump boot designation. These designations are used by characters conforming to UT3 presets. Of course, you can create sockets where you like as well.
  4. Let's create a socket on the head bone b_head called Hat. Notice that it takes the pivot of the bone itself, which isn't really a suitable place for a hat.
  5. In this case, we'll move the socket to the model's crown simply by dragging on its widget in the view port. If you prefer you can set a Relative Location for the socket in the properties section of the Socket Manager. The location is relative to the chosen bone's pivot.
  6. In the Content Browser highlight Packt.Mesh.Packt_TopHat and then in the Socket Manager properties section, find Preview Static Mesh and assign Packt_TopHat to it using the assign icon [ How to do it... ] as in the next screenshot.
    How to do it...
  7. If the added mesh does not show up where expected you may need to adjust the Relative Rotation (something like Roll=0, Pitch=-90, Yaw=11), and you can also adjust it directly by pressing Space in the preview and rotating it there.
  8. Tweak the placement of the Hat socket until the mesh is sitting agreeably on the model and follows the AnimSet animations accurately.

    Tip

    If you build your own prop to add to a socket, note that when exporting from 3ds Max the mesh must be placed at 0,0,0 rather than where it sits relative to the model, or the offset from 0,0,0 will be added in UDK.

  9. At the start we mentioned that there are already sockets for Packt_Character. The problem is, the mesh lacks an animated tail and isn't as complete as the model we'll use later. Putting sockets on again would be tedious. Luckily there are Copy Sockets and Paste Sockets tools in the socket manager. Open Packt_Character in the AnimSet Editor, then press the Socket Manager icon [ How to do it... ]. Along the socket manager dialog's icons you will see a scissors icon [ How to do it... ] and a clipboard icon [ How to do it... ]. These are Copy Sockets and Paste Sockets tools, so press Copy Sockets, then open Packt_SkinTail_LODtest and its socket manager (which should be empty) and press Paste Sockets to complete the transfer.
主站蜘蛛池模板: 桦甸市| 牙克石市| 郓城县| 南通市| 无为县| 武清区| 丹凤县| 霍城县| 炉霍县| 留坝县| 东阳市| 隆子县| 新干县| 景洪市| 慈利县| 珲春市| 冀州市| 惠州市| 饶河县| 杭锦后旗| 大同县| 宣汉县| 镶黄旗| 乐陵市| 达孜县| 大港区| 鹤岗市| 泉州市| 广安市| 陇南市| 军事| 阿荣旗| 绥中县| 长岭县| 建宁县| 东安县| 祥云县| 沁源县| 陵水| 偃师市| 潮州市|