[Papervision3D] PV3D 2.0 shadermaterials errors on collada models
George Profenza
orgicus at gmail.com
Tue Jun 17 08:53:17 PDT 2008
.Hi everybody.
I'm repeating myself :)
I've recently moved to Great White and started experimented with the
materials. I go nuts after that Cell Shaded look.
The shadedmaterials work fine on primitives and actionscript objects (
exported with as3 geom exporter ) , but I run into trouble if I try to apply
them to
collada models. I get this error on the EnterFrame event:
Cannot access a property or method of a null object reference.
at
org.papervision3d.materials.shadematerials::FlatShadeMaterial/drawTriangle()
at org.papervision3d.core.render.command::RenderTriangle/render()
at org.papervision3d.render::BasicRenderEngine/doRender()
at org.papervision3d.render::BasicRenderEngine/renderScene()
at ModelLoader/updateScene()
I don't know what happens to drawTriangle, but it doesn't seem to like
collada geometry.
In order to apply a shaded materials I create a materials list, add the
shaded material with the same name as the texture or material name in the
collada file ( in the library_materials node ).
Is this the right way to do it ? If not, what is the recomended way ?
So the main question is: How do I apply shaded materials to collada models ?
Also, since I've been playing with materials, I've tried baked materials.
I've got some nice results on the basic models. On more complex models (
more architectural models ) I've had some problems.
Some faces lacked the material and weren't properly sorted. I thought I
could fix that using the containerSortMode property but no result. I've
tried assigning integers / the constants ( although it's the same thing )
and nothing. In the docs, it says *Implementation*. Silly question: does
that mean this feature isn't implemented yet ?
I've also switched from Camera3D to FrustrumCamera3D and tweaked its values
and no luck.
The model was pretty lowpoly, so a friend that has way more experience with
3dsmax than I do suggested that I might get the faulty display because the
number of vertices is insufficient for the engine to map the texture
properly. He tweaked the model and managed to make it look better. The
question here is:
Is there a way to fix the face sorting for textured lowpoly models, or just
adding more vertices in the right spots is the only way to get around this ?
So it comes down to this:
1.How do I apply shaded materials to collada models without getting errors ?
2.Can I fix the face sorting for textured collada files from actionscript ?
If so, how ?
Thanks,
*George*
*George* *Profenza*
-------------
Student of all sorts
-------------
works: http://flash.quietroot.org/
experiments: http://flash.quietroot.org/labs
blog: http://tomaterial.blogspot.com/
-------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20080617/3706070c/attachment.html
More information about the Papervision3D
mailing list