U.S. Pat. No. 6,897,865

THREE-DIMENSIONAL IMAGE PROCESSING METHOD AND APPARATUS, READABLE STORAGE MEDIUM STORING THREE-DIMENSIONAL IMAGE PROCESSING PROGRAM AND VIDEO GAME SYSTEM

AssigneeKonami Corporation

Issue DateSeptember 21, 2001

Illustrative Figure

Abstract

Polygons forming a shadow models are sorted into front-facing polygons facing in directions toward a viewpoint of a virtual camera and back-facing polygons facing in directions opposite from the viewpoint of the virtual camera, and a shadow image is created in pixels which are pixels corresponding to the front-facing polygons minus pixels corresponding to the back-facing polygons, thereby realistically and easily creating a shadow on the outer surface of a 3D model. Accordingly, in the case that part or all the 3D model such as a character is placed in a shadow of a mountain, a building or the like, a shadow can be realistically and easily created on the outer surface of the 3D model.

Description

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS OF THE PRESENT INVENTION FIG. 1is a block diagram showing one embodiment of a video game system according to the present invention. This game system1is provided with a main game unit, a television (TV) monitor2for outputting images of a game, an amplifying circuit3and a loudspeaker4for outputting sound effects and the like during a game, and a storage medium5storing game data including image data, sound data and program data. The storage medium5may be a so-called ROM cassette in which a ROM storing the game data and a program data of an operating system is contained in a plastic casing, an optical disk, a flexible disk. Depending on the mode of the game system1, a built-in type ROM or the like may be used. The main game unit is constructed such that buses7including address busses, data buses and control buses are connected with a CPU6; a RAM8, interface circuits9,10, a signal processor11, an image processor12, and interface circuits13,14are connected with the buses7; a controller16is connected with the interface circuit10via an operational information interface circuit15; a digital-to-analog (D/A) converter17is connected with the interface circuit13; and a D/A converter18is connected with the interface circuit14. A memory unit19is constructed by the RAM8, the interface circuit9and the storage medium5; a control unit20for controlling the progress of the game is constructed by the CPU6, the signal processor11and the image processor12; an operation input unit21is constructed by the interface circuit10, the operational information interface circuit15and the controller16; an image display unit22is constructed by the TV monitor2, the interface circuit13and the D/A converter17; and a sound output unit23is constructed by the amplifying circuit3, the loudspeaker4, the interface circuit14and the D/A converter18. The signal processor11mainly performs calculation of positions of characters in a simulated 3D sp ace, calculation to transform a position in the ...

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS OF THE PRESENT INVENTION

FIG. 1is a block diagram showing one embodiment of a video game system according to the present invention.

This game system1is provided with a main game unit, a television (TV) monitor2for outputting images of a game, an amplifying circuit3and a loudspeaker4for outputting sound effects and the like during a game, and a storage medium5storing game data including image data, sound data and program data. The storage medium5may be a so-called ROM cassette in which a ROM storing the game data and a program data of an operating system is contained in a plastic casing, an optical disk, a flexible disk. Depending on the mode of the game system1, a built-in type ROM or the like may be used.

The main game unit is constructed such that buses7including address busses, data buses and control buses are connected with a CPU6; a RAM8, interface circuits9,10, a signal processor11, an image processor12, and interface circuits13,14are connected with the buses7; a controller16is connected with the interface circuit10via an operational information interface circuit15; a digital-to-analog (D/A) converter17is connected with the interface circuit13; and a D/A converter18is connected with the interface circuit14.

A memory unit19is constructed by the RAM8, the interface circuit9and the storage medium5; a control unit20for controlling the progress of the game is constructed by the CPU6, the signal processor11and the image processor12; an operation input unit21is constructed by the interface circuit10, the operational information interface circuit15and the controller16; an image display unit22is constructed by the TV monitor2, the interface circuit13and the D/A converter17; and a sound output unit23is constructed by the amplifying circuit3, the loudspeaker4, the interface circuit14and the D/A converter18.

The signal processor11mainly performs calculation of positions of characters in a simulated 3D sp ace, calculation to transform a position in the simulated 3D space to the one in a two-dimensional (2D) space, light source calculation, and reading and combination of various sound data.

The image processor12positions polygons forming an image to be formed in a display area of the RAM8and applies rendering such as texture mapping to these polygons based on the calculation result of the signal processor11.

The controller16is provided with various buttons for selecting game contents, instructing the start of the game, and instructing actions, direction, etc. to a main character.

