RAYCAST - Geometry Nodes 101
HTML-код
- Опубликовано: 2 авг 2024
- Check out my new procedural modelling bundle: www.nodegroup.xyz/procedural-...
Advanced Geometry Nodes course: www.canopy.games/p/advanced-g...
Grab the beginner course: www.canopy.games/p/bcs-geomet...
Want to learn about the new Geometry Nodes? You're in the right place!
I've got a 6 video crash course coming right up!
$40 off a holographic display? Yes please. lookingglass.refr.cc/erindalew
Geometry Nodes Toolkit: gum.co/erintools
Merch? erindale.threadless.com/desig...
Discord: / discord
My Courses:
www.futurly.com/s/store/cours...
www.canopy.games/p/bcs-geomet...
www.canopy.games/p/procedural...
Contents:
00:00 - Intro
00:50 - The Node
01:57 - Bridge Analogy
04:46 - Making Shrinkwrap
06:11 - Attribute Example
07:06 - Outro
Patreon: / erindale
Ko-fi: ko-fi.com/erindale
Twitter: / erindale_xyz
Instagram: / e.r.i.n.d.a.l.e
Gumroad: gumroad.com/erindale
Blender Market: blendermarket.com/creators/er...
Music Attribution:
Afterglow - Kulpa
Transfering Attributes via laser beam? What could be better?
The thumbnails are getting more and more Halloween.
Reminds me of those toys with numerous pins that wrap around whatever you place underneath.
A great, simple introduction to the raycast node which hints at its power. I'd love to see a more in-depth treatment.
Keep pumping out these wonderful tutorials for 3.0 geo nodes!
this tutorials are unbelievable! Thank you so much for making them
This is all super eye-opening. It really gets me into Geometry Nodes, which felt really daunting at first. I'm especially excited to do things like Landscapes and surreal geometry with it, since I never got that far with shader Nodes. My head explodes when it comes to vector displacement but one day I'll understand it too!
Once you know geometry nodes I think you'll be able to go to shader displacement as well. They're quite similar logic once you know the nodes!
@@Erindale That's true! I'm glad that there is a lot more overlap between the two node systems now. Don't have to relearn everything ^^
Such a good explanation, thank you!!
Glad it makes sense!
Really cool!
Thank you so much for the explanation. I've put off learning this node but it wasn't so painful after all, in fact with this video it was quite nice.
It's one of the most useful nodes as well! Very fast compared to sample nearest surface etc
I will only say, you are a precious gem to the blender community. Thank you.
Too kind, thank you!
I’m loving the tutorials, you’re doing a fantastic job of explaining all this! Question: I noticed you did some cell fracturing for the thumbnail of this video. Is it possible/practical to fracture geometry using geometry nodes?
I don't believe so. I used Sverchok's Voronoi on Mesh node for that ✌️
This torch analogy was all I needed, Thanks Champ!
Took me ages to work out how the node worked so I like a visual metaphor
thanks for the Tut!!! :)
Holy crap...! That is damn useful! Many thanks!
Sort of unrelated... but I'm losing my mind - how do you add a weight paint map in the new Geometry Nodes? Nice video btw!
Literally doing this in the next video! You plug from the Group Input node to your socket and then on the modifier click the button next to your value and it'll change to an attribute input where you can select your vertex group.
@@Erindale Thanks a ton man!
Hopefully we'll some kind of "get attribute" node, in addition to this technique.
Loving all your GeoNode stuff. Mindblowing.
Hopefully a quick question.
How would you go about increasing the selection of points that are affected by the raycast. So in the shrink wrap example, make it so there is a smooth falloff from the points that are affected and the ones that aren't?
You need a way to do some kind of gradient to scale the effect. Depending on the situation you might be able to put the hit distance through a map range so you can gradate from 1-0. Otherwise something like geometry proximity might work for you
OMG! I've hoping to see a raycast feature added to geo-nodes! Still haven't taken a full dive yet into your new geo-node material but this is SOOOO helpful to know early on. Have you made any content on the instancing features for geo-nodes that are supposedly in 3.0?
What do you mean by supposedly? I have some content in this series
@@Erindale I had read that you could do it in a list of expected features but never confirmed it for myself. I'm glad the myth is real.
@@Erindale Just saw the 'Vertex Group and UVs vid and that definitely got me going in the right direction. Does 'Array' have any place in geo-nodes yet? I'm trying to figure out a way to use raycast/vertex instancing/ and potentially array functions to enhance a procedural building system I've been working on that couldn't really cut the mustard without geo nodes because of the instancing requirements. An array that instances the "upper floor" objects until they hit the source/roof object is the missing link for it to really shine but I can't figure out for the life of me how to do arrays with geo-nodes in a way that can be rapidly recycled across thousands of simple planar objects that indicate the perimeter of a building along with its height (origin). Is this even feasible in geo-nodes right now?
It may be worth mentioning a little gotcha that can arise if you want to fire a ray from some Geometry onto itself. Which is fine. But in order for the ray not to hit its own Source Position, you will probably have to nudge the Source Position by a tiny epsilon into empty space, in the direction you want to fire the ray. Same happens when firing rays in Python, or in an OSL shader.. etc.
Oh that's a good point actually! I've not used raycast on a single mesh in that way
@@Erindale it happened to me recently.. if I wasn't kind of expecting it, I think it would have burned up a fair amount of time 🙂
I am still confused, I thought Ray Cast sent a single ray, from Source Position. But this example suggests may Rays, all from the Grid Plane downwards ? - Without connecting the Grid Object to the Source Position ? Where is the source of all these Rays ?
The source position socket is a diamond which indicates a field. So therefore different per element. With geometry nodes nodes are evaluated on the geometry that is using them so in the case of raycast, whichever geometry is using the raycast every vertex will be the source of a ray which is shooting in the Ray direction and will return information if it hits the target object.
Thanks for asking, had same confusion as well
Hi, Erindale! Thank you for your extremely useful explanations!
One of the biggest problem for me in GN - I can't seem to find a way to transfer point attributes to the instances that derived from these points. I know a "hacky" way with index multiplication before transfer attribute node, but it does not work when there is a different number of vertexes from instance to instance. Have you happen to find a proper solution for this??
forgot to add: instances have to be realized into "real" geometry after instancing.
Wow, looks like I've just figured out the way, using attribute statistics node to pass a number of vertexes to transfer attribute node! Thanks for you explanations again!
The "common" way is by using an instance scale node and scaling to 0 and realising them. Then transfer by proximity from the points to the 0 scale instance. In parallel, realise normal instances and transfer from the 0 scale ones to the normal ones by index. Hacky but it works
@@Erindale Thought of that just today, tried this approach but it just looked like even more hacky than index division one :)))
how can i make the ray hits in both directions? not just -z or +z so i can have a shrinkwrap that works no matter if i move my mesh above or below
Add another raycast shooting the opposite way and use a switch node depending on which hits
Is there anyway to make the mesh wrap around the opposite side of Suzanne so that it looks like it is covering Suzanne?
It's based on the UVs so wherever you put your patch relative to the UVs in that 0..1 space will define where it covers your model
This is a great tutorial! but.... how do you get those white edges to show up on an object, like on Suzanne there?
Thanks! What do you mean by white edges? Like when it's selected?
@Erindale I think they are asking about your viewport shading settings ☺️
@@Erindale I mean on Suzanne, it's purple overall but it seems like the edges are white. I've seen some other blender people here on RUclips with the same kind of thing I just don't know how it's done, and my searches haven't gotten me anywhere.
@@FalkFilmTutorials Yep it looks like that was finally the right search query to help! Looks like exactly what I wanted, thanks!
Is there a way to make the grid lines that aren't hits invisible? I just want what hits the object mesh to show up. Tnx!
Yeah, instead of using the selection of the Set Position node, just use a boolean math node set to Not to invert the Is Hit mask and plug that into a delete geometry node
@@Erindale I was able to follow that, and it worked!
@@KDawg5000 Nice! I'm glad you got it!
i have an object on which i instanced grids now i am trying to transfer uv from the original mesh to the geometry generated from instances after realizing them , i can't make it work ,
Hard to answer without pictures. I DMd you (I hope) on Twitter!
I use 3.5. Where would Transfer Attribute be or know as now? I tired the search function also.
It's replaced with the sample nodes
At 5.43, once you've connected the Position from the Hit Position, why is the center point of the grid unaffected? Why is it not being displaced downwards, as surely it is hitting the head?
You see just after that than when I plug the Is Hit selection into the Set Position node that you no longer get that point in the centre. It actually wasn't the centre of the grid, it was all the points that missed Suzanne and the Raycast went 100m without hitting anything so it returned (0,0,0) instead. So those side bits of the grid that don't hit all end up at the 0 position.
@@Erindale Ah that wasnt at all clear, thanks for the swift answer! Much appreciated.
6:39 mind clarifying?
Have a look at the second half of the Vertex Groups and UVs video in this series :)
your gumroad link is broken
Which one? They work okay for me 🤔
I love your tutorials, everything is so well explained and easy to follow. You make Blender Guru look like a cringy teenager, jk, he is legendary as well
Anyway, i have a tutorial idea
Occlusion culling for big scenes using the raycast node, it would be a game changer for everyone who scatters stuff in their scenes but not only them. I know that you have a tutorial on camera culling, but this could be much more powerful
Any kind of culling and LODs is actually counter productive wih Cycles when using instances but I can see it having some value for the viewport and Eevee! I'll have a look into what's possible
@@Erindale i see, i got misguided by my own culling system.
Instead of scattering instances i scatter vertiges for camera culling, then instance the object on the vertiges that remain.
This can't be applied for occlusion culling since the objects have to be there in the first place because vertiges won't occlude anything.
But maybe it could be done with distance levels?
Like
Lets say we have 3 radius levels
Radius1 (closest to the camera)
Made out of object instances
Radius2 starts where radius1 ends
Made out of scattered instanced vertiges. The ones that are ocluded by the geometry from radius1 are deleted. The rest get object instances on them
Radius3 starts where radius2 ends
Vertiges are scattered. The ones that are occluded by the geometry from radius1 or radius2./ Get deleted. Then the ones that remain get object instances on them.
More distance layers - more accuracy.
What do you think?
@@Erindale what do you think
Is it possible to Capture "distance field" attribute using this node? For example for making SDF of a curve.. similar to what can be achieved with geometry proximity node (except geometry proximity node requires target mesh to be highly subdivided for smooth visualisation of "distance field"). Can you please show how, if it's possible?
For an SDF of a curve you would do curve to mesh and then Geo Proximity from edges. As a curve has no faces, it’s not possible for the raycast to target it
Thank you for responding. That part I understand ( in terms of geo proximity and transforming curve to mesh or points - also how to capture Named attribute 'distance' out of it). Was wondering more about raycast node.. Can emitter (curve - mesh in my case) cast rays in all directions from it's points (from inside cube to the surface of it), or it's only in 1 predetermined direction casting rays to target?
Geo proximity does in all directions, but requires highly subdivided mesh for percision of detail. since it works only with vertices, edges, faces.. etc. not surface. Tried sample nearest surface too, but couldn't get distance attribute to all directions from it too.
My guess is if I learn more about how to use indexes and maths, I'd see more clearly. It should be possible.. But I am relatively new to geo and shader nodes.
Face is surface as you’re thinking about it on the geo proximity node. The field is being evaluated on some geometry so you’ll need whatever is doing the sampling to have whatever mesh density you need to do what you’re doing but the actual sample position for the geo proximity node is the nearest position on the closest face (when the domain is set to face).
The raycast will send out one ray per point that is doing the evaluation.
I’d recommend joining my discord server so you have more access to people to explain and share screenshots etc
Didn’t touch geometry nodes yet, but I suppose with raycast we can create something like snow layer hitting from one direction. Hm
Yes!
pew-pew
This guy, pumping out vid after vid like it's nothing xD
Having a rest day before Nodevember 😁
@@Erindale Good I think you're going to need it xD I'm going full steam forward. Deffenitely have some head scratchers on my hands
The thing about nodes is they scare me and I hate them
Don't worry that doesn't change!
@@Erindale oh good!
dude you need to hit the gym
I seriously do