Depth sorting problem

Have you come up with a good Moho trick? Need help solving an animation problem? Come on in.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
jorgy
Posts: 779
Joined: Sun Sep 05, 2004 8:01 pm
Location: Colorado, USA

Depth sorting problem

Post by jorgy »

Okay, now I know this is probably a FAQ, but since I've searched through the forum here and didn't find the answer I think it's time to post it.

I have been making a 3D model out of 2D vector layers (and I have gotten past the origin issues I was seeing before by moving entire layers, not the contents). However, I am having visibility problems.

Image

Image

As I drag the orbit workspace tool, the sides of the barn move in front of and in back of the front of the barn. I have put these layers into a group layer, and in the group layer checked "sort layers by depth". I also played with the "true distance" option there, but it didn't seem to help. Note that when I do a render preview, it shows up incorrectly as well.

Here is my moho file.

Thanks!
User avatar
Hiddicop
Posts: 250
Joined: Sun Nov 07, 2004 4:18 pm
Location: Sweden

Post by Hiddicop »

Ok, I checked you file and located the problem.

The orgin-points in the sides of the barn are incorrectly placed. The "sort layers by depth" function measures the distence to the orgin-point. If you stand facint forward the barn, the orgins of the sides are closer to you then the orgin of the front. Therefor they will be counted as "closer to the camera". If you put the orgin in the center of each layer, this problem will not occure.
User avatar
Lost Marble
Site Admin
Posts: 2347
Joined: Tue Aug 03, 2004 6:02 pm
Location: Scotts Valley, California, USA
Contact:

Post by Lost Marble »

When you sort layers by depth, they are sorted based on layer origins. The layer with the furthest origin point from the camera gets drawn first, etc.

In your barn, if you look at the two side layers, you'll see that the origins for those layers are out in front of the barn, so Moho thinks they should appear in front of the barn's front side. I just moved the origins of those two layers so that they're in the middle of the side walls, and it works much better:

http://www.lostmarble.com/misc/Barn.moho
User avatar
jorgy
Posts: 779
Joined: Sun Sep 05, 2004 8:01 pm
Location: Colorado, USA

Post by jorgy »

Wonderful! Thanks! I had been messing around with the origins before I had put the layers into a group layer.

The only thing better than moho is the moho support here!
Post Reply