Depth sorting issues

Discuss Moho bugs (or suspected bugs) with other users. To report bugs to Smith Micro, please visit support.smithmicro.com

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
Aminator
Posts: 5
Joined: Mon Oct 15, 2007 3:17 am

Depth sorting issues

Post by Aminator »

Maybe it's just my expectations, but I am having major trouble with characters overlapping in unexpected ways. I'm trying to take advantage of the pseudo-3d capabilities and having a terrible time.

I'd love to attach the problem file for people to look at, but the sticky talks about a "link" or a "picture." I don't think a picture would be of much use and I don't have a Web site to link to.

btw, I sent the file to AS tech support. They said they'd have to look at it further. That was about three weeks ago.

Any suggestions?
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Shapes on a layer can not have their order animated without using a script.

A new version of AS soon to be released, has animated layer ordering, but until that is available the only way to animate layer order (without a script) is to use depth sorting with the z axis. Keep in mind layer sorting only works within each group type layer. A layer inside one group layer will not go above a layer in another group layer no matter how hard you try... even if you grunt and squint your eyes and concentrate really hard it won't work (I've tried this and all that happened is I had to change my pants).

Do a search on the forum for anything to do with "ordering" or "layer ordering" or "layer order". There are a bunch of fairly recent detailed threads about this topic. I have posted these techniques so many times... <sigh> i just can't make myself do it again. ;)

In a perfect world all these topics would be organized thoroughly for easy access... this isn't a perfect world... in fact it isn't even a "good enough" world in my opinion... so painstakingly poking through bunches of search results on the forum is all we've got for now. ;)

-vern
Aminator
Posts: 5
Joined: Mon Oct 15, 2007 3:17 am

Clarification

Post by Aminator »

Sorry I wasn't clearer. I'm not even sure what you mean by animated ordering. I just want the layers to remain consistent. In the file I'm working on, the characters use the Z distance to appear in front of the wall of a room, but as they move horizontally (X), they suddenly disappear behind the wall, even though using the Orbit tool shows there's lots of distance between them and the wall.

Also, character A can be in front of character B on the Z axis but still have character B overlap, as if B were in front. What I can't get them to do is appear where they're spatially placed (Z), no matter how hard I try or squint my eyes.
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

Layers's Z depth sort is determined by the origin of the layer. If the layer is rotared and the center is above other layer's center then it will be rendered before. To solve that you should subdivide your object into smaller parts (one on each layer) and take care that the center of each layer is the one who determines its depth. It gets more complicated if you subdivide so much the shapes.

The best is have the gravity center of the shapes in the center of the layer. In this way the possiblity of z-depth overlapping is smaller.

See this for further information:

viewtopic.php?t=6506
Aminator
Posts: 5
Joined: Mon Oct 15, 2007 3:17 am

Post by Aminator »

In theory, that sounds like it will work...but I haven't been able to do it.

You're talking about moving the center with the "+" tool in the palette of layer tools, right? When I click with that tool, the character moves unpredictably. Eventually, it disappears and I can't find it no matter how much I zoom out or orbit. I can only close the file and start again to get it back.

I haven't found much in the documentation about this tool either. (I imagine I need to reset the center in frame 0, right?) And how do you figure out where the center of the frame is? I thought it was centered by default.
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

I could find a way to help you more without watching the anme file. It is a very strange thing the one you commented about that the object moves when the + is moved.
-G
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Just out of curiosity how much are you moving the layers in the z axis?

I am just guessing but if the amount is extreme it might be moving completely out of the camera view... or maybe the extremes of motion are causing trouble with layer ordering. Do you have "sort by true distance" checked in the layer depth sort tab? I find this causes "different" behavior. Not "wrong" behavior... I just don't understand what it's doing so I don't check that box. ;)

Is this a "3D" set up or are you just using the z depth to change layer order? If you are just changing layer order you can turn off 3D camera in the project settings and use very small increments in the z translation.

If you are doing some sort of "pseudo" 3D set up... uh... can't help there I don't have any experience with it. ;)

-vern
Aminator
Posts: 5
Joined: Mon Oct 15, 2007 3:17 am

Post by Aminator »

Yes, it's a pseudo-3D room (two adjacent walls) with transparent windows, trees and buildings outside, etc. Wish I could attach the files somehow.
Aminator
Posts: 5
Joined: Mon Oct 15, 2007 3:17 am

Post by Aminator »

To answer your question, heyvern: I've fiddled with the depth sorting check box and found, as you did, that results were more closely aligned with my expectations when the box was unchecked.

There's a lot of Z action in this scene--the camera starts with a swivel pan from one wall to the other, and the characters come in set to face the camera, close to the camera rather than the walls--so they're both on an angle and having a positive (and varying) Z aspect.

But the following scene has them parallel to the back wall, but still at forward Z distances...and they still overlap incorrectly and disappear behind the back wall. It's very puzzling (to put it mildly).

I have to say, if not for this issue, panning this 3D setup looks great!
Post Reply