SenGoku 发表于 2011-7-29 13:38:26

[中文已译]ms3dImportExport1.1 Release Notes 版本说明

简要说明:Milkshape是一款用于3D模型制作的软件,由于操作简便、功能强大而倍受广大Mod制作者青睐。据官方网站域名看作者应该是位于瑞士。下载请百度。

本插件主要用于Milkshape、3ds Max以及Gmax软件。
功能:将ms3d文件导入或导出至3ds Max和Gmax。


另附作者官方网站地址:http://chumbalum.swissquake.ch/index.html
本插件下载地址:http://www.twcenter.net/forums/downloads.php?do=file&id=1745

下面附版本说明翻译:
Release Notes for ms3dImportExport_ver1_1.ms:
Author: KnightErrant
Date:   02 December 2007

ms3dImportExport_ver1_1.ms版本注释:
作者:KnightErrant
发布日期:2007年12月2日

General Information:
This is an update to the importer/exporter of Milkshape .ms3d files into 3ds Max
and Gmax. It adds two new buttons for importing and exporting geometry only data,
that is, not full models but partial geometries without bones.It also fixes
three bugs (described below).

简介:
本软件可以将Milkshape .ms3d文件导入或导出到3dsMax和Gmax软件。1.1版本为本软件的更新,它增加了两个新按钮用于导入和导出只含有几何多边形的文件。这些文件不是完整的模型,只有几何形状而没有骨骼。1.1版还修正了3个bug(相关说明见后)。

The zip file contains the MaxScript ms3dimportexport_ver1_1.ms, the original
readme.txt file, now called readme_ver1_0.txt, a readme_ver1_1.txt file which
contains the information from this post in a little more detail, and two
files needed by Gmax users but not by 3ds Max users.The script can be placed in
your scripts subdirectory or any place convenient to your workflow.

本Zip压缩文件包括Max脚本文件,也就是本体ms3dimportexport_ver1_1.ms,以及原版自述文件(名称readme_ver1_0.txt)和1.1版的自述文件readme_ver1_1.txt,还有两个Gmax软件使用者需要而3dsMax使用者无需使用的文件(说明见下)。最新的自述文件包含本帖提到的更新细节。注意:本脚本不仅可以置于Max的脚本子目录下,还可以按照你的工作需要置于任意目录下。

Usage Information:
Click the Max Script menu item, then Run Script, then mouse to the directory containing
ms3dimportexport_ver1_1.ms and double click to run it.It will display a simple rollout
with "import ms3d file", "export ms3d file", and the two new buttons,
"import geometry only" and "export geometry only".

使用指南:
单击鼠标打开Max中的脚本菜单,点击运行脚本项。找到包含ms3dimportexport_ver1_1.ms的目录,并双击之以运行脚本。之后该脚本便会显示出一个下拉菜单,包括导入ms3d文件(import ms3d file)、导出ms3d文件(export ms3d file)、仅导入几何多边形(import geometry only)、仅导出几何多边形(export geometry only)等按钮。导入和导出几何多边形按钮为1.1版本新添加内容。

The two new buttons can be used this way.Suppose one likes a shield on one
model and wants to use it on another model or several other models.Import
the full model using "import ms3d file" and then click "export geometry only".
This will display a listbox containing the meshes in the scene. Double click
an entry to select it.Your selection will be echoed in the listener.You
are not limited to a single selection so double click all the meshes you wish
to export; they will also be echoed in the listener.The script does check
if you select an item twice which it doesn't allow.Click the "finished selecting"
button when done.

你可以这样用导入和导出几何多边形按钮。假设你喜欢一个兵模所持的盾牌,想把它用在其他人身上。那么首先,单击导入ms3d文件按钮导入完整模型,再按仅导出几何多边形。之后你会看见一个列表框,上面包含了场景中的网格。双击一个条目以选中,你的选择将会被监视器记录。一次选择可以选很多项目,所以一次都选上吧。如果一个物件你选了两次,脚本会自动侦测到并不会选择它。点击结束选择(finished selecting)按钮当你点选完毕。

