Okay, yeah, the mapping seems a little weird.

In order to get it look right at all, I did have to check "Copy Textures" in 
the export settings, so that it would generate the baked texture. That's what got it to 
look gold on my end rather than black. However, the mapping still looks a little strange. 
Correct in some places, but strange in others.

I exported from Maya ... I'm not sure if the option is called something 
different in 3ds max.

You also don't need that extra code when you pass in the UV like I mentioned 
earlier. Here's a quick copy/paste of the code I was using to test your model:


package  {
        
        
        import away3d.containers.View3D;
        import away3d.core.base.Object3D;
        import away3d.loaders.Collada;
        import com.eclecticdesignstudio.motion.Actuate;
        import com.eclecticdesignstudio.utils.enableCameraControls;
        import flash.display.Sprite;
        import flash.display.StageAlign;
        import flash.display.StageScaleMode;
        
        
        /**
         * @author Joshua Granick
         */
        public class TestCollada extends Sprite {
                
                
                [Embed(source='teapot.dae', 
mimeType='application/octet-stream')]
                private var TeapotMesh:Class;
                
                [Embed(source='Yellobrk.JPG', mimeType='image/jpeg')]
                private var TeapotUV:Class;
                
                
                public function TestCollada ():void {
                        
                        initialize ();
                        
                }
                
                
                private function initialize ():void {
                        
                        stage.align = StageAlign.TOP_LEFT;
                        stage.scaleMode = StageScaleMode.NO_SCALE;
                        
                        var view:View3D = new View3D ();
                        var teapot:Object3D = Collada.parse (TeapotMesh, { 
material: TeapotUV } );
                        
                        view.x = stage.stageWidth / 2;
                        view.y = stage.stageHeight / 2;
                        view.scene.addChild (teapot);
                        addChild (view);
                        
                        enableCameraControls (stage, view.camera);
                        Actuate.update (view.render, Number.POSITIVE_INFINITY);
                        
                }
                
                
        }
        
        
}


On Mon, 08 Feb 2010 13:38:30 -0800, antoniolea <[email protected]> wrote:

Hi,

OpenCollada Export settings are:

Standard options--------
bake matrix (checked)
relative paths (checked)
copy images(checked)
export user defined properties (unchecked)

Geometry ---------------------
normals (checked)
triangulate (checked)
tangents/binormals (tried both checks and unchecked)

Animation ---------
enable export (tried both checked and unchecked)
sample animation (tried both)


I just tried simplifying collada embed the way you suggested:
var myObject:ObjectContainer3D = Collada.parse (TeapotMesh,
{ material: TeapotUVW } );
myObject.materialLibrary.getMaterial("_1_-_Default-material").material
= _material;
_scene.addChild(myObject);

and the mapping is not correctly applied.. argh T.T


On Feb 8, 1:21 pm, "Joshua Granick" <[email protected]> wrote:
What are your OpenCollada export settings?

Have you tried checking that Bake Transforms, Triangulate and Texture 
Coordinates are being exported?

Also, you can simplify your Collada embed like this:

var myObject:ObjectContainer3D = Collada.parse (TeapotMesh, { material: 
TeapotUVW } );

On Mon, 08 Feb 2010 11:15:30 -0800, antoniolea <[email protected]> wrote:
> I am transitioning form papervision to away3D.  All the collada files
> + baked textures that used to work seems to fail on me on away3d.  I
> am using max 2010 with open collada plugin and using render to texture
> to create the uvw image.  The texture loads fine but the mapping does
> not work.

> It seems that the problem comes from the way I export because the
> away3d's supermario demo seems to work...  Any advise is GREATLY
> appreciated!...  :(

> (original uvmap screencapture from 3ds max)
>http://www.antoniolea.com/temp/screencapture.png
>http://www.antoniolea.com/temp/screencapture2.png

> (outcome - not uvmapped)
>http://www.antoniolea.com/temp/teapot.swf

> code used:
> //away version 3.4
> [Embed(source="assets/daeExport/teapot.jpg")]
> public var TeapotUVW : Class;

> [Embed(source="assets/daeExport/teapot.DAE", mimeType="application/
> octet-stream")]
> public var TeapotMesh : Class;

> _collada = new Collada();
> _model1 = _collada.parse(TeapotMesh) as ObjectContainer3D;
> _model1.materialLibrary.getMaterial("Bricks_Yellow__Teapot01_-
> material").material = _material;
> _scene.addChild(_model1);

> // assets -------------------------
> collada file:
>http://www.antoniolea.com/temp/teapot.DAE
> uvmap file:
>http://www.antoniolea.com/temp/teapot.jpg
> max file:
>http://www.antoniolea.com/temp/teapot.max

Reply via email to