TouchDesigner _03 Curl Noise

Sdílet
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___

Komentáře • 76

  • @petewerner5479
    @petewerner5479 Před 2 lety

    Great video man, thanks for the shout out and glad you found the slides useful!

  • @furek5
    @furek5 Před 4 lety +2

    Best resource ever watch!!! Pure Gold and so straight forward. Thank You:)

  • @elekktronaut
    @elekktronaut Před 4 lety +27

    Amazing, thanks!

  • @cheetahlion79
    @cheetahlion79 Před 3 lety +8

    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.

  • @detailsstudio
    @detailsstudio Před 4 lety +2

    Thank you! it's really helpful for understanding how GLSL top works.

  • @v.rtx_void
    @v.rtx_void Před 4 lety +1

    thank you so much for all that effort and good documentation :)

  • @BaoNguyen-ns6xq
    @BaoNguyen-ns6xq Před 4 lety +1

    really good tutorial, glsl is much lighter on gpu, very clear explanations.

  • @alexandrkrasnovitskii2512

    Thanks for the wonderful tutorial!

  • @fabriceduhamel1830
    @fabriceduhamel1830 Před 4 lety +1

    Thanks, great tutorial, I learn a lot with it

  • @guarranna
    @guarranna Před 4 lety +1

    Awesome tutorial, thanks!

  • @ganjamangaaiaaai9396
    @ganjamangaaiaaai9396 Před 2 lety

    Wow thank you Master Bruno !!! !!!

  • @jbach
    @jbach Před 4 lety +2

    Interesting how much curl noise resembles flocking behavior. Thanks for sharing.

    • @dot23X
      @dot23X Před 2 lety

      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

  • @colinchibois4497
    @colinchibois4497 Před 4 lety +1

    Thanks a lot ! Awesome tutorial

  • @jeremietoussaint4085
    @jeremietoussaint4085 Před 2 lety

    Very nice tutorial. Thanks a lot

  • @seskamol
    @seskamol Před 4 lety +2

    Thanks for useful glsl tricks Man lml.

  • @sphericalaberration
    @sphericalaberration Před 4 lety +5

    thank you! my brain exploded a little :))

  • @syskillme9651
    @syskillme9651 Před 3 lety

    존나 천재이십니다 존경합니다.

  • @jongo8535
    @jongo8535 Před 4 lety +1

    Many thanks, cool tut

  • @perimosh
    @perimosh Před 4 lety +1

    Amazing, thanks so much.

  • @kuzeybayraktar3255
    @kuzeybayraktar3255 Před 2 lety

    many thanks this is amazing

  • @aleksey_ris
    @aleksey_ris Před 4 lety +1

    Wow! Thank you!

  • @mujgan.armagan
    @mujgan.armagan Před 3 lety +1

    Thank you so much!

  • @skinnybreakfast
    @skinnybreakfast Před 3 lety +1

    You're amazing :)

  • @unveil7762
    @unveil7762 Před 3 lety +1

    Bella bruno!!!

  • @ronolds6505
    @ronolds6505 Před rokem +1

    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

  • @nasserahmad4653
    @nasserahmad4653 Před 2 lety

    That’s great,thank you

  • @simonrouhier
    @simonrouhier Před 4 lety +1

    Thank you !!

  • @sachasafretti3012
    @sachasafretti3012 Před 3 lety

    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?

  • @edeechen2689
    @edeechen2689 Před 2 lety

    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 :)

  • @bentheremedia3011
    @bentheremedia3011 Před rokem +1

    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.

  • @ronolds6505
    @ronolds6505 Před rokem +1

    Also, could you let me know how to add a cursor that attracts the curl noise and that glows red (lights up the background)?

  • @kvelve
    @kvelve Před 4 lety +1

    Nice!

  • @banu6301
    @banu6301 Před rokem

    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

  • @claudeofficial
    @claudeofficial Před 4 lety

    Thank you so much :)

  • @jaja6932
    @jaja6932 Před 4 lety

    This is so cool tutorial but I am no idea about glsl, how can I learn glsl?

  • @rkerlenbusch
    @rkerlenbusch Před 2 lety

    has anyone found a method outside of compute shaders for mac users by chance?

  • @jt4030
    @jt4030 Před 3 lety +1

    Thanks 🙏

  • @riccardofrancoloiri6783
    @riccardofrancoloiri6783 Před 11 měsíci

    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!

  • @soulstice555
    @soulstice555 Před 2 lety +1

    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!!!

  • @berkayposul5280
    @berkayposul5280 Před 4 lety

    thank you

  • @sublimazed
    @sublimazed Před rokem

    when attaching INFO dat - it's saying 'snoise' not found but i copied straight from that website.. what am I doing wrong?

  • @eloram979
    @eloram979 Před rokem +1

    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

  • @durolipons9560
    @durolipons9560 Před rokem

    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.

  • @margaritagovedarska6741
    @margaritagovedarska6741 Před 3 lety +2

    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

    • @threedashes___
      @threedashes___  Před 3 lety +1

      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!

    • @lucasvisionvjbitar
      @lucasvisionvjbitar Před rokem

      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 !

  • @xiaowujiang8049
    @xiaowujiang8049 Před 4 lety +1

    awesome!!! 碉堡了

  • @jchen4338
    @jchen4338 Před 3 lety

    Could I ask why my boxes don’t show cohesion ? Which parameter effects that?

    • @threedashes___
      @threedashes___  Před 3 lety

      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.

  • @RusticRaver
    @RusticRaver Před 4 lety

    great

  • @isaacgarza4041
    @isaacgarza4041 Před 4 lety +1

    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?

    • @vernellenoel2995
      @vernellenoel2995 Před 3 lety

      were you able to figure this out? I am having a similar problem

    • @pagsful
      @pagsful Před 3 lety

      I have the same problem , blocks are rotating on themselves but they don't flow.

    • @dot23X
      @dot23X Před 2 lety

      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.

  • @johnferry3488
    @johnferry3488 Před 2 lety

    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!

  • @vernellenoel2995
    @vernellenoel2995 Před 3 lety

    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?

    • @threedashes___
      @threedashes___  Před 3 lety

      Hi Vernelle, I'm not sure. What do you see in the viewer of your posBuffer? Also do you see any shader errors?

    • @vernellenoel2995
      @vernellenoel2995 Před 3 lety

      @@threedashes___ Hi Bruno. In the posBuffer is just a white rectangle. And the FPS is down to 3.

    • @threedashes___
      @threedashes___  Před 3 lety

      @@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.

  • @enricociacchi94
    @enricociacchi94 Před 3 lety

    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

    • @threedashes___
      @threedashes___  Před 3 lety

      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.

  • @gagewinthrop452
    @gagewinthrop452 Před 4 lety +3

    aww man says that I can't use a compute shader due to my gpu / os :( thanks though nice tutorial ! looks great

  • @gabrielamelina9709
    @gabrielamelina9709 Před 3 lety

    hi, is it possible to do it without glsl??

    • @threedashes___
      @threedashes___  Před 3 lety

      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.

    • @gabrielamelina9709
      @gabrielamelina9709 Před 3 lety +4

      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 🥳

    • @verbosemusic
      @verbosemusic Před 3 lety

      @@gabrielamelina9709 Have you find a workaround for GLSL?

    • @gabrielamelina9709
      @gabrielamelina9709 Před 3 lety +1

      @@verbosemusic hello, unfortunately no, I didn’t find any since I’ve changed my project.

    • @verbosemusic
      @verbosemusic Před 3 lety

      @@gabrielamelina9709 I see myself borrowing a windows just to achieve this. Thanks for the answer Grabriela!

  • @o.g.endless.8254
    @o.g.endless.8254 Před 4 lety +1

    Thank you now I feel like Jimmy Neutron