Adjusting horizontal and vertical shading in 3-D rendering

Rendering a stereoscopic image of a 3-D environment, including: tracing a path of ray from a camera to a light source for every pixel in a view window; determining shading of all pixels in the view window; and adjusting the shading for all pixels to show horizontal displacement but substantially reduce vertical displacement in the stereoscopic image. Keywords include shading and horizontal displacement.

BACKGROUND

Field of the Invention

The present invention relates to a technique for stereo rendering of objects, and more specifically, to using substantially horizontal offsets in stereo rendering.

Background

A 3-D graphics method such as ray tracing is a technique for rendering a 3-D scene with complex light interactions. It is based on modeling reflection and refraction by recursively following the path that light takes as it travels through the scene. To make the processing manageable, the light is traced backwards from the camera to the light source. However, ray tracing over curved surfaces may cause undesirable problems for viewers of the 3-D images.

SUMMARY

The present invention provides for adjusting horizontal and vertical shading in 3-D rendering to make the stereoscopic effect easier on the viewer's eyes without negating the refractive and/or reflective effects.

In one implementation, a method of rendering a stereoscopic image of a 3-D environment is disclosed. The method includes: tracing a path of ray from a camera to a light source for every pixel in a view window; determining shading of all pixels in the view window; and adjusting the shading for all pixels to show horizontal displacement but substantially reduce vertical displacement in the stereoscopic image.

In another implementation, a method of rendering images is disclosed. The method includes: rendering a pair of left and right images of a 3-D environment for viewing by a viewer, comprising: tracing a path of ray from a camera to a light source for every pixel in a view window; determining shading of all pixels of the pair of left and right images, wherein the shading is adjusted to be biased in a horizontal direction such that vertical displacement of objects within the pair of left and right images is substantially reduced.

In yet another implementation, a stereoscopic rendering system is disclosed. The system includes: a stereoscopic renderer configured to render a 3-D image by tracing a path of ray from a camera to a light source for every pixel in a view window of the camera, and determining shading of all pixels in the view window; a shading adjuster configured to adjust the shading for all pixels to show horizontal displacement but substantially reduce vertical displacement in the 3-D image.

In yet another implementation, a non-transitory storage medium storing a computer program to render a stereoscopic image of a 3-D environment is disclosed. The computer program includes executable instructions that cause a computer to: trace a path of ray from a camera to a light source for every pixel in a view window; determine shading of all pixels in the view window; and adjust the shading for all pixels to show horizontal displacement but substantially reduce vertical displacement in the stereoscopic image.

DETAILED DESCRIPTION

Certain implementations as disclosed herein provide for adjusting horizontal and vertical displacements or parallax in 3-D rendering to make the stereoscopic effect easier on the viewer's eyes without negating the refractive and/or reflective effects. After reading this description it will become apparent how to implement the invention in various implementations and applications. Although various implementations of the present invention will be described herein, it is understood that these implementations are presented by way of example only, and not limitation. As such, this detailed description of various implementations should not be construed to limit the scope or breadth of the present invention.

Human eyes are generally about 6 to 7 cm apart, and therefore each eye has a slightly different view of an object. Since the distance between left and right eyes causes a disparity of an image, an image having a stereoscopic effect can be perceived by assembling the disparity in the brain. This principle is basically applied to produce a 3-D image. For example, when the eyes observe a curved object such as a soda can, the brain perceives a similar object from images of the curved object that are respectively observed by the left and right eyes. Further, a depth of the object can be felt by perceiving a parallax difference caused by the differently observed images of the left and right eyes. Thus, a 3-D picture that is comfortable to watch comprises left and right images that make left-right movements with respect to the eye level when switching between the left and right images. However, as described above, a 3-D rendering over curved surface using techniques such as ray tracing may cause undesirable problems for viewers including excessive vertical displacement in the reflected and refracted rays bouncing back to the viewers.

Referring toFIG. 1, for example, when the eyes102,104observe a spherical object100, the brain perceives a similar object from images of the spherical object100that are respectively observed by the left102and right104eyes. In actual implementations, the left102and right eyes104represent two cameras separated by an appropriate distance to provide depth to the objects. Accurate 3-D rendering (using, for example, ray tracing) of a spherical object100produces vertical displacement130as well as horizontal displacement120with respect to the eye level plane110of the viewer (or camera axis horizontal plane) when switching140between left112and right images114. However, long term exposure to the vertical displacements130may cause dizziness, headache, or other uncomfortable feelings for the viewer.

FIG. 2is a flowchart illustrating a stereoscopic rendering technique200in accordance with one implementation of the present invention. In the illustrated implementation ofFIG. 2, the stereoscopic rendering is performed using a tracing method such as a ray tracing in which 3-D image is rendered by tracing a path of ray from a camera to the light source for every pixel in a view window112,114and determining the color or shading of all pixels in the view window, at box210. To render the 3-D image, the tracing of the ray through the view window112,114should be done for both left102and right104cameras. However, as described above, the displacement between the left and right cameras may include excessive vertical displacement130to cause uncomfortable feelings for the viewer. Accordingly, a shader, which renders the 3-D image (e.g.,114inFIG. 1) by coloring each pixel in the view window112,114, adjusts the color of the pixels to show the horizontal displacement120but substantially reduce or hide the vertical displacement130in the rendered images, at box220. As described above, the shader adjusts the displacements to substantially reduce the vertical displacement130which is defined as vertical movement with respect to the horizontal plane of the camera axis (equivalent to the eye level plane110inFIG. 1). Rendering the stereoscopic images in this manner provides more comfortable experience for the viewer. However, ignoring shading for the vertical displacement completely may cause negation of refractive and/or reflective effects present in the 3-D environment, especially in rendering curved surfaces. Accordingly, when further adjustment is desired to smooth the rendered image and preserve the refractive and/or reflective effects, the shading is adjusted, at box230, to appropriately blend the shading to account for both horizontal and vertical displacements while providing comfortable viewing experience for the viewer, without negating the refractive and/or reflective effects of the 3-D environment. The stereoscopic rendering of the 3-D images is then output, at box240.

