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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Can TML Text be applied on 3D models? What are the limitations of the TML Text widget?

Ace_Rothstein
8-Gravel

Can TML Text be applied on 3D models? What are the limitations of the TML Text widget?

I have already applied TML Text to model items and it works fine. I have used 'shader' property on model items to get a less opaque color effect. I wanted to apply the shader effect on an entire model containing sequences or figures from creo illustrate 

ACCEPTED SOLUTION

Accepted Solutions

Hi @Ace_Rothstein 

I think if you could apply a shader definition to the whole model widget - it depends generally on the shader implementation.

So for example a glass shader is intended ( lead to much better results) to be applied on modelItem widget. But it seems to work also if it is used for the whole mode widget:

 

$scope.setup = function() {
   console.info("started setup function");
  $scope.view.wdg['model-1'].texture   = "app/resources/Uploaded/cvc-test.jpg?name=tex0&edge=repeat";

  $scope.view.wdg['model-1'].shader   = "glass;refindex f 0.2;envrotate f 0.5"; 
  console.info("finished setup function");
 
}
////////////////////////////
$rootScope.$on("modelLoaded", function () {$scope.setup();})

 2020-02-20_12-18-43.jpg

 

In generally it should work because we have the model widget properties 'shader' and 'texture' but for example if you try to use a 'pinger' shader - it will definitely not work because the shader code will fails on some geometry .

Also, in the sequence the shader will override some color or highlight sequence of a component but will allow the transformation (translate or rotate)

What should be the effect in the particular case is something what should be  tested (trial and error)

 

View solution in original post

3 REPLIES 3

Hi @Ace_Rothstein 

I think if you could apply a shader definition to the whole model widget - it depends generally on the shader implementation.

So for example a glass shader is intended ( lead to much better results) to be applied on modelItem widget. But it seems to work also if it is used for the whole mode widget:

 

$scope.setup = function() {
   console.info("started setup function");
  $scope.view.wdg['model-1'].texture   = "app/resources/Uploaded/cvc-test.jpg?name=tex0&edge=repeat";

  $scope.view.wdg['model-1'].shader   = "glass;refindex f 0.2;envrotate f 0.5"; 
  console.info("finished setup function");
 
}
////////////////////////////
$rootScope.$on("modelLoaded", function () {$scope.setup();})

 2020-02-20_12-18-43.jpg

 

In generally it should work because we have the model widget properties 'shader' and 'texture' but for example if you try to use a 'pinger' shader - it will definitely not work because the shader code will fails on some geometry .

Also, in the sequence the shader will override some color or highlight sequence of a component but will allow the transformation (translate or rotate)

What should be the effect in the particular case is something what should be  tested (trial and error)

 

Thank you Roland Raytchev for such a prompt reply. 

Could you please elaborate the "glass" tml-text for entering in the text field  

Thank you once again, Roland Raytchev. I attempted a TML-Text I had already used and it works. The shader property works on the entire model and it has a sequence created in Creo Illustrate. The entire model has a shader effect while executing the sequence. This is exactly what I wanted. Thanks a ton!

Announcements

Top Tags