Raycaster¶
![https://user-images.githubusercontent.com/14288520/197017155-eeab3d4b-618b-49cf-8443-868f13ca18c7.png](https://user-images.githubusercontent.com/14288520/197017155-eeab3d4b-618b-49cf-8443-868f13ca18c7.png)
Functionality¶
Functionality is almost completely analogous to the two built-in blender operators
bpy.context.scene.ray_cast
and object.ray_cast
.
Ray is casted from “start” vector to “end” vector and can hit polygons of input objects.
see docs: bpy.types.Object.ray_cast and bpy.types.Scene.ray_cast
Input sockets¶
Verts - Vectors of objects receiving rays
Faces - Faces of objects receiving rays
Start - Start position of raytracing
Direction - Direction of raytracing
![https://user-images.githubusercontent.com/14288520/197019680-4183c4b0-cec0-4e81-80d9-10e0696a08ec.png](https://user-images.githubusercontent.com/14288520/197019680-4183c4b0-cec0-4e81-80d9-10e0696a08ec.png)
Output sockets¶
socket name |
description |
---|---|
Location |
Hit location for every raycast |
Normal |
Normal of hit polygon |
Index |
index of hit polygon |
Distance |
Distance between start point and hit location |
Success |
|
![https://user-images.githubusercontent.com/14288520/197022372-b39810a8-aae8-40fd-83ef-6b8dddaab9d6.png](https://user-images.githubusercontent.com/14288520/197022372-b39810a8-aae8-40fd-83ef-6b8dddaab9d6.png)
Advanced parameters (N-Panel)¶
All Triangles: Enable if all the incoming faces are triangles to improve the performance of the algorithm
Safe Check: Checks the mesh for unreferenced polygons (slows the node but prevents some Blender crashes)
Usage¶
![https://user-images.githubusercontent.com/14288520/197025123-e1c7f09d-3338-4164-937e-ceae59966a0a.png](https://user-images.githubusercontent.com/14288520/197025123-e1c7f09d-3338-4164-937e-ceae59966a0a.png)
Generator-> Sphere
Number-> Number Range
Vector-> Vector Polar Input
SUB: Vector-> Vector Math
Viz-> Viewer Draw
![https://user-images.githubusercontent.com/28003269/38853349-08514386-422e-11e8-8444-72101d9b0ade.png](https://user-images.githubusercontent.com/28003269/38853349-08514386-422e-11e8-8444-72101d9b0ade.png)
![https://user-images.githubusercontent.com/28003269/38853243-b2dc87a8-422d-11e8-96df-7d27735a5b67.gif](https://user-images.githubusercontent.com/28003269/38853243-b2dc87a8-422d-11e8-96df-7d27735a5b67.gif)
Replay with new nodes
![https://user-images.githubusercontent.com/14288520/197069114-b458a783-a921-4d34-a4db-8b49b8d6c76e.gif](https://user-images.githubusercontent.com/14288520/197069114-b458a783-a921-4d34-a4db-8b49b8d6c76e.gif)
![https://user-images.githubusercontent.com/14288520/197073636-3331852c-150d-4883-8c0d-303562d5066b.png](https://user-images.githubusercontent.com/14288520/197073636-3331852c-150d-4883-8c0d-303562d5066b.png)
Generator-> Plane
Transform-> Matrix Apply (verts)
Analyzers-> Distance Point Plane
Analyzers-> Origins
CAD-> Intersect Edges
CAD-> Planar Edgenet to Faces
Analyzer-> Mesh Filter
Modifiers->Modifier Change-> Delete Loose
Analyzers-> Distance Point Plane
Viz-> Viewer Draw
SUB, NEG: Vector-> Vector Math
Matrix-> Matrix In
Matrix-> Matrix Out
Scene-> Objects In Lite
Scene-> Get Objects Data