Blender Geometry Nodes - Raycast to Surface
ฝัง
- เผยแพร่เมื่อ 21 ส.ค. 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
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
This is excellent and well explained. Thank you.
thanks for watching!
awsome tutorial really helped me out :)
Super!
This is really cool! Thank you for sharing this trick.
You are a Geometry node genius. 😂
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.
Excelent tutorial! Thank you!
thanks for video!
Super helpful!
glad to hear it
Good tutorial, I from India.
Great tutorial. Very useful. Thank you for sharing your knowledge. THANK YOU! Dg
Cool concept I like it. Want to try this out I literally just made some ocean stuff today
Great tutorial, so useful. Can’t wsit to make something with it. Good work :D
thanks for watching!
😻
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.
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
can you double check you plugged the result into 'offset' and not 'position'? Nothing in here should mess with the scale
actually... in 'object info' node make sure you click ''relative'.
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
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?
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.
Perfect, thank you!@@RobbieTilton
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!
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.
@@RobbieTilton Awesome - thanks! I'll be mucking around with it myself, so if I discover anything worth noting, I'll post it here.
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!
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.
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
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.
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
@@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.
@@omermagen824 very cool! thanks for sharing
Really good tutorial! But I still get very jittery movement ... cannot make it smooth. Even adding all those offsets doesn't make a difference :(
Feel free to send the file in ‘help’ section of my discord if you want me to debug
@@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!
what addon are u using to show the key u are pressing?
carmac
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???
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.
@@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. :-(
@@catchingsky334 sorry- looks like that link expired. try this: discord.com/invite/FQuYknV5Wf
I also updated the link in the video description
bruh i just got it yesterday and it looks like spacesNice tutorialp controls thx for your help
Can the origin be affected by this?
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
There’s an ocean modifier??? Where???
it's built in. just go to the modifier tab and find 'ocean'
is thumbnail image your artwork?
no - i got it from a royalty free website
what do you use for the keys shown ?
carnac
"Euler" is pronounced like "oiler".