TouchDesigner _03 Curl Noise
Vložit
- čas přidán 22. 07. 2024
- Boxes swirling with curl noise, geometry instancing and compute shader
TouchDesigner 099 64-Bit Build 2020.20020
Peter Werner - Intro to Curl Noise: petewerner.blogspot.com/2015/0...
cabbibo - glsl-curl-noise: github.com/cabbibo/glsl-curl-...
Inigo Quilez - useful little functions: iquilezles.org/www/articles/fu...
00:00 - Intro
00:17 - About Curl Noise
01:36 - Render Setup
03:24 - Compute Shader
09:10 - Geometry Instancing
10:32 - Position / Velocity
16:22 - Life
19:33 - Orientation
20:05 - Scale
21:56 - Colour
23:29 - Number
23:49 - Outro
Instagram: / threedashes___
Great video man, thanks for the shout out and glad you found the slides useful!
Best resource ever watch!!! Pure Gold and so straight forward. Thank You:)
Amazing, thanks!
Incredible! Thank you. I’m just learning Touchdesigner over the last few weeks. Tutorials like this are unbelievably helpful. I’ve been learning to use analog video equipment for well over a year, but there are very few tutorials, so it’s mostly experimentation with patching and trial and error.
Thank you! it's really helpful for understanding how GLSL top works.
thank you so much for all that effort and good documentation :)
really good tutorial, glsl is much lighter on gpu, very clear explanations.
Thanks for the wonderful tutorial!
Thanks, great tutorial, I learn a lot with it
Awesome tutorial, thanks!
Wow thank you Master Bruno !!! !!!
Interesting how much curl noise resembles flocking behavior. Thanks for sharing.
yes I was thinking that - I wonder if it's adaptable to do that - presumably the flocking behaviour also has python code so it might just be a matter of cutting and pasting some code - there was a great tute on Boids in TD somewhere... czcams.com/video/f2yOYmOgZEA/video.html
Thanks a lot ! Awesome tutorial
Very nice tutorial. Thanks a lot
Thanks for useful glsl tricks Man lml.
thank you! my brain exploded a little :))
존나 천재이십니다 존경합니다.
Many thanks, cool tut
Amazing, thanks so much.
many thanks this is amazing
Wow! Thank you!
Thank you so much!
You're amazing :)
Bella bruno!!!
Is there any chance you would be willing to share the file you ended up creating with this tutorial? It would really be helpful in my learning process. Thank you
That’s great,thank you
Thank you !!
Hi! i'm looking a way to limit the noise in a box, i was trying with some rgb math but i end up always getting wrong results you maybe got some advices?
Oh thank you soooooo much for such a wonderful tutorial!! :)
I've learned a lot from it, but I still have some little questions
Is the quantity of the boxes variable? and can there be more than one box emitters?
I will be really appreciated to have your reply :)
This is awesome! How would I go about replacing the cubes with an imported 3D object? I was thinking it would be cool to have fish swimming around and I found a cool object online.
Also, could you let me know how to add a cursor that attracts the curl noise and that glows red (lights up the background)?
Nice!
Hi, this is really nice.
I got to the Life part, but the cubes aren't resetting for me. Do you know what could be wrong?
EDIT: I Used 32 bit RGB instead of RGBA
Thank you so much :)
This is so cool tutorial but I am no idea about glsl, how can I learn glsl?
has anyone found a method outside of compute shaders for mac users by chance?
Thanks 🙏
hey! fantastic tut! do you know a method to point to the center of the geo with my camera? I want to use your tech in a setup ultrawide for 3 projectors and I need the cam point to the center of the geo (e.g. when you home the camera, but constantly), lookAt doesn't work cause it doesn't recognize the center of the curl instanced noise. I need to point to the moving center of it, any suggestions? thank you!
HI! Sorry but I'm writing with sublime text and when I paste the write glsl on it, it highlights in red the return word. That wont let me the script work. Do you know what it can be? The view syntax is in phyton mode. Thank you!!!
thank you
when attaching INFO dat - it's saying 'snoise' not found but i copied straight from that website.. what am I doing wrong?
for pasting/checking for misspellings:
uniform float uTime;
uniform float uDelta;
uniform float uVelDamping;
uniform float uLifeDamping;
uniform vec4 uNoiseFactor;
layout (local_size_x = 8, local_size_y = 8) in;
vec3 snoiseVec3( vec3 x ){
float s = TDSimplexNoise(vec3( x ));
float s1 = TDSimplexNoise(vec3( x.y - 19.1 , x.z + 33.4 , x.x + 47.2 ));
float s2 = TDSimplexNoise(vec3( x.z + 74.2 , x.x - 124.5 , x.y + 99.4 ));
vec3 c = vec3( s , s1 , s2 );
return c;
}
vec3 curlNoise( vec3 p ){
const float e = .1;
vec3 dx = vec3( e , 0.0 , 0.0 );
vec3 dy = vec3( 0.0 , e , 0.0 );
vec3 dz = vec3( 0.0 , 0.0 , e );
vec3 p_x0 = snoiseVec3( p - dx );
vec3 p_x1 = snoiseVec3( p + dx );
vec3 p_y0 = snoiseVec3( p - dy );
vec3 p_y1 = snoiseVec3( p + dy );
vec3 p_z0 = snoiseVec3( p - dz );
vec3 p_z1 = snoiseVec3( p + dz );
float x = p_y1.z - p_y0.z - p_z1.y + p_z0.y;
float y = p_z1.x - p_z0.x - p_x1.z + p_x0.z;
float z = p_x1.y - p_x0.y - p_y1.x + p_y0.x;
const float divisor = 1.0 / ( 2.0 * e );
return normalize( vec3( x , y , z ) * divisor );
}
float parabola( float x, float k )
{
return pow( 4.0*x*(1.0-x), k );
}
void main()
{
vec4 p = texelFetch(sTD2DInputs[0], ivec2(gl_GlobalInvocationID.xy), 0);
vec4 v = texelFetch(sTD2DInputs[1], ivec2(gl_GlobalInvocationID.xy), 0);
vec4 i = texelFetch(sTD2DInputs[2], ivec2(gl_GlobalInvocationID.xy), 0);
vec3 pos = p.rgb;
vec3 vel = v.rgb;
vec3 ini = i.rgb;
//position
float life = p.a;
life -= uLifeDamping;
if (life
All good until I add Uniform float Utime; and add + Utime to the curlnoise and then everything stops. Sublime text is highlighting the return values. Really hope someone can help. I know this is a couple of years old. I haven't got a clue how to fix this.
First of all, thank you so much for this tutorial.
Could you recommend ways to make it interactive with a Kinect? I saw your comment about using Optical Flow as an external force in the Vel. parameter in the GLSL shader, but how do you proceed with that? Is there an expression, or just declaring a uniform and then exchanging, per se, the uNoiseFactor?
I am a student and I am really interested in the ways you would see this working out.
Thanks in advance :)
Hugs from Berlin
Hi Margarita, glad you liked the tutorial. You could perhaps use data from the Kinect to spawn the blocks. You'd need to convert position data into a TOP and then use that instead of iniBuffer. Just an idea. A complete answer would probably require another tutorial... but I hope it is enough to start exploring. Good luck!
Hi @margaritagovedarska6741, did you reach your goal on making interactive with the kinect? I`m starting to search on how to do that too, did you follow the tips above? do you have another clue on how to do that? big up from brazil !
awesome!!! 碉堡了
Could I ask why my boxes don’t show cohesion ? Which parameter effects that?
Hi Jingyi, this is not a real flocking simulation, so there isn't a specific parameter for cohesion. You can play with the values of uNoiseFactor and try to find something that works for you.
great
Amazing and deep Thanks! I am an absolute beginer and went thru the whole tutorial step by step. I did acheive alot but my blocks are not flowing. They do move in waves but they are anchored to the center. What could be wrong? Can I send you my file?
were you able to figure this out? I am having a similar problem
I have the same problem , blocks are rotating on themselves but they don't flow.
If you didn't figure it out I am guessing either some mistake in the GLSL python code (for example you didn't replace all the snoise with the TD version) or your feedback loop with the position buffer is not connected.
Hello, this is so cool!! and I was following along fine until around 8:23 I get still have an error message after switching inputs to 2.
The info DAT is saying this:
Compute Shader Compile Results:
Compute shader failed to compile with the following errors:
ERROR: 0:18: error(#143) Undeclared identifier: nTDComputeOutputs
ERROR: 0:18: error(#145) Left of "[" is not of type array, matrix, or vector: nTDComputeOutputs
ERROR: 0:18: error(#202) No matching overloaded function found: imageStore
ERROR: 0:21: error(#145) Left of "[" is not of type array, matrix, or vector: nTDComputeOutputs
ERROR: 0:21: error(#202) No matching overloaded function found: imageStore
ERROR: 0:25: error(#143) Undeclared identifier: color
ERROR: 0:25: error(#202) No matching overloaded function found: TDOutputSwizzle
ERROR: 0:25: error(#202) No matching overloaded function found: imageStore
ERROR: error(#273) 8 compilation errors. No code generated
Any ideas? very new to touch and GLSL shading!
Thank you so much for this. I am having an issue. For some reason, when I got to translate (r,g,b), nothing happens. I do not get what you get. It remains the horizontal rectangular block. Might you know why this is?
Hi Vernelle, I'm not sure. What do you see in the viewer of your posBuffer? Also do you see any shader errors?
@@threedashes___ Hi Bruno. In the posBuffer is just a white rectangle. And the FPS is down to 3.
@@vernellenoel2995 At 9:10 posBuffer should be the same as select1 and iniBuffer. If it isn't, check if your shader looks like the one at 8:15. Another potential cause is a limitation of your setup, other users have mentioned they can't use compute shaders for some reason.
Ciao! Tutorial e progetto veramente interessante! Ho solo un piccolo grande problema: come editor del "glsl1_compute" mi esce il blocco note di Win e non la finestra del video !!!
Ti prego aiutamiii
Ciao Enrico, my Italian is enough only for understanding the question, but not for replying. I use Sublime Text as my default text editor, and I've configured it to open GLSL files, that's why you see a different editor in the video.
aww man says that I can't use a compute shader due to my gpu / os :( thanks though nice tutorial ! looks great
same for me, can anybody explain why?
on a MAC with an AMD gpu?
hi, is it possible to do it without glsl??
Hi Gabriela, it might be possible, but I think the network would end up very convoluted. In this case a custom shader is probably the clearest way of doing it.
Even if TouchDesigner doesn't provide a Curl Noise operator at this point, it is already doing a lot in the background, for example making it quite convenient to change scale and rotation. The part that is left for us to do in GLSL isn't (hopefully) too scary.
Bruno Imbrizi thankyou for the info, it’s very helpful. Unfortunately my laptop’s gpu doesn’t support glsl in any kind of way... Hope I’ll find other alternative for my project . Wish me luck 🥳
@@gabrielamelina9709 Have you find a workaround for GLSL?
@@verbosemusic hello, unfortunately no, I didn’t find any since I’ve changed my project.
@@gabrielamelina9709 I see myself borrowing a windows just to achieve this. Thanks for the answer Grabriela!
Thank you now I feel like Jimmy Neutron