Object center and Z index

  • #1, by SergioWednesday, 06. March 2013, 14:30 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.

    Newbie

    6 Posts


  • #2, by afrlmeWednesday, 06. March 2013, 16:14 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

    Imperator

    7278 Posts

  • #3, by SergioWednesday, 06. March 2013, 17:12 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.

    Newbie

    6 Posts

  • #4, by afrlmeWednesday, 06. March 2013, 17:24 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.

    Imperator

    7278 Posts

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

    Newbie

    10 Posts

  • #6, by EinzelkämpferWednesday, 06. March 2013, 18:17 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.

    Newbie

    81 Posts

  • #7, by SergioWednesday, 06. March 2013, 19:42 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!

    Newbie

    6 Posts