NifSkope/Working: Basic Use(EN)
http://niftools.sourceforge.net/wiki/NifSkope/Working_With_Nifs_101_:_Basic_Use
Официальная справка Нифскопап по базовому использованию(С)
Nifskope 101
Basics! The aim of this section is to introduce the interface of NifSkope, and its various functions, and provide examples of some common activities.
Using NifSkope Part 1: The Interface
By default, we have our usual File, View menu along the top, with a bar underneath for quickly opening and saving files. Followed by a playbar for animations.
Along the left, we have the Block List (F1), This is where the hiearchy for a loaded .nif is shown. To the right of that, is the render window, where a loaded .nif should be visible. The block along the bottom is Block Details (F2): An item selected from the Block List will have it's details listed here. Along the Right is KFM (F3), Information about a loaded .kfm file will appear here.
F4 displays/hides the Reference Browser; this window displays documentation on the currently selected block.
The three block windows can be opened/hidden, dragged, resized, and docked in different configurations. Multiple windows can also be docked to the same area, and tabs will be used to navigate them. Column separators can also be resized to suit your needs.
3d View
These menus all surround the 3d view, which will display the currently loaded .nif. From the Render menu, we can toggle behavior of display. Using the Left mouse button, you can select a model, node or others, and it will be highlighted in the Block List. Dragging with the left mouse button rotates the model, and dragging with the Middle button Pans the view. Using the scroll wheel or dragging with the Right mouse button will zoom in or out. The QWEASD keys will also move the model around. In the Render menu and along the top of the main screen, we have options to quickly set the camera to Top, Side, Front and Walk mode. Ctrl-F9 or selecting "Save User View" allows you to set your own view angle for later reference. "Flip" will reverse the camera for each view: Top becomes Bottom, for example. You may also toggle between perspective and Orthogonal view via button or menu.
In Walk mode, the camera action is a little different, as is how the WASD keys work for movement: Experiment with this view to see what you like better.
Menu Options
In the File menu, we have the usual. I don't suggest ever unchecking "auto-sanitize" -it can't break anything, and can save you a lot of time. New Window spawns a new blank NifSkope window.
Auto Sanitize Before Save This option, when enabled will auto-fix many types of small chores you may have neglected when changing data. Checking links, updating arrays, etc. (Best left on.)
Import and Export Currently, NifSkope can import .3ds and .obj files, and can export .obj files. Many 3d applications can read and write the .obj format, see the documentation of your favored application for more information.
Reload XML + NIF If you have made changes to nif.xml, or simply need to reload your model quickly.
Effectively refreshes both at the same time. Shortcut key is Alt-X.
XML Checker: This dialogue will allow you to scan for files using a specified block, and report back with hyperlinks to any matches. Specify the directory to search within in the top left. Checking "Recursive" will allow for searching into subdirectories, as well as searching by file extensions provided. Click the Block Match button to select a node/property/data. Now, clicking run will scan through the chosen path, looking for any matches.
Этот диалог позволит вам сканировать файлы, используя указанный блок, и сообщать о них с гиперссылками на любые совпадения. Укажите каталог для поиска в нем в левом верхнем углу. Проверка "рекурсивно" позволит осуществлять поиск в подкаталогах, а также поиск по предоставленным расширениями файлов. Нажмите кнопку сопоставление блоков, чтобы выбрать узел / свойство / данные. Теперь, нажав кнопку Выполнить, вы будете сканировать выбранный путь, ища любые совпадения.
View: For Hiding/Unhiding NifSkope panels and further customizing the display.
Render
In the 3d view section above, the different view settings were covered, let's look at the rest.
Draw Axes: Draws 3 poles to mark the XYZ orientation: X=Red Y=Green Z=Blue. The arrows mark the Positive direction.
Draw Nodes: Draws a dot to represent any NiNode present in the .nif. If a NiNode is a child of another, then a line is drawn between them.
Draw Havok: Displays Havok Collision data for Oblivion files.
Draw Furniture: Files containing Furniture Markers have data to represent where an actor will interact with the mesh. NifSkope Will display simple wireframe bodies to show orientation.
Show Hidden: Will toggle rendering of objects marked as Hidden. Note this is a NifSkope-only setting; A hidden shape will still be hidden in-game.
Show Stats: When you select a shape in the 3D view, some statistics the objects location, as well as which NifSkope shader is being used.
Render Settings
For setting display-oriented options.
Along the left, are buttons for popular games using the Gamebryo engine, Clicking them will attempt to auto-find the directory where the game looks for textures. The Custom area to the right is for defining more texture paths. Nifskope will use these settings for displaying textures in the 3d view, AND how it assigns paths for NiTexturingProperty.
Anti-Aliasing Enable/Disable anti-aliasing to smooth jagged edges.
Textures and Shaders Enables/Disables rendering of textures or shaders. Useful for checking Vertex Colors, or the accuracy of an applied Normal Map on a mesh.
Up Axis Some games or specific files for them may use an alternate up axis. For easy viewing, you can reorient NifSkope here.
Cull Non-Textured, and Cull by name: Nifskope will not render non-textured shapes, or anything by the given names, when checked.
Lighting Change the color and orientation of the lighting for the 3D view. If Frontal is checked, then the light source will follow the camera movements when you rotate the model. Unchecked, you can specify which direction to illuminate from.
Colors For setting the colors used in the 3D view. Background is exactly that. Foreground is for unselected Nodes, and Highlight is selected nodes.
Spells
Nifskope does magic, and here's how (note that list tends to grow through NifSkope versions):
Animation:Load .kf > if a mesh is rigged for animation, and also has a hierarchal skeleton present, you may load Oblivion animation files for previewing.
Block:Insert > Inserts a given node, property or data usable by the currently loaded nif into the scene. This insertion adds with an index of 0 regardless of selection.
Block:Remove by ID > Can auto-strip items based by name. The default values strip any havok from the .nif
Optimize:Combine Properties > Attempts to reduce properties that are identical to a single shared one. Ex:If you have many trishapes that have uniquely numbered texturingproperties, but they all use the same texture file, this will make each trishape use the same exact texturingproperty.
Optimize:Unique Properties > Attempts to make Uniquely numbered properties from an identical source. Ex: You have many trishapes that all use the same texturingProperty, doing this would give each trishape their own special texturingProperty.
Optimize:Strippify all TriShapes > This will Strippify all NiTriShape nodes. TriStrips are optimized meshes, and discussed in more detail in later guides. (зависит от версии ниф файла! для 4.0 не работает).
Sanitize:Adjust Link arrays > If you've made changes to a number of different arrays in your .nif, you can update all of them at once with this option.
Sanitize:Reorder Havok Blocks > Will attempt to renumber havok blocks based on the number of the first in the hierarchy. Use this to save time and prevent crashes in one fell swoop!
Sanitize:Check Links > Scans the .nif and stops at the first bad link it finds, Highlighting the link, and tells you what's wrong with it. Ex: A soureTexture node improperly attached to a trishapes' Extra Data List.
Using NifSkope Part 2: Editing
You'll do most all .nif work in the Block list and Block Details view. Single-Clicking on an item in the List view will have its' data listed in the Details view; Editing will be done in both of these windows. Hovering over any piece of data will show a tooltip, often with a short description, or usability information.
Clicking on a + or - sign next to a node expands or collapses it. Double-Clicking a value goes into an edit mode, where you will enter numbers or text or scroll through lists to make a selection.
Some Blocks have special options or menus that can be invoked by clicking on an icon. "Flags" for a NiNode allows for some basic behavior settings, and is seen in the Block Details view.. The Color Wheel icon in a NiMaterialProperty brings up a menu to select material settings, and is visible in the Block List. Similar menus can be found on other nodes, and often have a value in the same line, where you may directly input info.
Any Links to another node have an Arrow Icon next to them; clicking this icon selects that link in Block List.
Any node/data/property may be given a name for easy identification: Either by editing "Value" in the Block List view, or by editing the "Name" value in Block Details. -Note that trying to rename the actual node name itself will break it: Naming "NiTriShape" to "MyHouse" will invalidate the NiTriShape, so be cautious where you change the name at.
Right-clicking is context sensitive to whatever you may have clicked on, here are most of the major options that appear in NifSkope v0.9.8.
These are all done in the Block List view by Right Clicking, and are common to most node types:
Block>Insert - This will insert a node/property of your choosing. Many types of blocks will get inserted to their proper slot through this function, others may not, and need linking manually.
Block>Remove - Removes the selected object. Any attached objects are now floating free in the scene.
Block>Remove Branch (CTRL-DEL) - This will remove the selected block, and its children, data, and properties.
Block>Move Up/Down - Reorders the node up or down through the hierarchy. The shortcut keys make this a very easy process. In some cases, renumbering is important, or just useful for cleaning/sorting your file.
Block> Copy - Copies what you've selected.
Block> Paste - If you've got something selected, it will paste in attached to the node in the appropriate slot. If you've right-clicked a blank space in the hierarchy, it pastes unattached.
Block> Paste Over - Pastes the copied data over the selected matching item. Ex: You've copied the MaterialProperty from one mesh- Now right clicking a different materialProperty gives you the option to paste the other material settings onto this one.
Block> Copy Branch - Same as copy, but also copies any children, properties or data for the selected block.
Block> Paste Branch - Pastes the copied branch data with node heirarchy.
We also have Block> Move Up/Down (CTRL UP/DWN) which will increment or decrement the current node in the heirarchy. In some cases, the numbering of nodes is important for a file to work properly, or simply to keep things clean and organized in your files.
When pasting or insterting new data into a file, New nodes will be numbered depending on where you added them. rClick>paste done on a blank area in Block List adds it in as index 0. Say Index #10 was a MaterialProperty, and you opted to paste there instead, (but not paste over), the new node would have an index of 11.
Node>Attach Property - Gives you a list of properties, once selected, it gets attached automatically as a property.
Node>Attach Node - Gives you a list of nodes, and attaches them as children.
(nodes and properties are detailed on in a later guide) Node>Attach Light - Attaches a light object.
Node>Attach Extra Data - A list of extra data blocks, attached in the Extra Data list.
Flags - For Un/Hiding a node or shape, and setting collision detection options. Unsure how and where Skin Influence is used, or for which games.
File offset returns the file offset for the selected data in dec and hex.
Texture>Multi Apply Mode Will modify all present NiTexturingProperty blocks in a find/replace manner.
Transform>Edit - Brings up a handy dialogue for editing Translation, Rotation, and Scale of the selected node. Transform> Clear - Restores original transformation settings.
Transform> Apply - Commits any translation changes you have made, and resets their values to 0. ((Important)) In many cases, you'll Need to apply your transforms for the changes to be apparent in-game.
Those are the basics which most nodes will give you when right clicked. Remember that these menus are context-sensitive, where you right-click may offer different options.
Block>Flatten on a skeleton Hierarchy will flatten it all down to being children of the skeletons' parent children list.
niTriStrips and niTriShapes
Also give these when you right click on them:
Mesh> Triangulate / Strippify - triStrip meshes are generally more optimized for the game to render. The basic idea is to create a winding strip to loop around- kind of like running a big long ribbon. I'm no math person, and can't describe it well. In some cases, it is easier to use a triShape, things like Armor, Transparent billboards, certain special effect shapes...
Mesh> Prune Redundant Triangles (triShape only) Mesh> Remove Doublicate Vertices' Mesh> Remove Unused Vertices' -I'm a little uncertain of the exact methods here, but should cover for duplicated, samespace items.
Mesh> Face Normals - Sets all vertices normal values to polygon face values. Update tangent space to see changes. Mesh> Smooth Normals' - Average vertex normals to smooth them out. Update tangent space to see changes.
Mesh> Update Tangent Space(v20.0.0.5+ only) - Updates or creates a niBinaryExtraData block attached to the selected shape. This will hold data for the Tangent Space of the mesh for Normal maps.
(selecting it will render the vert normals, useful for troubleshooting any bad normals you may have) This step is needed for any model also using a normal map. It provides the base data of which the normal map will make its adjustments.
Texture > Export Template - exports a wireframe image of the UV mapping for the selected mesh, in .tga format of the specified resolution.
Texture > Edit UV A new window will pop up with the UV mapping for the mesh. Middle mouse button to pan the view, and Scroll Wheel/ Drag with Right mouse button to zoom.
Drag the points to make adjustments. Select a point by clicking on it, and then right clicking brings up options to select the Faces shared by a UV, or selecting the entire "Shell" or "Patch" the UV is a part of. If you make a mistake, CTRL-Z has several levels of Undo.
Transform > Scale Vertices - For resizing/stretching a mesh along X, Y or Z.
There are many more functions available via Right Click in the Block Details view as well. One very common use is Array>Update. Many types of data are stored in a list, referred to as an array. Often, these arrays are altered by first stating how many entries are in a list, and then updating the list so you may continue working. A good example is a NiNode's "Num Children" and the following array "Children". First, expand Children to see the list, now change the value for Num Children and hit enter. Now rClick "Children" and Array>Update, and you can see how the list has changed to reflect the number stored in Num Children. This works for any type of array you may come across.