huge thanks huge
decided to take the collada route. got the model exported using maya 2010's
built in thingy. loaded fine. looked good.
hit a stumbling block regarding animation though. nobody online seems to be
having this same issue, but i wondered if any one here had seen such a
problem before.
http://files.dubitlimited.com/sean/pvalphaman/animated1/bin-debug/Demo.swf
if you look really closely, you should be able to see an animated version of
the fella in his own chest. one idea that's been put to me is that the big
guy is the little guy before the rig is attached. i don't really know what
the limitations of collada in papervision are, or what settings should be
used in either papervision or the export.
if you want to take a look at the source, look here...
http://files.dubitlimited.com/sean/pvalphaman/animated1/src/Demo.as
...or here...
http://files.dubitlimited.com/sean/pvalphaman/animated1/
<http://files.dubitlimited.com/sean/pvalphaman/animated1/>thanks
:S
On 12 October 2010 22:19, Huge Ontoman <darbam-***@public.gmane.org> wrote:
> Hello Sean,
>
> i dug deeper into this topic, and seriously..bad news.
> I don't know if it is a design fault of papervision3d or just the JOBJ.as
> parser, but it is quite not logically organized.
> DisplayObject3d SHOULD be the base class for all the scene (well) 3d
> objects. It is true, but the JOBJ is extending TriangleMesh3d, wich in turn
> extends Vertices3d, and that is the class extending DO3D. Like this, a some
> properties of the baseclass (DO3D) does not get filled with necesarry data.
>
> In an ideal world, after You load Your .obj, You could say
> myObj.replaceMaterialByName( new BitmapFileMaterial("image.png"),
> lambert3SG");
> and that should be it. But thanks to this chaos of hierarchy in the
> JOBJ-TriangleMesh3d-Vertices3d-DisplayObject3d, the DO3D object doesn't have
> any materials, and some basic parameters are not filled in - making some of
> it's public methods useless (like replaceMaterialByName, for example)..
> All the materials are stored inside the TriangleMesh3d, and that doesn't
> support material replacing.
>
> To make an even longer story short:
> - You could consider another file format (DAE, for example, it does extends
> *directly* DisplayObject3d) - be warned tough..You still would have to do
> dirty tricks to access the materials loaded automatically by the parser.
> - Or, maybe more simple, separate those alpha mapped planes into another
> .obj
> Load it before/after the stickman, and apply a new BitmapFileMaterial to
> the entire instance of JOBJ.
> stickman = new JOBJ("stickman.obj");
> fxPlanes = new JOBJ("planes.obj");
> fxPlanes.material = new BitmapFileMaterial("image.png");
>
> Probably, You would preferr the second one, as like that You have to add
> extra code, and not rewrite already existing one.
>
> Let us know if You find anything useful about the topic,
> cheers,
> huge
>
> ps: one more thing, that JOBJ needs some serious rewrite. It lacks some
> basic features. To add one LIFESAVER do the following...
> in JOBJ.as after line 510 add a new line:
>
> dispatchEvent( new FileLoadEvent( FileLoadEvent.LOAD_COMPLETE)
> );
>
> Like this, You could listen for the event LOAD_COMPLETE in Your main code,
> and do stuff with the already parsed .OBJ.
> for example:
>
> private function createObject() : void
> {
> man = new JOBJ("./stickman.obj");
> man.scale = 200; //You used the camera.zoom property to
> "scale" the model..
> man.addEventListener( FileLoadEvent.LOAD_COMPLETE, onComplete);
>
> }
> private function onComplete( event: FileLoadEvent ): void
> {
> man.removeEventListener( FileLoadEvent.LOAD_COMPLETE,
> onComplete);
> scene.addChild(man);
> var bfm:BitmapFileMaterial = new
> BitmapFileMaterial("lightf.png");
> man.material = bfm; //note that like this You have transparent
> textures...
> startRendering();
> }
>
>
> ------------------------------
> Date: Tue, 12 Oct 2010 11:00:58 +0100
> From: sean.thompson-OhYsZGG4/***@public.gmane.org
> To: papervision3d-***@public.gmane.org
> Subject: Re: [Papervision3D] BitmapFileMaterial PNG Alpha Transparency
>
> It's good to hear that BitmapFileMaterial supports transparency, but that
> just furthers the mystery! why isn't my model see through?
>
> the BitmapFileMaterials are made in JOBJ.as. Has anybody here used that
> parser? Does anybody know of another OBJ parser I could use? I've tried
> obj.as too, but that doesn't seem to like the newest version of
> papervision.
>
> http://files.dubitlimited.com/sean/demo.zip
>
> Feel free to take a look at my code if it helps. If zipped papervision and
> my assets in there too. JOBJ.as is in the parsers namespace.
>
> :S
>
>
>
> On 11 October 2010 22:59, Conceito Digital - Henrique <
> producao-xMS6koCHM+OZkjO+***@public.gmane.org> wrote:
>
> *Maybe just..*
> **
> var _loader:Loader = new Loader();
> _loader.load(new URLRequest("
> http://files.dubitlimited.com/sean/pvalphaman/lightf.png"));<http://files.dubitlimited.com/sean/pvalphaman/lightf.png%22%29%29;>
> _loader.contentLoaderInfo.addEventListener(Event.COMPLETE, function
> (e:Event):void
> {
> var _material:MovieMaterial = new
> MovieMaterial(_loader.content,true);
>
> //Above you use the material as you want
> addChild(new Plane(_material));
> }
> );
>
>
>
>
> *From:* John Brookes <jbpv3d-gM/Ye1E23mwN+***@public.gmane.org>
> *Sent:* Monday, October 11, 2010 6:03 PM
> *To:* papervision3d-***@public.gmane.org
> *Subject:* Re: [Papervision3D] BitmapFileMaterial PNG Alpha Transparency
>
> Nothing, it was just a quick cut n paste
> excess code
>
> doubleSided just makes materials double sided :)
>
> ------------------------------
> _______________________________________________
>
> Papervision3D mailing list
> Papervision3D-***@public.gmane.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D-***@public.gmane.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
>
>
> --
> Sean Thompson | Production Manager | Dubit Limited
>
> _______________________________________________ Papervision3D mailing list
> Papervision3D-***@public.gmane.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D-***@public.gmane.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
--
Sean Thompson | Production Manager | Dubit Limited