1 May 2011 01:22
Re: Example Of "Ray Casting" With SDL1.2+OpenGL?
Bob Pendleton <bob <at> pendleton.com>
2011-04-30 23:22:44 GMT
2011-04-30 23:22:44 GMT
No, no they are really not much use at all. They take too long. Object picking is best done using the clipping hardware. Every 3D API has a clipping API that uses the clipping hardware to do picking. Lighting is best done using the rendering hardware to do the lighting based on the surface normal of the thing being lighted. In cases where you can't use hardware picking such as when you want to do things in the scene graph that aren't going to the screen then you still use clipping to to eliminate most of the graph to find the items you want. The question of whether there is line segment that connects to points without passing through another object is also best done by clipping to volume that contains the two points and all points in between. Anything that isn't clipped out is possibly in the way. OTOH Ray Tracing (not ray casting) is a technique that lets you do photo realistic rendering with true reflections and shadows. Amazing stuff. If someone wants to learn 3D graphics my suggestion is to go to the web site of of a college that is language and culture appropriate for you, look up the entry level computer graphics programming course, and find the text book they are using. Then get a copy of that text book and read it. Do the problems at the ends of chapters. And get on with learning. A lot of colleges are putting entire courses on line for free. You can just go an read the material. You might have to get the text books, but that is cheap compared to taking the classes.(Continue reading)
>
Bob, you never cease to amaze me. This is excellent advice and very well put.
Those who wish to learn programming (or really any discipline) would be well
advised to take it seriously. I speak both as a former software engineer and
as a current college instructor.
Jeff
RSS Feed