Touchdesigner - Calculate Normals in Outward Direction
ฝัง
- เผยแพร่เมื่อ 14 ม.ค. 2025
- gumroad - diogodiogodiog...
in the following script, make sure to substitute your operator names:
import math
def onTableChange(dat):
Reference the input table (sopto2) and output table (table1)
input_table = op('sopto2')
output_table = op('table1')
Clear the output table
output_table.clear()
Add the header row with the label 'rz'
output_table.appendRow(['rz'])
Iterate through the rows of the input table (skip the header row)
for row in input_table.rows()[1:]:
n0 = float(row[5].val) # N(0)
n1 = float(row[6].val) # N(1)
Calculate the angle using atan2
angle_radians = math.atan2(n1, n0)
angle_degrees = math.degrees(angle_radians)
Subtract 90 degrees
adjusted_angle = angle_degrees - 90
Append the adjusted angle as a new row under the 'rz' column
output_table.appendRow([round(adjusted_angle, 2)])
return
WOW !Your turturial are amazing!
You are so amazing how long u have been into touchdesigner
thanks! ~1 year
@Diogo-mm9hh I am also into touch for 1 year, but I regret wasting my time and didn't learn much can u tell me how much time u used to put daily during uur learning toucch
Some time ago I used to spend entire evenings experimenting with TouchDesigner. Now I don't have that kind of time anymore.
The way i learnt was to copy other people’s work unitl I succeeded. I am very inspired on my TD practice by mainly @kiel.d.m on instagram, but also @holke79 @antonin.work @sakamoto.app @veravandeseyp @neurotypique @mikevdsanden @contemporarytype
I also sometimes browse Pinterest for motion design works and try to replicate them in TouchDesigner.
I learn through trial and error, browsing the TouchDesigner forum, and occasionally getting help with Python coding from ChatGPT.
@@Diogo-mm9hh thanks for your reply I really appreciate it