Jump to content
  • Advertisement

Archived

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

Neoteric

Doom Floors

This topic is 5668 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

I''ve searched everywhere for a fast (any) alogrithm to render floors and celings in my raycasting engine, without success, can anyone help?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
How exactly, are you doing it?

Share this post


Link to post
Share on other sites
The usual way I guess, the floor is ray-casted and the walls drawn on top, whatever I do I can't the floor movement to fit the wall movement. The FOV is correct, the scaling constant, view height, everything seems right but it just doesn't quite work.

I thought I would give somebody else's algoritms a go because I'm about to ditch mine.

[edited by - Neoteric on January 25, 2003 11:33:37 AM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster

Before you draw the walls, paint the lower half of the screen your floor color, and the upper part your roof color. That''s what wolfenstein 3d did, and just about every other raycaster I''ve seen does.

But, you say, Doom has better floors that that!

Yeah, because Doom didn''t use raycasting. I''m not sure why there''s this persistent rumor that it did.

Share this post


Link to post
Share on other sites
Ray casting was used to draw the textures onto the polygons after they came out of the tree, I assume floors were done similarly.

I think the problem is how I'm handling the fisheye on the ceiling, it seems to distort slightly at the far edges, Just need to figure out exactly what needs fixing. The math seems to work in my head and on paper, but not in practice. It's something obvious though.

(I apologise for the un-optimised speed, example moved to next post)




[edited by - Neoteric on January 29, 2003 11:55:17 AM]

Share this post


Link to post
Share on other sites
...the problem is better illustrated when the floor moves...

select the applet and use W,S,A and D to move.

[Edited by - Neoteric on July 1, 2004 9:53:25 AM]

Share this post


Link to post
Share on other sites
quote:

Ray casting was used to draw the textures onto the polygons
after they came out of the tree, I assume floors were done similarly.



I don''t think so, the walls were drawn using a column based rasterizer (similar to the final process of ray-casting in 2.5d worlds but not quite). The floors and ceilings were scanline rasterized, making use of the constant-z scanlines coz all the floors were flat.

Share this post


Link to post
Share on other sites
quote:
Original post by JuNC
I don't think so, the walls were drawn using a column based rasterizer (similar to the final process of ray-casting in 2.5d worlds but not quite). The floors and ceilings were scanline rasterized, making use of the constant-z scanlines coz all the floors were flat.


I stand corrected.

I was thinking of the beginning of the process, my floors work similarly, I think, but then again i've used sources from all over the place to put that togeather. .

The problem is the field of view is too large on the floor, it should be right, but I'm forgetting something.



[edited by - Neoteric on January 29, 2003 3:56:54 PM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
>...the problem is better illustrated when the floor moves...
the x of the walls have fisheye disortion

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
>...the problem is better illustrated when the floor moves...
the x of the walls have fisheye disortion


Wouldn't that make the walls bend when looking straight on? You're right though, they seem to compress around the screen edges. The column scale is worked out like this, with fisheye correction. Am I missing something?

ray_len = (ray_len/120) * Math.cos(ray_angle);




[edited by - Neoteric on January 30, 2003 3:04:59 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!