GPU accelerated worldspace vertex normal computation

A demonstration of world-space normal deformation/computation techniques using geometry shaders, implemented in Derivative Touchdesigner 64-Bit Build 2018.23470

Created for a talk given at TouchIn NYC May 2018, presented by Volvox Labs livex.tv/

Includes a real-time GPU accelerated “smooth” per vertex normal computation technique that I developed by emulating common CPU based methods for computing vertex normals for triangulated meshes.

This allows for non-uniform scaling and twisting / warping of the mesh while retaining smooth surface lighting.

Face normals and Vertex normals are both naively calculated here in a single shader pass using a nested loop for adjacent triangles.

A two pass method would be more efficient, but perhaps convoluted within TouchDesigner’s standard render pipeline for MATs / Materials.

This could also be adapted to a vertex shader only approach with the proper vertex attributes, or adapted to other OpenGL based engines/implementations.

Special Thanks:

Vincent Houzé vincenthouze.com
Elburz Sorkhabi elburz.io
Matthew Ragan matthewragan.com

Thanks man , Looks great,
I`m not able to switch into the network editor,
its crash right away.

Barak

Barak, do you get a dmp file? Can you send it in if so?

my mistake,
its entering the network after about 20 seconds.

There was a crash that was occurring when starting the file in the 2019.10000 series, this is now fixed.