Results 1 to 6 of 6

Thread: Ray Cast Geometry & Flocking: what's this node doing?

  1. #1
    Axes grinder- Dongle #99
    Join Date
    Jul 2003
    Location
    Seattle
    Posts
    14,729

    Question Ray Cast Geometry & Flocking: what's this node doing?

    Hi all: in the excellent tutorial: http://www.youtube.com/watch?v=biH1f_wALB0

    The presenter crafts this network, and inserts the Vector node but never talks about it. The default values of a Vector node are 1/1/1.
    Click image for larger version. 

Name:	raycastFlock.jpg 
Views:	182 
Size:	279.5 KB 
ID:	122231

    I don't understand why the node indicated by the arrow is necessary (it is):
    1. why can't the Ray Cast Geometry node just accept the Agent Info:Position output directly?, and
    2. use its own default 0/-1/0 Ray Direction value ?

    to detect the Ground Plane?

    Thanks for clarifying this for me.
    They only call it 'class warfare' when we fight back.
    Praise to Buddha! #resist
    Chard's Credo-"Documentation is PART of the Interface"
    Film the cops. Always FILM THE COPS. Use this app.

  2. #2
    The ray direction is the direction want the ray to be fired. By default this is 0,-1,0 - or negative Y, which means by default you want it to find the ground object below it. If you want that to be anything else, than you put in another value. So basically - 'fire a ray towards (value) . find intersection point, place object here'. Without checking the video in depth, that's what it'll be for.

  3. #3
    9 times out of 10, you will never manually enter in the ray direction. You'll usually be plugging the coodinate values derived from an "info" node. If you want to use cameras, lights, and bones as ray origins, you'll probably need the DP kit to do that.
    Professional-level 3d training: Ryan's Lightwave Learning
    Plugin Developer: RR Tools for Lightwave

  4. #4
    Axes grinder- Dongle #99
    Join Date
    Jul 2003
    Location
    Seattle
    Posts
    14,729
    Indeed, but what I'm not getting is: don't the Agent Info nodes give sufficient info to the ray cast geometry (can we start typing "rcg" now?? ) node to do this without the extra plumbing?

    Obviously, I'm confused/wrong: but this plumbing seems to be the kind you use to get a vector from one point to another.

    Is the maker of that video here on the forum? Or I guess I could ask James W.
    They only call it 'class warfare' when we fight back.
    Praise to Buddha! #resist
    Chard's Credo-"Documentation is PART of the Interface"
    Film the cops. Always FILM THE COPS. Use this app.

  5. #5
    Well remember it is ray-casting... it is literally firing a ray from the current position in the direction you specify, to hit a named piece of geometry, and return a value... That value is usually a scalar distance, telling the object how far it needs to go to hit said object...

    Ok so object A fires a ray in negative Y (0,-1,0) towards object B... it returns a value (how far it is from B in metres) and then the node translates the object that distance, along that vector, so that it sits on B.

  6. #6
    Registered User Slartibartfast's Avatar
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    419
    I think one can omit the vector node if one were certain the flock is originally ABOVE the ground plane att all times. In this case he subtracts -1 on the Y axis, wich is the same as adding one unit on the Y axis as the ray's origin. In short: fire the ray downwards from a meter above the flock. Otherwise you might "miss" the ground.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •