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

Problems with playing sequences on HoloLens

Re: Problems with playing sequences on HoloLens

Hi Giri,

Sequences created in an older version of Illustrate do play OK.  The problems that I have are:

  • I've got other work to do that is better done with Illustrate 4.1
  • 4.1 has much nicer tools for creating the sequence animations
  • You can't have 2 versions of Illustrate installed on the same machine

So for the moment, I've got another machine with Illustrate 3.1 installed, but it would be really good to have the 4.1 output bug fixed.  And don't forget - 5.0 is just around the corner (December) so please make sure the fix will work with that.

Cheers,

Allan

Re: Problems with playing sequences on HoloLens

Hello,

just side note with Creo Illustrate 4.0; if you publish both Creo 2D and Creo 3D (this is the default settings) at the same time, the sequences won't work. But if you uncheck the 2D from File => Publish => Settings and publish the PVZ, then the sequences will work which is strange. At least this happened with me.

Best regards,

Juho-Matti

Re: Problems with playing sequences on HoloLens

Hi,
I just tested it today with the actual version of creo (4.2) and Thingworx (8.2.0), but animations are still not useable with the HoloLens. 

 

Are there any news regarding this issue? 

Re: Problems with playing sequences on HoloLens

Hi All,

 

So I've been trying to create an animation of a door opening and there's a problem with the playback on the HoloLens.  When I preview the experience, it looks fine but when playing it on the HoloLens, the door does not pivot about the hinge, but does this weird movement where it moves off the hinge, pivots and moves back onto the hinge as is reaches the end of the movement.  Attached is a recording of what I mean.

 

I've tried creating the animation in Creo Illustrate 3.0, 3.1 and 4.0 with the same result.

 

Any updates on getting a fix for animation playback on the HoloLens?

 

Allan

Re: Problems with playing sequences on HoloLens

Allan,

Is this only happening with HoloLens?  Have you tried playing the animation using a Mobile Device?

Thanks,

 

Ricardo

Re: Problems with playing sequences on HoloLens

The problem only happens on the HoloLens.

 

This problem used to happen on mobile devices over a year ago, but it was fixed.  Unfortunately it looks like the HoloLens playback needs a bit of fixing.

Re: Problems with playing sequences on HoloLens

Hi,

I tested some sequences on the HoloLens and think some sequences steps which are  working on other devices (Android) still causes a problem on the hololens.:

- sequences generated with new versions of Creo Illustrate e.g. 4.1 or 4.2 but I suspect in same cases that the best results are achieved with the version 3.0 or 31.

- the pulse, and the shake effects, the unscrew and the fade out affects could causes very often problems when they are used in a step with more other effects. Mostly these effects will not work or will cause a wrong transformation of components. Therefore, such steps should be tested also on the end device

- some times problem occurs when the size of the thingmark does not have the correct size in mm  and does not match the  size of the  scanned thingmark. Actually often this is used to  have an additional scale of the  model but this could cause problems for the correct display of the sequence steps 

- On the HoloLens seems that is better to extract the .pvi file and to upload it to the project Upload directory explicitly ,especially when we want to change the figure via scripting

- in some cases, expectably on the HoloLense we can help with JavaScripts. For example for the door rotation we can use some script where we can move the rotation axis of hinge  via relation (it is the Creo Defautl Csys  is no coincident with the desired rotation axis) and use the setInerval function:

$scope.view.wdg[modelItem]['rx'] = angle1 ;
$scope.view.wdg[modelItem]['y'] = 0.0 - l_door*Math.sin(angle1_rad);
$scope.view.wdg[modelItem]['z'] = 0.0 - l_door*(1.0-Math.cos(angle1_rad));

2018-04-26_19-05-04.png

 

So the sample  code (tested on the holoLense device is the following)

// $scope, $element, $attrs, $injector, $sce, $timeout, $http, $ionicPopup, and $ionicPopover services are available
//$scope.app.params['virtual_slider1']=0;
var timerId = -1;
var down=false;
var g_door_angle=0;
var modelItemCounter=0;
var animate_model_items = 
 {
 "modelItem-1": {
        "angleIncrement" 	:	1,
         "minAngle" 		:   0,
         "maxAngle" 		: 	90,
        "timingInterval"   	: 	20,
         "duration"         :   12000
 }  
    };

$scope.app.playReset = function () {
 if (timerId > -1) { clearInterval(timerId);}
down=false;
g_door_angle=0; 
modelItemCounter=0;

}; 

