I have a CHOP pattern that is outputting random numbers on every beat (120 bpm) and the issue that I’m having is that when I reference it on a SOP Noise seed the fps drops by circa 45 fps and even when the number is static, but when I write the value to a DAT table first and reference the table it does not affect the fps like the CHOP does. Though the DAT table method works it seems it is not fast enough to be responsive to the beat and introduces a tiny lag compared to the CHOP pattern.
It sounds like one method is causing your SOP to cook every frame, while the other only when the value updates. The core issue is that your SOP cook time is to high to avoid frame drops.
If you can share a file then we could help confirm this guess.
Yeah, that was the problem. You had a SOP with 45000+ points cooking which is extremely heavy. The CHOP cooks every frame, the DAT only when updated. You always want to minimize SOP cooking in TouchDesigner as it is done on the CPU and relatively slow.
Since you are using TOPs for your instancing later in the network, you should try to work directly with noise on the GPU using Noise TOPs. In the attached file you can see I’ve swapped in Noise TOPs in place of Noise SOPs. Notice that the Sphere SOP converting to TOPs is not cooking at all, so only once the data is on the GPU in TOPs do we start manipulating it every frame.
The Noise TOP will behave a little differently than the Noise SOP, so you’ll have to massage its parameters to get a similar look and feel. There is a ‘Sparse’ noise on the Noise TOP just like the Noise SOP, but it is a CPU-based algorithm and thus slower, so I set both both Noise TOPs here to Simplex Noise which is fully GPU-based. I recommend trying to get the behavior you want by using one of the GPU settings. Also check the ‘Output’ page of the Noise TOP out, some interesting options can be had witht he RGB parameter. choptableSOP2.tox (4.0 KB)
I am aware about the things you are mentioning and I have been using the method of SOP to TOP and manipulate Noise there. But thanks for the advice.
But i´m kinda still left clueless and curious on why the DAT table value does not make the fps drop like the value straight from the SOP Noise since they are updating at the same frequency. Ben, you don’t have to chase this for me further, i´m simply doing experimentation and testing the limits with TD.
No problem, happy to help with any questions. Basically the CHOP connected to the Noice SOP is cooking every frame, where as the Table DAT is only cooking when the data updates from the script in chopexec2, which fires off every once in a while. You can view this by middle-mouse clicking on the CHOP and DAT and viewing the ‘Total Cooks’ count.
I am running into a similar problem with CHOP and SOP. Your conversation with gunnargs was really helpful to see the issue is that CHOP is over cooking. However, I fail to figure out how to produce random number without using CHOP…
Please see attached image. I am trying to randomly switch between some heavy geometry when a key is pressed. Could you advise me how without CHOP cooking every frame? Thank you very much.