Adsense

2013年1月31日木曜日

mesh, object, side, material,,, Hmmmm?

In order to understand secondlife mesh system for making pmx mesh dolls, I’m trying to recognize mesh as the following.

  • mesh = prim
  • mesh has up to 8 materials
  • materials = sides (faces), can be customized in texture, shininess, color, glow and transparency. (by manual or script)
  • object is configured by several prims (linked prims)
  • object is configured by several meshes (like linked prim)
  • Alpha channel implementation in secondlife is damned!!!!

For example, if pmx model has 32 materials for setting color (to be exact, for setting its diffuse, specular, ambient, transparency, texture, toon, sphere and so on), you should divide mesh to 4 mesh objects. One mesh object can have up to 8 materials in secondlife collada model therefore it should be divided and linked.

Fortunately some pmx importer can import diffuse/specular/ambient setting to blender. In secondlife, we can not set up diffuse/specular/ambient to “side(material)” but diffuse color is converted to side color.

Animasa style Rin Act2 pmd model has 27 materials
27mats

pmx importer can export diffuse, specular color to blender
matBlender

In blender edit mode, you can separate meshes with “material”.
[Mesh] – [Vertices] – [Separate] – [By material]
separatebymaterial

If you use “blender_mmd_tools” (https://github.com/sugiany/blender_mmd_tools), tool provides [separated by materials] which separates mesh and set one mesh to one appropriate material. Default blender separating by material can not omit extraneous materials therefore you should delete them manually later. I recommend bender_mmd_tools for separating by material.

rinMats

Now Rin mesh model has 27 mesh objects. In uploading to secondlife, one mesh has at least 1 land impact(download) therefore to reduce land impact, you should join mesh objects under 8 materials (= 8 meshes into 1 mesh).

afterjoiningmesh

Change all JAPANESE name to English including texture name, if you would like to avoid “parse error” in uploading. The names are not important(we will not use the names) but should be alpha numeric character.

Select all objects by [A] in object mode, check collada option (blender 2.65a) and export as collada file(dae). Especially [Apply Modifiers], [Selection Only] and [Include Material Textures] should be checked for mesh doll.

In upload dialog, optimize land impact by triangle limit for each LOD. It’s my personal recommendation, around 20 land impact might be better.

uploadrin

Upload and rez it!

RinAct2

You can understand pmx model material diffuse color exported as “prim face color” in secondlife by [Edit], [select face] option and [Texture] – [Color].

diffuseColor

Good luck and enjoy ウインク

0 件のコメント:

コメントを投稿