PDA

View Full Version : raymeshgridintersect problems


Haamu
06-30-2006, 05:45 PM
I've been using intersectray for various purposes for a while now but it is getting a bit slow and cubersome for more complex tasks. While ago I found raymeshgridintersect which seems nice enough but I can't seem to get few things right.

1.It has nodelist property, but if I add one or more nodes as array it just returns "** system exception **" when I try to build the grid. When I use addnode, it works with a single node but if I add more this way the rays will just ignore them. Also the nodelist does not update when using addnode. This is a problem only assuming it is supposed to handle more than one node. Nodelist is at least referring to multiple nodes. All examples I've seen so far are only handling single nodes.

2.This function does not return world coordinates of a hit. Those are propably quite easy to calculate manually from the other results but i'm just curious why intersectray does that by default but this one does not.

3. Barycentric coordinates. I so and so understand what these are and how they can be calculated but I have absolutely no idea what they are good for. I found some websites with overly technical explanations but I really missed the point of why and where these can be used.

HalfVector
07-01-2006, 07:04 PM
When I use addnode, it works with a single node but if I add more this way the rays will just ignore them.
That's right. I've been trying RayMeshGridIntersect and have the same question. It's a strange behaviour.

3. Barycentric coordinates. I so and so understand what these are and how they can be calculated but I have absolutely no idea what they are good for. I found some websites with overly technical explanations but I really missed the point of why and where these can be used.
They can be use to linearly interpolate any per-vertex value (position, normal, colors, etc) across the triangle surface.

Haamu
07-07-2006, 01:10 AM
Still trying to figure this out. Did some more testing but it just doesn't seem to work with more than one node. Otherwise it is quite neat though, especially intersecting backfacing :).

CGTalk Moderation
07-07-2006, 01:10 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.