Azure / azure-object-anchors

Azure Object Anchors releases and samples
https://docs.microsoft.com/azure/object-anchors
MIT License
36 stars 17 forks source link

Help / Missing documentation about Detected Object Position #35

Open Merichbier opened 2 years ago

Merichbier commented 2 years ago

Source : https://stackoverflow.com/questions/72705226/is-it-possible-to-get-the-object-origin-when-models-is-detected

Just repeating it here to be sure it get not forgotten.

When we have two geometrically identical model but with different origin. Is it possible to get this origin back once the model is detected ?

Example : sofa-center sofa-offset

I played a bit with the MRTK samples and showed a sphere at different position I could retrieve from the TrackedObject class :

Both seems to return the same position in Unity World Space for both models (bounding box center). So the description of the LogicalCenter confuse me a bit :

The object geometry isn't necessarily centered in the objects bounding box
As a consequence we must take care that other visualziations intended to be placed re

It would be good to state somewhere in the documentation what the Location of the detected object represents and if converting a model does apply any transformation on the model.

craigktreasure commented 2 years ago

Thanks for the feedback and I agree. I've filed an internal work item (40132604) to track this, and we'll see if we can get something added to our docs.

dfields-msft commented 2 years ago

The short answer is yes - use the ObjectModel.OriginToCenterTransform property to relate origin-relative content to the center of the detected object instance.

Merichbier commented 2 years ago

@dfields-msft Thanks a lot for the pointer :) I was able to easily get the model origin back ! Thanks