Tile ANY Procedural Texture

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 พ.ย. 2024

ความคิดเห็น •

  • @nucleohoshinova
    @nucleohoshinova ปีที่แล้ว +20

    Amazing video! The practical applications were great but the mathematical explanation was a little wonky.
    Essentially what you're doing is remap an 1 dimension input to a continuous closed loop in a higher dimension. In your case the loop was a circle in 2 dimensions as you used the sine and cosine functions. However any continuous closed loop achieves this result, which means that any continuous periodic function, such as the Ping-Pong function for example, can be used instead of sine and cosine.
    Mathematically speaking this remapping can be interpreted as a continuous closed curve k:[a, b] -> R^n where k(a) = k(b).
    To minimize the distortion the norm of the derivative of that curve should be constant, ideally 1 to preserve scale.
    I'm saying this because this process of mapping introduces a certain amount of distortion. If you look closely at your Voronoi noise you will notice that the cell borders are slightly curved even though they should be perfectly straight, this is due to the distortions cause by your remapping.
    The strength of the distortion is dependent on the the periodic function and the procedural texture being used, for example using the Ping-Pong function results in less distortion when paired with Voronoi noise.
    Another thing you mentioned was that your way of tiling a 2D Voronoi texture requires a 4D Voronoi texture while a tileable 3D Voronoi texture would require a hypothetical 6D Voronoi texture. This actually isn't necessary. For all procedural textures in Blender it's sufficient to only remap a single input axis. Not only does that mean that we can actually create a tileable 2D Voronoi texture using a 3D Voronoi texture and a tileable 3D Voronoi texture using a 4D Voronoi texture but doing so also reduces the amount of distortion we introduce.

    • @Erindale
      @Erindale  ปีที่แล้ว +4

      Thanks for the full answer. How are you achieving minimal distortion without looping all the axis? Doesn't it clearly stretch as it cycles?

    • @nucleohoshinova
      @nucleohoshinova ปีที่แล้ว +6

      @@Erindale When remapping there are 2 kinds of distortion we introduce.
      The first is caused by variations in the norm of the derivative of the curve we use to remap the input.
      To minimize this kind of distortion the norm of the derivative should be constant.
      The second is caused by the shape of that curve.
      For Voronoi this kind of distortion is minimized when there is curvature in our curve.
      This means that our function which we use to remap the input has to be a piecewise (affine) linear function which the Ping-Pong function is.
      The norm of the derivative of the curve consisting of Ping-Pong functions is the constant value sqrt(2). So if we divide the axis by a factor of sqrt(2) it completely cancels out the first kind of distortion.
      As an piecewise affine linear function the Ping-Pong function obviously has no curvature, so the second kind of distortion is also minimized.
      When using sine and cosine the norm of the derivative of the curve is sqrt((sin(t)^2)+(cos(t)^2)) ,which thanks to an addition theorem just happens to be the constant value 1. This is why you didn't have to divide the input by a constant factor and why the first kind of distortion is also minimized using sine and cosine.
      However because the curve comprised of sine and cosine has a certain amount of curvature it introduces the second kind of distortion.
      As for "without looping all the axis?" I don't quite understand what you mean by that. The Ping-Pong function just like sine and cosine is a periodic function so the resulting curve does loop.

    • @Erindale
      @Erindale  ปีที่แล้ว +4

      If using ping-pong it will be clearly mirrored like it's been book-matched. With the sin and cosine method, the repeating isn't immediately apparent to the eye. You mentioned you can loop with only a single axis which makes doing a 3D tileable effect possible without 6D noise

    • @nucleohoshinova
      @nucleohoshinova ปีที่แล้ว +5

      @@Erindale Ah, I forgot to mention that you have to apply an offset to one of the remapped axis. So just add a constant factor to one of the remapped axis. If you do that the mirroring effect will disappear.
      Also when I said that it's possible to loop with only 1 axis I meant that we only need 1 additional axis to create tileable textures. Doing so requires arranging the curves in a way such that the resulting shape is topologically equivalent to our looping plane, however that isn't easily explained.

    • @kaustik185
      @kaustik185 ปีที่แล้ว +2

      I dare you, I double dare you guys, find me a better community!
      The magic of open source.

  • @Dmytrozern
    @Dmytrozern 6 หลายเดือนก่อน +3

    There is a real difference between someone who teaches you how to drop assets into the scene, and someone who teaches you how to loop stuff using vector math. Great one, Erindale!

  • @JohnWesleyDavison
    @JohnWesleyDavison ปีที่แล้ว +36

    Imagine a horrible world without blender. Erindale might have ended up teaching regular... MATHS! **shudder**.

    • @Erindale
      @Erindale  ปีที่แล้ว +16

      It doesn't bare thinking about 😭

    • @kaustik185
      @kaustik185 ปีที่แล้ว +2

      Meanwhile, people with even a vague resemblance of a "life":
      It is just maths tho innit

  • @KarlBonenberger
    @KarlBonenberger ปีที่แล้ว +3

    Bookmark this tutorial!!! It's a godsend. Seeing a plane displaced, in geonodes, with a noise texture that moves along one axis, seamlessly looped, probably would've been a better visual example of exactly what he's explaining. But I'd be nitpicking =]] and now you have something to test it on.. Seriously, not being able to loop textures is really annoying. Thank you, thank you, thank you 🙏

    • @Erindale
      @Erindale  ปีที่แล้ว +1

      Haha yeah there's a lot of good demo exercises for this, I just wanted to keep the video relatively short

  • @tirushone6446
    @tirushone6446 ปีที่แล้ว +3

    really greatful you went through all the maths step by steps so everyone watch and take this knowledge and apply it however they need to. Thanks!

  • @UTubeSuhail
    @UTubeSuhail ปีที่แล้ว +14

    I missed your shader editor tutorials!! It's been a while. Always something new to learn from you Erin. Thanks so much for the efforts.

    • @Erindale
      @Erindale  ปีที่แล้ว +1

      Thanks Suhail!

  • @Nyokee
    @Nyokee ปีที่แล้ว +1

    This is excellent. I played with procedural textures for the first time this week, and couldn't believe how much Blender was crashing. Now I can make myself a neat set of procedural-looking image textures and use them instead of texture nodes. Thank you so much, exactly what I needed!

  • @gottagowork
    @gottagowork ปีที่แล้ว +7

    I've been doing this since Realsoft3D got 4D generators 20-30 years ago - damn just saying that makes me feel old 😀Couple of other tricks related to this:
    1. Instead of 2D UV -> 4D generator to get two seamless dimensions, you can also do 2D UV -> 3D generator to get one seamless dimension. This is very useful for procedural texturing of cylindrical and conical shapes where you fill out one dimension. Meaning it is possible to use voronoi on a UV unwrapped cylinder (no seam around the circle) - just make sure it fills 0-1 in U perfectly - but it will also never repeat along its height. I use this pretty much all the time for brushed textures; seamless voronoi.Color -> Separate HSV.H -> -0.5 -> *0.02 (or lower) and drive anisotropic rotation. HSV.V can drive the coloring.
    2. Looping time also have its uses for non seamless texture creation. Sine and cosine of #frame/frames * tau, add that to z and w for an "evolving" 2D texture that loops. If you also add to x and y you'll see the "circular movement" of the texture and probably not desired. It's a nice way to create a repeating set of images to fake waves or caustics as long as a non seamless texture is sufficient.
    3. The downside of 4D (and 3D for that matter) voronoi over actual 2D voronoi, is that Distance to Edge mode will not look as nice. So having seamless options for each of the dimensions built into them would be far more valuable than this workaround.
    4. 4D Smooth Voronoi is slooooooooooooooow... Just a little warning 😀

    • @Erindale
      @Erindale  ปีที่แล้ว

      4. Yeah that sand dune example uses two 4D smooth voronoi and it chugs

    • @__leoayres__
      @__leoayres__ ปีที่แล้ว +2

      I think we need another tutorial

  • @tac-22
    @tac-22 ปีที่แล้ว +2

    Thank you Erindale for all your contributions to the blender community.
    Another essential tutorial right here.

    • @Erindale
      @Erindale  ปีที่แล้ว +1

      Thank you!

  • @tiagotiagot
    @tiagotiagot ปีที่แล้ว +9

    I don't know the whole math; but I think the simple(ish) solution for 3d tiling would be to use the 3D coordinates as euler angles, and convert that rotation into a quaternion to get the 4 values you need.
    edit: I'm not sure if I made a mistake in the nodes, or if this isn't such a good idea after all; tried using the formula from Wikipedia but there are some stretched regions suspect might actually not supposed to be there...
    edit2: Still gotta study it a little more; but kinda looks like I fixed most of the stretching by replacing the plus with a minus for the Y value, so only the w uses a plus now

    • @Erindale
      @Erindale  ปีที่แล้ว +2

      Interesting stuff! If you get it working, feel free to share in my Discord resources

    • @tiagotiagot
      @tiagotiagot ปีที่แล้ว +6

      @@Erindale Don't hold your breath, I rarely manage to finish anything I start...

    • @Erindale
      @Erindale  ปีที่แล้ว +8

      Haha you should see my WIP folder 😅

  • @sander-wit
    @sander-wit ปีที่แล้ว +3

    Somehow I feel everything will be alright when listening to you. Thanks for the great tutorial Erin.

    • @Erindale
      @Erindale  ปีที่แล้ว +2

      Everything's always alright

    • @sander-wit
      @sander-wit ปีที่แล้ว

      See, I knew it. Thanks.

  • @CrispyGFX
    @CrispyGFX ปีที่แล้ว +7

    Needing a 6D texture to map a 3D object in the Z axis is intriguing.
    I wonder if you could arrive at a sufficient result by repeating this entire 4D texture process in the Z and Y (or Z and X) axis and then using mix/blend nodes to seamlessly combine the two 4D textures.

    • @Erindale
      @Erindale  ปีที่แล้ว +2

      Worth a try! Let me know how it goes

    • @CrispyGFX
      @CrispyGFX ปีที่แล้ว

      @@Erindale Didn't get too close. I'm sure there's a way to do it using the Normal information of the object, or triplanar mapping or something, but I'm too smoothbrained to figure it out.

  • @DanielPartzsch
    @DanielPartzsch ปีที่แล้ว

    Since I switched from Cinema4D to Blender I was looking for a way to get seamlessly looping noises in Blender as well (Cinema4D noises have this implemented as setting). This is an immensely important feature for motion graphics artists if you need to create looping visuals for events or social media for example. My workaround so far was to blend over two textures with the same values over the looping time while animating the W value accordingly so that they are the same at start and finish. But this setup is the real solution, very elegant and much more flexible. Thank you so much for this amazing tip!

    • @Erindale
      @Erindale  ปีที่แล้ว +1

      Glad it's helpful!

  • @Transcriptor
    @Transcriptor ปีที่แล้ว

    wow, never realised adding mesh in editor inherits material! Thanks a million... ❤

  • @voyageruk2002
    @voyageruk2002 ปีที่แล้ว

    These last two videos have been superb. I remember using sin and cos when I was a Adobe flash developer, nice to see this stuff explained in geometry nodes. Thank you.

    • @Erindale
      @Erindale  ปีที่แล้ว

      Thanks so much

  • @amrtahtawi
    @amrtahtawi ปีที่แล้ว +1

    Amazing work Erin! after watching this, I had a crystal clear image of even more uses for what I learned from your amazing advanced geometry nodes course! Thank you for always inspiring me and making me love and use math. Appreciate your work as Always!

    • @Erindale
      @Erindale  ปีที่แล้ว

      Thanks Amr

  • @BleachedBroccoli
    @BleachedBroccoli ปีที่แล้ว

    You, sir, are truly godsent! Incredibly chill vibes, thorough explanations, and a fountain of knowledge. I was given your advanced geo nodes course for my birthday and couldn't have hoped for something better! Thank you for what you do and how you do it

    • @Erindale
      @Erindale  ปีที่แล้ว

      That's amazing to hear! Glad you're enjoying the content

  • @Spacebar-3D
    @Spacebar-3D ปีที่แล้ว +1

    Thanks for the trick! I am happy people that understand math share their knowlegde to no-math artist!

    • @Erindale
      @Erindale  ปีที่แล้ว

      I used to be a no-math artist myself! Turns out you don't need much more maths than this to do a lot of cool things

  • @zachhoy
    @zachhoy ปีที่แล้ว +1

    always helping me remember my maths! Thanks Erin

    • @Erindale
      @Erindale  ปีที่แล้ว +1

      Enjoy your remembered super power

  • @Mautar55
    @Mautar55 ปีที่แล้ว

    You got the record of giving me what I need in the least time possible.

  • @letscompose8560
    @letscompose8560 ปีที่แล้ว +1

    Subscribed for the tau command. Great stuff man!

  • @AfesoFranklyn
    @AfesoFranklyn ปีที่แล้ว

    Oh Erin. Thank you so much for this. Can't tell you how many times I've been wanting to do this, but not sure how.

    • @Erindale
      @Erindale  ปีที่แล้ว

      Glad it's useful!

  • @ricardo.d.i.a.s
    @ricardo.d.i.a.s ปีที่แล้ว

    Thanks for sharing the force 🤯

  • @snow_mamba
    @snow_mamba ปีที่แล้ว

    Thanks very much for the tutorial, super useful info

  • @jovlem
    @jovlem 10 หลายเดือนก่อน

    Please make a video about how to make these 6d texture coordinates. Or is there video or site that explains how it's done ( in Blender, or at least the math for it ).

  • @activemotionpictures
    @activemotionpictures ปีที่แล้ว +1

    Awesome video!! Thank you for sharing this.

    • @Erindale
      @Erindale  ปีที่แล้ว

      Thanks! Hope it's useful for you

  • @MedicinalMJ
    @MedicinalMJ ปีที่แล้ว

    This man is a sorcerer!

  • @thezachlambert
    @thezachlambert ปีที่แล้ว

    HA! Now I understand Sine and Cosine! Yet again you have used Blender to teach me what school could not. 😅 Ditto on @Suhails comment! This was a great throwback to some of your older content. Cheets mate and happy 2023! This is a great new trick to know. Thanks!

    • @Erindale
      @Erindale  ปีที่แล้ว

      Thanks! Happy New Year!

  • @__leoayres__
    @__leoayres__ ปีที่แล้ว

    You had showed it in one of your long tutorials. I've been using it since. 😍

    • @Erindale
      @Erindale  ปีที่แล้ว

      Yes! I thought it was worth splitting it out to make it more searchable for people 😁

  • @MrKanimator
    @MrKanimator ปีที่แล้ว

    Always loves stumbling across your work my friend :D

    • @Erindale
      @Erindale  ปีที่แล้ว

      Fancy meeting you here

  • @AslanTamjidi
    @AslanTamjidi 10 หลายเดือนก่อน +1

    you are wonderful

  • @darrennew8211
    @darrennew8211 ปีที่แล้ว +1

    Amazing as always! And not 14 hours long! ;-)

  • @studioskye4903
    @studioskye4903 ปีที่แล้ว

    Thanks for the tut! As a nodes novice, I found the explainations of principles really useful! I was hoping to create a water texture which loops in time and is seamless in x and y space. I can do one or other fairly easily but combining those seems to be a real challenge, mainly because of the input limitations of 4D noise textures. Do you know of a way to do this (preferably without resorting to scripting custom nodes!) Thanks :)

  • @glacier4286
    @glacier4286 ปีที่แล้ว

    This video says it. I need a "6D" texture, one that doesn't stretch on my 3D object. I've been searching for a means to how but too often the results are just 2D solutions. I have a procedural texture, I just need to apply it in a way that it doesn't stretch, and isn't using UV mapping with its seams breaking up the pattern.

  • @SillyandgoofyAnim8or
    @SillyandgoofyAnim8or ปีที่แล้ว +8

    my brain is too small

    • @Erindale
      @Erindale  ปีที่แล้ว +9

      Muscles only grow when stretched! Or something like that 🤔

    • @SillyandgoofyAnim8or
      @SillyandgoofyAnim8or ปีที่แล้ว

      @@Erindale that sounds correct, I think that's exactly how it works.

    • @valovanonym
      @valovanonym ปีที่แล้ว +2

      Brain small > you lighter > you faster!
      No but seriously, spending time playing with nodes will make this stuff feel easier!

    • @SillyandgoofyAnim8or
      @SillyandgoofyAnim8or ปีที่แล้ว

      @@valovanonym yea

  • @regenbot
    @regenbot ปีที่แล้ว

    Great as always, thanks for making it :)

    • @Erindale
      @Erindale  ปีที่แล้ว

      Thanks Regen

  • @Supersctar
    @Supersctar ปีที่แล้ว

    I have an ugly seam on a noise texture with polar coords. Now it seems I have a way to fix it!

  • @deslomator
    @deslomator ปีที่แล้ว +1

    "I have a truly marvelous demonstration of a 3d texture tiling which this margin is too narrow to contain.”

  • @dwellersart7538
    @dwellersart7538 4 วันที่ผ่านมา +1

  • @screwdriver1337
    @screwdriver1337 ปีที่แล้ว

    Thank you a lot! It would be great if you could add this group to your ETK🙏

    • @Erindale
      @Erindale  ปีที่แล้ว +1

      Should be in the mapping section already

    • @screwdriver1337
      @screwdriver1337 ปีที่แล้ว

      @@Erindale thank you, I'll download the latest version then and check thoroughly!

  • @ToraVictoria
    @ToraVictoria ปีที่แล้ว

    This is exactly what I have been looking for - but the Z axis ... I am not a math guy so can you @Erindale cover the tiling on the Z axis?

    • @Erindale
      @Erindale  ปีที่แล้ว

      Check replies to my tweet for this video on Twitter. I think someone posted it

    • @ToraVictoria
      @ToraVictoria ปีที่แล้ว

      @@Erindale Well I am this odd individual who does not use Twitter

    • @Erindale
      @Erindale  ปีที่แล้ว

      It's gone downhill since it was bought but there's still a good Blender community there. This is the tweet twitter.com/mazenalimam/status/1633806669581893637?t=LXiOYtAj57NI70wUvgVRUA&s=19

    • @ToraVictoria
      @ToraVictoria ปีที่แล้ว

      @@Erindale Thanks a lot - love your work!

  • @francesca5295
    @francesca5295 ปีที่แล้ว +1

    black magic i tell you!! xD no super coll I learned a lot coming from the not mathematical side of software this was mind-blowing

    • @Erindale
      @Erindale  ปีที่แล้ว

      Haha thanks

  • @РоманЛебідь-ш3ы
    @РоманЛебідь-ш3ы ปีที่แล้ว

    So it is not an option to tile wave texture and using it you can't implement mapping node, for example, to stretch voronoi

    • @Erindale
      @Erindale  ปีที่แล้ว

      I might be misunderstanding but the wave texture is already looping

  • @trksnoos
    @trksnoos ปีที่แล้ว

    Thanks mate great Math!!!

    • @trksnoos
      @trksnoos ปีที่แล้ว

      This way of thinking is a genius sign!

  • @eobet
    @eobet 7 หลายเดือนก่อน

    I've compared node setups 10 times now and I can't spot a difference, yet can't get it to work... did this stop working in 4.0?

    • @Erindale
      @Erindale  7 หลายเดือนก่อน +1

      It shouldn’t have done… still works for me. Maybe drop a screenshot on my discord and someone can probably help

    • @eobet
      @eobet 7 หลายเดือนก่อน +2

      @@Erindalethis is embarrasing... I was so focused on the various sine and cosine nodes trying to figure out why I'm not seeing the same patterns that I missed that I missed the 2*pi scaling node in the beginning which makes everything work! 🤦‍♂Anyway, at least I've spend an hour extra trying to understand the maths behind this so I've either gained 0.001 IQ points or wasted a whole lot of brain cells...😅

    • @Erindale
      @Erindale  7 หลายเดือนก่อน +1

      @eobet not embarrassing! Very easy mistake. And the debugging is a good brain exercise

  • @kaj1892
    @kaj1892 ปีที่แล้ว +2

    i like noodles

  • @dwibasukirahmat3796
    @dwibasukirahmat3796 ปีที่แล้ว

    need update about 6d

    • @Erindale
      @Erindale  ปีที่แล้ว

      Try this twitter.com/mazenalimam/status/1633806669581893637?t=LXiOYtAj57NI70wUvgVRUA&s=19

  • @jeffreyspinner5437
    @jeffreyspinner5437 ปีที่แล้ว +3

    Hey man, I just went thru your video th-cam.com/video/ve3TXCuwoKo/w-d-xo.html and found it more parsimonious an approached and more sophisticated than the donut maker's (idk why he rubs me the wrong way) or the Default Cube's (he's just coocoo for cocopuffs, but shares half of the cool stuff he does, so that's good)... let me see how far you have advanced from 2 years ago... and ty for donating to my skill fund for making me a better procedural artist. I'll have to clean my fingers from my finger paint and put on my big boy pants, but this is how I suffer for my art. Well, my Art Therapy.
    This is all tongue in cheek, but also completely true (!) Also, I just woke up from my toddler/old man nap, so don't think I wait for the ping of a new video you do! It was just there, and I was like cool beans... downloaded.

    • @Erindale
      @Erindale  ปีที่แล้ว +1

      Haha a good video to jump from. That one prevents tiling repetition, this one creates it 😁
      I can't believe that was only 2 years ago, it feels like a lifetime

    • @jeffreyspinner5437
      @jeffreyspinner5437 ปีที่แล้ว

      @@Erindale Oh, maybe you live in dog years like I. It first started when I met my wife... it was pretty intense from then on... hope you never meet a (wo)man like my wife... white knuckling it all the time isn't fun after a while... (this can also be achieved with any intense work/situation so you were both busy and challenged in the last two years) but, don't worry, as your brain ages and cycles slower and slower, time will feel faster and faster eventually. (~/jk)
      Counterintuitively, when you brain cycles slower your perception of time spans feel less and less long.
      I'm just fascinated by manipulating UVs in both shader and GNs, my unconscious says if I can understand and use that, I will be able to do extraordinary things. He hasn't told me why yet...
      But now I'm confused (my unconscious is again laughing at me) because the loop is from [0-1,0-1] and I immediately think sim node alternative that doesn't crash?

    • @Cyber_Kriss
      @Cyber_Kriss ปีที่แล้ว

      Jeffrey, I have the exact same feeling about the donut maker... I just can't stand this guy.
      Dudes like Erindale are way more useful.

    • @jeffreyspinner5437
      @jeffreyspinner5437 ปีที่แล้ว +1

      @@Cyber_Kriss He's one of my Blender procedural role models. GIven his stuff, I realized there are at least two parts of procedural processes I needed to learn: 1) "Painting" with functions; 2) Logic control. I had conflated the two and it made it harder for me to learn and place what I was learning in a formal way to understand better what's going on.
      It was like when I be (sic) a high school math teacher. After grad school, I realized the reason why I had trouble with math was because I wasn't limiting the scope of my tools for the problem at hand. Once I did that, _already_ solved problems like presented in HS are easy peasy. I used to go into my Geometry Class cold and do the proofs for the class. It kept me awake...
      Now that I see more of the things GNs or the shader tab can do and are, it makes more sense to me, until I see him do something like make a circle from a sine and cosine wave... still don't feel it yet... I may have to get Mathematica or Maple again, and play with the graphs of the functions... then again maybe Khan University on ytube can help. I'm not proud if I can learn what I need!

  • @denzelmodeste6485
    @denzelmodeste6485 ปีที่แล้ว

    @4:36 “because we have simple harmonic motion and it is out of sync with itself, we can actually track around a perfect circle”…kinda lost me there. Is there another way of explaining it sir?

    • @Erindale
      @Erindale  ปีที่แล้ว +1

      If you swing a pendulum and map it's position over time, you'll return a sin graph. If you swing the pendulum so it moves in a circle instead, you can map it's X position over time, and it's Y position over time and you'll get a sine and cosine graph. Simple harmonic motion is like a swinging pendulum

    • @denzelmodeste6485
      @denzelmodeste6485 ปีที่แล้ว

      @@Erindale Thanks very much for taking the time to reply. Love the illustration, it gave me a good visual in my head to start with. I’ll definitely research it some more because i think it’s an interesting subject! Thank you again🙏🏽

  • @rbettsx
    @rbettsx ปีที่แล้ว

    Disappointed. I thought you were going to have us generate a Clifford torus with shader displacement, (experimental) and suck our bedrooms out through our laptop screens into the VOID...

    • @Erindale
      @Erindale  ปีที่แล้ว +1

      That's part 2