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 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #34979
    precismo
    Customer

    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)

    registerOnClick(['GROUP', 'indicator_group'], function() {
      changeVis(['GROUP', 'object_group'], true);
      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);
    
    }, function() {});

    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

    Attachments:
    You must be logged in to view attached files.
    #34984
    precismo
    Customer

    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).

    Soft8Soft Tech Chief
    X | FB | LinkedIn

    #35031
    precismo
    Customer

    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.

    #35043
    precismo
    Customer

    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.

    Soft8Soft Tech Chief
    X | FB | LinkedIn

    #35179
    precismo
    Customer

    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
    precismo
    Customer

    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.

    Soft8Soft Tech Chief
    X | FB | LinkedIn

    #35217
    precismo
    Customer

    Great, thank you! :good: :)

    #35246
    precismo
    Customer

    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.

    Soft8Soft Tech Chief
    X | FB | LinkedIn

    #35525

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

    Chief 3D Verger | LinkedIn | Twitter

    #38058
    precismo
    Customer

    Thanks a lot Yuri!

    Your fix worked for all models with single-group hiearachy. Howerver if we add second level grouping (i.e. group inside group)*, error is again there. Attaching sample screenshots and model.

    *Unfortunately it is the only way how to currently created linked/composite objects in Blender as far as we know. The other option is to creatre single object composite but this is problem for materials and movement.

    Please would it be possible to fix also this two-level grouping?

    much appreciated,

    Petr from Precismo

    Attachments:
    You must be logged in to view attached files.
    #39736
    precismo
    Customer

    Any update on this, please?

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