Login | Register 
FEATURES
APPLICATIONS
DOWNLOADS
EDUCATION
BLOG
WIKI
FORUM
STORE

cookOff: keep op chains from cooking & cache data

Helpful techniques for working with TouchDesigner. Answers only, no questions.

cookOff: keep op chains from cooking & cache data

Postby landonth » Thu Jun 07, 2018 2:27 pm

here's my solution i made a week or two ago to keeping/stopping op chains from cooking when you really need them to cut it out, and optionally cache the data for the current session.

It will generally keep those notorious "always cooking" operators like render TOPs, trigger CHOPs from cooking upstream

this approach does NOT change lock, bypass, or cook flags.

probably makes sense to save these as separate TOX for each op family, and ultimately i think they make a good candidate for a bonafide operator in each family

-----------------------
Attachments
cookOff.toe
(7.37 KiB) Downloaded 130 times
User avatar
landonth
 
Posts: 79
Joined: Tue Sep 09, 2014 11:15 pm

Re: cookOff: keep op chains from cooking & cache data

Postby raganmd » Thu Jun 07, 2018 3:15 pm

ohhhhh!

I think your CHOP approach could also work with another constant CHOP feeding the second input - I often end up using than for creating snap channels - you have to turn of "Active Needs Current", but it should work like a hold CHOP without cooking every frame.

That's only if you're interested in more "pure" TouchDesigner approach, otherwise I quite like your script CHOP trick here. Very nice!
Attachments
base_constant_snap.tox
(1.45 KiB) Downloaded 95 times
raganmd
 
Posts: 1372
Joined: Thu Mar 28, 2013 5:21 am
Location: San Francisco, CA

Re: cookOff: keep op chains from cooking & cache data

Postby landonth » Thu Jun 07, 2018 4:04 pm

The reason why I didn't use the Constant CHOP's snap feature is because it doesn't cache data from multiple sample CHOPs, only single sample CHOPs. It also won't store more than 40 channels from even a single sample CHOP.

I tested various types and sizes of input data for each operator family and found a solution that works for all input types, just like a real operator in that OP family would (generally) allow for.

But really this is just a proof of concept, it's not meant to be the definitive solution to this problem. Derivative just needs to implement an operator like this for each family, so people can stop writing hacky scripts and/or messing with various OP flags when all we really need is a simple, unified approach to control cook flow, and optionally cache the data.

-
Last edited by landonth on Thu Jun 07, 2018 7:33 pm, edited 1 time in total.
User avatar
landonth
 
Posts: 79
Joined: Tue Sep 09, 2014 11:15 pm

Re: cookOff: keep op chains from cooking & cache data

Postby raganmd » Thu Jun 07, 2018 4:24 pm

Good point! Well thought out sir, and an excellent RFE.

+1
raganmd
 
Posts: 1372
Joined: Thu Mar 28, 2013 5:21 am
Location: San Francisco, CA

Re: cookOff: keep op chains from cooking & cache data

Postby landonth » Thu Jun 07, 2018 7:47 pm

Also, edorgeville (via the slack chat server) mentioned external persistent storage which is important to mention. This approach only caches data for the current session, but my approach could be modified with a python save method to optionally save the cache data in a TouchDesigner native file format, saved separately from the TOE or TOX. And allows for these to be managed as assets in a Github repo.

This in contrast to the practice of setting the lock flag. For those that aren't aware, Locking is generally frowned upon as unless it's an extremely small amount of data, it bloats the TOE or TOX, even causing a drop in frames when you save your TOE/TOX as the total data from locked TOPs can't write to disk in time for the next frame. I actually inherited a project in recent memory that has over 100MB in locked OPs and every time you try to save, it would make TouchDesigner hang for 3+ seconds.

-
User avatar
landonth
 
Posts: 79
Joined: Tue Sep 09, 2014 11:15 pm

Re: cookOff: keep op chains from cooking & cache data

Postby Simplo » Mon Aug 13, 2018 10:59 am

Great COMPs!!! Thank you!
Simplo
 
Posts: 80
Joined: Thu Feb 05, 2015 5:39 am


Return to Techniques

Who is online

Users browsing this forum: No registered users and 4 guests