Self-typing Text with Python in TouchDesigner Tutorial

  Рет қаралды 9,014

The Interactive & Immersive HQ

The Interactive & Immersive HQ

Күн бұрын

Get access to 200+ hours of TouchDesigner video training, a private Facebook group where Elburz and Matthew Ragan answer all your questions, and twice-monthly group coaching/mastermind calls here: iihq.tv/Trial
If you’re a TouchDesigner Beginner, check out our TouchDesigner Tutorial Series! We teach you all the basics of how to use TouchDesigner, including mouse controls, hotkeys, parameters, the operator families, and more: interactiveimmersive.io/touch...
Most people think Python is just for scripting state machines, parsing data, and other boring tasks! On the contrary, Python can play a fundamental role in content creation. In this video, Elburz shows you how a single line of Python using the Timer CHOP's callbacks can create a self-typing text system in TouchDesigner.

Пікірлер: 37
@guzzi7897
@guzzi7897 2 жыл бұрын
i’ve been looking for something like this for soooo long 😩 thank you!
@TheInteractiveImmersiveHQ
@TheInteractiveImmersiveHQ 2 жыл бұрын
No problem, glad it's helpful!
@faustobrusamolino6345
@faustobrusamolino6345 2 жыл бұрын
I love text manipulation. Nice tutorial elburz, thanks for sharing!
@TheInteractiveImmersiveHQ
@TheInteractiveImmersiveHQ 2 жыл бұрын
Our pleasure! Thanks for watching!
@ysy69
@ysy69 6 ай бұрын
Very grateful. It helped me figure out how to automate the task of extracting each row's text from a table and feeding to a text operator for display, serving as a prompt for a streaming diffusion custom operator that taps into SD Tubo, generating large number of images in seconds.
@TheInteractiveImmersiveHQ
@TheInteractiveImmersiveHQ 6 ай бұрын
We're so glad to hear that! Sounds like a really cool (and timesaving!) application of the technique :)
@roberterdos
@roberterdos 2 жыл бұрын
Great technique, thanks Elburz:)
@TheInteractiveImmersiveHQ
@TheInteractiveImmersiveHQ 2 жыл бұрын
No problem :)
@rockculturebeats
@rockculturebeats Жыл бұрын
Hi Elburz!! Thanks so much for everything you do! I've learned so much from you. Quick question. Is there a way to add a blinking cursor effect to this?
@SleepofEons
@SleepofEons 2 жыл бұрын
excllent clip! thanks for the awesome video!
@TheInteractiveImmersiveHQ
@TheInteractiveImmersiveHQ 2 жыл бұрын
Our pleasure! A little bit of Python goes a long way!
@moonmountain
@moonmountain 2 жыл бұрын
Thanks, Make it look so easy. Now we need that blinking cursor !
@TheInteractiveImmersiveHQ
@TheInteractiveImmersiveHQ 2 жыл бұрын
Haha there's always one more thing to add! It wouldn't be hard to use another Timer CHOP using a similar technique but with a faster cycle time that could be turning on a line or similar.
@stahldesignl
@stahldesignl Жыл бұрын
@@TheInteractiveImmersiveHQ I have added a blinking cursor. Let me know if I can sent the file.
@corlangerak4310
@corlangerak4310 2 жыл бұрын
Great tutorial really helpfull! I was wondering how would it be possible to have the text typing continue from the point where you left off, instead of retyping the text from the beginning of the "source" OP?
@corlangerak4310
@corlangerak4310 2 жыл бұрын
I mean to be able to type the sentences line by line, when hitting the start button
@TheInteractiveImmersiveHQ
@TheInteractiveImmersiveHQ 2 жыл бұрын
@@corlangerak4310 Great question! You could try in the Timer CHOP callbacks, after the equal sign, you can change the right side of equal sign to: op('text1').par.text + op('source').text[cycle]
@TheInteractiveImmersiveHQ
@TheInteractiveImmersiveHQ 2 жыл бұрын
Try something like that and let me know. It should get close because it will already start by taking the existing text from the Text TOP and then it will only add the current new letter of the cycle you're on. It might need some tweaking but it's a good start
@zu.kolodziej
@zu.kolodziej 22 күн бұрын
Thank you for this amazing tutorial! I've been trying to do one extra thing, unsuccesfully though. I wanted to make every letter increase alpha from 0 to 1 every cycle, so that it appears more smoothly when typed in, but the only thing I could achieve is increasing the whole text alpha from 0 to 1 each cycle :( If you could point me to the right way to do this, I would be super grateful!
@TheInteractiveImmersiveHQ
@TheInteractiveImmersiveHQ 9 күн бұрын
It is possible to achieve this effect, however it is more complex! You can specify the alpha of a text string independently using a Specification DAT with the Text COMP. Each letter will have to be treated as a separate string (meaning it will have its own row in the DAT) and manually positioned via the x and y columns.
@eti313
@eti313 2 жыл бұрын
2:26 how did you make the viewer active so you can type text in it?
@TheInteractiveImmersiveHQ
@TheInteractiveImmersiveHQ 2 жыл бұрын
Great question! I should have mentioned it in passing, if you have an operator selected you can hit A on your keyboard to toggle the viewer between active and not active state. You can also click on the + button in the bottom right corner of the operator to get the same effect!
@platzzz
@platzzz Жыл бұрын
It's great tutor, thank you so much! But I have a problem, if the data are several columns in table. I want the columns to appear in turn, but instead the data appears as rows :( Can we fix it? :)
@TheInteractiveImmersiveHQ
@TheInteractiveImmersiveHQ Жыл бұрын
If you're looking to reveal columns of text one by one, you might be better off following a different approach. The Select DAT along with the Timer CHOP should give you the functionality you're looking for. In the Select DAT's parameters, if you set the Select Cols parameter to "by Index", the End Col Index parameter can be used to sequentially add/remove columns of the original data. Controlling this parameter with the timer's timer_fraction channel (with the range adjusted by a Math CHOP) could allow you to add more columns of data over time. Hope that helps!
@platzzz
@platzzz Жыл бұрын
@@TheInteractiveImmersiveHQ thank you very much, and is it ok to have rows typed in turn for each column? or is it just for the columns to appear in turn?
@maxmainio7762
@maxmainio7762 2 жыл бұрын
If I have a table DAT with a number of rows, each containing a string, is it possible to generate a new table with the number of characters in each string in each row separate? So far all I can really do is retrieve the total amount of characters in a text DAT and not the amount of characters in each row separately. For example: Table 1: ----> New Table: Hello 5 how 3 are 3 you? 4
@TheInteractiveImmersiveHQ
@TheInteractiveImmersiveHQ 2 жыл бұрын
Sounds like you could use the Evaluate DAT for this. It has a handy feature of being able to take a second input table into it with expressions. In the second table if you only give it 1 row and 2 columns, it will copy that expression for all other rows, which is cool. So in the first cell you could put something like me.inputCell.val and then in the second column cell put len(me.inputTable[me.inputRow, 0].val)
@TheInteractiveImmersiveHQ
@TheInteractiveImmersiveHQ 2 жыл бұрын
This should then make the output of the evaluate pass everything in the first column to the output while in the 2nd column it counts the number of characters in the first row!
@TheInteractiveImmersiveHQ
@TheInteractiveImmersiveHQ 2 жыл бұрын
You can find a lot of the tricks like that about how you can get the me.inputTable and me.inputRow on the wiki about Evaluate DAT here: docs.derivative.ca/Evaluate_DAT
@maxmainio7762
@maxmainio7762 2 жыл бұрын
@@TheInteractiveImmersiveHQ thank you so much! I'm looking forward to trying these out first thing in the morning tomorrow! I love the tutorials by the way, great work, keep it up!
@TheInteractiveImmersiveHQ
@TheInteractiveImmersiveHQ 2 жыл бұрын
@@maxmainio7762 Thanks for the kind words and thanks for watching :)
@zacharykrevitt7560
@zacharykrevitt7560 Жыл бұрын
Getting errors as soon as i type in the code. I've triple checked and its letter for letter the exact same
@TheInteractiveImmersiveHQ
@TheInteractiveImmersiveHQ Жыл бұрын
Can you tell us what kind of error it is? If you use Alt + T you might be able to see the error in the textport, if not you can click on the red circle with the X on the top right corner of operator with the error. It will have a message written in the middle.
@sanyuktabhave2331
@sanyuktabhave2331 2 жыл бұрын
It is showing me an error after writing the code.
@TheInteractiveImmersiveHQ
@TheInteractiveImmersiveHQ 2 жыл бұрын
Can you let me know what error you're seeing? Make sure you have all the write brackets and colons and similar to not throw any errors from spelling mistakes.
@BlogAnnabel3112
@BlogAnnabel3112 Жыл бұрын
I think this would be a good tutorial, but once I put the code there nothing happens. Do you happen to know the issue?
@TheInteractiveImmersiveHQ
@TheInteractiveImmersiveHQ Жыл бұрын
The first things I like to check for are the most simple (which are often very easy to overlook - everyone's been there): are you hitting start on the Timer CHOP? Is the Play toggle switch parameter on the Timer set to On? Is the Cue switch on the Timer set to off? Have you set the Length parameter on the Timer to 0.5? Are you receiving any errors? You can bring up the Textport with Alt + T, most errors will pop up there. From there, double check that you have renamed your Text DAT to _source_ and added some text to it. Then I'd check for spelling errors in the Python expressions/code. Make sure you've set the Timer's _Cycles_ parameter to On and the _Maximum Cycles_ parameter to the expression _len(op('source').text)._ Within the Timer CHOP callbacks, the line of code under the *onCycle()* function should read _op('text1').par.text = op('source').text[0:cycle]_ Another thing to make sure of is the alignment of the line of code in the callbacks. It should be directly aligned on the left with the return function on the following line (1 tab over from the left edge). Python has very specific requirements about spacing. Take a look at these first and let us know whether any of them solve it (or if you're still running into issues)! Hope that helps :)
Extracting Data from Featuring Tracking in TouchDesigner - Tutorial
24:04
The Interactive & Immersive HQ
Рет қаралды 9 М.
Python Optimization and Pro Tips For TouchDesigner
13:22
The Interactive & Immersive HQ
Рет қаралды 1,6 М.
Alex hid in the closet #shorts
00:14
Mihdens
Рет қаралды 10 МЛН
Gym belt !! 😂😂  @kauermtt
00:10
Tibo InShape
Рет қаралды 12 МЛН
The Top 4 TouchDesigner Operators You Aren't Using (but should be)
18:28
The Interactive & Immersive HQ
Рет қаралды 10 М.
ASCII Effect in TouchDesigner
47:25
Simon Alexander-Adams
Рет қаралды 4,9 М.
Early 2000s-style Glitch / Net Art In TouchDesigner - Tutorial
25:46
The Interactive & Immersive HQ
Рет қаралды 30 М.
Python in TouchDesigner | Printing | TouchDesigner
31:26
Matthew Ragan
Рет қаралды 21 М.
Build a FULL Web App With Claude With 2 SCREENSHOTS!
17:36
Riley Brown
Рет қаралды 34 М.
por que parei de usar Vim depois de 2 anos de uso
14:44
Lucas Montano
Рет қаралды 12 М.
Looping Noise Part 1: Ending at the Beginning (TouchDesigner Tutorial)
25:54
Simon Alexander-Adams
Рет қаралды 50 М.
TouchDesigner Text TOP Tutorial
16:36
The Interactive & Immersive HQ
Рет қаралды 14 М.
Alex hid in the closet #shorts
00:14
Mihdens
Рет қаралды 10 МЛН