Sign in to follow this  
Westeria

One step above Raycasting.

Recommended Posts

Raycasting is cool, but I'm wondering if my 3D game should be something a little more advanced. Basically, I'm going to write a 3D shooter, but I'm not going to use DirectX/OpenGL. All math is going to be done by hand in procedural-C. In comparison to Raycasting, how difficult is it to write an engine very similiar to Doom? And if it all possible, is there any articles on the subject?

Share this post


Link to post
Share on other sites
Quote:
Original post by Westeria
RayTracing is cool, but I'm wondering if my 3D game should be something a little more advanced.

More advanced than raytracing? Well, I guess you'll want to go for photon mapping, then.

Quote:
In comparison to RayTracing, how difficult is it to write an engine very similiar to Doom?

Doom employed raycasting, not raytracing. Raycasting is a very fast method for rendering pseudo-3d objects (no actual 3D transformations are done). Raytracing is a very slow method for rendering full 3D that tries to (partially) simulate the actual physical processes that transmit light from light sources to cameras. Photon mapping is an enhancement to raytracing that can dramatically improve performance, at the cost of significantly increasing the complexity of the technique. Neither raytracing nor photon mapping are anywhere near efficient enough to work in realtime on currently availanle consumer-level CPUs.

Share this post


Link to post
Share on other sites
Quote:
Original post by Westeria
I edited it before you posted Sneftel. [razz]

Seriously though, for a mod, you should have guessed I mixed the two up: considering how often they get mixxed up! [razz]
There's no need to be rude.

Why don't you just look up the Doom source? It's open source now, you know.

Share this post


Link to post
Share on other sites
You might also look around online for the code to Marathon 2, another old-school raycasting engine-based game.

Granted, digging through that amount of source code isn't easy, but you might be hard-pressed to find tutorials on the subject.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Neither raytracing nor photon mapping are anywhere near efficient enough to work in realtime on currently availanle consumer-level CPUs.


I do remember coming across a raytracing game implementation in realtime.

http://www.realstorm.com/

Share this post


Link to post
Share on other sites
Once again, DOOM did not use raycasting. :-)

That last link is to the doomsrc.txt file on id's own web site. The relevant files to check out in the source code distribution are r_bsp.c and r_main.c. You will see no mention of raycasting. It boils down to: "The basic rendering concept -- horizontal and vertical lines of constant Z with fixed light shading per band".

The gamedev dictionary should be updated.

cheers
sam

Share this post


Link to post
Share on other sites
RealStorm is VERY cool (everyone should check it out), but it's not a game, it's just a concept demo.

If you want to play an actual ray-tracing game, then search for "antiplanet". They didn't have a version that works on AMD processors last time I checked though, only Intel.

Share this post


Link to post
Share on other sites
RealStorm is cool in theory but really, polygonal-based systems have far surpassed whatever raytracing may have promised us.. I mean sure it's a nice generic system but polygons+pre-calculated radiosity+shaders offers plenty of flexibility at a fraction of the processing costs..

But kudos to the RealStorm guys anyway for keeping the dream alive.. :-)

cheers
sam

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this