Category: 

What is Ray Casting?

Article Details
  • Written By: Malcolm Tatum
  • Edited By: Bronwyn Harris
  • Last Modified Date: 25 November 2016
  • Copyright Protected:
    2003-2016
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
The great magician and escape artist Harry Houdini died on Halloween in 1926.  more...

December 11 ,  1946 :  UNICEF was established.  more...

Ray casting is a process that is helpful in identifying and solving a wide range of problems associated with graphics. Sometimes confused with the process of ray tracing, ray casting does perform some of the same functions and usually is able to move with greater speed than current raytracing protocols. The development of the first ray casting algorithm is usually traced back to 1968 and the work of Arthur Appel.

Somewhat more focused in scope than ray tracing, ray casting makes it possible to take 3D images and render them effectively to two-dimensional screens. This is accomplished by tracking the rays of light that trace a direct path from the eye to some source of light. However, ray casting discounts the influence of any element that may intersect that path between the eye and the light source, although the effect of these elements at the point of termination does come into play. Typical influences would be refraction, reflection and shadowing.

Ad

One of the easiest ways to understand how ray casting works is to think of light emitting from the eye and continuing on in a straight line until being blocked by some object. A portion of the light will stop or be absorbed by the object. Another portion of the light may be reflected by the object in several different directions. Any remaining portion is refracted by the object. Ray casting seeks to identify what percentage of the ray or light is devoted to each of these three possibilities, so that the ray or light is fully accounted for.

The newer technology of ray casting had an impact on the world of animation in very short order. Because of how this process constructs images, ray casting made it possible to design animation for movies and television shows that were of a depth and detail not easily accomplished by other methods. By the middle of the 1980’s, ray casting had become a common tool in many animation studios.

Along with the impact on movies and television, ray casting also aided in the evolution of video games. While the first attempts were somewhat primitive in the late 1970’s and early 1980’s, ray casting helped to add crisp and compelling graphics and 3D images to video games in the 1990’s. These high-resolution entertainment options continue to inform and inspire new video game designs as well as enhance the ability to use animation in movie and television productions.

Ad

You might also Like

Recommended

Discuss this Article

David09
Post 4

@Charred - Of course this kind of thing is not limited to game development. It’s used to recreate physical structures within virtual space as well.

For example, I saw this archaeology program on television where scientists discovered this rare skull whose structure they wanted to investigate further. Rather than remove the skull from the scene, they had one of their computer graphics artists use volume raycasting to send rays through the skull at every direction, inside and out, producing a photorealistic 3D model that was the exact dimensions of the actual skull.

From this virtual model they were able to create a plaster-based reproduction and work with that. That’s pretty amazing when you think about it.

Charred
Post 3

@nony - Yeah, I remember that in the early days of the computer revolution-when computer graphics was still fairly new-the bulletin boards would have these animations of raycasting that would demonstrate things like fractal geometry and photorealistic 3D texture scenes like mapped terrains.

Some of the results were breathtaking to behold, and depending on the speed of the computer, the rendering of the scene could take minutes or even hours. Of course nowadays those things look simplistic in hindsight, but they were pretty big back then.

The concepts are still in use, of course, it’s just that there are a ton of libraries out there with raycasting algorithms, so you don’t have to write your own.

nony
Post 2

When I took courses in computer graphics I learned about raycasting as a method used in computer game development. I began using it in my own computer games, using some freely available algorithms on the Internet and also creating some of my own.

Basically you use ray cast procedures so that you can plot where points, lines and even planes intersect on a screen. The purpose of calculating the intersections is so that you can build what are called collision detection routines for your games.

If you’re building an Asteroids game, for example, you need to show the computer how to determine if the spaceship has hit an asteroid. Collision detection will answer that.

Post your comments

Post Anonymously

Login

username
password
forgot password?

Register

username
password
confirm
email