The mode of the game system1differs depending on its application. Specifically, the TV monitor2, the amplifying circuit3and the loudspeaker4are separate from the main game unit in the case that the game system1is constructed for home use, whereas all the elements shown inFIG. 1are contained as a unit in one casing in the case that the game system1is constructed for business use.

In the case that the game system1is constructed with a personal computer or a workstation as a core, the TV monitor2corresponds to a computer display, the image processor12corresponds to part of the game program data stored in the storage medium5or hardware on an extension board mounted on an extension slot of the computer, and the interface circuits9,10,13,14, the D/A converters17,18, and the operational information interface circuit15correspond to hardware on the extension board mounted on the extension slot of the computer. Further, the RAM8corresponds to a main memory of the computer or the respective areas of an extension memory.

A case where the game system1is constructed for home use is described below.

First, the operation of the game system1is briefly described. When a power switch (not shown) is turned on to activate the video game system1, the CPU6reads image data, sound data and game program data from the storage medium5in accordance with the operating system stored in the storage medium5. All or part of the read image data, sound data and game program data are stored in the RAM8.

Thereafter, the game is proceeded by the CPU6in accordance with the game program data stored in the RAM8and contents of instructions given by a game player via the controller16. In other words, commands as tasks for forming images and outputting sounds are suitably generated in accordance with contents of instructions given by the game player via the controller16.

The signal processor11performs calculation of positions of characters in the 3D space (of course the same applies for the 2D space), a light source calculation, reading and combination of various sound data in accordance with these commands.

Subsequently, the image processor12writes the image data to be formed in the display area of the RAM8based on the calculation result of the signal processor11. The image data written in the RAM8is supplied via the interface circuit13to the D/A converter17, which then supplies the image data to the TV monitor2to display it as an image on the screen of the TV monitor2after converting it into an analog video signal.

FIG. 2is a block diagram showing an essential portion of a 3D image processing apparatus. The signal processor11includes a polygon sorting section111for sorting polygons forming a shadow model into front-facing polygons facing in directions toward a viewpoint of a virtual camera and back-facing polygons facing in directions opposite from the viewpoint of the virtual camera. The image processor12includes a model image creating section121for applying rendering to a model, an image writing section122for writing the image data obtained by rendering in a frame buffer8ato be described later while being related to Z-values to be stored in a Z-value memory8b, and a shadow creating section123for creating a shadow on the outer surface of a 3D model.

Here, a shadow model (shadow volume) is a polygon model expressing an area which is so set in the simulated 3D space as to correspond to a position and a size of a mountain, building or the like for which a shadow is to be created and a propagating direction of rays from a light source, etc. If an object such as a character is located in this area, a shadow is thrown onto the outer surface of this object.

The polygon sorting section111calculates inner products of normal vectors of the surfaces of the polygons forming the shadow model and a camera viewing vector, and sorts the respective polygons into back-facing polygons whose inner products are positive and front-facing polygons whose inner products are not positive.

The model image creating section121applies texture mapping and rendering to all the models except the shadow model located in the simulated 3D space to form an image of all the models except the shadow model.

The image writing section122writes the image formed by the model image creating section121in the frame buffer8ain the form of frame color data which are color data of the respective pixels and writes Z-values, i.e. distances to the polygons corresponding to the respective pixels from the viewpoint of the virtual camera in the simulated 3D space, in the Z-value memory8b.

The shadow creating section123creates a shadow image of the 3D model by subtracting the color data of the shadow model from the frame color data of the pixel stored in the frame buffer8afor the pixels (shadow creating pixels) which are pixels corresponding to the front-facing polygons of the shadow model whose distances from the viewpoint of the virtual camera in the simulated three-dimensional space are smaller than the Z-value of the corresponding pixels minus pixels corresponding to the back-facing polygons of the shadow model whose distances from the viewpoint of the virtual camera in the simulated three-dimensional space are smaller than the Z-value of the corresponding pixels. In other words, the shadow image is created in pixels which are pixels corresponding to the back surfaces of the shadow model excluding from those corresponding to the front surfaces thereof.

The RAM8includes a camera viewing data section81for storing vector data representing the viewpoint and viewing direction of the virtual camera, and a shadow model data storage82for storing pieces of information on the shadow model. The frame buffer8ais adapted to store the frame color data which are color data of each pixel of the image obtained by applying rendering, and a Z-value memory8bis adapted to store distances Z between the viewpoint of the virtual camera and the polygons corresponding to the respective pixels in the simulated 3D space.

