It just takes practice.

So you have a "location" from your raycast... that's basically an abstract
"place" on geometry from which you can extract any ICE attribute, and their
magic is they interpolate ("blend", kind of) based off the attribute values
off their neighbors.

For example if you get a weightmap value in the middle of a polygon (and as
you might know, weightmaps are per-vertex values), it takes care of
checking the nearest triangle's vertex weights and blending them such that
you get the expected value at that particular place. You don't need to know
how it works, but if you feel like reading, the black magic under the hood
revolves around "barycentric coordinates".

Anyway, back to your issue... plug the Location output of the Raycast into
the "Source" input of a GetData set to just "PointPosition" (no self. or
anything), and that will get your position at the raycast hit location.

You can then plug that into the SRT To Matrix to get a transform with that
position.



On Wed, Mar 27, 2013 at 11:36 AM, Sam <[email protected]> wrote:

> I’m not sure that would work with what I’m trying to do. What I was
> thinking was sort of a laser effect. I can move or rotate my null to aim it
> at objects and it would leave a trail of particles behind which I will then
> emit more particles from for smoke. My biggest problem is figuring out
> which nodes I need to use to make it work. For example, raycast gives me a
> location, but I cannot plug that into the translation on the SRT to matrix
> node. So, once again I am stuck. This is what gets me stuck 99% of the time
> with ICE. I know it’s possible, but I can spend hours trying to figure out
> something that seems like it should be very simple. It would be great if
> Ice could be a little smarter about things like this.****
>
> ** **
>
> ** **
>
> *From:* [email protected] [mailto:
> [email protected]] *On Behalf Of *Alan Fregtman
> *Sent:* Wednesday, March 27, 2013 7:00 AM
> *To:* XSI Mailing List
> *Subject:* Re: Moving objects using ICE and raycast?****
>
> ** **
>
> Or you know... select your null, go to the ICE module, (below the
> Kinematics label) go to Constrain->to Closest Surface and pick your mesh.*
> ***
>
> ** **
>
> :)****
>
> ** **
>
> ** **
>
> ** **
>
> On Tue, Mar 26, 2013 at 10:46 PM, Eric Thivierge <[email protected]>
> wrote:****
>
> You don't need to use a simulated tree to do this.
>
> You'll need to set the kine.global of the object with a matrix which you
> can build from an SRT to Matrix node. Feed your position from your raycast
> into the translation of the SRT to Matrix node.****
>
>
> ****
>
> --------------------------------------------
> Eric Thivierge
> http://www.ethivierge.com****
>
> ** **
>
> On Tue, Mar 26, 2013 at 10:41 PM, Sam <[email protected]> wrote:****
>
> First off, this is just a learning exercise, not an actual project. I’m
> trying to set up an ice tree where I’m using a null to get a location on
> another mesh (raycast) and then move an object along that mesh. I can get
> the position on the mesh just fine, but I’m having trouble moving the
> object. I can seem to set the object position through ICE, but I’m sure it
> should be possible. Also I’m not completely sure how I would move the
> object along the position. What I’m doing now is just getting the positions
> per frame, but I’m not sure this would be the best way because I’m not sure
> this will work correctly with motion blur. I thought about using the points
> to create a curve and then moving the objects along the curve, but I’m not
> sure this is completely possible to do through ICE. Any help is appreciated.
> ****
>
> ** **
>
> ** **
>

Reply via email to