У нас вы можете посмотреть бесплатно Easy ray triangle intersection explained in full (alternative method) (unoptimized) или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
A very easy to understand way of finding if a ray hits a triangle. That is, ray-triangle intersection. There a few ways to to this, but this method is intuitive because of its geometric interpretation. I don't have any direct resources for this as it is what we covered in my college class a few years ago. There are different ways to do this algorithm; GPU hardware does triangle-pixel collision tests differently if I recall correctly. But this method is how I implemented model rendering in my toy ray tracer, so it is robust enough to be used in a ray tracer. If you use this to render large models in a ray tracer, you will likely need to add an acceleration structure (octree etc.) This is not a optimized version of ray-triangle intersection (more below). SECTIONS: I don't recommend skipping sections, but adding for reference after first watch. 0:40 Review 7:17 Geometric Interpretation 10:10 Coding 11:41 Algebra(part of of coding section) 14:43 Resume coding after algebra ////////////////////////////////////////////////////////////////////////////////////////////////////////// Algorithm source: ////////////////////////////////////////////////////////////////////////////////////////////////////////// I do not remember where I learned of this, it was during a graphics ray tracer assignment. I went looking and I think I found a potential paper from 2003 describing the method. I haven't vetted that paper to see if it is an exact match looks to be same method: CS465 Notes: Simple ray-triangle intersection Steve Marschner Cornell University http://www.cs.cornell.edu/courses/cs4... ////////////////////////////////////////////////////////////////////////////////////////////////////////// Corrections and Statement qualifications: ////////////////////////////////////////////////////////////////////////////////////////////////////////// Optimizations: This is a simple method for ray-triangle intersection. There are a few ways to do ray-triangle intersection. This is not necessarily the most optimized method of doing that. Instead it is meant to serve as a introduction on how to start thinking about these types of problems. User uberlazytoad recommends this as a resource on optimized ray-triangle intersection: https://stackoverflow.com/questions/1... here's the paper for the broken hyperlink: https://cadxfem.org/inf/Fast%20Minimu... Barycentric coordinates: Most people use with barycentric coordinates when dealing with triangles; especially when determining if a point is within the triangle. This seems to be a good resource on using Barycentric coordinates with ray-triangle intersection • Math for Game Developers - Ray Triangle In... Finding vector length as 3D Pythagorean's theorem: I anticipate someone commenting about the glm::length not being implemented as 3D pythagorean's theorem. In my version of glm, glm::length is implemented like "sqrt(dot(v, v));" where v is the vector. Many already know that if you take the dotproduct of a vector with itself, you get its length squared; so naturally if you take the square root of that you will get the length of the vector. But this can be interpreted as a solving Pythagorean's theorem for length. One way to compute the dot product is x*x + y*y + z*z. So if we square root that, we get sqrt(x*x + y*y +z*z), which is essentially Pythagorean's theorem in 3d. Source code from video: locate function Slide_LiveCoding::liveCodingIntersection https://github.com/matts-dev/OpenGL-4... Moller Trumbore video: • Möller Trumbore Ray Triangle Intersection ...