Object center and Z index

  • #1, z SergioWednesday, 06. March 2013, 14:30 hodinky 12 years ago
    I will continue my problem here.

    I have defined an object (with image) which is not visible at the beginning (through a self condition linked in the condition properties field). When the player does something, it triggers an action which changes the condition to true and the object is visible. This works perfectly. My problem arises when the character passes in front of the object. No matter what object center I select, but the object always is drawn in front of the character.

    As AFRLme suggested, I tried to recreate the object in case it was corrupted, but it is the same. Even more, I tried to play with other independent objects in the scene, but they are always in foreground.

    Then I wrote a small LUA script to print the centers of the object and the character. When the problem happens the object center has a value of 537, while the character has an Y position 846. I even checked the .ved file, and in the object definition the object center is properly set, so I can't see any corruption.

    Any ideas on that?
    Thanks, Sergio.

    Bažant

    6 Posts


  • #2, z afrlmeWednesday, 06. March 2013, 16:14 hodinky 12 years ago
    it does this with all objects in the scene?
    what about the other scene you mentioned?

    I have had a similar issue before but it was just one object & was when I used a specific image file as all object centers were fine before I added said object/image.

    when I aded the object with the image all of the other images & animations were pushed in front of the character but everything was fine again when I removed the object/image - maybe try exporting the image again under a different name?

    P.S: what file type are you using for your images & what color mode & bits?
    recommended is: .png (rgb color) @ 8bit

    Imperátor

    7285 Posts

  • #3, z SergioWednesday, 06. March 2013, 17:12 hodinky 12 years ago
    You gave me a clue about testing the object in another scene. At least one of images works perfect. Don't know why it's not working in the other scene.

    By the way, I'm using PNG in RGB color, but at 32 bits. It shouldn't be problem I think.

    Thanks a lot, I'll keep taking a look at it.

    Bažant

    6 Posts

  • #4, z afrlmeWednesday, 06. March 2013, 17:24 hodinky 12 years ago
    it should be 8bit for visionaire studio to read/use correctly ...

    we've had various people report issues with images not working correctly (pixelated or strange artifacts) when using other bit settings.

    Imperátor

    7285 Posts

  • #5, z mowrenWednesday, 06. March 2013, 17:56 hodinky 12 years ago
    It should be 8 Bit per channel. Witch results in 32 Bit PNG files.

    Bažant

    10 Posts

  • #6, z EinzelkämpferWednesday, 06. March 2013, 18:17 hodinky 12 years ago
    Be sure to have your scene objects sorted correctly. Use the sort button for automatic sorting of the ojects list (the rightmost button with the two arrows). Having the objects in the wrong order may cause strange effects - like the one you are experiencing.

    Bažant

    81 Posts

  • #7, z SergioWednesday, 06. March 2013, 19:42 hodinky 12 years ago
    Yes, indeed I missed completely the IMPORTANT note (in red, caps and bold font) in the documentation. I am ashamed :S

    I assumed that placing the center was enough to decide whether if paint the character in front or in the background. Obviously it needs more help to work properly.

    I won't forget about this issue from now, but it's not so straightforward to handle for beginners smile

    Thanks to everyone!

    Bažant

    6 Posts