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

Setting collision in the Static Mesh Editor

When you convert BSP to a StaticMesh, and when you import a new model from an external source, the mesh will have no collision calculated. UDK provides an easy way to automatically generate collision geometry for imported StaticMesh assets. Collision geometry can be calculated from the actual mesh, but that is seldom efficient. It is better to use a proxy mesh with far fewer polygons, encasing the visible model. Instead of bumping into the visible model while playing, you'd instead be bumping into the low res collision model linked to it. Without collision you'd run right through the model, though that may be desirable for some models, such as grass, flowers, the canopies of trees, and things that would otherwise be troublesome to snag against when moving.

How to do it...

  1. For the base meshes that come with UDK, it isn't a good idea to try changing them. However, you can Create a Copy and edit that instead.
  2. In a new scene, open the Content Browser, click All Assets, then filter Static Meshes. Type Mesa in the search field. This model is a rock without collision.
  3. Right-click on the mesh and choose Create a Copy... to duplicate it into a package of your own.
  4. Double-click on the resulting copy and the Static Mesh Editor will open.
    How to do it...
  5. The fifth icon along [ How to do it... ] toggles the collision preview. At present, there is no collision so toggling it won't make any difference yet.
  6. Above, in the menu, under Collision, choose 6DOP simplified collision. This will create a box collision only. It should show up as a wireframe around the object and you will see that there is a lot of negative space within the collision box.
  7. In the same menu, try using Auto Convex collision using the settings shown in the next screenshot, which accumulate together to give a collision proxy, then hit Apply:
    How to do it...
  8. The convex collision sliders allow for splitting the collision component into chunks to better fit concave shapes. Splitting it up too much can cause a slow calculation. Take the time to experiment with values to get the optimal result.
  9. Once you press Close, don't forget to save your asset.
  10. Place the mesh in the scene and press Alt + C to view the collision in the scene.

There's more...

Changing the Material on a StaticMesh

Meshes that ship with UDK don't respond well to direct changes in the Static Mesh Editor. If you want though, you can place in the scene a mesh you've already copied to a new package, then highlight a new Material in the Content Browser, and right-click on the mesh in the scene and choose Materials | Assign from Content Browser. Changes in the scene like this aren't stored on the original asset, but on an instance saved with the map.

Visibility in the scene of StaticMesh actors

  1. Select the Mesa StaticMesh actor and right-click in the viewport, then choose Visibility | Hide Selected.
  2. To restore hidden objects, choose instead Visibility | Show All.
  3. There are icons for these commands on the editor's side toolbar under Select.
主站蜘蛛池模板: 仙桃市| 汽车| 车致| 静安区| 介休市| 常宁市| 遵义市| 高唐县| 甘谷县| 黑河市| 洞头县| 长治县| 湘潭市| 辉南县| 徐闻县| 诸城市| 苍山县| 沂源县| 吕梁市| 龙江县| 北辰区| 石楼县| 碌曲县| 清水河县| 凤庆县| 秦皇岛市| 萝北县| 徐水县| 新绛县| 甘德县| 咸丰县| 镇雄县| 万宁市| 楚雄市| 东兴市| 高密市| 习水县| 阿图什市| 礼泉县| 丹东市| 济阳县|