The shadow model data storage82is provided with a color data section821for storing the color data of the shadow model, a normal vector data section822for storing normal vectors of the respective polygons forming the shadow model, and a vertex coordinate data section823for storing the coordinates of the respective vertices of the respective polygons forming the shadow model.

FIG. 3is a flow chart showing a summary of a 3D image processing for displaying a polygon model located in the simulated 3D space on the monitor after applying rendering thereto and for applying an image processing to create a shadow image on the outer surface of a 3D model. First, the model image creating section121applies texture mapping and rendering to the respective models located in the simulated 3D space except a shadow model, thereby forming an image of all the models except the shadow model (Step ST1). The image writing section122writes color data of the respective pixels of this image in the frame buffer8aand Z-values of the respective pixels thereof in the Z-value memory8b. The color data of the respective pixels written in the frame buffer8aare referred to as frame color data.

Subsequently, the polygon sorting section111calculates inner products of surface normal vectors of the respective polygons forming the shadow model and a camera viewing vector (Step ST3) and discriminates whether the calculated inner products are positive or not (Steps ST5, ST8). The polygons whose inner products are positive are discriminated as back-facing polygons while those whose inner products are not positive are discriminated as front-facing polygons. As is clear from a calculation procedure, the front-facing polygons are those facing in directions toward the viewpoint of the virtual camera and the back-facing polygons are those facing in directions opposite from the viewpoint of the virtual camera.

Subsequently, for each pixel to which the back-facing polygon is to be adhered, a distance between the back-facing polygon at this pixel position and the viewpoint of the virtual camera in the simulated 3D space and the Z-value of this pixel stored in the Z-value memory8bare compared, and the color data of the shadow model is added to the frame color data of this pixel if the former is smaller than the latter (Step ST7). For each pixel to which the front-facing polygon is to be adhered, a distance between the front-facing polygon at this pixel position and the viewpoint of the virtual camera in the simulated 3D space and the Z-value of this pixel stored in the Z-value memory8bare compared, and the color data of the shadow model is subtracted from the frame color data of this pixel if the former is smaller than the latter (Step ST9). Here, since the addition precedes, an excessive fall of the color data below a lower limit by the subtraction (carry down) can be prevented. It should be noted that the operations in Steps ST7and ST9are performed by the shadow creating section123and the data in the Z-value memory8bare not rewritten thereby. The color data of the shadow model is subtracted from the frame color data at the positions of the pixels (shadow creating pixels) which are pixels corresponding to the front surfaces of the shadow model minus those corresponding to the back surfaces thereof, thereby creating a shadow image on the outer surface of the 3D model.

FIG. 4is a diagram showing one example in which a shadow image is created on the outer surface of a 3D model partly located within a shadow model. In the case that a cylindrical solid M is placed on a plane P and a light propagates in direction of a light source vector V, a shadow model M0of the solid M is, for example, formed into a substantially triangular column as shown. The shadow model M0is comprised of front-facing polygons M01and back-facing polygons M02.

As shown inFIG. 4(FIGS. 5 and 6representing plan and side views thereof, respectively, for showing relative location of a viewpoint C for the perspective view of FIG.4), if part of a solid N in the form of a rectangular column is located within the shadow model M0, the front-facing polygons M01are located more toward the viewpoint C of the virtual camera than the solid N, and most of the back-facing polygons M02are located more toward the viewpoint than the solid N while part of the back-facing polygons M02are located at a side of the solid N opposite from the viewpoint C of the virtual camera. Specifically, pixels where a shadow image K are formed are those of the pixels at the positions of the back-facing polygons defined as follows. For each of those pixels, a distance between the back-facing polygon at the position of this pixel and the viewpoint C of the virtual camera and the Z-value (distance between the solid M, N or the plane P and the viewpoint of the virtual camera) of this pixel stored in the Z-value memory8bare compared, and the color data of the shadow model is not added to the frame color data of this pixel, since the former distance is larger than the latter. As shown inFIG. 4, shadow pixels, i.e. those of which form shadow image K are pixels corresponding to the front-facing polygons of the shadow model whose distances from the viewpoint of the virtual camera in the simulated three-dimensional space are smaller than the Z-values of the corresponding pixels, while excluding pixels corresponding to the back-facing polygons of the shadow model whose distances from the viewpoint of the virtual camera in the simulated three-dimensional space are smaller than the Z-values of the corresponding pixels. These excluded pixels which, as shown inFIG. 4, define a portion L of solid N which exits rearwardly of the shadow model, i.e., which is made up of pixels with a Z-value greater than a distance between the viewpoint C of the virtual camera and the back-facing polygon corresponding to the pixels, and therefore do not have a shadow cast thereupon.