(1) If you are a 3ds Max user the script will open a file chooser for you to
enter a name for the .ms3d file to save to.It will then write the file.
(2) If you are a Gmax user the script exports the data to the listener just
like exporting a full model.You then have to use the supplied GMaxSLGRAB.exe
utility to copy the data from the listener into a ASCII text file that
you name.Then you have to run the Python ascii2ms3dconverter.py utility
to convert it into a binary .ms3d file with the same name but .ms3d extension.
You can then reset and import a desired model you want to add your saved shield to.
Delete the shield you don't want and then click the "import geometry only"
button and select the file you saved previously.The desired object should
appear in the scene.If you exported a fully defined object, that is, one
with uv coordinates and bone assignments and weighting, that information
is preserved and a skin modifier will be put on the object.

(1)如果你使用的是3dsMax软件,脚本会激活一个文件选择窗口让你给需要保存的.ms3d文件命名,然后写入文件。
(2)如果你使用的是Gmax软件,脚本会导出文件给监听器,就像导出完整模型一样。然后你必须使用提供的GMaxSLGRAB.exe通用版来将监听器中的文件转成一个你命名的ASCII 代码文本文件。之后,你需要运行 Python ascii2ms3dconverter.py 通用版,以把它转换成一个同名的二进制 .ms3d扩展文件。然后你可以重置,再导入你所想要加上盾牌的模型。删掉你不想要的盾牌,再点选仅导出几何图形按钮,选择你之前保存的文件。那个你渴望已久的盾牌将会出现在场景中。如果你导入的是完整清晰的物体,那么UV烘焙贴图坐标和骨架的指定和重量还有皮肤编辑器将会被添加,前提是已有相关信息的话。

Additional error checking:
On export the script now checks for defined grouptypes and groupflags.Rather
than just stopping with an error, it now prompts you to enter these.On exporting
a full model without a bounding sphere, it tells you it is supplying a default one.
If it finds an unassigned vertex, it will inform you which mesh the problem occurs
in and then terminate.

附加的错误检查功能:
导出时脚本将会检查详细的组种类和字段。如果没有,脚本会要求你键入它们,而不是自己简单地弹出报错。导出一个没有bounding sphere的完整模型时,脚本会自动添加一个默认的。当脚本发现一个未指定的顶点时,它会通知你来修复问题。

Bug fixes:
Fix 1: Most glaring bug is that the uv maps are upside down in version 1_0.
The correct transformation was in Vercingetorix's script, I just didn't
see it.It is v -> 1 - v when converting from meshes and Milkshape to
3ds Max and Gmax.This is now done for all imports and exports.
Fix 2: A more subtle bug, again correctly done in Verc's script, is that
texture vertices and geometry vertices have no 1-1 correspondence in
3ds Max.You don't notice this if you just import a model and then export
it because they do have a 1=1 correspondence in a mesh file.Here's the
documentation on the subject.

Bug修正:
修正bug1:最要命的Bug是在1.0版本中模型的UV贴图上下颠倒。正确的变换信息在Vercingetorix的脚本中有。我只是没看到它……在把Milkshape中的网格变换入3dsMax和Gmax时须经历v -> 1 - v的变化,现在所有导入导出操作均无问题。

修正bug2:一个有些微妙的问题。Verc的脚本中也解决了它,那就是材质顶点和几何顶点在3dsMax中没有一一对应。如果你只是导入导出文件的话是不会注意到的——因为它们在网格上的确是一一对应的 - -|||。下面是有关它的详细叙述。

BEGINNING OF DOCUMENTATION:
It is very important to note that
A - There can be more or less texture and color vertices than there are mesh vertices
B - There are always exactly as many mesh faces as there are texture and color faces!
So there is no one-to-one correspondence between mesh vertices and texture and color vertices.
You cannot take vertex number 10 from the mesh and expect that texture vertex 10 will store
the information about its texturing or color vertex 10 would define its vertex color.
As mentioned in B , the number of faces is always identical. Not only this, the indices of
the mesh and texture resp. color faces have a one-to-one correspondence! If face 5 has 3 mesh
vertices you are interested in, their corresponding texture vertices will be the 3 vertices
referenced by the texture face number 5.
This is the key to access to texture and color information in 3ds Max!

