Error with collada model

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Error with collada model

Raul Rueda
Hi, i'have download the model duck.dae from here:  http://www.collada.org/owl/browse.php?sess=0&parent=48&expand=1&order=name&curview=0&sortname=ASC

I save the model on my hard disk here: C:/-/duck.dae
This is the code I use:

public var cow:DisplayObject3D;
//cow = new Collada("http://papervision2.com/wp-content/downloads/dae/cow.dae");
cow = new Collada("C:/-/duck.dae");

NOTE: My program works perfectly with the model of commented code: //cow = new Collada("http://papervision2.com/wp-content/downloads/dae/cow.dae");

This is the error I get when run on FlashDevelop:

TypeError: Error #1009: No se puede acceder a una propiedad o a un método de una referencia a un objeto nulo.     (ENGLISH: Unable to access a property or method of a null reference to an object.)

    at org.papervision3d.objects.parsers::Collada/buildObject()[C:\flex_sdk_3\Papervision3D_2.0_beta_1_src\src\org\papervision3d\objects\parsers\Collada.as:341]
    at org.papervision3d.objects.parsers::Collada/parseGeometry()[C:\flex_sdk_3\Papervision3D_2.0_beta_1_src\src\org\papervision3d\objects\parsers\Collada.as:324]
    at org.papervision3d.objects.parsers::Collada/parseNode()[C:\flex_sdk_3\Papervision3D_2.0_beta_1_src\src\org\papervision3d\objects\parsers\Collada.as:257]
    at org.papervision3d.objects.parsers::Collada/parseScene()[C:\flex_sdk_3\Papervision3D_2.0_beta_1_src\src\org\papervision3d\objects\parsers\Collada.as:188]
    at org.papervision3d.objects.parsers::Collada/buildCollada()[C:\flex_sdk_3\Papervision3D_2.0_beta_1_src\src\org\papervision3d\objects\parsers\Collada.as:173]
    at org.papervision3d.objects.parsers::Collada/onComplete()[C:\flex_sdk_3\Papervision3D_2.0_beta_1_src\src\org\papervision3d\objects\parsers\Collada.as:152]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()

[Fault] exception, information=TypeError: Error #1009: No se puede acceder a una propiedad o a un método de una referencia a un objeto nulo.
Fault, Collada.as:341


The program runs, but the model does´t appear at stage...

Where is the problem?
Thanks in advance!

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Reply | Threaded
Open this post in threaded view
|

Re: Error with collada model

Tim Knip-2
Hi Raul,

The duck.dae you try to load uses polygons instead of triangles (if
you check the dae you'll see '<polylist>' elements).
The Collada class cannot parse these <polylist> elements, only
<triangles> elements.

You can do two things:
1] Use the DAE class which *does* support <polylist>
2] import duck.dae into your 3D app, and export with option 'triangulate'

Hope this helps!
Tim

2009/2/27 Raul Rueda <[hidden email]>:

> Hi, i'have download the model duck.dae from here:
> http://www.collada.org/owl/browse.php?sess=0&parent=48&expand=1&order=name&curview=0&sortname=ASC
>
> I save the model on my hard disk here: C:/-/duck.dae
> This is the code I use:
>
> public var cow:DisplayObject3D;
> //cow = new
> Collada("http://papervision2.com/wp-content/downloads/dae/cow.dae");
> cow = new Collada("C:/-/duck.dae");
>
> NOTE: My program works perfectly with the model of commented code: //cow =
> new Collada("http://papervision2.com/wp-content/downloads/dae/cow.dae");
>
> This is the error I get when run on FlashDevelop:
>
> TypeError: Error #1009: No se puede acceder a una propiedad o a un método de
> una referencia a un objeto nulo.     (ENGLISH: Unable to access a property
> or method of a null reference to an object.)
>
>     at
> org.papervision3d.objects.parsers::Collada/buildObject()[C:\flex_sdk_3\Papervision3D_2.0_beta_1_src\src\org\papervision3d\objects\parsers\Collada.as:341]
>     at
> org.papervision3d.objects.parsers::Collada/parseGeometry()[C:\flex_sdk_3\Papervision3D_2.0_beta_1_src\src\org\papervision3d\objects\parsers\Collada.as:324]
>     at
> org.papervision3d.objects.parsers::Collada/parseNode()[C:\flex_sdk_3\Papervision3D_2.0_beta_1_src\src\org\papervision3d\objects\parsers\Collada.as:257]
>     at
> org.papervision3d.objects.parsers::Collada/parseScene()[C:\flex_sdk_3\Papervision3D_2.0_beta_1_src\src\org\papervision3d\objects\parsers\Collada.as:188]
>     at
> org.papervision3d.objects.parsers::Collada/buildCollada()[C:\flex_sdk_3\Papervision3D_2.0_beta_1_src\src\org\papervision3d\objects\parsers\Collada.as:173]
>     at
> org.papervision3d.objects.parsers::Collada/onComplete()[C:\flex_sdk_3\Papervision3D_2.0_beta_1_src\src\org\papervision3d\objects\parsers\Collada.as:152]
>     at flash.events::EventDispatcher/dispatchEventFunction()
>     at flash.events::EventDispatcher/dispatchEvent()
>     at flash.net::URLLoader/onComplete()
>
> [Fault] exception, information=TypeError: Error #1009: No se puede acceder a
> una propiedad o a un método de una referencia a un objeto nulo.
> Fault, Collada.as:341
>
>
> The program runs, but the model does´t appear at stage...
>
> Where is the problem?
> Thanks in advance!
>
> _______________________________________________
> Papervision3D mailing list
> [hidden email]
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Reply | Threaded
Open this post in threaded view
|

