Calling all RayCasting experts

Started by
7 comments, last by MindWipe 22 years ago
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."
"To some its a six-pack, to me it's a support group."
Advertisement
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]
This is also an article on raycasting you might want to read:
http://www.permadi.com/tutorial/raycast/
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."
"To some its a six-pack, to me it's a support group."
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.

_______________________________
"To understand the horse you'll find that you're going to be working on yourself. The horse will give you the answers and he will question you to see if you are sure or not."
- Ray Hunt, in Think Harmony With Horses
ALU - SHRDLU - WORDNET - CYC - SWALE - AM - CD - J.M. - K.S. | CAA - BCHA - AQHA - APHA - R.H. - T.D. | 395 - SPS - GORDIE - SCMA - R.M. - G.R. - V.C. - C.F.
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.
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]
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]
[]s, Andrei de A. Formiga
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.

This topic is closed to new replies.

Advertisement