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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Use cases for the TML widget in Vuforia

DmitryTsarev
17-Peridot

Use cases for the TML widget in Vuforia

I thought TML widget is only about working with shaders, but according to this post , it can be used for other things, including dynamically creating stuff within experience, 

 

Can someone provide more information / examples on how to use TML widget to dynamically create stuff and / or other use cases?

Help Center is pretty laconic (but intriguing 🙂 ) on this - "The TML Text widget allows you to manually enter TML directly through Vuforia Studio to create a custom widget."

5 REPLIES 5

Seconded

 

Looking forward to documentation.

That;s correct.  the tml wiget can be use to inject any tml into the scene.  View is a web browser and Tml is the markup language used to define the 3D AR experience.   Declaring shaders is just one of many uses; probably one of the more advanced, as the shader mechanism itself is generally reserved to cgi professionals who understand how to program GPUs!!   Other tml usecaes e.g. defining trackers, or declaring scene content, these are all possible  Real examples are now being created -

.

Apparently, there is an example of using TML to dynamically highlight parts in the Help Center

Not sure, for how long it has been there, but I haven't seen it.

http://support.ptc.com/help/vuforia/studio/en/#page/Studio_Help_Center%2Fmetadata%2FMetadata_201_Highlight_Parts.html%23

 

 

$scope.hilite = function (items, hilite) {
  items.forEach(function(item) {
    tml3dRenderer.setProperties(item, hilite === true ? { shader: "green", hidden: false, opacity: 0.9, phantom: false, decal: true }
                                                      : { shader: "Default", hidden: false, opacity: 1.0, phantom: false, decal: false });
  }) //foreach end
} //hilite function end

 

Top Tags