Detect object boundaries based on image

  • #1, by masoohFriday, 10. February 2017, 12:48 7 years ago
    If I add an object to a scene I have to set the object boundaries manually.

    It would be great if this process could be supported by Visionaire based on the image:
    • image with alpha channel: set boundaries around non-transparent part of the image (see image below)
    • image without alpha channel: set boundaries around image borders

    A rectangular boundary would be sufficient as a starter which can be adjusted later.

    Polygons would be more accurate, but I think too complicated to implement. And the additional benefit would be low.

    Newbie

    15 Posts


  • #2, by afrlmeFriday, 10. February 2017, 12:55 7 years ago
    If I add an object to a scene I have to set the object boundaries manually.

    It would be great if this process could be supported by Visionaire based on the image:
    • image with alpha channel: set boundaries around non-transparent part of the image
    • image without alpha channel: set boundaries around image borders

    A rectangular boundary would be sufficient as a starter which can be adjusted later.

    Polygons would be more accurate, but I think too complicated to implement. And the additional benefit would be low.

    Simon was actually looking into that & it's not exactly impossible. I believe the character & items already generate interaction polygons based on the alpha map as we personally don't have to manually generate them as you've probably noticed. Try hovering your mouse over an NPC character or an item while running the game & you will see what I mean.

    I don't really care about automatically generated polygons for scene objects, as a lot of people like to extend boundaries a bit or create generic shapes so that it's easier for players to detect & interact with the scene objects, but what I would like to see is some pre-made polygon shapes that you could select via buttons on the toolbar so that you can easily create a square/rectangle & circle shapes rather than just the line tool as it would save a lot of time. There should also be a keyboard button you can hold to make it easy to reposition, resize & rotate the polygon shapes.

    P.S: almost forgot. The character & item polygons are generated (I believe) during runtime of the game. It would be completely different to have the editor generate them & probably quite taxing on system resources as it would need to generate polygon for images / animation frames each time you added/edited an image, animation or animation frame.

    Imperator

    7278 Posts

  • #3, by masoohSunday, 12. February 2017, 12:59 7 years ago
    I don't really care about automatically generated polygons for scene objects, as a lot of people like to extend boundaries a bit or create generic shapes so that it's easier for players to detect & interact with the scene objects
    P.S: almost forgot. The character & item polygons are generated (I believe) during runtime of the game. It would be completely different to have the editor generate them & probably quite taxing on system resources as it would need to generate polygon for images / animation frames each time you added/edited an image, animation or animation frame.
    Just to clarify, I thougt of the image detection only as an editor feature which assists you in creating your object area. The polygon is saved as before and not recalculated if you not whish to. You are right: Boundaries need to be extended, this could be done with an input field padding for the space between the detected boundary and the area you want to set.

    Sample workflow:
    1. add new scene object
    2. select image file
    3. click "create and edit oboject areas"
    4. now new button  "detect boundaries" and input field "padding" (which gives you the opportunity extend the areas). If you click you get a rectangle with the selected padding.
    5. normal workflow as before: You can drag on drop the points and add or delete some of them.

    Only in step 4 image detection is needed and only if you click the new button.

    but what I would like to see is some pre-made polygon shapes that you could select via buttons on the toolbar so that you can easily create a square/rectangle & circle shapes rather than just the line tool as it would save a lot of time. There should also be a keyboard button you can hold to make it easy to reposition, resize & rotate the polygon shapes
    Completely agree, this would also facilitate the process and is easier than my suggestion. Both would be great.

    Newbie

    15 Posts

  • #4, by afrlmeSunday, 12. February 2017, 13:59 7 years ago
    I don't know how much work something you are suggesting would be. Simon was working on something to do with that for his uni thesis thing, but no idea if anything came of it. I imagine it would be quite a bit of work to code - the pre-made polygon shapes I mentioned would probably require a fair bit of work to implement too, but I think they would be the better option in the long run.

    Imperator

    7278 Posts