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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Display a model in a 2D view

rwmahrra
4-Participant

Display a model in a 2D view

I have a use case where, rather than displaying a model in tracked AR, I would like to display it in the 2D view where a user could interact with it by playing through a sequence and rotating the model.  I am aware other software could do this, but I would like it embedded in a vuforia studio experience without having to navigate elsewhere.

 

For reference, this would be very similar to the <model-viewer> component that google has output without the need for converting it to AR.

https://googlewebcomponents.github.io/model-viewer/

 

1 ACCEPTED SOLUTION

Accepted Solutions
sdidier
17-Peridot
(To:rwmahrra)

Hello,

 

Today, a such feature is not possible in Vuforia Studio.

We don't have the target to manage that.

 

I suppose, it is possible by using Vuforia Engine and Unity 3D but it needs to developp an Application from scratch.

 

Best regards,
Samuel

View solution in original post

3 REPLIES 3
sdidier
17-Peridot
(To:rwmahrra)

Hello,

 

A 2D View, is a HUD to display only GUI.

It is not possible to display 3D model in a 2D View.

 

2D View is a surface (in 2D dimensions) who is always normal to the Camera.

 

So, at the best, you can displayed a 2D image of the 3D model.

 

To display a 3D model and rotate it, it must be in 3D View, in a 3D world, in 3D dimensions.

 

In Vuforia View, by default, Camera rotations are managed by the position and the rotations of the mobile, tablet ...etc...

 

To achieve an orbit camera around a 3D model, I would recommand these steps :

  1. At first, read this post about rotations and the referential of a 3D Model : https://community.ptc.com/t5/Studio-Tech-Tips/Mechanism-Concept-in-Vuforia-Studio-How-to-make-rotation-more/m-p/552743#M35
  2. In the Project, In the 3D View, use a binding to Freeze the Camera
  3. Add a Target
  4. Add a 3D model
  5. In 2D View, add 2 Buttons
  6. In Home.js, add 2  javascript functions to increase and descrease the angle of Y axis of the 3D Model.
    $scope.increaseY = function() {
        console.log("increaseY");
        console.log($scope.view.wdg['model-1']['ry']);
    	$scope.view.wdg['model-1']['ry'] = $scope.view.wdg['model-1']['ry'] + 10;
    }
    
    $scope.decreaseY = function() {
        console.log("decreaseY");
        console.log($scope.view.wdg['model-1']['ry']);
    	$scope.view.wdg['model-1']['ry'] = $scope.view.wdg['model-1']['ry'] - 10;
    }
  7. In 2D View, for each Button Widgets, in EVENTS, in Click, in js button, call the right function needed

 

At the end, you can do the same for the 2 other Axis X and Y.

To track fingers move on screen for moble, instead of clicking buttons, I would recommand to use a Spatial Tracking

https://community.ptc.com/t5/Studio/support-touch-screen-thingworx-studio/td-p/549493

 

Please find attached an example of the steps in a Project.

 

 

Best regards,

Samuel

rwmahrra
4-Participant
(To:sdidier)

This is very similar to the functionality I would like, but doesn't handle my main issue.

 

I would like to display a model without needing an AR camera to find tracking. If someone was multitasking while using this application the AR features mandate that they manipulate a tablet or mobile device in 3D space to establish camera tracking which may interfere with other tasks they are currently undertaking, especially if they need to keep their hands relatively free. For example, upon loading the view, they see the model already in a predefined orientation that they can rotate with swipe gestures (or even buttons).  They can still pause and play animations on the model as well.  They however, can position the tablet wherever they need in order to view the model and work in their space without having to constantly move the tablet to view or track to model. This would be similar to having a static camera in the scene rather than one parented to the devices orientation.

 

Basically, I want the features of the model in AR without needing the user to set up tracking or the model being composited onto a live feed.

sdidier
17-Peridot
(To:rwmahrra)

Hello,

 

Today, a such feature is not possible in Vuforia Studio.

We don't have the target to manage that.

 

I suppose, it is possible by using Vuforia Engine and Unity 3D but it needs to developp an Application from scratch.

 

Best regards,
Samuel

Top Tags