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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Translate the entire conversation x

Reset shader values of a model in Vuforia Studio

FC_12202090
10-Marble

Reset shader values of a model in Vuforia Studio

Hello, I made a function that cuts my model based on the value of a slider, to obtain a dynamic section-like effect.
This model has some element which are glass-like (material wise) and when I apply the "cut" which is basicall a shader this "glass" becomes darker, more like plastic. I would like to know if there is a way to reset the model shader value to its default value.
The code for the section is the following:

 planarCutmodel.shader = `planar_cut; clipCenterX f ${$scope.clipCenterX}; clipCenterY f 0.0; clipCenterZ f 0.0; clipAxisX f 1.0; clipAxisY f 0.0; clipAxisZ f 0.0; clipLineWidth f 0.003`;
I tried with 
$scope.view.wdg["model-1"]['shader'] = undefined; or tml3dRenderer.setProperties('model-1', {'shader': undefined}); but nothing happens.
Thanks in advance
 




ACCEPTED SOLUTION

Accepted Solutions

Hello @FC_12202090,

please try to set it to '' or to 'Default'

in preview seems that all both worked 

so example

$scope.unsetTest=function() {
  $scope.view.wdg['model-1'].shader='Default';
//or

$scope.view.wdg['modelItem-1'].shader='';
 $scope.view.wdg['modelItem-2'].shader=''
    $scope.$applyAsync();

 

 

View solution in original post

2 REPLIES 2

Hello @FC_12202090,

please try to set it to '' or to 'Default'

in preview seems that all both worked 

so example

$scope.unsetTest=function() {
  $scope.view.wdg['model-1'].shader='Default';
//or

$scope.view.wdg['modelItem-1'].shader='';
 $scope.view.wdg['modelItem-2'].shader=''
    $scope.$applyAsync();

 

 

Hello @RolandRaytchev yeah I've already fixed it but thank you very much

Announcements
Top Tags