Skip navigation
Currently Being Moderated

DAE loaded successfully but scaled

Nov 4, 2011 11:57 AM

Tags: #scale #3dsmax #proscenium #collada #dae

Hi, I successfully loaded a dae model I did in 3dsmax. The model doesn't have the same dimensions in the proscenium viewport than in max.  I wonder if there is a way to load it in the correct scale i.e. the one I work with in max.


I tried to scale the model to its correct dimensions using the newly created sceneMesh boundingBox and a strange thing happens. If I access the sceneMesh boundingBox just after loading to calculate the scale ratios, the scale transformation (mesh.transform.appendScale...) won't apply. If I hardcode the scale ratios without accessing the sceneMesh boundingBox, It works.


How should I do to scale my model in its original dimensions ?


You can reproduce by replacing onLoad mehod of Tutorial08_LoadedAnimation by this one. The model is scaled by a factor of 2 (x,y,z). If you uncomment the two lines above, you'll see that the model is not scaled at all + it is broken.


public function onLoad( event:Event ):void {

                              var node:SceneMesh = new SceneMesh();

                              scene.addChild( mesh );

                              var manifest:ModelManifest = loader.model.addTo( mesh );

                              var bounds:BoundingBox = new BoundingBox();

                              //bounds = mesh.boundingBox;

                              //mesh.transform.appendScale(18 / (bounds.maxX - bounds.minX),12 / (bounds.maxY - bounds.minY), 12 / (bounds.maxZ - bounds.minZ));



                              animations = loader.model.animations;

                              for each ( var anim:AnimationController in animations ) {

                                        anim.bind( scene );



                              for each ( var material:Material in manifest.materials )


                                        trace( material );



                              initialized = true;



More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points