Scene objects - characters - front, behind?

  • #1, z nfuchsMonday, 06. March 2017, 18:52 hodinky 8 years ago
    Hi all!

    I would like to be able to tell the engine, which scene object is on which "layer"...basically: what occludes which character and when. How can I do this properly? Am I missing something?
    Only the scene objects order in the stack and the objects centerline is at my disposal to try to put a decent scene together?
    Anybody has some good pointers for me?
    Thanks!

    Bažant

    3 Posts


  • #2, z sebastianMonday, 06. March 2017, 19:00 hodinky 8 years ago
    the order the scene objects are listed define the drawing order in the scene. the object center defines when a character is drawed before or behind the object graphic. 

    Kapitán

    2346 Posts

  • #3, z afrlmeMonday, 06. March 2017, 19:10 hodinky 8 years ago
    Also the order of the objects is very important. They should be ordered based on the object center value you assign to them.

    Object center defines the coordinate on y-axis in which if the character is above that point then the object is drawn on top of the character. If the character is below that coordinate the character is drawn in front of the scene object. I'm not sure what happens if character is on the same exact coordinate - I forget & it's probably rare that will happen if you setup the way system borders & paths for your scene correctly.

    In regards to what I mentioned in my first paragraph, you can automatically reorganize the scene object list based on the object center values of each scene object by clicking on the double yellow arrow icon on the toolbar above the scene object list. I highly recommend doing that before you save & run your game - if you have added any new objects, adjusted object center for existing objects or deleted some objects.

    Imperátor

    7285 Posts

  • #4, z nfuchsMonday, 06. March 2017, 19:21 hodinky 8 years ago
    Wouldn't it be easier if we could draw layer areas and masks and say: "objects that I select now will be assigned to this layer which is 'the floor', every character will be on top of these graphics"..." now I draw another layer and say, this is the room objects layer, every object assigned to this layer will behave as it is told in its properties...occlude the character based on it's centerline..."

    Right now it's a chance game to find the proper center and order for me. (Wall as object, has to occlud one character but not the other, etc...)

    Any info if masks will be implemented anytime?

    Bažant

    3 Posts

  • #5, z sebastianMonday, 06. March 2017, 19:34 hodinky 8 years ago
    masks for shaders: yes. in vs5
    I doubt they will implement it for objects

    Kapitán

    2346 Posts

  • #6, z nfuchsMonday, 06. March 2017, 19:40 hodinky 8 years ago
    I'll experiment then with what we have now...
    Thanks!

    Bažant

    3 Posts

  • #7, z afrlmeMonday, 06. March 2017, 19:54 hodinky 8 years ago
    It's all about a characters position in relation to the scene object. You assign each animation for all of your characters an animation center. This animation center is what determines the position of the character in the scene. The animation center is usually located somewhere near the feet of the character...

    Now, it doesn't have to be placed there at all. If a character is going to be an npc in a scene & will be in the same place the entire time, then you could offset the animation center for that character & offset the position of the character in the scene. It's just about figuring out the right balance & testing things out as you go to figure out what works best in each situation.

    Imperátor

    7285 Posts