The present invention may also be embodied as follows.

(A) Although there is only one shadow model in the foregoing embodiment, shadow images can be created in a similar procedure even if there are two or more shadow models. However, it is necessary to secure an area of the shadow model data82for the number of the shadow models. The more the shadow models, the more realistic an image can be made.

(B) Although the shadow model has the normal vectors of the polygons in the foregoing embodiment, it may have vertex vectors of the respective vertices of the polygons. The normal vector of the polygon can be calculated by, for example, adding and averaging the normal vectors of the respective vertices of the polygon.

(C) Although the shadow image is created by subtracting the color data of the shadow model from the frame color data for the pixels which are those corresponding to the front-facing polygons of the shadow model minus those corresponding to the back-facing polygons in the foregoing embodiment, the shadow image may be created by changing the frame color data of these pixels. In such a case, color tone can also be changed in addition to the density of the shadow.

(D) Although the shadow image is created by subtracting the color data of the shadow model from the frame color data for the pixels which are those corresponding to the front-facing polygons of the shadow model minus those corresponding to the back-facing polygons in the foregoing embodiment, the frame color data may be changed by a method for subtracting a predetermined value independent of the color data of the shadow model from the frame color data of the above pixels. According to this method, the predetermined value may be added to the frame color data of the pixels corresponding to the back-facing polygons of the shadow model after being subtracted from the frame color data of the pixels corresponding to the front-facing polygons of the shadow model or in a reversed procedure. In this case, it is not necessary to store the color data of the shadow model, and color tone can also be changed in addition to the density of the shadow.

(E) Although the shadow image is created by subtracting the color data of the shadow model from the frame color data for the pixels which are those corresponding to the front-facing polygons of the shadow model minus those corresponding to the back-facing polygons in the foregoing embodiment, the frame color data may be changed by a method for multiplying the frame color data of the above pixels by a predetermined value independent of the color data of the shadow model. According to this method, the frame color data of the pixels corresponding to the back-facing polygons of the shadow model may be divided by the predetermined value (e.g. 0.5) after the frame color data of the pixels corresponding to the front-facing polygons of the shadow model are multiplied by it or in a reversed procedure. In this case, it is not necessary to store the color data of the shadow model, and color tone can also be changed in addition to the density of the shadow.

(F) Although the shadow image is created by subtracting the color data of the shadow model from the frame color data for the pixels which are those corresponding to the front-facing polygons of the shadow model minus those corresponding to the back-facing polygons in the foregoing embodiment, the shadow image may be created by applying a specified semitransparent processing to these pixels. In this case, it is not necessary to store the color data of the shadow model.

(G) Although the color data of the shadow model is subtracted from the frame color data of the pixels corresponding to the back-facing polygons of the shadow model after being added to the frame color data of the pixels corresponding to the front-facing polygons of the shadow model in the foregoing embodiment, the procedure may be reversed. In such a case, since the addition precedes, an excessive fall of the color data below a lower limit by the subtraction (carry down) can be prevented.

(H) Although the color data of the shadow model is stored separately from the coordinates of the vertices in the foregoing embodiment, these data may be stored as vertex color data. In this case, the shadow model can be stored in a data structure similar to that of a usual polygon model.

(I) Although the shadow model data and other data are stored in the RAM8in the foregoing embodiment, they may be transferred from the storage medium5to the RAM8according to the progress of the game. This embodiment has an advantage that a necessary capacity of the RAM8can be reduced.

As described above, according to the present invention, the shadow image thrown on the outer surface of the 3D model can be obtained by creating the shadow image in the pixels which are pixels corresponding to the front-facing polygons of the shadow model minus pixels corresponding to the back-facing polygons. Thus, the shadow image thrown on the outer surface of the 3D model can be more realistically and easily created. Further, since the front-facing polygons and the back-facing polygons can be sorted out by calculating the inner products of the vectors, sorting can be easily realized.

In sum, a three-dimensional image processing apparatus for creating a shadow image on the outer surface of a 3D model using a shadow model formed by a plurality of polygons, comprises: a shadow model storage means for storing at least coordinates of vertices of the shadow model, a polygon sorting means for sorting the polygons forming the shadow model into front-facing polygons facing in directions toward a viewpoint of a virtual camera and back-facing polygons facing in directions opposite from the viewpoint of the virtual camera, and a shadow image creating means for creating the shadow image in pixels which are pixels corresponding to the front-facing polygons minus those corresponding to the back-facing polygons.

