[Papervision3D] double sided materials from collada file
allan e
allanmon at gmail.com
Sat Aug 16 16:10:24 PDT 2008
Thanks for your prompt reply John! Works beautifully.
Congratulations on pv3d! it's wicked!
Cheers,
Al
On Sat, Aug 16, 2008 at 3:54 PM, John Grden <neoriley at gmail.com> wrote:
> you need to leave the file assigned to the 3d object in your 3D application
> and make sure you give it a name (the material that is)
>
> then, with your code, you're missing an argument with addMaterial:
>
> var matsList:MaterialsList = new MaterialsList();
> matsList.addMaterial(materialYouCreated,
> "nameOfMaterialFrom3DApplication");
>
> Then, DAE will see that you provided a material and will use that
>
> On Sat, Aug 16, 2008 at 5:37 PM, allan e <allanmon at gmail.com> wrote:
>
>> Hello all!
>>
>> I've finally got my collada model into papervision and it looks good.
>> It's just a simple polygon mesh. The thing is, the texture works fine when
>> I embed it via collada. But when i omit the texture in the 3d app, export
>> like that, then try to pass a material to the collada constructor in flash,
>> it won't work.
>>
>> It gives me: Collada material not found.
>>
>> Here's the just of the code:
>>
>> protected function loadBitmap():void {
>> material = new BitmapFileMaterial();
>> material.addEventListener(FileLoadEvent.LOAD_COMPLETE,
>> handleFileLoaded);
>> material.texture = "flower_text.jpg";
>> material.oneSide = false;
>> material.smooth = false;
>>
>> list = new MaterialsList();
>> list.addMaterial(material);
>>
>> }
>> protected function handleFileLoaded(e:FileLoadEvent):void {
>> //init collada scaffold object
>> for (var i:uint = 1; i<7; i++) {
>> this["test"+i] = new Collada("test.dae", list, 0.2);
>> this["test"+i].y = i*500;
>> scene.addChild(this["test"+i]);
>> }
>> }
>>
>>
>> Basically my issue is that I would like the polygon mesh/plane to have the
>> texture on both sides of it - it looks like it's culling. I'd dont want to
>> have to make it closed as this will use more polygons.
>> I did see a post with a special doublesidedmaterial class, and I tried to
>> implement it with no avail.
>>
>> Can anyone give a simple code example of how to import a collada file and
>> assign it a double sided material / bitmap?
>>
>> Pretty pretty please?
>>
>> Cheers all,
>> Al
>>
>>
>>
>> _______________________________________________
>> Papervision3D mailing list
>> Papervision3D at osflash.org
>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>
>>
>
>
> --
> [ JPG ]
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
--
Allan Estabillo
647 50 IDEAS
www.aedesign.ca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20080816/6b3f0fa9/attachment.html
More information about the Papervision3D
mailing list