I have a problem sorting layers by depth because of groups..

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
Didi
Posts: 11
Joined: Wed Feb 03, 2010 2:29 am

I have a problem sorting layers by depth because of groups..

Post by Didi »

Hello


( I am new here, I'll introduce myself later. ;) )


I am having a problem sorting layers by depth, because of parent-groups and child-groups...

Seems that a group can only sort its "childs", not its child's childs. :?


I had to make a very wide desert landscape. I made a "floor", a layer that I rotated so it is not anymore facing the camera but is like a floor.
I have painted, imported and scattered tons of cactus, dry weed and so on, on my "floor".

And then, to keep far ones to appear above near ones because of the layers order, I activated the "sort layers by depth" and "sort by true distance" options.

I thought all my object would be sorted equally in my whole "world", so I could make my character pass-by through the cactus, weed, and all these tons of things, to make a nice landscape scrolling effect.

But it does not work, there is a parent-group / child-group problem... :(


Look, I have such a groups tree :

Desert

__Character

__Cactus
____Cactus1
____Cactus2
____...

__Dry Weed
____Dry Weed1
____Dry Weed2
____...

__Bushes
____Bush1
____Bush2
____...

__Mountains

__Sun

__Sky


Only the parent-groups "Cactus" "Dry Weed" and "Bushes" are sorted with my character, because they are childs of their "Desert" parent-group...

My cactus are only sorted inside their "Cactus" parent-group, my bushes are only sorted inside their "Bushes" parent-group, and so on.... My cactus and my bushes are not "sorted together". And it is really a problem !!! :(


The only way it could work would be to put my character with all my cactus objets, weed objets, and so on, in a unique big group. But it would be such a mess !!!! :shock: It would really be horrible to work with ! I would always be looking for my character's layer among these tons of stuff.......


I saw a member here is working on a wide cowboy desert landscape too, so I asked her, but she does not make it the same way as me : she uses only a few huge vector layers, while I use tons of small picures, so she sorts them herself.

Please tell me how could I do.
User avatar
slowtiger
Posts: 6081
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

You just sort your stuff by wrong parameters.

Think of different layers in different distance to the camera. Lets have some layers:
A foreground
B
C cowboy
D
E hills, sky

Now you just put as many elements as you need into each layer, set a Z distance for each, and use the camera.
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

The only way to sort out the child z-depth problem is to place all the stuff you really need to be crossed by your character into a single group/bone layer and enable sort by depth and by true distance.
You should study the scene carefully and mybe you find that only two or three things overlap with your character. If the object doesn't overlap, why to worry on mix with your character? Also, do you really need that kind of zdepth effect?
In any case, deal with all them in a big group is not a really mess if you just move your character. The problem comes when you cross different planes from bottom to front and viceversa. move only a plane is a piece of cake ;)
-G
Didi
Posts: 11
Joined: Wed Feb 03, 2010 2:29 am

Post by Didi »

Thanks. I finally cut my world into several areas.

I have several characters, so it goes like :

1.01 to +∞ : near objects
1 : a character
0.01 to 0.99 : some objects
0 : main character
-0.01 to -0.99 : some objects
-1 : a character
-1.01 to -∞ : far objects

Not so messy finally. But maybe I will make a feature request about an option in the sorting panel : "Sort layers inside child groups as well".
User avatar
dueyftw
Posts: 2174
Joined: Thu Sep 14, 2006 10:32 am
Location: kingston NY
Contact:

Post by dueyftw »

I sometime avoid using 'sort by distance' by using duplicate layers and masking both layers where it is needed.

Also I stay at the default distance and just sort and re-size objects in layers to make the look of distance.

Dale
Post Reply