Fwd: Error with collada model

Tim Knip-2
Raul,

you should find a duck_triangulate (or similar) in the same location
you got duck.dae

Regards
Gordon Everett


My preferred email address: [hidden email]

 My Blog: http://flashgordonmedia.blogspot.com/









> Date: Fri, 27 Feb 2009 18:43:28 +0100
> From: [hidden email]
> To: [hidden email]
> Subject: Re: [Papervision3D] Error with collada model
>
> Hi Raul,
>
> The duck.dae you try to load uses polygons instead of triangles (if
> you check the dae you'll see '<polylist>' elements).
> The Collada class cannot parse these <polylist> elements, only
> <triangles> elements.
>
> You can do two things:
> 1] Use the DAE class which *does* support <polylist>
> 2] import duck.dae into your 3D app, and export with option 'triangulate'
>
> Hope this helps!
> Tim
>
> 2009/2/27 Raul Rueda <[hidden email]>:
> > Hi, i'have download the model duck.dae from here:
> > http://www.collada.org/owl/browse.php?sess=0&parent=48&expand=1&order=name&curview=0&sortname=ASC
> >
> > I save the model on my hard disk here: C:/-/duck.dae
> > This is the code I use:
> >
> > public var cow:DisplayObject3D;
> > //cow = new
> > Collada("http://papervision2.com/wp-content/downloads/dae/cow.dae");
> > cow = new Collada("C:/-/duck.dae");
> >
> > NOTE: My program works perfectly with the model of commented code: //cow =
> > new Collada("http://papervision2.com/wp-content/downloads/dae/cow.dae");
> >
> > This is the error I get when run on FlashDevelop:
> >
> > TypeError: Error #1009: No se puede acceder a una propiedad o a un método de
> > una referencia a un objeto nulo.     (ENGLISH: Unable to access a property
> > or method of a null reference to an object.)
> >
> >     at
> > org.papervision3d.objects.parsers::Collada/buildObject()[C:\flex_sdk_3\Papervision3D_2.0_beta_1_src\src\org\papervision3d\objects\parsers\Collada.as:341]
> >     at
> > org.papervision3d.objects.parsers::Collada/parseGeometry()[C:\flex_sdk_3\Papervision3D_2.0_beta_1_src\src\org\papervision3d\objects\parsers\Collada.as:324]
> >     at
> > org.papervision3d.objects.parsers::Collada/parseNode()[C:\flex_sdk_3\Papervision3D_2.0_beta_1_src\src\org\papervision3d\objects\parsers\Collada.as:257]
> >     at
> > org.papervision3d.objects.parsers::Collada/parseScene()[C:\flex_sdk_3\Papervision3D_2.0_beta_1_src\src\org\papervision3d\objects\parsers\Collada.as:188]
> >     at
> > org.papervision3d.objects.parsers::Collada/buildCollada()[C:\flex_sdk_3\Papervision3D_2.0_beta_1_src\src\org\papervision3d\objects\parsers\Collada.as:173]
> >     at
> > org.papervision3d.objects.parsers::Collada/onComplete()[C:\flex_sdk_3\Papervision3D_2.0_beta_1_src\src\org\papervision3d\objects\parsers\Collada.as:152]
> >     at flash.events::EventDispatcher/dispatchEventFunction()
> >     at flash.events::EventDispatcher/dispatchEvent()
> >     at flash.net::URLLoader/onComplete()
> >
> > [Fault] exception, information=TypeError: Error #1009: No se puede acceder a
> > una propiedad o a un método de una referencia a un objeto nulo.
> > Fault, Collada.as:341
> >
> >
> > The program runs, but the model does´t appear at stage...
> >
> > Where is the problem?
> > Thanks in advance!
> >
> > _______________________________________________
> > Papervision3D mailing list
> > [hidden email]
> > http://osflash.org/mailman/listinfo/papervision3d_osflash.org
> >
> >
>
> _______________________________________________
> Papervision3D mailing list
> [hidden email]
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org

________________________________
Windows Live Hotmail just got better. Find out more!

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Error with collada model

charlito
This post has NOT been accepted by the mailing list yet.
dude..
just wanna say thanks... i was getting that error for a few days.. i allmost give up..   to fix it all i have to do was export as triangles..

thx..  :)