Skip to main content
5-Regular Member
March 10, 2020
Solved

Model Item colors are not showing up in View

  • March 10, 2020
  • 1 reply
  • 2722 views

The colors applied to the model items are not showing up when it is being viewed using the Vuforia View App.

 

Aby idea why this is happening?

 

Avinash

Best answer by RolandRaytchev

The problem is that some time when the model widget has a sequence property set to a figure e.g. figure-1 and it could override the colors . Therefore, is good to check if the sequence property is set and to unset it. OK, only the relevant is this line :

 

$scope.setWidgetProp('model-1','sequence', undefined);

 

another way ->you can try to set directly the modelItem without modelItem explicit widget definition is some call like this:

 

$timeout(function() { 
 tml3dRenderer.setColor('model-1-/0/0/4/1','rgba(44, 130, 201,1);');
 },500)

 

where 'model-1' is the widget name of the model widget and /0/0/4/1 is the ModelItem widget occurrence path

1 reply

21-Topaz I
March 10, 2020

Hi @agangaiah ,

 

how did you apply the color to the modelItem widget - via setting property in UI or via Script? 

Is only specific ModelItem Widget?

Is the occurrence path to a part or to subassembly?

So is the behavior in preview ok? On which type of device? /android, HoloLens or IOS ?

agangaiah5-Regular MemberAuthor
5-Regular Member
March 10, 2020

Hi, 

 

1. Color was applied JS Script

2. All Model Item Widgets

3. The occurrence path is to a part.

4. In Preview the behaviour is okay but when viewed in both android and IOS, it does not work. 

21-Topaz I
March 10, 2020

what is the example of the relevenat js code line your used to set the color of particular modelItemWidget. e.g. set via rgba function e.g. "rgba(255,0,0,1.0)";

Did you apply also texture and shader property  to the model or modelItem widget?