Skip to main content
17-Peridot
Mar 5, 2021 6:56 AM UTC
Question

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

16-Pearl
Mar 5, 2021 9:41 AM UTC

Seconded

 

Looking forward to documentation.

Translate
12-Amethyst
Mar 7, 2021 8:27 AM UTC

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 -

Translate
17-Peridot
Apr 4, 2021 7:24 AM UTC

.

Translate
17-Peridot
Apr 4, 2021 7:25 AM UTC

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

 

Translate
16-Pearl
Apr 6, 2021 12:49 AM UTC