Darn, I wish I had waited just  a bit longer to post that, my very next
effort revealed the problem (or at least I can reproduce it with a
simplified example now).

 

It appears (to my eyes) that if 

..         I add the object to the scene AFTER it has finished loading, only
the cube loader is shown.

..         If I add the object to the scene IMEDIATELY FOLLOWING the
Obj.load() method, it works fine.

 

Here's what I did to reproduce it in a minimal test case, let me know what
you think:

 

1)      Call Obj.load()

2)      Add onEnterFrame listener

3)      Wait for the 300th frame before adding the object to the scene

 

This displays the cube loader only. If I add the object to the scene on the
first frame it works, same as if I add it immediately after creating it.

 

Dave

 

 

 

From: [email protected] [mailto:[email protected]] On
Behalf Of Peter Kapelyan
Sent: Sunday, July 26, 2009 2:52 PM
To: [email protected]
Subject: [away3d] Re: Intermittent error loading a mesh

 

I've seen something similar with SWF's and plain ole' regular Flash. The SWF
will load 100% but because it's cached (or something) one of the complete
listeners never fires, usually in a certain browser (forget which one-maybe
IE). Some questions:

Does it happen just locally or or the web as well?

Do you see the loading percentage, or does it just start at the final size?

I forgot exactly what I did to fix the swf problem, but I remember once I
had to change the =100% to = 99.99% (or something like that), and in another
case I had to add another listener because a certain browser didn't like it.
I don't know if it's the same error, butI have seen "something" like this
before.

-Pete

On Sun, Jul 26, 2009 at 3:34 AM, David Parks <[email protected]> wrote:

Ok, this is worth asking now.

 

I am trying to use Obj.load(url). And I get an intermittent problem. Some
times (vary rarely at the moment) the mesh will load just fine. Most times
the cube loader will only ever display with the text "Loading Geometry.
51622 of 51622 bytes". 

 

I've tried this with a couple of meshes generated by different apps.

 

I haven't been able to reproduce this in a simplified example (it loads fine
in that attempt). So I have started stripping down a copy of my code to try
to isolate the issue. But am not having much luck yet.

 

So maybe it's worth asking if anyone's seen something like this before?

 

Some potential oddities to note: 

..         All I am loading is the .OBJ, no MTL file was generated (other
than this issue that seems like a non issue). The .OBJ only contains the
geometry, the texture map is a separate JPG that I will load once I get the
mesh its self loading in a stable fashion. 

..         I am adding the object to the scene in a separate step than when I
create it (just happens to be the way the code flows), the loader object is
being cast to an Object3D before being added to the scene. 

 

Thanks,

David

 




-- 
___________________

Actionscript 3.0 Flash 3D Graphics Engine

HTTP://AWAY3D.COM

Reply via email to