Responder al comentario
QtRay (Step 1)
Enviado por manolopm el Mié, 09/02/2009 - 19:59.I always wan't to make my own raytracer. I have the oportunity in the university, but the raytracer that I want to do then was bigger than the one that I need to do for the university so I get out of time (and didn't pass that assignment). So after reading a lot about realtime raytracers in Codepixel and in Jon Valdes blog I decided to make a really small raytracer.
The first step was remember all about math. I ned to remember what I have to do to know if a ray intersects a triangle. There a lot of methods about it, and a lot of changes to make it faster using sse instructions and stuff like that. But I need the earlier and easiest way. So I get my "Collision detection in interactive 3d enviroments" and I read the easy way to do that. The easy way use Cramer's method to solve an ecuations system. And I didn't remember how It works. So I spend one full night to understand all of this. If someone wants more information about the other methods you can take a look to Codepixel Wiki entry about it. I'll probably talk about all the math stuff when I'll do it in code but today I only wan't to give an overview of what I have now.
I also need more information on how to transform the screen positions into world positions to calculate the ray, after some time trying to figure how to do that. I asked to Jon Valdes and he send me to an old post in codepixel mailing list where he ask the same thing. I've read Alex Méndez answer and I get the solution.
The next thing to solve was a technological problem, what to use? OpenGL? Qt? in which language? C? C++? Ruby? Other? Finally I'm quite sure to do it in C++ with Qt. So I start again to make some test to remember how Qt works. (You know hello world tutorial and something like that).
Ok when I thougth that I can begin with the math part in code, and make appear a white plane on my screen, I found another problem. Qt don't have a 3 dimensional point into their classes. So using the code of QPointF I'll start to make a QPointF3d. And that's my actual state.
I'll try to do something every day (at least a few lines and a post) tomorrow (or even tonight) I'll try to make another class QLineF3d to hold ray's informations.
Comentarios recientes
hace 13 semanas 2 días
hace 14 semanas 2 días
hace 29 semanas 1 día
hace 1 año 6 días
hace 1 año 6 días
hace 1 año 1 semana
hace 1 año 2 semanas
hace 1 año 49 semanas
hace 1 año 49 semanas
hace 2 años 1 día