Insert foot in mouth, just did some more testing and the name doesn't
matter, just ended up being a coincidence.

On Feb 25, 11:12 am, Reinorvak <[email protected]> wrote:
> Been working on this for the past few days and found something very
> interesting through our artists. Apparently, the texture only goes
> through the away3D loader when it has "Lambert" + etc. as its name. I
> just tested it myself it seems to hold true.
>
> But I've set up the flash file to now load files one at a time, in
> order, so that it can never be over-loaded. Sometimes it makes it
> through, sometimes it doesn't. Still working on this, but I've gotten
> texture's to follow through to away3d so far.
>
> On Feb 22, 2:26 pm, "Joshua Granick" <[email protected]> wrote:
>
> > I'm not sure if this is related, but occasionally Flash Player seems to get 
> > overloaded if it loads too much at once. Unfortunately, this causes the 
> > player to seize up and to simply not load certain files. It happens the 
> > most for me when I am testing locally, as it seems to occur most when they 
> > all finish loading in the same frame.
>
> > Have you put in traces to try and see if everything is actually loading, or 
> > if the problem is in parsing?
>
> > See if it works if you force them to go in sequence. Chain them from 
> > beginning to end, starting each later model only after the first has been 
> > loaded and processed. If that works somehow than you'll at least have a 
> > starting point to work back from.
>
> > On Mon, 22 Feb 2010 10:26:55 -0800, Reinorvak <[email protected]> 
> > wrote:
> > > All models in game are scaled by 10 so I'd know if they were there
> > > regardless. Did it work on loading more then one model? I mostly ask
> > > cause I've gotten it to load one model on a rare occasion, but it
> > > won't load others afterwords.
>
> > > To further explain, I just tested this on the fly with that .dae
> > > model. I called the loadModel function with the same model 8 times,
> > > but only got onSuccesses for 3 of them. Maybe I'm overloading the call
> > > to load due to the extra data of the material?
>
> > > On Feb 22, 11:52 am, katopz <[email protected]> wrote:
> > >> it's load fine here with v2.4.3 lastest on trunk fp9
> > >> result look same as in maya
>
> > >> may be you forget to increase scale, so it's too small to see?
> > >> do try scale by 25 after load success, should help
>
> > >> hth
>
> > >> On 22 February 2010 21:40, Reinorvak <[email protected]> wrote:
>
> > >> > Sorry for the late response, weekend showed up and all that lovin.
>
> > >> > I've uploaded the model file and texture file into the database. Its
> > >> > box_test.dae and wood.png. Just put them both in the same file and
> > >> > they should run respectively. Weird thing is, I did get a model to
> > >> > make it through the collada loader, however, the other models didn't
> > >> > show up. There was suppose to be 5 models, but I only ever got one, if
> > >> > that, and away3D was running as I could to move objects around.
>
> > >> > The target version should be 2.3.3 on FP9.
>
> > >> > Thanks for the help in advance.
>
> > >> > On Feb 19, 9:18 pm, katopz <[email protected]> wrote:
> > >> > > Hey guy
>
> > >> > > could you send that dae to me? i'll take a look
> > >> > > btw, what you target version? away3d fp9, fp10?
>
> > >> > > cheers
>
> > >> > > On 20 February 2010 03:14, Joshua Granick <[email protected]>
> > >> > wrote:
>
> > >> > > > Anyone else? Is this a bug in the Collada class?
>
> > >> > > > On Fri, 19 Feb 2010 10:01:32 -0800, Reinorvak <
> > >> > [email protected]>
> > >> > > > wrote:
>
> > >> > > >  For most of the materials loaded in, they get turned into a
> > >> > > >> ColorMaterial, however, when I specified a texture it actually 
> > >> > > >> made it
> > >> > > >> through as a texture Material according to the MaterialLibrary 
> > >> > > >> from
> > >> > > >> away3D.
>
> > >> > > >> I understand the method of looking through the materialLibrary and
> > >> > > >> changing the materials there however, the Collada loader actually 
> > >> > > >> gets
> > >> > > >> stuck when loading the models through with a texture applied to 
> > >> > > >> them.
> > >> > > >> I went into the Collada load functionality and checked the 
> > >> > > >> material
> > >> > > >> and it was correct on file path, material type, etc. But, since it
> > >> > > >> gets stuck it never reaches my OnSuccess function for when the 
> > >> > > >> Collada
> > >> > > >> is done parsing the .dae.
>
> > >> > > >> I'm using the same kind of method except the object is an Away3D
> > >> > > >> extended object.
>
> > >> > > >> Just to reiterate, the texture's properties from maya are loaded 
> > >> > > >> with
> > >> > > >> the Collada loader with the correct file path. They're relative 
> > >> > > >> paths
> > >> > > >> according to where the model is located. The Collada parse just 
> > >> > > >> gets
> > >> > > >> stuck on the load when trying to load the model with a texture.
>
> > >> > > >> On Feb 19, 12:22 pm, "Joshua Granick" <[email protected]>
> > >> > > >> wrote:
>
> > >> > > >>> If you load and parse a Collada which has several textures 
> > >> > > >>> specified,
> > >> > > >>> will it leave out the materials, or will it load the materials, 
> > >> > > >>> but
> > >> > as a
> > >> > > >>> Wireframe Color or something instead?
>
> > >> > > >>> Whenever I need to swap out a texture at runtime, I run a for 
> > >> > > >>> each
> > >> > loop
> > >> > > >>> over the materialLibrary property. It's possible that if you 
> > >> > > >>> load an
> > >> > object
> > >> > > >>> and don't pass a material, the for each loop (or for in loop) 
> > >> > > >>> might
> > >> > still
> > >> > > >>> have an entry for each referenced material in the model. Then 
> > >> > > >>> it's
> > >> > just a
> > >> > > >>> matter of linking up the correct file path to that material.
>
> > >> > > >>> At that point, since you might know the name of the material you
> > >> > need,
> > >> > > >>> there might be a way to get that URL off of the object, or you 
> > >> > > >>> might
> > >> > have a
> > >> > > >>> library you can reference which will define the file path for 
> > >> > > >>> that
> > >> > material
> > >> > > >>> name. That would make it possible to share textures across 
> > >> > > >>> different
> > >> > > >>> objects. On the other hand, I guess that still is hard-coding URL
> > >> > paths.
>
> > >> > > >>> I am using a unique class with Flash embed code for each model 
> > >> > > >>> I'm
> > >> > using
> > >> > > >>> in my current project, because each one needs to have additional 
> > >> > > >>> code
> > >> > > >>> information for how it interacts inside the environment I've 
> > >> > > >>> created.
> > >> > If you
> > >> > > >>> just needed to load a lot of objects, I can see how this would be
> > >> > difficult.
>
> > >> > > >>> So if you use the standard Collada.load method, it doesn't load 
> > >> > > >>> the
> > >> > > >>> textures, you said? Are you sure that it is finding the 
> > >> > > >>> textures? Are
> > >> > the
> > >> > > >>> paths to the material images correct inside the Collada? Are they
> > >> > relative?
>
> > >> > > >>> On Fri, 19 Feb 2010 06:16:05 -0800, Reinorvak <
> > >> > [email protected]>
> > >> > > >>> wrote:
> > >> > > >>> > Yeah, that is what I was doing previously, but this ended up 
> > >> > > >>> > being
> > >> > a
> > >> > > >>> > hard-coded kind of method since each model would have a 
> > >> > > >>> > specific
> > >> > > >>> > texture. I was looking for a more dynamic way of going about 
> > >> > > >>> > this
> > >> > as
> > >> > > >>> > we're going to have tons of individual models and textures.
>
> > >> > > >>> > Alright let me explain a bit more on how this is working. 
> > >> > > >>> > Currently
> > >> > I
> > >> > > >>> > have two classes running about being the Item class, which 
> > >> > > >>> > contains
> > >> > > >>> > all the model data. Then there is my own MatLibrary. I use the
> > >> > > >>> > MatLibrary to load texture's at run time and place them on the
> > >> > model.
> > >> > > >>> > However, this requires that I know which texture goes where on 
> > >> > > >>> > the
> > >> > > >>> > model, as there can be multiple texture's per single model. As 
> > >> > > >>> > is
> > >> > > >>> > such, I'd like to further separate the need to externally load
> > >> > > >>> > texture's when loading a model, as want to load it with the 
> > >> > > >>> > Collada
> > >> > > >>> > loader, not using the bitmap parameter.
>
> > >> > > >>> > Currently, this is whats happening in code:
>
> > >> > > >>> > On the load call:
> > >> > > >>> > public function loadModel(url:String):void
> > >> > > >>> > {
> > >> > > >>> >    m_url = url;
> > >> > > >>> >    var loader:Object3DLoader = Collada.load("Models/test/chair/
> > >> > > >>> > box_test.dae");
> > >> > > >>> >    loader.addOnSuccess(onSuccess);
> > >> > > >>> >    loader.addOnError(onError);
> > >> > > >>> > }
>
> > >> > > >>> > Pretty much just making a basic load call with Collada and 
> > >> > > >>> > setting
> > >> > up
> > >> > > >>> > event handlers.
>
> > >> > > >>> > On the load Success:
>
> > >> > > >>> > override protected function onSuccess(e:LoaderEvent)
> > >> > > >>> > {
> > >> > > >>> >         m_model = (e.loader.handle as ObjectContainer3D);
> > >> > > >>> >         m_model.ownCanvas =true;
> > >> > > >>> >    m_model.renderer = renderer;
> > >> > > >>> >    addChild(m_model);
>
> > >> > > >>> >    for(var i = 0; i < m_textureNames.length; ++i)
> > >> > > >>> >    {
> > >> > > >>> >            fcsMaterialLibrary.getInstance().addEventListener(
> > >> > > >>> "LoadComplete" +
> > >> > > >>> > m_textureNames[i], initMaterial);
> > >> > > >>> >    }
> > >> > > >>> >    
> > >> > > >>> > fcsMaterialLibrary.getInstance().CreateMultiMaterial(m_model,
> > >> > > >>> > m_textureNames);
> > >> > > >>> > }
>
> > >> > > >>> > Turn the model that has been loaded into an object of the 
> > >> > > >>> > class,
> > >> > and
> > >> > > >>> > then continue on to load the Array of textures. The textures 
> > >> > > >>> > are
> > >> > hard-
> > >> > > >>> > coded for the time being, and I can get them to show up on the
> > >> > model
> > >> > > >>> > with some tricks. But what I'd like to do is remove the need 
> > >> > > >>> > for
> > >> > the
> > >> > > >>> > MaterialLibrary, and just have all texture's loaded on the 
> > >> > > >>> > collada
> > >> > > >>> > load without having the load the texture beforehand.
>
> > >> > > >>> > Thanks again in advance.
>
> > >> > > >>> > On Feb 18, 4:58 pm, "Joshua Granick" <[email protected]>
> > >> > wrote:
> > >> > > >>> >> FYI, you can parse on your own like this:
>
> > >> > > >>> >> Collada.parse (MeshClass, { material: MaterialClass } );
>
> > >> > > >>> >> or
>
> > >> > > >>> >> var material:BitmapMaterial = new BitmapMaterial (Cast.bitmap
> > >> > > >>> (MaterialClass), { smoothing: true } );
> > >> > > >>> >> Collada.parse (MeshClass, { material: material } );
>
> > >> > > >>> >> That works great if you're embedding. I don't
>
> ...
>
> read more »

Reply via email to