, Sr. Member
My solution for now is: ( core_fp11 from github )
In OBJParser.as make this change:
/**
* Converts the parsed data into an Away3D scenegraph structure
*/
private function translate() :void
{
for (var objIndex:int = 0; objIndex < _objects.length; ++objIndex)
{
var groups:Vector.<Group> = _objects[objIndex].groups;
var numGroups:uint = groups.length;
var materialGroups:Vector.<MaterialGroup>;
var numMaterialGroups:uint;
var geometry:Geometry;
var mesh:Mesh;
var m:uint;
var sm:uint;
var bmMaterial:TextureMaterial;
for (var g:uint = 0; g < numGroups; ++g) {
geometry = new Geometry();
materialGroups = groups[g].materialGroups;
numMaterialGroups = materialGroups.length;
for (m = 0; m < numMaterialGroups; ++m)
translateMaterialGroup(materialGroups[m], geometry);
if(geometry.subGeometries.length == 0) continue;
// Finalize and force type-based name
finalizeAsset(geometry, “”);
// WORKS !
bmMaterial = new TextureMaterial(DefaultMaterialManager.getDefaultTexture());
// DON’T WORKS !!!
// bmMaterial = DefaultMaterialManager.getDefaultMaterial();
mesh = new Mesh(geometry, bmMaterial);
if (_objects[objIndex].name) {
// this is a full independent object (‘o’ tag in OBJ file)
mesh.name = _objects[objIndex].name;
} else if(groups[g].name) {
// this is a group so the sub groups contain the actual mesh object names (‘g’ tag in OBJ file)
mesh.name = groups[g].name;
} else {
// No name stored. Use empty string which will force it
// to be overridden by finalizeAsset() to type default.
mesh.name = “”;
}
_meshes.push(mesh);
if(groups[g].materialID != “”){
bmMaterial.name = groups[g].materialID+”~”+mesh.name;
} else {
bmMaterial.name = _lastMtlID+”~”+mesh.name;
}
if(mesh.subMeshes.length >1){
for (sm = 1; sm