In an alternative implementation to the stereoscopic rendering technique200, a pair of left and right images of a 3-D environment is rendered for viewing by a viewer. The alternative technique includes: tracing a path of ray from a camera to a light source for every pixel in a view window; determining shading for all pixels of the pair of left and right images, wherein the shading is adjusted to be biased in a horizontal direction such that vertical displacement of objects within the pair of left and right images is substantially reduced. The alternative technique further includes adjusting the shading in the left and right images to blend the horizontal and vertical displacements to provide a comfortable viewing experience for the viewer without negating refractive and reflective effects of the 3-D environment.

FIG. 3is a functional block diagram of one implementation of a stereoscopic rendering system300. The rendering system300includes a processor340, a stereoscopic renderer310, and a shading adjuster320. A pair of cameras captures a pair of images as a ray of light reflecting from objects within a 3-D environment.

In the illustrated implementation ofFIG. 3, the stereoscopic rendering is performed by the renderer310using, for example, ray tracing in which the image is rendered by tracing a path of ray from the camera to the light source for every pixel in the view window (e.g.,112,114inFIG. 1). The renderer310determines the color or shading of all pixels in the view window. To render the 3-D image, the tracing of the ray through the view window should be done for both left and right cameras. However, as described above, the displacement between the left and right cameras may include excessive vertical displacement to cause uncomfortable feelings for the viewer. In one implementation, the shading adjuster320adjusts the colors of the pixels in the view window to show the horizontal displacement but substantially reduce or hide the vertical displacement in the rendered image. As described above, the shading adjuster320adjusts the displacements to substantially reduce the vertical displacement which defined as vertical movement with respect to the horizontal plane of the camera axis. Adjustments made by the shading adjuster320may include appropriately blending horizontal and vertical shadings to provide comfortable viewing experience for the viewer, without negating the refractive and/or reflective effects of the 3-D environment.FIG. 4Aillustrates a representation of a computer system400and a user402. The user402uses the computer system400to perform various operations described with respect toFIGS. 2 and 3. Thus, the computer system400includes a stereoscopic rendering system490including a shading adjuster.

FIG. 4Bis a functional block diagram illustrating the computer system400hosting the stereoscopic rendering system490. The controller410is a programmable processor and controls the operation of the computer system400and its components. The controller410loads instructions (e.g., in the form of a computer program) from the memory420or an embedded controller memory (not shown) and executes these instructions to control the system. In its execution, the controller410provides the stereoscopic rendering system490as a software system. Alternatively, this system can be implemented as separate hardware components in the controller410or the computer system400.

Memory420stores data temporarily for use by the other components of the computer system400. In one implementation, memory420is implemented as RAM. In one implementation, memory420also includes long-term or permanent memory, such as flash memory and/or ROM.

Non-transitory storage430stores data for use by other components of the computer system400, such as for storing data used by the on set metadata acquisition unit490. In one implementation, storage430is a hard disk drive.

The media device440receives removable media and reads and/or writes data to the inserted media. In one implementation, for example, the media device440is an optical disc drive.

The user interface450includes components for accepting user input from the user402and presenting information to the user402. In one implementation, the user interface450includes a keyboard, a mouse, audio speakers, and a display. The controller410uses input from the user402to adjust the operation of the computer system400.

The I/O interface460includes one or more I/O ports to connect to corresponding I/O devices, such as external storage or supplemental devices (e.g., a printer or a PDA). In one implementation, the ports of the I/O interface460include ports such as: USB ports, PCMCIA ports, serial ports, and/or parallel ports. In another implementation, the I/O interface460includes a wireless interface for communication with external devices wirelessly.

The network interface470includes a wired and/or wireless network connection, such as an RJ-45 or “Wi-Fi” interface (including, but not limited to 802.11) supporting an Ethernet connection.

The computer system400includes additional hardware and software typical of computer systems (e.g., power, cooling, operating system), though these components are not specifically shown inFIG. 4Bfor simplicity. In other implementations, different configurations of the computer system can be used (e.g., different bus or storage configurations or a multi-processor configuration).

The above description of the disclosed implementations is provided to enable any person skilled in the art to make or use the invention. Various modifications to these implementations will be readily apparent to those skilled in the art, and the generic principles described herein can be applied to other implementations without departing from the spirit or scope of the invention. Accordingly, additional implementations and variations are also within the scope of the invention. For example, although the description is directed to adjusting shading in stereoscopic rendering, other parameter(s) in lieu of or in addition to shading, such as hue, can be adjusted to provide the illusion of depth. Further, it is to be understood that the description and drawings presented herein are representative of the subject matter which is broadly contemplated by the present invention. It is further understood that the scope of the present invention fully encompasses other implementations that may become obvious to those skilled in the art and that the scope of the present invention is accordingly limited by nothing other than the appended claims.