Hey Beka,

if you come from an older version, there are indeed improvements on code and functionality
done on the latest update.
Here a bit of info:

Obj class, supports groups and autoloading of the textures.
so where the previous parser was seeing the whole obj file as one Mesh
you can now have multiple object3ds and multiple textures.
This also means the companion file mtl must be valid and located in same directory as the obj file. the textures are also like the format guidelines relative to the mtl file.

so basically if you just make a loader and addchild your loader, you should see your model fully textured with no problems. if the mtl tag is found in the obj file and the mtl is not there, you will have an error
traced, but the parsing will continue.

the loader handle returns now an Object3D, but it can be an Object3D with mesh geoemtry or an ObjectContainer3D containing an Object3D that also can be a container.... the rule: if you make a group or polygonmeshgroup into your ap, it will be a container. Some app export also per default any obj files as one group, so to set your object3D var in the loadSuccess you will need to access the children array. like this: var myModel = (loader.handle as ObjectContainer3D).children[0]

the obj parser also has two extra features, it generates a default white BitmapMaterial, so if your model is white thats because the mtl file do not have the propper url for the source. If your model has unvalid uv's or no uv's defined, the parser will generate default ones for you. This is made to avoid crashes or error popups in the player if you have an application loading dynamic data and have partially unvalid models.

For the material override, if you export a model with textures (mtl file), if you set a material in the loader, it will possibly be overwrited by the obj material(s) defined into the mt file. If you wish to set by hand instead of using the mtl info, make sure you explode all your groups within your 3D editor so that you have only one mesh, and if your app exports per default an mtl, open the obj file with a text editor and clear the second line, "use mtl+url" and clear all other reference to this mtl in the obj file.

the md2 containing animation
you need to import the AnimationSequence class
I've answered your question already here
http://groups.google.com/group/away3d-dev/browse_thread/thread/d0e8c311c1699098


Fabrice



On Aug 30, 2008, at 12:35 PM, Beka Master wrote:


this is my code for load Obj and Md2 Models:

modelLoader = Obj.load(modelURL, { material:texture, scaling:0.233,
loadersize:300, rotationX: 90, ownCanvas:true, mouseEnabled: !isTemp,
useHandCursor:true } );

modelLoader = Md2.load(modelURL, { material:texture, scaling:0.023,
loadersize:300, rotationX: 0, ownCanvas:true, mouseEnabled: !isTemp,
useHandCursor:true } );

I think that the ini:Object is no more working.

please help.

On 30 Ago, 12:17, Beka Master <[EMAIL PROTECTED]> wrote:
Hi everybody,

I got all things messed up with the last SVN update (revision 655):
- all Obj model bigger, rotated in X of 90°, random color textured
instead of my BitmapMaterial
- all MD2 animated totaly not working, throw an error on loading at
away3d.loaders::Object3DLoader/onParserComplete()[D:\Away3D_SVN\trunk
\src\away3d\loaders\Object3DLoader.as:235]

What's happening???

please helppppppp.

-Beka

Reply via email to