Blender Geometry Nodes - Raycast to Surface

Поділитися
Вставка
  • Опубліковано 3 жов 2024
  • Snap any object to a surface using the Blender 3.0+'s Raycast Node. This technique snaps the location and normal rotation of the entire object (not just the vertices). Want to have a boat floating in a stormy ocean? Look no further.
    Patreon: / robbietilton
    Twitter: / robbietilton
    Instagram: / robbie.tilton
    Discord: / discord
    #blender #geonodes #geometrynodes

КОМЕНТАРІ • 55

  • @NikClark
    @NikClark 2 роки тому +8

    This is excellent and well explained. Thank you.

  • @Zebra_Blender
    @Zebra_Blender 2 місяці тому

    Very good tutorial, especially the smoothing of normals, very instructive. In addition, the hit position of the raycast can be directly linked to the position of the transformed geometry

  • @CaptainSnackbar
    @CaptainSnackbar 3 місяці тому

    awsome tutorial really helped me out :)

  • @EthanWilson473
    @EthanWilson473 Рік тому

    i'm trying to use this to place a road on a terrain i made but i can't get the position of the points to cast the ray from

  • @wakegary
    @wakegary 2 роки тому

    This music reminds me of Myst/Riven. Love it. It's rare for me to like bg music as it's usually stock stuff. Even if this is stock, I dig it. Ambient is the way to go. Good video. Raycasting confuses me and I've put off learning that node for a while.

  • @CassiaConvolution
    @CassiaConvolution Рік тому

    "Euler" is pronounced like "oiler".

  • @amrtahtawi
    @amrtahtawi 2 роки тому +1

    Love your video here! I was happy to support you on patreon because of this amazing video. I'm trying to animate the uv sphere with different location like a ship sailing for example, but It's not working with me for some reason, Can you make a video about that please? Thanks in advance.

  • @a.miroshin
    @a.miroshin 3 місяці тому

    Super!

  • @cosmo4251
    @cosmo4251 Рік тому

    Hi Robbie, great tutorial. Question. In my file, the cube was initially disappearing every X number of frames. I realized it related to the wave height going above the cube's origin. I fixed the origin by moving the cube up but in object mode. Do you know if there's a way to avoid needing to do this?

    • @RobbieTilton
      @RobbieTilton  Рік тому +1

      you could change the original raycast position to have an offset in the z+ direction and then you wouldn't need to worry about it.

    • @cosmo4251
      @cosmo4251 Рік тому

      Perfect, thank you!@@RobbieTilton

  • @purpleparkstudios4124
    @purpleparkstudios4124 2 роки тому

    Cool concept I like it. Want to try this out I literally just made some ocean stuff today

  • @Lucas.D
    @Lucas.D 2 роки тому

    bruh i just got it yesterday and it looks like spacesNice tutorialp controls thx for your help

  • @vstreet7583
    @vstreet7583 2 роки тому

    Great tutorial. Very useful. Thank you for sharing your knowledge. THANK YOU! Dg

  • @homundakahani3D
    @homundakahani3D Рік тому

    Good tutorial, I from India.

  • @omermagen824
    @omermagen824 Рік тому

    Is there a way to have the same effect but with multiple islands of the same mesh? I tried using the Accumulate Field node and Transfer attribute by island index but none of those preserved mesh details.

    • @RobbieTilton
      @RobbieTilton  Рік тому

      to do that i would use two geometry nodes. one for the individual mesh like in this tutorial. and then a new geo nodes to instance the islands where you instance the object that has the raycast geonode setup

    • @omermagen824
      @omermagen824 Рік тому

      @@RobbieTilton I actually found a way using two accumulate field nodes. One to find all the positions and one to find the number of verts in an island. Then you can use those values to calculate an avarage position for each island.

    • @RobbieTilton
      @RobbieTilton  Рік тому

      @@omermagen824 very cool! thanks for sharing

  • @joshiifive
    @joshiifive 2 роки тому +1

    Can the origin be affected by this?

    • @RobbieTilton
      @RobbieTilton  2 роки тому +1

      you can use a translate to offset where it catches on the surface. or use bounds to get the bottom most point of your mesh at anytime

  • @vizdotlife
    @vizdotlife 10 місяців тому

    This is really cool! Thank you for sharing this trick.

  • @matthewmounsey-wood5299
    @matthewmounsey-wood5299 Рік тому

    😻

  • @frankwas586
    @frankwas586 9 місяців тому

    You are a Geometry node genius. 😂

  • @David_Fernandez
    @David_Fernandez 2 роки тому

    Really good tutorial! But I still get very jittery movement ... cannot make it smooth. Even adding all those offsets doesn't make a difference :(

    • @RobbieTilton
      @RobbieTilton  Рік тому

      Feel free to send the file in ‘help’ section of my discord if you want me to debug

    • @David_Fernandez
      @David_Fernandez Рік тому

      @@RobbieTilton Thanks a lot for your response and for your offer, I found another work around, but I will send it to you if it doesn't work. Have a good day!

  • @bonecoseoutrascoisas-leiri1131

    Excelent tutorial! Thank you!

  • @dimdimtattooer
    @dimdimtattooer Рік тому

    thanks for video!

  • @diiba_
    @diiba_ 2 роки тому

    My cube disappears below the ocean after 78 frames or so, double checked all node settings and connections and they match the ones in the video.
    Edit: Figured it out, the original position of the cube had to be moved further up in a more wavy ocean so that the raycast would stay above it.

    • @RobbieTilton
      @RobbieTilton  2 роки тому

      check the position of your cube and make sure it's above the water. because we raycast downward it needs to be above it. you could also modify the raycasting so it works both below and above

  • @cherok5004
    @cherok5004 Рік тому

    Hey - this tutorial really stands out! I wasn't able to learn how to project full 3d objects (without mashing the verticies into two dimensions) on many other similar videos.
    I have a small follow up question for something that wasn't covered - what if instead of a single floating cube, I want to connect multiple cubes to the source position on Raycast? I my case, I'm trying to connect a group of nested objects to a bumpy landscape. It looks like Source Position will only receive one connection - is there a way to capture location data for all nested objects and link them to Raycast?
    Thanks, and love your content!

    • @RobbieTilton
      @RobbieTilton  Рік тому

      thanks for the comment. regarding your question i'm going to have to think about it. it's a good use case though. I'll see if i can figure it out this week and will make a video if so.

    • @cherok5004
      @cherok5004 Рік тому

      @@RobbieTilton Awesome - thanks! I'll be mucking around with it myself, so if I discover anything worth noting, I'll post it here.

    • @cherok5004
      @cherok5004 Рік тому

      I wish that it was possible to post images here as it might helpful to show and not tell about the nodes I used.
      TLDR: the only means for getting close to the desired effect is to flip the land layer (the ocean in this video), connect Hit Position to Set Position for each of the three nested geometry groups (Buildings, Roads and Land Use in my case) via Set Position, and try to get the base and geometry layers close enough that they 1) don't stretch too much, and 2) don't go above Raycast's Ray Length threshold.
      The only solution I can figure is that there's a way to combine location data from all objects using a capture attribute node for each, then combine them into one, then feed it into the Source Position input on Raycast (like you did to make the Cube float). That said, I have no idea if that's even possible.
      Anyway, I'd be appreciate if you have any suggestions and thanks for making great content!

  • @youtuberrick2065
    @youtuberrick2065 2 роки тому +1

    I am facing a problem where the cube becomes abnormally elongated when i plug the raycast with combine xyz to the offset. by any chance do you know what the source of the error could be

    • @RobbieTilton
      @RobbieTilton  2 роки тому

      can you double check you plugged the result into 'offset' and not 'position'? Nothing in here should mess with the scale

    • @RobbieTilton
      @RobbieTilton  2 роки тому

      actually... in 'object info' node make sure you click ''relative'.

  • @matiasbriones9665
    @matiasbriones9665 2 роки тому

    Great tutorial, so useful. Can’t wsit to make something with it. Good work :D

  • @giorgilezhava1877
    @giorgilezhava1877 2 роки тому

    is thumbnail image your artwork?

    • @RobbieTilton
      @RobbieTilton  Рік тому

      no - i got it from a royalty free website

  • @catchingsky334
    @catchingsky334 Рік тому

    In 3.3.1 I'm getting the really jittery movement too. It doesn't roll smooth with the waves like your video and I've painstakingly reviewed all the nodes and steps. Mine seems like its clamped in some way where it bobs up and down fine but more shivers in place instead of rolling. What I did stumble on though is when I duplicated the cube and moved it off of the world center it worked fine. So for some reason even though the cube was at +5 in Z to be above the wave as long as the X and Y were 0 it just shivers. Also, if I animate the cube moving in X or Y it rolls but also has the shiver like its being added in and using both movements. Also, if I apply the location to the cube at 0,0,5 it rolls fine without the shiver but its obviously floating above the surface. Any ideas what going on there? I also set it to the Z in the Euler like in the video. Hmmm
    I don't understand at the end how its working with the sphere when you are skipping the entire Attribute Statistic part as well???

    • @RobbieTilton
      @RobbieTilton  Рік тому

      could you share your file w me on my discord under the 'help' section. then i can take a look and let you know what's happening.

    • @catchingsky334
      @catchingsky334 Рік тому

      @@RobbieTilton when I click the Discord link it says "Invite Invalid". I tried both direct and also logged in and tried again - still no luck. :-(

    • @RobbieTilton
      @RobbieTilton  Рік тому +1

      @@catchingsky334 sorry- looks like that link expired. try this: discord.com/invite/FQuYknV5Wf
      I also updated the link in the video description

  • @likeyouknowwhatever2811
    @likeyouknowwhatever2811 2 роки тому

    There’s an ocean modifier??? Where???

    • @RobbieTilton
      @RobbieTilton  2 роки тому

      it's built in. just go to the modifier tab and find 'ocean'

  • @sebastianosewolf2367
    @sebastianosewolf2367 2 роки тому

    what do you use for the keys shown ?

  • @coleorloff
    @coleorloff 2 роки тому

    Super helpful!

  • @somrender
    @somrender 2 роки тому

    what addon are u using to show the key u are pressing?