Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Ray casting
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Ray casting in early computer games == [[File:Anarch short gameplay.gif|thumb|right|Game using ray casting rendering, making use of advanced techniques to render floor at multiple height levels]] In early first person games, raycasting was used to efficiently render a 3D world from a 2D playing field using a simple one-dimensional scan over the horizontal width of the screen.<ref name="giantbomb_raycasting">{{cite web|url=https://www.giantbomb.com/ray-casting/3015-1517/|title=Ray Casting (Concept) - Giant Bomb|access-date=31 August 2021}}</ref> Early first-person shooters used 2D ray casting as a technique to create a 3D effect from a 2D world. While the world appears 3D, the player cannot look up or down or only in limited angles with shearing distortion.<ref name="giantbomb_raycasting">{{cite web|url=https://www.giantbomb.com/ray-casting/3015-1517/|title=Ray Casting (Concept) - Giant Bomb|access-date=31 August 2021}}</ref><ref>{{Citation |title=Looking up and down in a raycasting game - y-shearing, change pitch #Shorts | date=23 November 2021 |url=https://www.youtube.com/watch?v=JJEN08XBiyA |access-date=2023-09-28 |language=en}}</ref> This style of rendering eliminates the need to fire a ray for each pixel in the frame as is the case with modern engines; once the hit point is found the projection distortion is applied to the surface texture and an entire vertical column is copied from the result into the frame. This style of rendering also imposes limitations on the type of rendering which can be performed, for example '''depth sorting''' but [[depth buffering]] may not. That is polygons must be full in front of or behind one another, they may not partially overlap or intersect. ===''Wolfenstein 3D''=== The video game ''[[Wolfenstein 3D]]'' was built from a square based grid of uniform height walls meeting solid-colored floors and ceilings. In order to draw the world, a single ray was traced for every column of screen [[pixel]]s and a vertical slice of wall [[Texture mapping|texture]] was selected and scaled according to where in the world the ray hits a wall and how far it travels before doing so.<ref>[http://www.permadi.com/tutorial/raycast/ Wolfenstein-style ray casting tutorial] by F. Permadi</ref> The purpose of the grid based levels was twofold β ray-wall collisions can be found more quickly since the potential hits become more predictable and memory overhead is reduced. However, encoding wide-open areas takes extra space. ===''ShadowCaster''=== The [[Raven Software]] game ''[[ShadowCaster]]'' uses an [[ShadowCaster#Technology|improved Wolfenstein-based engine]] with added floors and ceilings texturing and variable wall heights. === ''Comanche'' series === The [[Voxel Space]] engine developed by [[NovaLogic]] for the [[Comanche (video game series)|''Comanche'' games]] traced a ray through each column of screen pixels and tested each ray against points in a [[heightmap]]. Then it transformed each element of the heightmap into a column of pixels, determined which are visible (that is, have not been occluded by pixels that have been drawn in front), and drew them with the corresponding color from the texture map.<ref>[[Andre LaMothe]]. ''Black Art of 3D Game Programming.'' 1995, pp. 14, 398, 935-936, 941-943. {{ISBN|1-57169-004-2}}.</ref> === Beyond raycasting === Later [[MS-DOS|DOS]] games like ''[[Doom_(1993_video_game)|id Software's DOOM]]'' kept many of the raycasting 2.5D restrictions for speed but went on to switch to alternative rendering techniques (like [[Binary_space_partitioning|BSP]]), making them no longer raycasting engines.<ref>{{cite web|url=https://www.youtube.com/watch?v=96nFJIxW-34 |archive-url=https://ghostarchive.org/varchive/youtube/20211212/96nFJIxW-34| archive-date=2021-12-12 |url-status=live|title=ADG Filler #48 - Is the Doom Engine a Raycaster? - YouTube|website=[[YouTube]] |date=19 June 2015 |access-date=31 August 2021}}{{cbignore}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)