POP Networks
GPU-accelerated point operations. POPs replace SOPs for 3D geometry with massively parallel GPU compute. See reference.md for operator decision tree and attribute reference.
Core Concepts
- Points with attributes: P (position), N (normal), Color, Tex, custom
- GPU-resident: all data stays on GPU, downloading to CPU causes stalls
- Memory model: unmodified input attributes pass by reference (zero-copy)
- Points alone don't render — need Point Primitives (set Connectivity on generators)
- Rendering: POPs in geometryCOMPs, rendered by renderTOP. MATs read POP attributes
- Data sourcing: POPs can exist in any COMP (baseCOMP, etc.) for data extraction without rendering
- GPU→CPU cost:
poptoCHOPandpoptoDATcopy data from GPU to CPU — can be heavy for large point counts
geometryCOMP Setup
- Create geometryCOMP
- Delete auto-created torus immediately
- Build POP chain inside, end with nullPOP
- Set
display=true render=trueon output nullPOP - Material: place MAT inside geometryCOMP, reference as
./mat_name. Seetd-mat-familyskill - For instancing: see
td-geometry-instancingskill
Feedback Simulation
feedbackPOP has 1 input (reset/initial geometry). Loop back from output null is automatic.
- Lifecycle:
initializepulse(reset) →startpulse(begin playback) →play(pause/resume) - particlePOP same lifecycle — also requires
initializepulsethenstartpulseto reset and run - Reinit after attribute changes:
pulse_parameterwithinitializepulsethenstartpulse - Conservative initial forces: start low (gravity ~0.1-0.2, damping ~0.98)
- forceradialPOP planar force — creates soft repulsion, not hard bounces. Use mathmixPOP for floor collision (see reference.md)
GLSL POP
glslPOP— default choice, one attribute class, supports multi-passglsladvancedPOP— only when needed: multi-class read/write, index buffer (I[]), extra outputs. Seetd-glsl-shaders/glsladvancedPOP.mdfor buffer allocation, output count control, and pitfalls- Set
computedatto textDAT name, list output attributes inoutputattrs - Custom attributes — use the
attrsequence:attr0name=color,attr0type=color. GLSL buffer is auto-declared asColor(capital C, matching POP attribute name). Write asColor[idx] = vec4(...). Do NOT manually declare an SSBO — it compiles but writes to an unmapped buffer - Attribute must exist before writing —
outputattrsonly grants write access to attributes that already exist on the points. To write a new attribute: either create it with theattrsequence on the glslPOP itself, or place anattributePOPupstream to initialize it. Then list it inoutputattrsexplicitly - writeonly caveat — with default
outputaccess=writeonly, attributes listed inoutputattrsthat aren't written in the shader may get zeroed TDPerlinNoise()NOT available — write custom noise or use sampler input- Multi-pass:
Passes=N, prevPassOutput=ONfor iterative solvers vecnotconstfor uniforms —constsequence recompiles shader on every value change. Usevecfor runtime parameters (seetd-glsl-shadersskill)- Prefer built-in POPs over trivial glslPOP — operations like texture lookup + math (abs, multiply, add) can use
lookuptexturePOP → mathmixPOPchain instead of custom GLSL
Common Patterns
- Basic point cloud:
gridPOP → noisePOP → nullPOP - Particle sim:
sourcePOP → feedbackPOP → [forces] → nullPOP - Built-in particles:
pointgeneratorPOP → particlePOP → [forces/bounce] → nullPOP - Spatial interaction:
neighborPOPaddsNebr/NumNebrsfor flocking/collision - SOP conversion:
soptoPOP → attributePOP → nullPOP - Copy/instance:
copyPOP(simple) orglslcopyPOP(custom per-copy transform, see below)
GLSL Copy POP
glslcopyPOP copies source geometry N times with a custom GLSL transform per copy. See reference.md for full shader API.
- Inputs: input 0 = source geometry, input 1 = template points (optional, determines copy count)
- Shader in docked DAT only — write to
<name>_ptCompute, never a separate textDAT (TDCopyIndex breaks). Delete unused_vertComputeand_primComputedocked DATs if not writing vert/prim shaders - Key functions:
TDCopyIndex(),TDTemplate_P(),TDTemplate_AttribName(),TDIn_P()
Attributes
- See
reference.mdfor full attribute list (reserved, common, particlePOP-specific) - Component access:
P.x,P.y,P.z(preferred) orP(0),P(1),P(2). Use.x/.y/.zfor readability - User-defined: lowercase first letter to avoid conflicts with Derivative attrs
- Debug values:
inspect_values(path)returnspointAttributes[name].values— sampled point values per attribute.max_points=100default (cap 10000), even-spaced stride when over cap.attributes=["P","Cd"]to filter. Type strings:float3,int,float(TD doesn't expose color/dir semantics — infer from name)
Pitfalls
- Locked nullPOP breaks POP cook loops — cachePOPs keep cooking even when
active=false, creating dependency loops in iterative POP pipelines. Place anullPOPafter the cachePOP and lock it (op.lock = True). The locked null holds stable geometry and breaks the cook chain. Seetd-glsl-shaders/glsladvancedPOP.mdfor the full cache feedback pattern - Default torus not deleted — renders instead of your chain
- No display/render flags on output null — nothing renders
- feedbackPOP not reinitialized after attribute changes — stale attribute schema
- Avoid SOPs inside geometryCOMPs — use POP equivalents (spherePOP not sphereSOP)
- copyPOP too heavy — N vertices × M particles. Use instancing instead for many copies
- GPU download stalls — use
delayed=Truein Python for POP data access - lookuptexturePOP defaults wrong —
lookupindexattr0/1default toP(0)/P(1)(world position), NOTTex(0)/Tex(1). Explicitly set to Tex coords when sampling by UV - normalPOP tangents for PBR — set
tang=alwayscomputewhen using pbrMAT. Without tangents, PBR lighting fails - Point vs vertex attributes for materials — glslPOP writes point attributes. pbrMAT/phongMAT read Tex as vertex attributes. Use
attributeconvertPOP(convertop=pointtovert,inputattrs=Tex) to convert before the output null. Also disable spherePOP's built-in vertex Tex (texture=none) to avoid conflicts - mathmixPOP/mathcombinePOP sequences start empty —
vec/combsequence pars don't exist until you add blocks:n.par.comb.sequence.numBlocks = 2. Must do this before settingcomb0operetc. AlsocombNscopea/b/resultstay disabled until that block'scombNoperis set — set opers first, scopes in a second pass - forceradialPOP Global Force multiplier defaults to 0 —
globforce*values do nothing untilglobforcemultis set (e.g. gravity:globforcey=-6,globforcemult=1). Same trap withwindspeed*/windspeedmult - rectanglePOP size is
sizeu/sizev, NOTsizex/y/z/wdespite get_help showing those as components. Settingsizexsilently does nothing. Same U/V naming on other 2D primitives with UV semantics — always verify live pars withget_parameters(include_defaults=true)before trusting get_help'scomponentslist - POP render color attr =
Color(float4), NOTCd— SOP→POP trap.attributePOPvalue params areattr0value0..3.constantMAT applypointcolor=1renders point AND primitiveColor - Filled POP geometry invisible from one side — set MAT
cullface=neither; default backface-culls primitives whose winding faces away


