Skyrim

File information

Last updated

Original upload

Created by

Letstryagain

Uploaded by

Letstryagain

Virus scan

Safe to use

About this mod

A Python script for Blender 2.49b, user friendly, for mirroring body and armor meshes. It mirrors automatically: vertex positions, vertex groups, and UV map.

Requirements
Permissions and credits
Mesh XMirror for Modders Blender script
 
What is it?
A Python script for Blender 2.49b, user friendly, for mirroring body and armor meshes. It
mirrors automatically: vertex positions, vertex groups, and UV map.
 
Bug fixes
v1.5 fixed reflection for weights of the skirt-bones
v1.4 fixed UV reflection in case of non vertical nor horizontal joint, removed annoying and useless wornings
v1.3 fixed wrong weights on the 3D reflection plane
v1.2 fixed errors in exporting the mesh (unweightd verts error could have been arise) 
in this version such bug is fixed. If you have problems, please PM me.

Other scripts
- Mesh_0 Generator Blender script - http://www.nexusmods.com/skyrim/mods/80506/?
  Given Body_1, Body_0 and Dress/Armor_1 gives mesh Dress/Armor_0.
- Mesh X Mirror for Modders Blender script - http://www.nexusmods.com/skyrim/mods/80503/?
  Given a "half" Dress/Armor mesh it mirrors: verts positions, bone weights, and UV map of the selected faces.
- Mesh_0.5 Blender script - http://www.nexusmods.com/skyrim/mods/79663/?
  Given Mesh_1 and Mesh_0 and a scaling factor (say 0.5) it will return the weighed mesh. Negative scaling gives thinner 
  than Mesh_0, larger than 1 gives a mesh larger than Mesh_1
- Mesh_1 to Mesh_0 Blender compatibility script - http://www.nexusmods.com/skyrim/mods/79572/?
  This solvs the mesh incompatibility issue (i.e. congruence in the order the vertices are stored in the file).
  So you can part and join the meshes and fix the order once you have done.


How can I use it?
It is pretty simple. The general case is:
  • in "edit mode", select all the verts in the mesh that have a mirrored UV map (see UV mirroring below),
  • in the UV map, select the two nodes at the edges of the UV reflection line (see UV mirroring below),
  • in "object mode", right-click on the Mesh to select it,
  • than go to the tab: "Object > Scripts > Mesh X Mirror for Modders" and click it (FIG. 2),
  • in the popup box (FIG. 3) you can specify some "Selectable features" (see below)
  • once done, push OK,
  • it takes some time to do the work and:
  • DONE

              
About bone weight mirroring
Blender's mirror is suited to mirror the vertex groups ending with "_R" or "_L" which is not the case of the Skyrim vertex groups as they are
imported in Blender 2.49. The script is suited for manage the group names having two type of structures:
  • "NPC Xstring"
  • "NPC Xstring [Xstring]"
where X,standing for "L" or "R", is the letter that is changed in the mirrored group.
If I missedbones having a different structure, please PM me and I will try to include those bones too.
Vertices on the 3D reflection plane have the same weight for the mirroring groups.
 

About UV mirroring
IT WILL NOT WORK IF THE WHOLE MESH IS NOT TRIANGULATE

The reflection line (red lines in FIG. 4) is a line in the UV map, on the edge of 
the UV map that will be mirrored, just like the central part of a folder:
on this line the UV of the mesh is reflected on the other side. To provide the
reflection line to the script you must highlight the two verts on the extremes
of the edge of the map (surrounded by circles in FIG. 4).
  • The UV ofthe unselected verts is NOT mirrored. 
  • If youselect all the verts, all the UV will be mirrored.
If you havesome UVs to be mirrored (i.e. 3 in FIG 4) the corresponding "groups of selected verts" in 3D must be separated
in the 3D (see FIG 6).
If the groups are not linked in 3D than the script will recognize the groups and reflect each UV separately, i.e. one mirroring
line is independently identified by the script for each group of selected verts.
In to keep unlinked the groups I parted and joined the groups separately in order to have double verts on the group
edges(see FIG. 5 and FIG. 6).
 

Selectable features: UV
X distance in 3D for identifying the edge for UV mirroring (DEF = 0.05 BU)
This is the maximum distance of the edge (in Blender Units) along the X axis from the
center of the mesh. Default is usually good since the X coordinate of the
edge's verts is usually placed on the center of the mesh and the distance from
the center is pretty small even if the verts are hand positioned. However, it
could be increased up to 10 Blender units for including an edge far from the
central part of the mesh (e.g. butterfly wings having the butterfly body in the
center of the 3D mesh).
 

Selectablefeatures: remove doubles
X distance in 3D for identifying the edge for removing doubles (DEF = 0.05 BU)
Similarly to the Blender mirror, the script joins the corresponding verts after mirroring
but, in this case, only the verts on the mesh X edge and within the specified
X-range are subject to the remove doubles, i.e. other verts even if pretty
close, but not perfectly overlapping, will be NOT joined if they are not on the
edge of the mesh.
 
How to install the script
Download the file, unzip and drop it in the folder:
"C:\Program Files (x86)\Blender Foundation\Blender\.blender\scripts", or wherever
you have the Blender script folder. Then run Blender and it will recognize the script automatically.
 
Documentation and software
Introduction to Python (http://learnpythonthehardway.org/book/ex24.html)
Python 2.7 functions (https://docs.python.org/2/library/functions.html)
Blender functions for Python scripting (https://www.blender.org/api/249PythonDoc)
Notepad++ (https://notepad-plus-plus.org/)
Blender 2.49b
Python 2.7
 

Note:
The armor in the pictures can be found here:
Truly Light Glass Armor by Letstryagain and OperatorCactus

Bugs andrequests
Please, if you have suggestions / bugs / issues or requests concerning my scripts PM me
(button on this page just below the figures).
 

Permission
Please, donot upload this script on other sites without permission (other Nexus sites are
not "other sites", but refer to this page).