Exporting a model/XSI:ru

From Valve Developer Community
< Exporting a model
Revision as of 01:00, 25 March 2012 by MextraJOHN (talk | contribs) (Freeze transforms and history)
Jump to: navigation, search
Mod Tool logo

Эта статья покажет вам, как экспортировать модель из XSI Mod Tool для компиляции с помощью Studiomdl.

Чтобы узнать об общем использовании XSI, см. XSI Beginner Tutorial

Add a texture and UV map

To learn about UV mapping in general, see XSI Texturing.
The 'Textures' dialogue.

In the third group of left-hand menu buttons you will find 'Textures'. Select your mesh(es) and click the button and choose the first sub-option, 'Image'. There are two parts of this dialogue we are interested in: 'Image -> New' and 'Texture Projection -> New'.

The filename of the image you import into XSI defines the name of the VTF file Source will try to apply to the model in-game (though not its location). To avoid confusion, try to keep the texture name the same as the model name. If you don't want to worry about textures yet you can stick with XSI's default, but your model will be covered in Source's purple "missing material" checkerboard when you try to use it.

Next is the texture projection, or UV map. The XSI SMD exporter will decide what to export by looking at what has UV data rather than what is hidden and what is visible, even if the mesh is intended for collision, so don't forget this step!

Tip.png Tip: The second and third sections of the Texture toolbar contain shortcuts for applying UV maps.

Отключение автоматического разрыва

Непонятно почему это необходимо - возможно это ошибка SMD экспортера. Тем не менее:

  1. Откройте 'Explorer'. Это можно сделать из меню View - General - Explorer, или нажав 8 на клавиатуре
  2. Разверните(значек"+") все meshes
  3. Вызовите окно параметров двойным кликом мыши по 'Geometry Approximation'
  4. Выберите 'no' в диалоге "Confirm make local" в ответ на предложение перед этим сделать локальную копию данных
  5. Выберите вкладку 'Polygon Mesh' в окне параметров
  6. Снимите флажок 'Discontinuity -> Automatic'

Вы увидите изменение освещения модели, когда снимете этот флаг.

Warning.png Warning: Пренебрежение изменением этого параметра приведет к тому, что все объекты сольются в один!

Freeze transforms and history

Если у вас есть, non-enveloped meshes, что говорит о том, что модель не анимирована, вы должны замораживать(Freeze) их до каждой операции экспорта. Enveloped meshes должны быть заморожены (Freeze) перед применением Envelope!

Freezing 'bakes' your geometry, turning it from a series of manipulations on primitives (i.e. the cubes or spheres you began with) to a literal representation of where each polygon is located. Much like disabling automatic discontinuity, the fact that this step is required seems to be no more than a limitation of the XSI SMD exporter; unfortunately it's destructive and can really bugger you up if you aren't careful.

To freeze, first select all of your meshes. Then click the section header for 'Transform', on the right-hand menu, and choose 'Freeze All Transforms', which is directly beneath the first divider. Then choose 'Freeze History -> Modeling' from the right-hand menu.

Tip.png Tip: Since you'll probably be freezing transforms quite a lot, you may want to place its button in a more accessible location. Right-click on some empty space under the 'Freeze History' heading and choose 'Customize toolbar'. You can then search the list for 'Freeze All Transforms' and drag it onto the menu.

Merge meshes

If your model has or will have animations you must merge all of its geometry into the same mesh. This would happen on Export anyway, but the automated version of the process destroys most envelope data.

Select everything and choose 'Mesh -> Merge' from the left-hand menu. This has created a new 'polymsh' object that contains some, but not all, of the data from your existing meshes. To merge the last few pieces of information in, open Explorer with 8 and double-click on 'polymsh -> Polygon Mesh -> Merge Meshes'. Look in the lower half of the new dialogue for two buttons labelled 'Merge' and press them, then press the 'Delete' button in the top half to remove the old input meshes.

Export SMDs

Your model is now ready for export to SMD. The export dialogue can be found from the main menu, under ValveSource -> Export SMD....

Tip.png Tip: Uncheck 'Remove all unused bones' if you are exporting an animated collision model. Otherwise you can usually leave the checkboxes alone.
Note.png Note: The ValveSource add-on doesn't seem to work properly with 64 bit versions of XSI - the Export SMD button is missing.


With a reference mesh SMD and skeletal animation SMD exported, you are ready to compile your model.