Lecture 10: Ray Tracing (15)

In the event that the point in question lies between two of the surface's 'walls' (like in the cow's chest between its legs) and a ray is intersected which calculates 2-4 intersection points, how can we tell that the point is outside the object despite being on the same ray (slightly surrounded) as several other points on the surface of the object?


I'm not sure what you mean by the "point in question". If you look at the ray equation a few slides later, it's in the form of "origin + scalar * direction", where the scalar runs from 0 to infinity. So it's not that we take specific points (such as one between the cows legs) and draw a ray from the origin, but we draw a ray form the origin which happens to intersect the point.

As far as how we can tell that a point is outside the object, I think it might not matter. The mesh is rendered as a surface, not a solid; that is, there's nothing inside, and thus no difference between a point being "inside" and "outside" (I'm mostly basing this off of my experience clipping into objects in videogames). Imagine there's a cow skin walking around: there's nothing special about the inside of the cow.

If we wanted the inside of the surface to render differently, there's probably something we could do with triangles behaving differently depending on which side they are intersected from. But being able to tell mathematically whether you're inside the cow is a different question, and I'm inclined to say a mesh might not be a well-suited representation for that question.


After actually listening to lecture it seems that, if you want to find whether a specific point is in the cow, you can draw the ray to the point, stop it at the point, and see how many intersections you have made with the mesh. Odd number means you're inside and even means you're outside.

You must be enrolled in the course to comment