Writing GLSL in POPs

There is a new page in Learning About POPs that provides tips on writing compute shaders for POPs in TouchDesigner:

Let us know in this thread any detail you would like explained more. The page assumes you know a bit about writing GLSL shaders in TOPs or materials (search GLSL in wiki).

6 Likes

Thanks, super useful, I really like the part where you do not need to declare uniform in the shader.

Are we going to get some function to manipulate directly surfaces?
I’m trying to close a geometry through a specific order of points, in the same way we do it with a skin POP/SOP, but with more granular control.

Cheers

H.

Hi Hugues,

Indeed we’re planning on adding some ways to create primitives with GLSL, with either direct write access to the index buffer and/or higher level functions.

In the mean time maybe the Primitives page of the create POP will be useful to you, it’s somewhat similar to the polygons page of the add SOP with a few different methods to create new primitives

1 Like

Hi Vincent,

I’m very interested in having write access to the index buffer too! I implemented Marching Cubes to convert 3DTextures to POPs. I went the extra mile and implemented it with shared points. To that end, I have to generate a lot of triangles in real-time, with varying indices. Using the create POP I get about 13ms on the CPU and 19.5ms on the GPU for approximately 14000 triangles. Given the fact that e.g. the grid POP can generate triangles etc much faster, can I expect similar performance once we have write access to the index buffer?
Thanks you so much for your work on POPs, they are amazing<3

Oh wow, I just realized that the polygonizePOP has marching cubes build in!!! Marvellous!

(I’m still looking forward to having access to the index buffer)

Yes, Polygonize is 2D-ish only, with limited controls on granularity, and it over-generates what it needs. Vincent can give more detail on index buffer (holiday for another week). But yes, shared points is terrific.

@josefpelz Glad you found the polygonize POP!
Not sure what Greg means by it being 2D-ish only, it does 3D with marching cubes and 2d with marching squares.

Otherwise yes index buffer write access in GLSL is still on the (long) list

1 Like