PMDGeometry geom = new PMDGeometry("geom" + meshCount++);
geom.setMesh(mesh);
setupMaterial(pmdMaterial, geom);
- System.out.println(node.attachChild(geom));
+ node.attachChild(geom);
skinMeshList.add(mesh);
}
// System.out.println("child size = "+node.getChildren().size()+" "+meshList.size()+" "+skinMeshList.size());
geom.setGlslSkinningMaterial(mat);
geom.setNoSkinningMaterial(mat);
} else {
+ PMDMesh mesh = (PMDMesh)geom.getMesh();
mat = createMaterial(m, true);
geom.setMaterial(mat);
geom.setGlslSkinningMaterial(mat);
+ mat.setInt("NumBones", mesh.boneIndexArray.length);
mat = createMaterial(m, false);
geom.setNoSkinningMaterial(mat);
- PMDMesh mesh = (PMDMesh)geom.getMesh();
-// mat.setInt("NumBones", mesh.boneIndexArray.length);
}
geom.setPmdMaterial(m);
}
}
if (skinning) {
- mat.setInt("NumBones", meshConverter.getMaxBoneSize());
+// mat.setInt("NumBones", meshConverter.getMaxBoneSize());
}
float alpha = m.getMaterial().getFaceColor().getAlpha();
if (alpha > 0.99f) {
skinMesh.setSkinvb2(skinMesh0.getSkinvb2().clone());
skinMesh.setBuffer(skinMesh0.getBuffer(Type.Normal).clone());
skinMesh.setSkinnb2(skinMesh0.getSkinnb2().clone());
- skinMesh.setBuffer(skinMesh0.getBuffer(Type.TexCoord).clone());
+ skinMesh.setBuffer(skinMesh0.getBuffer(Type.TexCoord));
}
newPMDNode.skinTargets[skinMeshCount++] = (PMDSkinMesh)mesh;
}