|
|
|
Maggical
|
Hi there, I'm having some trouble making a light affect a material that I load to a Collada file.
All works great, exept the light does not seem to affect the model. Here's the function that creates the light, the materials, the materiallist and the collada... Any ideas? private function addCollada():void{ /// light = new PointLight3D(true); /// var shader:GouraudShader = new GouraudShader(light,0xffffff,0x222222); var shadeMat:ShadedMaterial = new ShadedMaterial(new BitmapFileMaterial("assets/Rectangle2CompleteMap.png"),shader); /// var materialsList:MaterialsList = new MaterialsList(); materialsList.addMaterial(shadeMat,"baked_wire_028028177"); /// collada = new Collada("assets/skate.dae", materialsList); default_scene.addChild(collada); } I tried moving the light's x, y and z and nothing... Thanks, Javier _______________________________________________ Papervision3D mailing list [hidden email] http://osflash.org/mailman/listinfo/papervision3d_osflash.org |
|
xero
|
hey javier,
i dont work w/ collada very often, so i might be wrong.
but im pretty sure that shaders/shadedmaterials DO
NO WORK with materialsList, or compositeMaterials. if you want to try somthing else use the
collada.replaceMaterialbyName
function and try and replace the default materials
w/ shaded ones manually.
hope that helps!
____ ___ \ \/ /___________ ____ .\ // __ \_ __ \/ _ \ ./ \ ___/ | | \( <_> ) /___/\ \___ >__|---\____/ | \_/ \/ | | xero harrison | | xero.nu@gmail.com | | http://xero.nu | | http://fontvir.us | | http://hexarray.nu | | http://xero.owns.us | `---------------------'
_______________________________________________ Papervision3D mailing list [hidden email] http://osflash.org/mailman/listinfo/papervision3d_osflash.org |
||||||||||||||||
|
Maggical
|
But how can I apply a map to a collada object and then have it been affected by a papervision light?
Any example? I thought I was going the right way =P On Wed, Jul 1, 2009 at 2:46 PM, xero <xero.nu@gmail.com> wrote:
_______________________________________________ Papervision3D mailing list [hidden email] http://osflash.org/mailman/listinfo/papervision3d_osflash.org |
||||||||||||||||
|
nospam
|
I think ShadeMaterials do work with materialslist, but not composite materials. If the material is being applied to the collada properly I would have thought that would work, but I'm not in front of my workstation now to double check....I did a similar thing a week or so ago... > But how can I apply a map to a collada object and then have it been > affected > by a papervision light? > > Any example? I thought I was going the right way =P > > On Wed, Jul 1, 2009 at 2:46 PM, xero <[hidden email]> wrote: > >> hey javier, >> i dont work w/ collada very often, so i might be wrong. >> but im pretty sure that shaders/shadedmaterials DO >> NO WORK with materialsList, or compositeMaterials. >> if you want to try somthing else use the >> >> collada.replaceMaterialbyName >> >> function and try and replace the default materials >> w/ shaded ones manually. >> >> hope that helps! >> ____ ___ >> \ \/ /___________ ____ >> .\ // __ \_ __ \/ _ \ >> ./ \ ___/ | | \( <_> ) >> /___/\ \___ >__|---\____/ >> | \_/ \/ | >> | xero harrison | >> | [hidden email] | >> | http://xero.nu | >> | http://fontvir.us | >> | http://hexarray.nu | >> | http://xero.owns.us | >> `---------------------' >> >>> >>> ---------- Forwarded message ---------- >>> From: "Javier España | javierespana.com" <[hidden email]> >>> To: [hidden email] >>> Date: Wed, 1 Jul 2009 13:16:06 -0300 >>> Subject: [Papervision3D] Lights and Shader Materials >>> Hi there, I'm having some trouble making a light affect a material that >>> I >>> load to a Collada file. >>> >>> All works great, exept the light does not seem to affect the model. >>> Here's >>> the function that creates the light, the materials, the materiallist >>> and the >>> collada... Any ideas? >>> >>> *private function addCollada():void{ >>> /// >>> light = new PointLight3D(true); >>> /// >>> var shader:GouraudShader = new >>> GouraudShader(light,0xffffff,0x222222); >>> var shadeMat:ShadedMaterial = new ShadedMaterial(new >>> BitmapFileMaterial("assets/Rectangle2CompleteMap.png"),shader); >>> /// >>> var materialsList:MaterialsList = new MaterialsList(); >>> materialsList.addMaterial(shadeMat,"baked_wire_028028177"); >>> /// >>> collada = new Collada("assets/skate.dae", materialsList); >>> default_scene.addChild(collada); >>> }* >>> >>> I tried moving the light's x, y and z and nothing... >>> >>> Thanks, >>> >>> Javier >>> >>> >> _______________________________________________ >> 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 > _______________________________________________ Papervision3D mailing list [hidden email] http://osflash.org/mailman/listinfo/papervision3d_osflash.org |
||||||||||||||||
|
Maggical
|
If you could send that example for me to see once you get to your computer that would be amazing...
Thanks, Javier On Wed, Jul 1, 2009 at 5:34 PM, <[hidden email]> wrote:
_______________________________________________ Papervision3D mailing list [hidden email] http://osflash.org/mailman/listinfo/papervision3d_osflash.org |
||||||||||||||||
|
Lindquist
|
Does this help: http://pv3d.org/2008/12/07/collada-with-cellshader-and-pointlight3d/
2009/7/1 Javier España | javierespana.com <[hidden email]> If you could send that example for me to see once you get to your computer that would be amazing... _______________________________________________ Papervision3D mailing list [hidden email] http://osflash.org/mailman/listinfo/papervision3d_osflash.org |
||||||||||||||||
|
Maggical
|
I tried using that link, but I'm working on Flash CS4 and it uses some Flex libraries I don't have, ByteArray I think it's called.
If someone could have a look at my files It would be great, I'm stuck on this and can't move on... http://www.javierespana.com/uploads/test_14.zip Oh, PaperBase.as is here Thanks a lot, Javier On Wed, Jul 1, 2009 at 5:45 PM, John Lindquist <[hidden email]> wrote: Does this help: http://pv3d.org/2008/12/07/collada-with-cellshader-and-pointlight3d/ _______________________________________________ Papervision3D mailing list [hidden email] http://osflash.org/mailman/listinfo/papervision3d_osflash.org |
||||||||||||||||
|
nospam
|
Some javascript/style in this post has been disabled (why?)
ByteArray is part of flash's
standard library. Look in the Help Docs, it will tell you what you
need to import to make ByteArrays work.Cheers, mark Javier España | javierespana.com wrote: I tried using that link, but I'm working on Flash CS4 and it uses some Flex libraries I don't have, ByteArray I think it's called. _______________________________________________ Papervision3D mailing list [hidden email] http://osflash.org/mailman/listinfo/papervision3d_osflash.org |
||||||||||||||||
| Free Embeddable Forum Powered by Nabble | Help |