$scope.app.playStep = function () {
// debugger;
var m_items=Object.keys(animate_model_items);
number_objs=Object.keys(animate_model_items).length;
if(modelItemCounter >= number_objs) return; //start new loop 
  { console.log(" number_obj="+ number_objs);
    console.log(" m_items["+modelItemCounter+"]="+ m_items[modelItemCounter]);
    console.log(" object["+modelItemCounter+"]="+ animate_model_items[m_items[modelItemCounter]]);

  $scope.testAsm(m_items[modelItemCounter],animate_model_items[m_items[modelItemCounter++]]);
  
  }
};
////////////////////
$scope.testAsm = function (var_arg1,var_arg2) {
 // var_arg1 modelItemVar
  // var_arg2 modelItemObj
ray_call_interval_count=0;

  if (timerId > -1) { clearInterval(timerId);
                     console.log("ClearInterval");}

  

  timerId = setInterval( function ( modelItemVar,modelItemObj) { 
 
   
   //var current_angle = $scope.view.wdg[modelItemVar][modelItemObj['rx']];
   
     
   if( g_door_angle <= var_arg2['minAngle']) down=false;
   if( g_door_angle >  var_arg2['maxAngle']) down=true;
  
    
   $scope.$apply((function (a1,a2,a3) {
             console.log("apply a1="+a1);
            if(a3) 
              g_door_angle=  g_door_angle - a2['angleIncrement'];
            else   
              g_door_angle=  g_door_angle + a2['angleIncrement'];
   
          $scope.setAngle(g_door_angle,a1);
          
        })(modelItemVar,modelItemObj,down) //apply inline function
        );//applay funciton   

   console.log("call_interval g_door_angle="+g_door_angle);  
      }, var_arg2['timingInterval'],var_arg1,var_arg2); //end of interval
  

 
  
setTimeout( function () {
             var a1=var_arg1; //arguments to inline function
      
                    
             clearInterval(timerId);
             console.warn("started the timeoutfunction for "+ a1);
                           } , var_arg2['duration']); 
        
};


/////////////////////////////////////////////////////

$scope.setAngle = function (door_angle,modelItem) {
  
  var angle1=door_angle;//  $scope.app.params['virtual_slider1'];
  var l_door=0.999;
  var angle1_rad=angle1*Math.PI/180.0;
$scope.view.wdg[modelItem]['rx'] = angle1 ;
$scope.view.wdg[modelItem]['y']  = 0.0 - l_door*Math.sin(angle1_rad);
$scope.view.wdg[modelItem]['z']  = 0.0 - l_door*(1.0-Math.cos(angle1_rad));
};

 The coplete HoloLense Project is uploaded on this link

Re: Problems with playing sequences on HoloLens

Hi Roland,

 

Many thanks for sending this through.  I opened up the project and can see the door opening and closing, so while it's a workaround, it's a pretty daunting one for a non-javascript person like me.

 

I recently created an experience showing a machine that had 3 different access doors.  So In Creo Illustrate I created 3 models with a door open and close sequence.  Then I could just bring those models into Studio in the correct position and users can just click each of the the doors once to open and click again to close.

 

This works fine when creating an experience for mobile devices and really goes to the strength of Studio in that I can author without needing to code.  I should also be able to do this for the HoloLens, but there's still this problem of how it interprets the PVI information like you pointed out.  It would be great is this could be fixed rather than having to rely on a lot of code to redo what I've already done in Illustrate.

 

Many thanks,

 

Allan

Re: Problems with playing sequences on HoloLens

Hi all,

can't agree more, if I'll have to write code to display sequences then hey, I don't have to use studio and illustrate! 🙂

I tried all combinations of Illustrate and none works if you have few, not even complex steps, no pulse or uncsrew or so effects.. only with 3 steps and color +move works.. 😞

 

Hope it will work soon!

 

Regards, 

Bojan

Re: Problems with playing sequences on HoloLens

Hi Allan,

 

I did interpret you message only as comment and overlooked the second part. I

Yes this is an issue what we have to report. So ,could you please, provide asimple project which demonstrate the issue so I will report it to PTC R&D.

If this is to much work for you than, please, let me know , so I will prepare my version of a project.

For example I tested it with a my door model and the sequence (created with Illustrate 4.0, Pay attention that 4.2 is strongly not supported on HoloLens  on Mobile the most things generated in Illustrate 4.2 seem to work for example mechanism animation !!! see  animate1 and animate2) so in generally it  was working on the HoloLens but did not follow exact the original sequence  on the HoloLens (on a mobile device the same is working fine)

2018-05-24_11-43-19.jpg

So some of the component are incorrectly shown by offset. I  know that here the reason is using some shake and pulse effects. When I try to use ONLY! (transformations - rotate and translate) in this case the most things are working fine - also on HoloLens. But I had problems to fade out modelitems,  so I used additional some scripts to make the modelitems invisible when new step event - so something like:

$scope.$on('newStep', function(evt,arg) {
 console.debug("console.debug: $scope.$on -> newStep:".concat("started") );
 var getStepRegex = /\((\d*)\//; 
 
 $scope.message = getStepRegex.exec(arg)[1];
...
// here is the $scope.message is string with the step number
// check it and decide which Items should be set to invisible
...
... 
});