Skip navigation
Hec63
Currently Being Moderated

MovieClip disappear and reappear?

Sep 5, 2012 10:00 AM

Tags: #3d #actionscript3 #movieclip_disappear

Hi,

 

On a 3D scene a have some MovieClip container disappearing randomly after a while and reappearing when I rotate de scene.

Using CS6 AS3 Air 3.2.

 

-No memory leak

-fps good

-Object still on display list

-Tried whitout transparency no lock

 

If you have any clue please help,

 

Thanks,

 

CaptureTest1.JPGCaptureTest2.JPG

 
Replies
  • kglad
    72,189 posts
    Jul 21, 2002
    Currently Being Moderated
    Sep 5, 2012 10:17 AM   in reply to Hec63

    is its z property changing so it's behind those walls and floor?

     
    |
    Mark as:
  • kglad
    72,189 posts
    Jul 21, 2002
    Currently Being Moderated
    Sep 5, 2012 12:51 PM   in reply to Hec63

    nevertheless, i think you most likely have a clipping issue (or you're doing something to cause the problem).

     
    |
    Mark as:
  • kglad
    72,189 posts
    Jul 21, 2002
    Currently Being Moderated
    Sep 5, 2012 4:25 PM   in reply to Hec63

    no, it can't be gc'd unless it's removed from the display list.

     

    setup a loop that repeatedly traces that objects x,y,z,visible and stage properties and see if anything changes when it disappears.

     
    |
    Mark as:
  • kglad
    72,189 posts
    Jul 21, 2002
    Currently Being Moderated
    Sep 5, 2012 10:34 PM   in reply to Hec63

    what about visible and stage properties?

     

    and, is there any code anywhere in your app that can cause any object to not be visible?

     
    |
    Mark as:
  • kglad
    72,189 posts
    Jul 21, 2002
    Currently Being Moderated
    Sep 6, 2012 7:22 AM   in reply to Hec63

    there are bitmap size limitations but those would not cause a bitmap to disappear and reappear.

     

    stage is a property of all displayobjects.  when an displayobject is in the display list, its stage propety is the [object Stage].  when its not in the display list, its stage property is null.  you should check if that cabinet's stage property is null when it disappears.

     

    are you using a 3d (or any other framework)?

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 6, 2012 8:57 AM   in reply to Hec63

    Try changing the 3d scene itself. Duplicate the offending 3d object and see if both instances disappear.

     

    What format are you using for the 3d scene?

     

    How complex are the 3d models? Have they been optimized to remove excess/unnecessary vertices?

     
    |
    Mark as:
  • kglad
    72,189 posts
    Jul 21, 2002
    Currently Being Moderated
    Sep 6, 2012 10:51 AM   in reply to Hec63

    that trace repeatedly executes and show [object Stage] even after that object disappears?

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 6, 2012 11:30 AM   in reply to Hec63

    What is the target of this, desktop, web or mobile? If desktop or web have you tried viewing it on another machine to verify it's not a video card related issue? I presume you're using direct acceleration with depthAndStencil?

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 6, 2012 12:10 PM   in reply to Hec63

    Not specific to Flash but to OpenGL, the only time I've seen any significant issues with objects disappearing is when multiple 3d objects exist in the same 3d space. The only real way to verify if that's the issue is to make an object you're absolutely sure no overlapping exists in. Even if you draw a few dozen cubes with textures on them and make them a single object and it works (doesn't disappear) you might have an issue similar to that.

     

    The reason that is an issue is there are faces to all 3d objects. Unless you specifically select a face and mark it as a 2-sided face, only one side of a 3d mesh is ever visible. When 2 objects are in the same exact place, one may be pointed backwards and the GPU is simply not drawing the reverse side of the face. But that usually makes "parts" of a 3d model disappear, not really the whole model. Food for thought.

     

    You may want to try a simple test on a 3d framework. What 3d software do you use? I know it might not be advisable or practical to start rebuilding this all in a new framework but if you convert your model to a collada, 3ds or obj and import it directly into a framework and it displays perfectly, it may be worth using. I like Flare3D, Away3D and Alternativa3D myself. Some frameworks have plugins to convert 3d models to their own format (like Flare3D's f3d format). Sometimes just converting geometry to another format can solve an issue. You may even be able to convert your objects to OBJ and then back to their original format and solve the geometry issue. That has worked for me in the past.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 10, 2012 8:25 AM   in reply to Hec63

    Was the array a Vector? Was it class-level?

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 10, 2012 9:59 AM   in reply to Hec63

    While you can iterate through the display list and that can confuse you by similarity, that's not an array, that's just a MovieClip.

     

    Completely off-topic I'd stay away from using punctuation in a class name and stick to camel notation. Underscores are fine in variable names and people got used to them in instance names in flash but for example FrigoC1_mc should be FrigoC1MC. It helps quite a bit in determining if something is a class or an instance or variable name just by looking at code. But that's a side note.

     

    I see no issue with what you're doing and even though it doesn't disappear in 11.2, if white spots are appearing, it's still not working.

     

    I suspect the 3d models and materials are the underlying issue. I've already mentioned my recommended path. Create an object you're sure has no front/back faces in the same position and see if it disappears, or try a 3d framework and see if their object formats give similar results. I've never seen this happen in Flare3D, Alternativa3D or Away3D.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points