Archived

This topic is now archived and is closed to further replies.

Calling all RayCasting experts

This topic is 5741 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Okey now, I''ve done a raycaster, I''ve got the walls looking perfect, texture mapped and all... http://hemohes.4t.com/EarlyScreen.html But my question is how to draw the floor. I understand that it must be done in the same way as the walls. But when the walls have the "fish-eye effect" (or what ever it was called) I''m getting a bit confuced how it really should be done. Anyone know how to do this? The map is a 2D Array, so collision detection is easy. /MindWipe "If it doesn''t fit, force it; if it breaks, it needed replacement anyway."

Share this post


Link to post
Share on other sites
Check out this article. The answer for the fish-eye thing is there (down in the Correcting the Distance section), and the question concerning the floor may also be in there somewhere. Haven't read the article...

http://www.gamedev.net/reference/articles/article872.asp

--Buzzy

[edited by - buzzy_b on March 23, 2002 7:57:44 AM]

Share this post


Link to post
Share on other sites
Thanks. But, I''ve seen that, I understand the basic idea, but how it works to put all to gether is still a little problem for me.

/MindWipe

"If it doesn''t fit, force it; if it breaks, it needed replacement anyway."

Share this post


Link to post
Share on other sites
The ray casting technique was originally developed by Appel in 1968. The concept remained relatively dormant in the computer graphics field until 1980 when Whitted wrote his landmark paper: An Improved Illumination Model for Shaded Display. The term ray tracing then became the more common name for the technique.

Appel, A., Some Techniques for Shading Machine Renderings of Solids, Proceedings of Spring Joint Computer Conference, 1968.

Whitted, T., An Improved Illumination Model for Shaded Display, Communications of the ACM, 23(6), June 1980, 343-349.

Share this post


Link to post
Share on other sites
The words raycasting and raytracing have evolved to mean two different things. People unfortunately confuse the two.

Raytracing has a ray for each pixel (or sub-sample), and can be used directly with geometric primitives, patches, and meshes.

Raycasting has a ray for each column of pixels, and is almost always performed on block-maze type worlds. Motion is constrained as it is in Wolfenstein.

Share this post


Link to post
Share on other sites

Sounds like you are on the old path Lary Myers was on back in the 90's look here for the ack eng he left behind.
http://www.devinfo.com/archives/x2ftp/ack/
He wrote a book on the topic called Amazing 3d Games Adventure Set.
If you still have questions about this topic after reading these sources ICQ me. Hope this info helps.
Oh yeah one more place to look that has full source to a working model.
http://www.geocities.com/SiliconValley/Bay/2234/boom2.htm


[edited by - Cardesh on March 26, 2002 3:19:56 PM]

Share this post


Link to post
Share on other sites
Well, It's been a long time since I don't see anything about ray-casting and I'm not sure this is your problem, but remember that:

- on the walls, the lines of constant Z are vertical lines
- on the floor, the lines of constant Z are horizontal lines

so the floor you render with horizontal spans rather than vertical spans. Of course, the ceiling is done the same way.

Hope this helps.

[]s, Andrei de A. Formiga

[edited by - ktulu on March 26, 2002 3:55:36 PM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Of course, if you''re doing a wolfenstein style shooter and you don''t mind the floor/ceiling not being textured, you can just draw the top half of the screen as a ceiling, the bottom as a floor, and draw the walls over it all.

Share this post


Link to post
Share on other sites