cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

About placing the 3D image at the position of a click

Sandy_Gunner
14-Alexandrite

About placing the 3D image at the position of a click

Hello community member.

Is there any method to locate the 3D image uploaded in the resource at the location of the click in the Vuforia View.  For eg, I wanted to place the image of the exclamation mark(!) for certain location to review it later.

I came to know that the pageX and pageY can be calculated but I don't have the idea about how to use this value for locating the 3D image in vuforia view.

 

tml3dRenderer.setTranslation(name,pos.x,pos.y,pos.z);

 Please suggest If there is another way such as drawing the line in canvas for marking purpose for certain location in Vuforia view.

 

7 REPLIES 7

Hi @Sandy_Gunner ,

possibly we need further to clarify what is required there. Possibly if you provide some fruther details or picture it will be helpful to better understand the requirment.

So because on click in view:

  • to clarify-> we have different behavior / or view points depending on that if we are in the preview , on mobile device or on HoloLens
  • the click is possibly that what you meant for a test in preview in chrome
  • in  mobile device we could click the screen that the quesiton for the 3D images what to do--- here possible scenario could be e.g. to place the 3DImage widget in fromt to the view - so means some distance from you position along to eyevector 
  • or are there meant that you want to click / here this is a userpick - on component and then have the move  e.g. to some point of the bounding box of picked 3d component (part of the 3d augmentation

Here I want to pont to post  and the example which will move a 3D Image widget to the csys on specific part. 

The project...

So there is a 3DImage alligned with the coordinate system of a part. exapmple click a button but we can implment that a part is first selected and the 3Dimage is moved there... but it depeneds on the requirements was is required in your case.

Hello @RolandRaytchev ,

 

Thank you for your response. 

I am talking about the use of the mobile device (Ipad pro) with model tracking experience.
I want to place the uploaded 3d image in front of the 3D CAD model, strictly on the location of the click.

Please see the attached image for the reference.

test.JPG

Hello @Sandy_Gunner ,

thanks for the feedback. Understood. OK this is not directly possible (my knowledge at the current functionality ) but I see 2 possible approches there what we can use.

Click on screen - will be the more difficult way.  Wo we need to check 2 D coordinates and then depending on the device resolution to calculate them :

- 1.)first calculate the 2D point coordinate of the click - transform it tto the current device postion (what we can get from the tracking event) paralell to screen 

- then we can find the nearest to device bouning box point of the model and let say , calculated the  the item in ratio of 10% from model bounding box nearest point to the screen plane. (this is the vector which is normal to the screen plane and startss from the transformed 3d point ( 2d to 3D Space click point)

So this requires some calculation so far I see.

-2.)the second approach is to click on a visible component and take the middle of the bounding box as reference and then do a vector between and screen location and select 10% from the model > as bounding box diagonal.  This dpeneds on the size of the component and distance to the model etc. This is approach with a similar compexitity as 1.) but has the advantage that we do not need to do some device specific calculation and will stay always in the 3d room. But it requires  some work 🤔

So when I have this issue I would decide the second approach. Unfortunately I do have such example for this and need to adapt some of my test proejcts to create an example.

the following key points

.- acitvate the tracking event and handle and tracking call back the eyepos, eyedir and eyeup vector

-then eyevectorRight - means Y on screen coordinate system = is normilze( crossvec(eyeup,eyevector))  -  eyevector== gaze vector

- the plane vector is normilze(eyevector)

- having the eyepos, eyedir, eyeup, eyeRight you can create a Location and use it for transformation of widget coordinates. (widgets such a 3Dimages which are located in the Root coordinate system == modelwidget which is also the modeltarget 0,0,0)

-you need to shift this position form device into model direction so that you will see that widget (3DImage)  between the model and device and device plane.

This is all but requires implmentation ,

Please, let me know if you have question.

 

BR 

Roland 

AlexK
15-Moonstone
(To:RolandRaytchev)

Hi Roland

 

I've seen a very similar use case in the Ratingen Experience Center, they have an end of line inspection tool for the eGo car. Can you see how it was solved there?

 

Best wishes

 

Alex

Hi @RolandRaytchev 

Thank you for your explanation.
As an end user I want to achieve it in more simpler way.
Any explanation with sample project will help me to understand the above explanation.

I am thinking another way to mark (draw a line) on the object in vuforia experience.
Is it possible to get the two touch point of ipad screen and draw the line in between those point ?
Best regards,
Sandy

 

Hi @Sandy_Gunner ,

as mentioned I am not aware about easy solution of this in the current functionality

I see that there is another point about drawing annotations in Vuforia Stuido . so this functionality is working fine in the Vuforia Chalk on video conferencing there but not availible in Studio. I will check in this post it further with R&D

So in the current functionality is not easy (so far my knowledge - possibly some one know a better option)

I whould do this as already mentioned using some API:

2024-02-14_10-44-08.jpg

clicking point in distance of the eyevector and drawing then 3D Entities between these points

Hi @RolandRaytchev 

How about the progress of this enhancement request ?

You mentioned earlier that you will consult with the R&D team about this request.

As getting coordinate of the tap location is mandatory for us in Vuforia view for the purpose of the marking the important location

as well for adding comment/notes for particular location,

Also, getting the 3D coordinates of the tap location, marking, adding notes is possible within the other AR software. 

We will be very pleased if you convey this enhancement request to the R&D Team. 

 

BR

Sandy 

Announcements

Top Tags