We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

improper display of objects containing group dependencies in Android AR

Home Forums Bug Reports and Feature Requests improper display of objects containing group dependencies in Android AR

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #34979
    precismoprecismo
    Licensee

    Hi Verge3D,

    this will be a bit longer as I will try to describe error in detail.

    When working with 3D models in Blender, we found out that having parent dependencies is causing improper object placement in Android AR.

    This scene in Blender (exported via verge3D export to gltf):
    [image:blender-error.JPG]

    Is properly displayed in viewer (looks like Blender scene).

    But (only) in Android AR, after placement, is such that part of object is improperly transformed:
    [image:bad-ar.png]

    Please notice that this “head object” which is improperly placed is exactly this object with child dependency in Blender scene.

    When we apply following “fix” select child object – object->parent->Clear and keep transformation:
    [image:fixing.png]

    After export, problem is suddenly solved:
    [good-ar.jpg]

    Being able to hotfix is nice but our graphics would like to keep dependencies as this helps them work with scenes properly.

    This applies to all Verge3D versions as far as I know.


    We are using following code in visual_logic.js inspired by your AR example (object_group is group of objects from Blender)

    which is calling your function function setObjDirection(objNames, x, y, z, lockUp) for AR objects initial positioning.

    Solution:

    I think this could be fixed by following:
    – our graphics team constantly removing all parent dependencies before export (manual time consuming, undesirable, human error)
    – modification of your python export Blender script Verge3D GLTF for automatic removal of such parent dependencies
    – improving mentioned javascript function for proper initial object placement in Android AR scene

    Please let me know if you needed anything else.

    Thank you very much in advance for your support!

    Petr Sehnal, Precismo

    • This topic was modified 2 months, 2 weeks ago by precismoprecismo.
    Attachments:
    You must be logged in to view attached files.
    #34984
    precismoprecismo
    Licensee

    adding attachements (original post limit is 4)

    Attachments:
    You must be logged in to view attached files.
    #35017

    Hi,
    This might happen due to additional object called v3d_Proxy_Node_N_ParentedName. This object is inserted between parented object and object’s parent to keep the initial transformation of the former.
    I believe you need to figure out how you will define your object center. E.g if you’ll do it at the parent object than you should place your parent directly (not group). If you’re going to place your child, then you better unparent it and reset transformation (with parent to <none> object and set transform to zeroes).

    Co-founder and CTO at Soft8Soft
    FB | Twitter | VK

    #35031
    precismoprecismo
    Licensee

    Thank you for your input.

    We found out that GLTF Verge3D export does not contain scale and rotation attribute for AR-misplaced objects. Manual addition of those attributes to GLTF source fixes the problem. We will investigate further and provide additional details.

    • This reply was modified 2 months, 2 weeks ago by precismoprecismo.
    #35043
    precismoprecismo
    Licensee

    2Alexandr:

    – Tried setObjDirection in visual_logic.js – does work, but only in viewer. AR seems to ignore it completely.
    – Tried parenting object using makeParent, unfortunately without luck as well :(

    Any more ideas, please?

    #35154

    Hi,

    Camera direction should work in AR mode. Please check the Augmented Reality demo in you Verge3D distribution. See below how it is done there:

    For parenting issue what I meant acutally is to peform unparenting of your 3D objects. To do so you should specify <none> in the make parent puzzle.

    Attachments:
    You must be logged in to view attached files.

    Co-founder and CTO at Soft8Soft
    FB | Twitter | VK

    #35179
    precismoprecismo
    Licensee

    Thank you! :bye:

    It seems it is something in the scene or export. I have tried to do minimal demo containing scene which is displayed differently in viewer and AR – please see attached screenshots and scene.

    Please can you help me identify, what exactly is causing first cube to look differently in AR? I cant seem to find it.

    Thanks very much for your support! It will help us debug project for our customer.

    Attachments:
    You must be logged in to view attached files.
    #35197
    precismoprecismo
    Licensee

    I found out that function setObjDirection is for some reason executed only for one object which is causing this error. Internally It uses same retrieveObjectNames for getting list of objects as setObjTransform and Im calling them equivalently with same object parameters in my visual_logic.js which i copied from your AR example:
    setObjTransform([‘GROUP’, ‘object_group’], ‘position’, arHitPoint(‘x’), arHitPoint(‘y’), arHitPoint(‘z’), false);

    setObjDirection([‘GROUP’, ‘object_group’], getObjTransform(‘Camera’, ‘position’, ‘x’), getObjTransform(‘Camera’, ‘position’, ‘y’), getObjTransform(‘Camera’, ‘position’, ‘z’), true);

    Please can you help me identify, why is this happening?

    #35199

    Hi,
    Thanks for sending this basic sample. We did find the root of this issue and going to fix it in the nearest Verge3D release.

    Co-founder and CTO at Soft8Soft
    FB | Twitter | VK

    #35217
    precismoprecismo
    Licensee

    Great, thank you! :good: :)

    #35246
    precismoprecismo
    Licensee

    Kindly please if you can also fix hierarchical positioning – AR rotation is also different from viewer when they are object parents/children in Blender.

    Thank you very much in advance! :good:

    #35261

    It appears it’s the same bug which causes such behavior.

    Co-founder and CTO at Soft8Soft
    FB | Twitter | VK

    #35525
    Yuri KovelenovYuri Kovelenov
    Developer

    This issue has been fixed in 3.5 pre4. Please check it out.

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.