pouët.net

Go to bottom

Paperview3D: Phong and COLLADA.

category: general [glöplog]
I've been playing around with 3D in flash using Papervision 2.0. And I have a little problem. I don't know what I'm doing wrong while trying to use PhongShader/ShadedMaterial with Collada model.
Code: var materials : MaterialsList = new MaterialsList(); light = new PointLight3D(true); theScene.addChild(light); phong = new PhongShader(light, 0xFFFFFF, 0x000000, 20); shm = new ShadedMaterial(smat, phong); materials.addMaterial(shm, "std01"); sphere = new Collada("content/sphere.dae", materials); theScene.addChild(sphere);

And when I try to render the scene flash gives me a lot of "Cannot access a property or method of a null object reference." errors. When I replace the collada loading code with sphere:
Code: var tmp:Sphere = new Sphere(shm, 1000, 24, 12); theScene.addChild(tmp);

It works. Anyone knows what is wrong with that? Thanks in advance.
added on the 2008-02-14 15:36:05 by masterm masterm
like as you didn't export normals?
added on the 2008-02-14 15:54:03 by hfr hfr
I export them.
added on the 2008-02-14 15:57:56 by masterm masterm
pouet calling trace, come in trace.
added on the 2008-02-14 16:51:43 by psenough psenough
Use the debugger in Flash
added on the 2008-02-14 18:36:59 by Zplex Zplex
I wonder why you though pouet.net was the place to ask this :)

For stuff like that you should ask here:
http://osflash.org/mailman/listinfo/Papervision3D_osflash.org

And I think somebody asked the same question on the list too.

Anyway, as far as I know, ShadedMaterials doesn't work very well on Collada objects yet. I may take a look on the sources and see what's going on. Try with DAE instead of Collada see if it helps.
added on the 2008-02-14 19:24:10 by mrdoob mrdoob
collada in flash? i better hope its converted
added on the 2008-02-14 19:59:24 by Hatikvah Hatikvah
converted to what?
added on the 2008-02-14 22:22:05 by mrdoob mrdoob
@zplex: I know how to debug AS and I'm using the debugger. :P
@+: Why pouet? It was a blind shot. :) And thanks for your help. I changed my model's class from Collada to DAE and it works!
added on the 2008-02-14 22:45:27 by masterm masterm
sorted then ;)
added on the 2008-02-14 23:19:12 by mrdoob mrdoob
random survey: how many demosceners out there are using collada? (for either their scene stuff or their work stuff)
added on the 2008-02-15 09:04:01 by smash smash
smash: i know duckers of outracks is, and i know i met the guy who wrote the damn thing (and so have gargaj :)

BB Image
added on the 2008-02-15 09:09:49 by gloom gloom
he did collada for the lulz!
added on the 2008-02-15 09:14:24 by Hatikvah Hatikvah
gloom: "the guy who wrote the damn thing" - which guy exactly, there's a bunch of them. :) mainly from scea.
added on the 2008-02-15 09:30:05 by smash smash
smash: Remi Arnaud is his name, and yes, he was a graphic architect at SCEA. Of course, I guess he didn't write it all by himself, but I believe he said that he started it all (and he had enough detailed knowledge about COLLADA to make me believe him for sure :)
added on the 2008-02-15 09:57:05 by gloom gloom
gloom: yep, that him. he doesnt work for us anymore, though - he's gone to intel.
so, namedropping aside :D - im just curious to know if anyone's using it.
added on the 2008-02-15 10:15:08 by smash smash
smash: I am currently using COLLADA for some stuff as well. It's mostly experimental so far, but it seems to be working out somehow, so I might keep it.
added on the 2008-02-15 10:15:30 by kusma kusma
gloom: Wow, you're so exclusive.
added on the 2008-02-15 10:16:11 by kusma kusma
kusma :what 3d tool are you using, and what exporter? :)
(should have added that question to the original survey, really)
added on the 2008-02-15 10:18:31 by smash smash
smash: I'm using 3DS Max and the ColladaMAX exporter. To import the data, I'm using FCollada. There's definitely issues with it, and I'm not sure I would have used it for anything "high-end" yet. I'm thinking of switching to ColladaDOM, but for what I'm currently doing, it's working out well enough. It's not like MaxSDK is very pleasant to work with either. ;)
added on the 2008-02-15 10:23:48 by kusma kusma
damn, and reading all this stuff i thought collada was some super awesome media threedee tool thing suite whatever, that i hadn't ever heard about but all the hip sceners used it. turns out it's yet another threedee file format. what an anticlimax :-(
added on the 2008-02-15 10:52:49 by skrebbel skrebbel
skrebbel: you misunderstand -- collada is the fix for everything wrong with demomaking, you're just not reading it right. ;)

kusma: indeed i am (or, i just dropped the only knowledge i had about collada - i met a a french guy you talked about for hours and i didn't really understand diddly squat :) if that makes me exclusive then whatever :)
added on the 2008-02-15 11:49:35 by gloom gloom
BB Image
added on the 2008-02-15 12:03:52 by kusma kusma
"Collada is not a data exchange format, it's a container."

As kusma, I also use 3DS MAX and ColladaMAX. I would love to move to Modo tho, I wonder how's the collada support on it.
added on the 2008-02-15 13:40:27 by mrdoob mrdoob

login

Go to top