With this construction, the shadow image thrown on the outer surface of the 3D model is obtained by being created in the pixels which are pixels corresponding to the front-facing polygons of the shadow model minus pixels corresponding to the back-facing polygons. Thus, the shadow image thrown on the outer surface of the 3D model can be realistically and easily created.

In the aforementioned three-dimensional image processing apparatus, it is preferable that the shadow model storage means stored normal vectors of the respective polygons forming the shadow model, and the polygon sorting means sorts the respective polygon forming the shadow model into the front-facing polygons and the back-facing polygons based on whether an inner product of the normal vector of each polygon and a camera viewing vector representing a viewing direction of the virtual camera is a positive or negative value. With this construction, the polygon can be easily sorted into the front-facing polygons and the back-facing polygons by calculating the inner products of the vectors.

The aforementioned three-dimensional image processing apparatus may further comprise model image creating means for creating an image by applying rendering to a polygon model except the shadow model, and model image storage means for storing the image created by the model image creating means while relating frame color data which are color data of pixels to Z-values which are distances to the polygons corresponding to the respective pixels from the viewpoint of the virtual camera in a simulated three-dimensional space, wherein the shadow creating means changes the frame color data of the pixels stored in the model image storage means for shadow creating pixels which are pixels corresponding to the front-facing polygons of the shadow model whose distances from the viewpoint of the virtual camera in the simulated three-dimensional space are smaller than the Z-values of the corresponding pixels minus pixels corresponding to the back-facing polygons of the shadow model whose distances from the viewpoint of the virtual camera in the simulated three-dimensional space are smaller than the Z-values of the corresponding pixels. With this construction, an entire image including the shadow image created on the outer surface of the 3D model can be realistically and easily created, and the density and the like of the shadow can be changed by changing the frame color data.

In the aforementioned three-dimensional image processing apparatus, the shadow creating means can be set to subtract a predetermined value from the frame color data of the shadow creating pixels which are stored in the model image storage means. With this construction, an entire image including the shadow image created on the outer surface of the 3D model can be realistically and easily created, and the density and the like of the shadow can be changed by changing the predetermined value to be subtracted from the frame color data.

In the aforementioned three-dimensional image processing apparatus, wherein the shadow creating means may be set to multiply the frame color data of the shadow creating pixels which are stored in the model image storage means by a predetermined value. With this construction, an entire image including the shadow image created on the outer surface of the 3D model can be realistically and easily created, and the density and the like of the shadow can be changed by changing the predetermined value to multiply the frame color data.

In the aforementioned three-dimensional image processing apparatus, wherein the shadow model storage means may be set to store a single color data of the shadow model and the shadow creating means subtracts the color data of the shadow model from the frame color data of the shadow creating pixels which are stored in the model image storage means. With this construction, an entire image including the shadow image created on the outer surface of the 3D model can be realistically and easily created, and the density and the like of the shadow can be changed by increasing and decreasing the frame color data.

In the aforementioned three-dimensional image processing apparatus, the 3D model can be a character movable in a simulated three-dimensional space. With this construction, the shadow thrown on the outer surface of the movable character can be created, thereby enabling creation of realistic images.

In addition, the present invention also relates to a readable storage medium which stores a three-dimensional image processing program for creating a shadow image on the outer surface of a 3D model using a shadow model formed by a plurality of polygons. The stored program comprises the steps of: storing at least coordinates of vertices of the shadow model, sorting the polygons forming the shadow model into front-facing polygons facing in directions toward a viewpoint of a virtual camera and back-facing polygons facing in directions opposite from the viewpoint of the virtual camera, and creating the shadow images in pixels which are pixels corresponding to the front-facing polygons minus those corresponding to the back-facing polygons. According to this program, the shadow image thrown on the outer surface of the 3D model is obtained by being created in the pixels which are pixels corresponding to the front-facing polygons of the shadow model minus pixels corresponding to the back-facing polygons. Thus, the shadow image thrown on the outer surface of the 3D model can be realistically and easily created.

In the aforementioned readable storage medium, the normal vectors of the respective polygons forming the shadow model can be stored, and the polygon sorting processing can be performed to sort the respective polygon forming the shadow model into the front-facing polygons and the back-facing polygons based on whether an inner product of the normal vector of each polygon and a camera viewing vector representing a viewing direction of the virtual camera is a positive or negative value. According to this program, the polygon can be easily sorted into the front-facing polygons and the back-facing polygons by calculating the inner products of the vectors.

