I know I'm gonna get flamed for this..

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Arya
Posts: 12
Joined: Tue Oct 07, 2008 2:35 am

I know I'm gonna get flamed for this..

Post by Arya »

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. :oops:
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Raycasting is just sending (casting) a line (ray) out of the camera and intersecting it with the scene, like in the collision example.

The only thing you'll be flamed for is not having a meaningful title ;)
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Manawenuz
Posts: 22
Joined: Wed Jun 10, 2009 12:42 am
Location: France

Post by Manawenuz »

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/
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

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/
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.)
TheQuestion = 2B || !2B
Manawenuz
Posts: 22
Joined: Wed Jun 10, 2009 12:42 am
Location: France

Post by Manawenuz »

OK Sorry for the misundestanding
Post Reply