render TOP - cook on demand?

Hi,

It looks like the renderTOPs cook every frame even if nothing is changing (read it in the doc as well).

I’m using some renderTOPs to do some text layout on quads but it needs only being cooked once.
Is there a more elegant way than switching on and off the allowCooking flag?

Thanks
Vincent

You can use the lock flag on the render to stop it from cooking, or you can cache the render with a cache top, and disable the render parameter on the render top. Either should work

The render parameter is the best way to control it.

Makes sense, thanks!

What if the RenderTOP is a cube map render? Cube maps can’t be cached, so I’m breaking the cube map into 6 pieces and caching individually (then wiring to a cube map that knows not to keep cooking). Does this strategy have the lowest memory footprint possible for this situation of holding onto a cube map?

I’m sharing my Cube Map Cache technique that splits a cube map into 6 faces and caches each individually :slight_smile:
cube_map_cache.tox (2.56 KB)

I’m uploading a newer version that’s faster.
cube_map_cache.tox (1.84 KB)

A cube map can use just a single vertical cross input - rather than breaking our your texture into six pieces you could write a shader just to convert the cubemap to a 2d Texture.

Also - if you add a null after your trigger set to selective it will keep your Math CHOP from cooking every frame. For non-optimized ops I sometimes write a script to unbypass or unlock during operation, then bypass or lock after the operation is complete. This can keep any unnecessary cooking from happening.