说明的开始:
这是一个非常重要的因为
A 网格顶点在材质和颜色顶点上多少有些不同。
B 网格面有多少,材质与颜色面就有多少!
所以网格顶点与材质颜色顶点压根儿没有一一对应的关系。
不要想从网格中选10号点然后指望着材质点10号能记录它的材质,或巴望着10号颜色点能准确记录它的颜色。
就像我在B中提到的那样,面的数量是完全相同的。不仅如此,网格材质颜色面的指数是一一对应的!如果5号面有三个你感兴趣的网格点,它们的对应材质将会是三个在5号材质面上的参考点。
这就是得到3dsMax中材质与色彩信息的不二法门!

Finding the corresponding vertices
In order to find out which texture vertex corresponds to a mesh vertex, you have to do the following:
1. Take the index of the mesh vertex.
2. Find out which faces reference the index of the face.
3. Note the number of the vertex (1st, 2nd or 3rd - .x, .y or .z) inside each face.
4. For each face referencing the vertex, get the texture face with the same index.
5. Get the index of the respective texture vertex from the face - 1st, 2nd or 3rd / .x, .y or .z
6. The vertex you got corresonds to the mesh vertex we started with.
7. Repeat steps 3 to 6 for all faces found.
Same applies to color vertices.

找到对应的顶点:
为了找出一个网格点对应的一个材质点,你必须按照如下操作进行:
1. 取得网格点的参数
2. 找出参考该面参数的面。
3. 给每个面里的顶点编号。
4. 对于那些参考顶点的面,让材质面拥有同样的参数。
5. 从面上各自的材质点上得到参数。
6. 你得到的点对应了我们开始时的网格点。
7. 重复3至6步以覆盖全部的面。
对于颜色面亦可同样处理。

END OF DOCUMENTATION:
The release notes in the header comments of ms3dImportExport_ver1_1.ms have the
commands you have to use to implement the above algorithm.

说明的结束:
在ms3dImportExport_ver1_1.ms的header comments中有发布声明,它包含你用来执行以上演算操作的各项命令。

Fix 3: For animated files I said I had computed the basevert_array so that on back conversion
you obtain the basepose when you open the file in Milkshape.Well, that was half true, you
get the basepose if you are a Gmax user but I forgot to implement that for the 3ds Max
side.There you get the regular vert_array which would be whatever animation frame
was displayed when you exported.The animation data in the bones was still correct, you
just got a distorted mesh that would look terrible if you played the animation in Milkshape.
Now on the 3ds Max side, it looks at a flag to decide if there is animation data present
and stored in the root bone (an animheader entry). If so, it writes out the basevert_array.

修正bug3:对于动画文件我说过我已经编出了 basevert_array ,为了能在变换后你在Milkshape中打开文件后能够得到基本动作。额,我的基本能对一半儿,因为Gmax用户可以,但3dsMax用户不行(我忘了编它)。那样的话你可以得到常规的vert_array,导出时你可以在任何动作框架内看见它。不过骨骼中的动作信息依旧是对的,你会看到一个长的很残酷扭曲的网格,如果你在Milkshape中播放它的动画。现在在3dsMax上会出现一个标记让你来决定是否有动作文件存在并储存于root bone (an animheader entry)之中。如果是这样的话,那么脚本会制作出basevert_array。

注:有两个词意思可能有些许偏差,请谅解~ index、vertex。
本翻译仅供参考,一切内容请以原文为准

freefen 发表于 2011-7-29 13:54:56

继续努力!!有时间 可以看下版规的地址 翻译下 其它教程!!

Magic↘℡ 发表于 2011-9-25 00:59:15

我要学……
页: [1]
查看完整版本: [中文已译]ms3dImportExport1.1 Release Notes 版本说明