Login | Register 
FEATURES
APPLICATIONS
DOWNLOADS
EDUCATION
BLOG
WIKI
FORUM
STORE

GPU accelerated worldspace vertex normal computation

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

GPU accelerated worldspace vertex normal computation

Postby landonth » Mon Jun 18, 2018 8:16 pm

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 http://volvoxlabs.com and LiveX https://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é http://vincenthouze.com
Elburz Sorkhabi http://elburz.io
Matthew Ragan http://matthewragan.com

project/toe/shaders on github: https://github.com/landonth/normals-gpu
User avatar
landonth
 
Posts: 79
Joined: Tue Sep 09, 2014 11:15 pm

Re: GPU accelerated worldspace vertex normal computation

Postby barakooda » Mon Oct 22, 2018 3:21 am

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

Barak
User avatar
barakooda
 
Posts: 669
Joined: Fri Nov 27, 2009 5:08 pm

Re: GPU accelerated worldspace vertex normal computation

Postby ben » Mon Oct 22, 2018 10:36 pm

Barak, do you get a dmp file? Can you send it in if so?
User avatar
ben
Staff
 
Posts: 2599
Joined: Thu Nov 08, 2007 6:55 pm
Location: Toronto

Re: GPU accelerated worldspace vertex normal computation

Postby barakooda » Tue Oct 23, 2018 3:15 am

my mistake,
its entering the network after about 20 seconds.
User avatar
barakooda
 
Posts: 669
Joined: Fri Nov 27, 2009 5:08 pm

Re: GPU accelerated worldspace vertex normal computation

Postby malcolm » Wed Mar 06, 2019 9:29 pm

There was a crash that was occurring when starting the file in the 2019.10000 series, this is now fixed.
User avatar
malcolm
Staff
 
Posts: 4424
Joined: Tue Nov 13, 2007 1:11 am


Return to Techniques

Who is online

Users browsing this forum: No registered users and 3 guests