I know I'm gonna get flamed for this..
I know I'm gonna get flamed for this..
This might be the noobiest question ever, but really, what is raycasting? Is there any tutorials about it, and how can I use it to make a simple FPS? Is there any functions I should know about raycasting? I read the CollisionDetection tutorial in the Irrlicht tutorials, and although I have very minor knowledge in that, I still really don't know what raycasting his. I heard, to be able to shoot in an FPS, you need this. Can someone explain this to me as best as they can? Thank you very much in advance, and I really hope I'm not acting too much of a noob.
I would add that you have to cast one ray per screen pixel. And each time, you test if the half-line defined by its origin (the camera position) and one of its point (the pixel screen you're testing) intersects something in the scene.
To have realistic light effects, you must add levels of recursion: if the half-line intersects something, you can continue the computation for the reflected ray...
So for real time rendering, it's not yet usable (unless you have a simple scene, with shapes like spheres, cylinders, planes for example. But see this, which should be amazing when it's released: http://www.openrt.de/
To have realistic light effects, you must add levels of recursion: if the half-line intersects something, you can continue the computation for the reflected ray...
So for real time rendering, it's not yet usable (unless you have a simple scene, with shapes like spheres, cylinders, planes for example. But see this, which should be amazing when it's released: http://www.openrt.de/
You're talking about ray-tracing. He's talking about ray-casting for the sake of collision resolution. (Not the type of ray-casting that is defined by the first Wolfenstein etc.)Manawenuz wrote:I would add that you have to cast one ray per screen pixel. And each time, you test if the half-line defined by its origin (the camera position) and one of its point (the pixel screen you're testing) intersects something in the scene.
To have realistic light effects, you must add levels of recursion: if the half-line intersects something, you can continue the computation for the reflected ray...
So for real time rendering, it's not yet usable (unless you have a simple scene, with shapes like spheres, cylinders, planes for example. But see this, which should be amazing when it's released: http://www.openrt.de/
TheQuestion = 2B || !2B