dylanroscover / operator-gotchas
MUST READ before wiring a TOP, CHOP, MAT, DAT, light, camera or instancing chain you have not built before: the parameter names TD abbreviates, the defaults that silently do the wrong thing, and the input-order rules, per operator, verified on TD 2025.33230. Pair with describe_op_type.
<!-- Generated by Embody/Envoy - Do not remove this comment - sha:25bf8f0d0830692c -->
Operator Gotchas
Per-operator traps, verified live on TD 2025.33230 (2026-09-25) unless marked as a field note. Before touching an unfamiliar operator, describe_op_type(op_type, pattern=...) returns its real parameter names, creation defaults and menu values, and set_parameter rejects a bad menu value and names the valid ones. A guessed name costs a round trip; a wrong guess that happens to exist costs a show.
Universal
- Reference nulls, not live ops. An expression or OP parameter that names a Null survives inserting or deleting the ops before it; one that names the working op breaks the moment a filter goes in front. End every chain in a Null and point everything at that.
- OP-reference parameters hold a path string and do not follow a rename of their target (a Select TOP pointed at a renamed Constant TOP read
None). After any rename, sweeppar.val,par.exprandpar.bindExprfor the old name (td-python.md). - Menu values are the lowercase token, never the label:
orthonotorthographic,degnotdegrees,aa8notaa8high,chanpercolnotChannel per Column. Par.defaultcan disagree with what a fresh operator actually holds (a Text DAT'slanguagedeclaresinputbut a new one readstext);describe_op_typereports the creation value and flags the divergence.- Time-dependent operators cook only when something demands their output: a viewer, a Render or Out TOP, a Null with its viewer on, a CHOP Execute DAT. A silent chain is usually undemanded, not broken (
td-python.md, Cook Model).
TOPs
compositeTOP:operanddefaults tomultiply. Withover, input 0 is the FOREGROUND (on top) and later inputs sit underneath, the reverse of a layer stack.constantTOPis white with alpha 1 by default; setcolorr/g/b=0andalpha=0for an empty seed. It exposestype=texture3dbut has nocustomdepth, so it cannot seed a real volume; use a smallglslTOP(/glsl-shaders).feedbackTOP:topnames the Null that closes the loop,resetpulseresets. Keepformatidentical through the loop (rgba16floatorrgba32floatfor anything outside 0-1) and pinoutputresolution=custominside it. Field note (TDMCPSkills): on reset it takes the input's resolution, afterwards the target's, so a mismatch changes resolution after the first frame.selectTOP:topis a path string (see Universal: a rename breaks it).depthTOP:pixelformat=rgba16float+depthspace=rerangedgives usable 0-1 depth.moviefileinTOP: paths resolve relative to the.toe; afilechange orreloadpulselands only across a real frame advance (/td-api-reference, Cook Model Gotchas).playmodeislocked,specify,sequentialortimecodeop;cuepulse+cuepointjump.renderTOP:cameradefaults tocam1,geometryandlightsto*;antialiasisaa1..aa32;bgcolora0 keeps the background transparent for compositing; set a floatformatbefore bloom or tone-mapping or every value clips at 1.0 (/visual-aesthetics).rgba8fixed, the default output format everywhere, clamps to 0-1. Data textures, feedback, random values and HDR needrgba16floatorrgba32float.choptoTOP:dataformatpacks channels (r, one channel per row by default;rgbapacks four) and needs a floatformatfor data bakes.glslTOPhas 3 input connectors; useglslmultiTOPfor more (/glsl-shaders).
CHOPs
selectCHOP: the remote reference ischops(plural);channames,renamefromandrenametotake TD patterns (*,?,[xyz],[0-2],a|b,~exclude). Use it to fan one source out to many consumers without long wires.parameterCHOP(opsdefaults to..):customis ON andbuiltinis OFF by default, so readingtxneedsbuiltinon, and aparametersfilter alone does nothing while the category toggle is off.lagCHOP:lag1(rise) andlag2(fall) inlagunitseconds; there is nolag.filterCHOP:type(gaussdefault),width,widthunit(seconds by default).mathCHOP:chopop/chanopcombine across inputs or channels (add,sub,mul,div,avg,min,max,len);preop/postopact per value (negate,pos,root,square,inverse);preoff,gainandpostoffapply as (value + preoff) * gain + postoff;integerrounds.logicCHOPconvert: onlyboundreadsboundmin/boundmax;gt,ge,lt,le,eq,necompare between inputs, not against a threshold. "Value above a threshold" is Math CHOPpreoff=-thresholdinto Logicconvert=pos.functionCHOP:func(sqrt,abs,sign, trig, ...),angunitisdeg,radorcycle.lookupCHOP: input 0 is the index, input 1 the table,index1/index2the index range.shuffleCHOPmethod=spliteverynwithnvalde-interleaves samples into channels.resampleCHOPratefixes a rate mismatch before a Merge or Math.nullCHOPcooktype=selectiveon a chain end that only needs to update on change.timerCHOPships withcycleOFF andcyclelimitON atmaxcycles4: a periodic timer needscycleon and the limit off or it stops after four.length10 s;ondoneisdonothing,reinit,restartorrestartnoinit; segments come fromsegdatwithsegmethodserial or parallel anddeferparson while they play;lengthtype=infinitedisables the fraction;callbacksis its docked DAT.constantCHOP:const0name(defaultchan1) /const0valueis a sequence, andset_parameteronconst5namegrows it.switchCHOPindexis an Int;switchTOPindexis a Float with ablendtoggle.speedCHOPintegrates its input (a rate becomes a position). Field note (TDMCPSkills):triggerCHOPwill not re-fire while the input stays high; detect edges in a CHOP Execute DATonOffToOninstead.- The audio input is
audiodeviceinCHOP(there is noaudiodevinCHOP); long files play fromaudiofileinCHOP; analysis isaudiospectrumCHOP(fftsize,frequencylog),analyzeCHOP(function=rmspower),beatCHOP. - Never drive a long-running show's motion from
absTime.seconds: the accumulated value loses float precision on the GPU (noise goes blocky, motion steps). Use cyclic sources (LFO sin/cos into a 4D noise offset,beatCHOP,timerCHOP) orabsTime.framemodulo a period.
DATs and callbacks
- Every execute DAT has ONE source parameter and is silently inert without it:
chopexecuteDAT.chop,datexecuteDAT.dat,parameterexecuteDAT.op(withparsa pattern; empty watches nothing),panelexecuteDAT.panels(plural).activeand the callback toggle you rely on (offtoon,valuechange,tablechange, ...) must both be on. parameterexecuteDATships withbuiltinANDcustomON; turnbuiltinoff for a custom-parameter dispatcher (/parameter-design).executeDATships with every hook OFF (framestart,frameend,start,create,exit); a frame driver that was never enabled demands nothing.- A CHOP Execute DAT makes its watched CHOP cook every frame whether or not anything else pulls it.
- A Text DAT's
language(python,glsl,json,yaml,xml,text) is what gives a code DAT colouring and error checking; a hand-created one readstext, whilecreate_opandcreate_extensionmake itpython; for any other content passcreate_op(language=...), which also picks the matching file type when the DAT is auto-externalized. Embody'sexternalize_opsetsfileandsyncfile; never set them yourself. webclientDAT:reqmethod,url,requestpulse,timeoutin ms (60000 default),authtype,output(textortable), and a docked_callbacksDAT whoseonResponseruns on the main thread (/td-api-reference, Background Work).jsonDAT:filteris a JSONPath ($),outputisresults,resultorsource.- Table cells are strings:
op('t')[1, 2] + 1auto-casts,.val + 1raises (/td-api-reference).
MATs, lights, cameras
pbrMAT:metallicANDroughnessdefault to 1.0, so untouched it renders as rough chrome; setmetallic=0for dielectrics and varyroughness. It needs anenvironmentlightCOMP(envlightmap) plus a Light COMP or it renders near-black. POP geometry under PBR needsnormalPOPtangents (/pop-networks).pointspriteMAT:pointsizein pixels,colormap,blendingon for transparency (blendop),sizingmodelconstatten(withattennear,attenfar,attensizenear,attensizefar) orperspective. Points render as single pixels under any other MAT.lineMAT:linecolorattdefaults toColor,linewidthatttoLineWidth;widthnear/widthfarattenuate with distance;widthaffectedbyfovOFF keeps pixel widths when the camera is normalized.glslMAT:blendingoff by default;srcblend/destblend(one,zero,sa,omsa, ...) plus the alpha pairsrcblenda/destblenda;cullfaceisuserender,neither,backfacesorfrontfaces;wireframeisoff,tesselatedortopology.lightCOMP:lighttypepoint,coneordistant;dimmer;coneangle/conedelta;shadowtypeoff,hard2d,soft2d;attenuated.cameraCOMP:projectionperspectiveorortho;fov45;near0.1 andfar1000 (a computed camera distance can clip -- raisefar);lookat;fogoff,linear,exp,exp2withfogcolorr/g/bandfogdensity.- A fresh
geometryCOMPholdstorus1with its render flag ON: delete it or it renders behind your scene (/create-operator).
Instancing (Geometry COMP, Instance pages)
instancing=1,instanceop= the data OP (CHOP, DAT, TOP or POP);instancecountmodeoplength(default) ormanual; a DAT with a header row needsinstancefirstrow=names.- Channel selectors are strings that must match a channel name, DAT column or POP attribute exactly:
instancetx/ty/tz,instancerx/ry/rz,instancesx/sy/sz,instancer/g/b/a(instancecolormodereplace,multiply,add,subtract),instanceactive. Per-group OP overrides:instancetop(translate),instancerop(rotate),instancesop(scale),instancecolorop,instancetexcoordop. - POP data goes in directly:
instanceop= a nullPOP, selectorsP(0),P(1),P(2),Color(0), ... NopoptoCHOPround trip, no GPU-to-CPU copy. - Rotate-to-vector:
instancerottoop+instancerottox/y/z,instancerottoforward(negzdefault;posyfor tubes),instancerottoorder(rottoxform,rotaterotto,rottorotate), up vector frominstancerotupop+instancerotupx/y/z. - Textures per instance:
instancetexs(a TOP list),instancetexindexop+instancetexindex,instancetexmodereplaceortransform. - OP-reference parameters inside a Geometry COMP resolve from INSIDE it: reach the COMP's siblings through a parent-shortcut expression, never
../name(parameters.md).
In and Out
- A COMP has no input connector until an
in*operator exists inside it; with several, setconnectorderexplicitly (default order is creation order). Wire a default source into aninTOP/inCHOP's own input: it is used when nothing is connected outside. outTOPlabeldefaults to$ON(its own name). A specimen's output is an Out TOP namedout1.
Topics cross-checked against Derivative's TDMCPSkills family skills with permission; every unmarked claim was probed live on 2025.33230, and three of theirs were corrected here (chops, panels, audiodeviceinCHOP).