In the aforementioned readable storage medium, the program may further comprise a model image creating processing for creating an image by applying rendering to a polygon model except the shadow model, and a storing processing for storing the image created by the model image creating processing while relating frame color data which are color data of pixels to Z-values which are distances to the polygons corresponding to the respective pixels from the viewpoint of the virtual camera in a simulated three-dimensional space, wherein, during the shadow image creating processing, the frame color data of the pixels stored in the model image storage means are changed for shadow creating pixels which are pixels corresponding to the front-facing polygons of the shadow model whose distances from the viewpoint of the virtual camera in the simulated three-dimensional space are smaller than the Z-values of the corresponding pixels minus pixels corresponding to the back-facing polygons of the shadow model whose distances from the viewpoint of the virtual camera in the simulated three-dimensional space are smaller than the Z-values of the corresponding pixels. According to this program, an entire image including the shadow image created on the outer surface of the 3D model can be realistically and easily created, and the density and the like of the shadow can be changed by changing the frame color data.

Furthermore, in the aforementioned readable storage medium, a predetermined value can be subtracted from the frame color data of the shadow creating pixels which are stored in the model image storage means during the shadow image creating processing. According to this program, an entire image including the shadow image created on the outer surface of the 3D model can be realistically and easily created, and the density and the like of the shadow can be changed by changing the predetermined value to be subtracted from the frame color data.

Moreover, in the aforementioned readable storage medium, the frame color data of the shadow creating pixels which are stored in the model image storage means can be multiplied by a predetermined value during the shadow image creating processing. According to this program, an entire image including the shadow image created on the outer surface of the 3D model can be realistically and easily created, and the density and the like of the shadow can be changed by changing the predetermined value to multiply the frame color data.

Moreover, in the aforementioned readable storage medium, a single color data of the shadow model can be stored, and the color data of the shadow model can be subtracted from the frame color data of the shadow creating pixels which are stored in the model image storage means during the shadow image creating processing. According to this program, an entire image including the shadow image created on the outer surface of the 3D model can be realistically and easily created, and the density and the like of the shadow can be changed by increasing and decreasing the frame color data.

Yet moreover, in the aforementioned readable storage medium, the 3D model can be a character movable in a simulated three-dimensional space. According to this program, the shadow thrown on the outer surface of the movable character can be created, thereby enabling creation of realistic images.

The present invention also relates to a three-dimensional image processing method for creating a shadow image on the outer surface of a 3D model using a shadow model formed by a plurality of polygons. The method comprising the steps of: storing at least coordinates of vertices of the shadow model, sorting the polygons forming the shadow model into front-facing polygons facing in directions toward a viewpoint of a virtual camera and back-facing polygons facing in directions opposite from the viewpoint of the virtual camera, and creating the shadow images in pixels which are pixels corresponding to the front-facing polygons minus those corresponding to the back-facing polygons. According to this method, the shadow image thrown on the outer surface of the 3D model is obtained by being created in the pixels which are pixels corresponding to the front-facing polygons of the shadow model minus pixels corresponding to the back-facing polygons. Thus, the shadow image thrown on the outer surface of the 3D model can be realistically and easily created.

In addition, the present invention also relates to a video game system which comprises: one of the forms of the aforementioned three-dimensional image processing apparatuses, an image display means for displaying an image including a shadow image on the outer surface of a 3D model, a program storage means for storing a game program data, and an externally operable operation means, wherein the three-dimensional image processing apparatus displays images on the image display means in accordance with the game program data. Such a video game system can realistically and easily create the shadow image thrown on the outer surface of the 3D model using the shadow model.

This application is based on Japanese patent application serial no. 2000-290170 filed in Japanese Patent Office on Sep. 25, 2000, the contents of which are hereby incorporated by reference.

As this invention may be embodied in several forms without departing from the spirit of essential characteristics thereof, the present embodiment is therefore illustrative and not restrictive, since the scope of the invention is defined by the appended claims rather than by the description preceding them, and all changes that fall within metes and bounds of the claims, or equivalence of such metes and bounds are therefore intended to be embraced by the claims.

