UIg Gadget Library
uig.tox is an experimental gadget library that can help you build user interfaces. See also TUIK which is the standard UI kit for TouchDesigner. Like TUIK, UIg is made with TOPs, CHOPs and Panel components. UIg gadgets are internally lightweight and easy to understand. They are visually neutral and semi-transparent to accommodate layering of information. Panels are designed to be stretchable and touch-screen friendly. The text fields are designed for maximum readability at a distance. UIg can be used a guide to build your own gadget library. It's the basis of the Mixxa user interface.
Watch the UIg guide on vimeo: http://www.vimeo.com/61035488 Or you can use the guide below. ze0time, author
Install UIg Version 49, August 2013
UIg version 49 is in the palette of any TouchDesigner 077 and 088 after August 20, 2013 under the
UI tab. The most recent version is also here in the forum: .
You can replace any prior
/uig with a new version by deleting the old one, then drag-dropping the latest
uig in from the palette, or a
uig.tox from a folder or the Desktop. The new one will be placed at
/uig. Note that installing
uig creates one Root Variable,
UIG, which is the path to where
uig gets created. Some gadgets' structure have changed so you may have to hand-edit and make some adjustments.
Make a Control Panel with UIg
Tutorial Video Transcript
- start a default TD from the desktop
- go to the root component, /
- show it is in palette, but
- turn off palette
- and get it from the UIg wiki page
- make project1 panel size be half-res or 640 x 360
- drag uig from desktop to /
- open viewer on /uig
- go into /project1
- delete all OPs except moviein1
- change Movie In TOP to have the sky image (press + on its File parameter)
Let's say we want to build an interface to pre-process an image to make it a repeating texture, alter its brightness, and pre-blur it a bit. You want to pay attention to the gadgets in 2 places: in the network, and in the panel.
- drag/drop the 2nd vertical slider gadget (whose rollover help is "Vertical Slider ") onto network – called sliderv.
- connect to a Null to obsetve the output of any gadget
- click Viewer Active (+) on gadget and operate the slider, see null1 change in range 0 to 1
- notice the slider is also represented in the control panel for /project1 (floating window right side)
- click Operate> and move the slider up and down to see its value change
- another way to see the same panel is to press the square icon in the corner "Open Viewer"
- also, right click on the gadget and select View… to get it in a floating window
- make the current node to be the sliderv gadget (click the nodename). see it's a Slider component type
- select the Layout tab in the parameter dialog and observe the panel size
- click-drag the slider in the panel away from the bottom left corner
- drag the the gadget around the panel and when you let go, see that the parameter X and Y update in the parameter dialog
- make the gadget 5 pixels wider by clicking the +5 button in the "w" dialog at the bottom of the Operate> panel
- right-click on the output of moviein1 and add a Luma Level TOP
- export the null1 to the Luma Level TOP's Gamma parameter and operate the slider
- notice the image will only get darker. on the slider component, in its Slider tab, turn off Clamp V High and operate the gadget above its range
- alternately you can increase the range of the slider: insert a Math CHOP before the Null
- make the Math CHOP's To Range be 0 and 2. operate the gadget
- add a view gadget and attach the Movie In to it.
- position the view gadget at the top left of the panel. put the slider to the right.
- add another view gadget and attach the output of the Luma Level CHOP it
- let's add blur. add a viewu slider and a Blur TOP. check we want blur to go up to 100. re-range the output og viewu to 0-100 and export to Blur. send the output of blur to the input of viewu
- add a Tile TOP
- add a view gadget. attach it to the Tile TOP and make it large
- add a slideruv gadget. attach a Null. Observe there are two channels output from the slideruv
- export to the Overlap U and V on the Tile TOP's Tile page
- position slideruv on the panel
- now add a che ck gadget.
- see we want the the Tile TOP's Repeat X and Y parameter to be 1 or 2. use a Math CHOP and change its range to 1 to 2.
- make out2 and preceed it with a Level TOP set at 30%
- go up one level to the root (/) and use a Null to see the output of /project1
- change the Background parameter to ./out2 so you can see a muted version of the texture in the background
- we now have a full application and can press F1 to bring it up
- Start a default TouchDesigner, or start an existing
- Go to the root (
- Drag-drop the
uig.toxin a folder, or from the palette (077 or 088 from Jan 25, 2013 or later), in the network. (
uigis automatically placed in
- Right-click on the
/uigcomponent and select View... This is the UIg Authoring Panel.
- Click the Edit> button to expose the gadget positioning area. It points to
- In your TouchDesigner network, now go into
/project1, or replace
/project1with any panel's path.
- Drag-drop any gadget from the UIg Authoring Panel into the
/project1network. You can operate the new gadget by clicking the Operate> tab.
- Gadgets you drag onto the Edit> area will appear in the component network, and vice versa.
- Drag-drop a few more gadgets from the Authoring Panel into the Edit> area or the component network.
- In the network, on the
uiggadgets with a (green) CHOP output, attach a Null CHOP to see the values coming out of the gadget: right-click on the output of the gadget, and select CHOP then Null.
- On gadgets with a TOP input, attach any TOP to it, such as a Movie In TOP.
- You can play around with gadgets there, then at some point, you will want to look at and re-arrange the control panel
/project1containing your first gadgets. One the Edit> tab of the Authoring Panel, can click/drag the gadget, anjust the sizes via teh +-5 +-1 controls at the bottom.
- Click the Operate> tab in the UIg floating window to operate your gadgets in the panel.
- In the network, you will want to hook the gadgets together to TOPs or other operators. Press Tab to get the OP menu and lay down, for example, a Movie In TOP connected to a Transform TOP connected to an Out TOP.
- Next take the output of any of your gadgets that outputs a CHOP, and attach it to a new Null CHOP (just to see values) and then to a Math CHOP. You will later adjust lower-upper "To Range" values in the Range tab of the Math CHOP.
- Send the Math CHOP to a Null CHOP and then export its channel(s) to any parameters of the Transform TOP, say Translate X. To do this, click on the channel in the Null CHOP's viewer and drag it to the Transform TOP's parameter. You should see the export line between the two.
- Now operate the gadget you just connected to see its effect on the Transform TOP.
- All sliders in
/uigare in the range 0 to 1. Adjust the lower/upper range of the Math CHOP to suit the range of the parameter in the Transform TOP. Like -1 to +1 in the To Range of the Math CHOP when exporting to the Translate channels of the Transform TOP.
- Finally, insert a Spring CHOP after the Math CHOP, and operate the gadget again. You can double the Spring Constant parameter to get more action.
- You can hook up other gadgets in your container to other parameters of the Transform TOP.
- Then go back up to / and on the
/project1parameters, set Background to
./out1, or attach a Null TOP to the output of
/project1. Play with the gadgets in
/project1to see their effect on the image.
- Finally, click File -> Save Project.toe As ... name your file
FirstTry.1.toeand save it.