Sorry for the late reply, lunch happened and had to go eat. The way I've about loading is in a single load call I load one entire model. Then once that model has completed, I proceed to load its respective texture(s). This method is currently working with obj files, even though I had to change some things in the loader cause the names weren't crossing correctly.
This method shouldn't require AWD models, this method even came about because we didn't want to use the AWD models because it was another step in our artist pipeline. But, respectively, this should work for any of the file types. I personally haven't tried to do it with 3DS models, but I'm sure as long as you can translate a name, you can find a naming convention that works for your models. Hope this helps, and good luck. On Mar 25, 12:57 pm, Aurélien Nauwelaers <[email protected]> wrote: > Thanks for the info anyways ;) > Oh, and BTW, it's a great job already ! > > On 25 mar, 17:39, Fabrice3D <[email protected]> wrote: > > > yes, Prefab handles only one material per mesh for now. > > Pretty sure it will not help at all saying this now: that will change later > > on :)) > > > Fabrice > > > On Mar 25, 2010, at 5:20 PM, Aurélien Nauwelaers wrote: > > > > Hi, > > > Thanks for your answer. I'd read your previous posts about this > > > problem too ;) > > > > Yes, it seems to me too that the problem comes from multiple textures > > > loading. > > > I tried transforming the weak references created in Loader3D and > > > AbstractParser into strong references, in case that would prevent the > > > Garbage Collector to delete the loaders before their work is finished, > > > but it didn't change anything. > > > > Does your solution (loading separately the meshes and then the > > > textures) require AWD files to work ? Or can it be done successfully > > > with 3DS files ? > > > > I'm looking into Prefab right now. But it has trouble correctly > > > loading my 3DS, and it seems to me that it can't handle more than one > > > texture per model (which I really need). Hmm... > > > > On 25 mar, 15:08, Reinorvak <[email protected]> wrote: > > >> I've been fighting with these loaders for several months, I switched > > >> models several times as well. I've had this occur every time with > > >> models in obj or dae. Only place it didn't occur was in the awd (an > > >> Away3D model type with PreFab). > > > >> Also, this problem only seems to occur with textured models for some > > >> reason. Really the base way to solve this, or at least the best way > > >> I've come to terms on how to solve this, is you load all your models > > >> in individually with a queue order. Then when they model's done you > > >> load its corresponding texture. If you can get the name of the mesh to > > >> come across, I suggest using that as a way to get the file name for > > >> the image. > > > >> At least that's how I've solved this for now. Currently, we can have > > >> as many models as we want on the loader and we never fail to load a > > >> model with its texture this way. > > > >> Hope this helps. > > > >> On Mar 25, 7:50 am, Aurélien Nauwelaers <[email protected]> > > >> wrote: > > > >>> No, the problem is the same with this method. > > >>> In fact, I previously programmed it your way ; but i feared that > > >>> adding the listeners only after using the load() method might cause > > >>> this strange lack ef event triggering (in case the model would be > > >>> loaded just after the load, but before the listeners are given). > > >>> Anyway, I switched back to your method just in case, but it doesn't > > >>> change anything. > > > >>> I noticed that the failure chances are higher when I load several > > >>> models simultaneously, but I still have roughly 10% of fail when > > >>> loading only one model at a time. > > >>> It is also higher when I test my project online than offline. > > > >>> The Loader3D "bitmapLoaded" and "bitmapTotal" seem to point at first > > >>> to the 3DS object, then to the successive textures of this model. > > >>> It looks like, randomly, one of these texture loadings can happen to > > >>> fail (at 0%, 100% or any inbetween), and this doesn't trigger any > > >>> event. > > > >>> Is this a known bug ? > > > >>> On 24 mar, 22:31, juliancruz87 <[email protected]> wrote: > > > >>>> hi why not try the following way I loaded my perfect all 3ds models, > > >>>> we should note that it is much better to try textures and 3DMax Studio > > >>>> that things are not used as materials, and others, only texture > > >>>> images, I always use this code, and it has worked perfectly in all > > >>>> projects > > > >>>> first create a variable > > > >>>> var object3DS: Loader3D; > > > >>>> then assemble, > > > >>>> object3DS = Max3DS.load (assets/objeto.3ds ", (texturePath: > > >>>> assets /)); > > >>>> view.scene.addChild (object3DS); > > > >>>> if you need access to properties object3D then use the following code > > >>>> for example > > > >>>> object.handle and then the 3D object properties such as an alpha > > > >>>> object3DS.handle.ownCanvas = true; > > >>>> object3DS.handle.alpha =. 5; > > > >>>> I hope this will be helpful whenever I use it and have not had any > > >>>> flaws. the same way you can apply the error events, success, load. > > > >>>> On 24 mar, 13:53, Aurélien Nauwelaers <[email protected]> wrote: > > > >>>>> My 3DS or DAE loadings happen to freeze, apparently randomly and > > >>>>> without dispatching any event. > > > >>>>> This is the code I use to load 3DS files : > > > >>>>> var initObject:Object = { useGroups:true }; > > >>>>> var parser: AbstractParser = new Max3DS( initObject ); > > >>>>> var loader:Loader3D = new Loader3D(); > > >>>>> loader.addOnProgress( onProgress ); > > >>>>> loader.addOnSuccess( onSuccess ); > > >>>>> loader.addOnError( onError ); > > >>>>> loader.loadGeometry( urlObjet, parser ); > > > >>>>> (Plus necessary callback functions.) > > > >>>>> Most of the times it works perfectly, onProgress and onSuccess are > > >>>>> called when necessary and the model appears. > > >>>>> But sometimes (about 10% chances), the loading gets stuck at either > > >>>>> 0%, 100% (frequent) or any random value between them, according to the > > >>>>> last call of onProgress. > > >>>>> In such case, onProgress stops, and neither onSuccess nor onError > > >>>>> functions are called. The model isn't displayed, even with permanent > > >>>>> view.render(). > > > >>>>> I use the latest version of the Away3D svn. > > > >>>>> Do you have any idea of what went wrong ? > > >>>>> Many thanks in advance :) > > > > To unsubscribe from this group, send email to > > > away3d-dev+unsubscribegooglegroups.com or reply to this email with the > > > words "REMOVE ME" as the subject. To unsubscribe from this group, send email to away3d-dev+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