Claims

  1. A three-dimensional image processing apparatus for creating a shadow image on an outer surface of a 3D model using a shadow model formed by a plurality of polygons, comprising: shadow model storage means for storing at least coordinates of vertices of the shadow model;polygon sorting means for sorting the polygons forming the shadow model into front-facing polygons facing in directions toward a viewpoint of a virtual camera and back-facing polygons facing in directions opposite from the viewpoint of the virtual camera;model image creating means for creating an image by applying rendering to a polygon model except the shadow model;model image storage means for storing the image created by the model image creating means while relating frame color data, which are color data of pixels, to Z-values, which are distances to the polygons corresponding to the respective pixels, from the viewpoint of the virtual camera in a simulated three-dimensional space;and shadow creating means for creating the shadow image in pixels which are pixels corresponding to the front-facing polygons by changing the frame color data of the pixels stored in the model image storage means for shadow creating pixels which are: a first set of pixels corresponding to the front-facing polygons of the shadow model whose distances from the viewpoint of the virtual camera in the simulated three-dimensional space are smaller than the Z-values of the corresponding pixels, and excluding a second set of pixels corresponding to the back-facing polygons of the shadow model whose distances from the viewpoint of the virtual camera in the simulated three-dimensional space are smaller than the Z-values of the corresponding pixels;said shadow creating means including means for performing an operation on said frame color data of first set of pixels which is either one of addition and subtraction of a predetermined value thereby creating modified frame color data, and for performing an additional operation on said modified frame color data of said second set of pixels which is an opposite operation of said one of addition and subtraction using said predetermined value, whereby said operation alters initial frame color data values of said first set of pixels as indicative of being the shadow creating pixels, and said second set of pixels is effectively excluded as said shadow creating pixels by a cancellation of said first operation by performance of said additional operation equal and opposite in value thereto.
  1. A three-dimensional image processing apparatus according to claim 1 , wherein the shadow model storage means stores normal vectors of the respective polygons forming the shadow model, and the polygon sorting means sorts the respective polygon forming the shadow model into the front-facing polygons and the back-facing polygons based on whether an inner product of the normal vector of each polygon and a camera viewing vector representing a viewing direction of the virtual camera is a positive or negative value.
  2. A three-dimensional image processing apparatus according to claim 1 , wherein the shadow creating means subtracts the predetermined value from the modified frame color data of the shadow creating pixels which are stored in the model image storage means.
  3. A three-dimensional image processing apparatus according to claim 1 , wherein the shadow creating means multiplies the frame color data of the shadow creating pixels which are stored in the model image storage means by a predetermined value.
  4. A three-dimensional image processing apparatus according to claim 1 , wherein the shadow model storage means stores a single color data of the shadow model and the shadow creating means subtracts the color data of the shadow model from the modified frame color data of the shadow creating pixels which are stored in the model image storage means.
  5. A three-dimensional image processing apparatus according to claim 1 , wherein the 3D model is a character movable in a simulated three-dimensional space.
  6. A readable storage medium storing a three-dimensional image processing program for creating a shadow image on the outer surface of a 3D model using a shadow model formed by a plurality of polygons, the program comprising the steps of: storing at least coordinates of vertices of the shadow model;sorting the polygons forming the shadow model into front-facing polygons facing in directions toward a viewpoint of a virtual camera and back-facing polygons facing in directions opposite from the viewpoint of the virtual camera;creating an image by applying rendering to a polygon model except the shadow model;storing the image created by the model image creating means while relating frame color data, which are color data of pixels, to Z-values, which are distances to the polygons corresponding to the respective pixels, from the viewpoint of the virtual camera in a simulated three-dimensional space;and creating the shadow images in pixels which are pixels corresponding to the front-facing polygons by changing the frame color data of the pixels stored in the model image storage means for shadow creating pixels which are: a first set of pixels corresponding to the front-facing polygons of the shadow model whose distances from the viewpoint of the virtual camera in the simulated three-dimensional space are smaller than the Z-values of the corresponding pixels, and excluding a second set of pixels corresponding to the back-facing polygons of the shadow model whose distances from the viewpoint of the virtual camera in the simulated three-dimensional space are smaller than the Z-values of the corresponding pixels;said step of creating including performing an operation on said frame color data of first set of pixels which is either one of addition and subtraction of a predetermined value thereby creating modified frame color data, and performing an additional operation on said modified frame color data of said second set of pixels which is an opposite operation of said one of addition and subtraction using said predetermined value, whereby said operation alters initial frame color data values of said first set of pixels as indicative of being the shadow creating pixels, and said second set of pixels is effectively excluded as said shadow creating pixels by a cancellation of said first operation by performance of said additional operation equal and opposite in value thereto.
  7. A readable storage medium according to claim 7 , wherein normal vectors of the respective polygons forming the shadow model are stored, and the polygon sorting processing is performed to sort the respective polygon forming the shadow model into the front-facing polygons and the back-facing polygons based on whether an inner product of the normal vector of each polygon and a camera viewing vector representing a viewing direction of the virtual camera is a positive or negative value.
  8. A readable storage medium according to claim 7 , wherein the predetermined value is subtracted from the modified frame color data of the shadow creating pixels which are stored in the model image storage means during the shadow image creating processing.
  9. A readable storage medium according to claim 7 , wherein the frame color data of the shadow creating pixels which are stored in the model image storage means are multiplied by a predetermined value during the shadow image creating processing.
  10. A readable storage medium according to claim 7 , wherein a single color data of the shadow model is stored, and the color data of the shadow model is subtracted from the modified frame color data of the shadow creating pixels which are stored in the model image storage means during the shadow image creating processing.
  11. A readable storage medium according to claim 7 , wherein the 3D model is a character movable in a simulated three-dimensional space.
  12. A three-dimensional image processing method for creating a shadow image on the outer surface of a 3D model using a shadow model formed by a plurality of polygons, the method comprising the steps of: storing at least coordinates of vertices of the shadow model;sorting the polygons forming the shadow model into front-facing polygons facing in directions toward a viewpoint of a virtual camera and back-facing polygons facing in directions opposite from the viewpoint of the virtual camera;creating an image by applying rendering to a polygon model except the shadow model;storing the image created by the model image creating means while relating frame color data, which are color data of pixels, to Z-values, which are distances to the polygons corresponding to the respective pixels, from the viewpoint of the virtual camera in a simulated three-dimensional space;and creating the shadow images in pixels which are pixels corresponding to the front-facing polygons by changing the frame color data of the pixels stored in the model image storage means far shadow creating pixels which are: a first set of pixels corresponding to the front-facing polygons of the shadow model whose distances from the viewpoint of the virtual camera in the simulated three-dimensional space are smaller than the Z-values of the corresponding pixels, and excluding a second set of pixels corresponding to the back-facing polygons of the shadow model whose distances from the viewpoint of the virtual camera in the simulated three-dimensional space are smaller than the Z-values of the corresponding pixels;said step of creating including performing an operation on said frame color data of first set of pixels which is either one of addition and subtraction of a predetermined value thereby creating modified frame color data, and performing an additional operation on said modified frame color data of said second set of pixels which is an opposite operation of said one of addition and subtraction using said predetermined value, whereby said operation alters initial frame color data values of said first set of pixels as indicative of being the shadow creating pixels, and said second set of pixels is effectively excluded as said shadow creating pixels by a cancellation of said first operation by performance of said additional operation equal and opposite in value thereto.
  13. A video game system, comprising: a three-dimensional image processing apparatus for creating a shadow image on the outer surface of a 3D model using a shadow model formed by a plurality of polygons, including: shadow model storage means for storing at least coordinates of vertices of the shadow model;polygon sorting means for sorting the polygons forming the shadow model into front-facing polygons facing in directions toward a viewpoint of a virtual camera and back-facing polygons facing in directions opposite from the viewpoint of the virtual camera;model image creating means for creating an image by applying rendering to a polygon model except the shadow model;model image storage means for storing the image created by the model image creating means while relating frame color data, which are color data of pixels, to Z-values, which are distances to the polygons corresponding to the respective pixels, from the viewpoint of the virtual camera in a simulated three-dimensional space;and shadow image creating means for creating the shadow image in pixels which are pixels corresponding to the front-facing polygons by changing the frame color data of the pixels stored in the model image storage means for shadow creating pixels which are: a first set of pixels corresponding to the front-facing polygons of the shadow model whose distances from the viewpoint of the virtual camera in the simulated three-dimensional space are smaller than the Z-values of the corresponding pixels, and excluding a second set of pixels corresponding to the back-facing polygons of the shadow model whose distances from the viewpoint of the virtual camera in the simulated three-dimensional space are smaller than the Z-values of the corresponding pixels;said shadow image creating means including means for performing an operation on said frame color data of first set of pixels which is either one of addition and subtraction of a predetermined value thereby creating modified frame color data, and for performing an additional operation on said modified frame color data of said second set of pixels which is an opposite operation of said one of addition and subtraction using said predetermined value, whereby said operation alters initial frame color data values of said first set of pixels as indicative of being the shadow creating pixels, and said second set of pixels is effectively excluded as said shadow creating pixels by a cancellation of said first operation by performance of said additional operation equal and opposite in value thereto: image display means for displaying an image including a shadow image on the outer surface of a 3D model;program storage means for storing a game program data;and externally operable operation means;wherein the three-dimensional image processing apparatus displays images on the image display means in accordance with the game program data.

Disclaimer: Data collected from the USPTO and may be malformed, incomplete, and/or otherwise inaccurate.