WO2012043009A1 - 画像処理プログラム及びコンピュータ読み取り可能な記録媒体 - Google Patents

画像処理プログラム及びコンピュータ読み取り可能な記録媒体 Download PDF

Info

Publication number
WO2012043009A1
WO2012043009A1 PCT/JP2011/065601 JP2011065601W WO2012043009A1 WO 2012043009 A1 WO2012043009 A1 WO 2012043009A1 JP 2011065601 W JP2011065601 W JP 2011065601W WO 2012043009 A1 WO2012043009 A1 WO 2012043009A1
Authority
WO
WIPO (PCT)
Prior art keywords
player character
image processing
obstacle
processing program
gazing point
Prior art date
Application number
PCT/JP2011/065601
Other languages
English (en)
French (fr)
Inventor
哲 吉光
Original Assignee
株式会社セガ
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社セガ filed Critical 株式会社セガ
Publication of WO2012043009A1 publication Critical patent/WO2012043009A1/ja
Priority to US13/846,053 priority Critical patent/US9345958B2/en

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • A63F13/525Changing parameters of virtual cameras
    • A63F13/5258Changing parameters of virtual cameras by dynamically adapting the position of the virtual camera to keep a game object or game character in its viewing frustum, e.g. for tracking a character or a ball
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/10Geometric effects
    • G06T15/20Perspective computation
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • A63F13/57Simulating properties, behaviour or motion of objects in the game world, e.g. computing tyre load in a car race game
    • A63F13/573Simulating properties, behaviour or motion of objects in the game world, e.g. computing tyre load in a car race game using trajectories of game objects, e.g. of a golf ball according to the point of impact
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/64Methods for processing data by generating or executing the game program for computing dynamical parameters of game objects, e.g. motion determination or computation of frictional forces for a virtual car
    • A63F2300/643Methods for processing data by generating or executing the game program for computing dynamical parameters of game objects, e.g. motion determination or computation of frictional forces for a virtual car by determining the impact between objects, e.g. collision detection
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/66Methods for processing data by generating or executing the game program for rendering three dimensional images
    • A63F2300/6661Methods for processing data by generating or executing the game program for rendering three dimensional images for changing the position of the virtual camera
    • A63F2300/6676Methods for processing data by generating or executing the game program for rendering three dimensional images for changing the position of the virtual camera by dedicated player input
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/66Methods for processing data by generating or executing the game program for rendering three dimensional images
    • A63F2300/6661Methods for processing data by generating or executing the game program for rendering three dimensional images for changing the position of the virtual camera
    • A63F2300/6684Methods for processing data by generating or executing the game program for rendering three dimensional images for changing the position of the virtual camera by dynamically adapting its position to keep a game object in its viewing frustrum, e.g. for tracking a character or a ball
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/80Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game specially adapted for executing a specific type of game
    • A63F2300/8076Shooting

Definitions

  • the present invention provides video games and CG (Computer).
  • CG Computer
  • the present invention relates to display image generation technology in video and the like.
  • TPS third person shooting game
  • RPG role playing game
  • the virtual camera is often set at a predetermined position behind the player character and facing the front direction of the player character (for example, patents). Reference 1).
  • Patent Document 3 Furthermore, according to the technique disclosed in Patent Document 3, a transmission process for an obstacle is performed, so that an image that cannot be visually recognized is generated. For this reason, there exists a problem that a player impairs the immersive feeling to the game in virtual space.
  • the present invention has been proposed in view of the above-described conventional problems, and an object of the present invention is to generate an image that does not give the player a sense of incongruity or pressure and does not impair the sense of immersion in the game.
  • An image processing program and a computer-readable recording medium are provided.
  • a virtual viewpoint, a gazing point, and a viewing angle are provided in a virtual space in which an object including a player character and an obstacle is arranged as described in claim 1.
  • An image processing program for forming a view frustum based on the image and generating an image of an object arranged inside the view frustum, the computer comprising: orientation and position information of the player character; and position of the obstacle Storage means for storing information, gazing point setting means for setting the gazing point in an area in front of the player character, and a position in the area behind the player character at a predetermined interval from the player character
  • a viewpoint setting means for setting the virtual viewpoint, and determining whether a line segment from the gazing point to the virtual viewpoint intersects the obstacle When the line segment and the obstacle intersect, the virtual viewpoint is reset to the position of the intersection coordinate closest to the gazing point and the line segment and the obstacle intersect.
  • the gist is an image processing program for functioning as a viewing angle enlarging means for
  • the viewing angle enlarging means calculates a distance between the virtual viewpoint set by the viewpoint setting means and the intersection coordinates. As the distance is calculated, the viewing angle can be increased.
  • the image processing program according to claim 2 wherein the storage unit stores vector information of the obstacle, and the viewing angle expansion unit includes the intersection coordinates.
  • the vector information of the obstacle at is read, and the larger the angle formed by the vector from the intersection coordinate to the gazing point GP and the vector of the obstacle, the smaller the angle for expanding the viewing angle.
  • the viewpoint setting means is located at a position to the right rear or left rear of the player character.
  • a virtual viewpoint can be set.
  • the straight line intersects with the obstacle or the enemy character, and the intersection coordinate closest to the virtual viewpoint among the intersecting coordinates is used as a means for setting the arrival position of the projectile to be fired from the player character. be able to.
  • the object includes an enemy character, and further causes the computer to function as means for calculating an expected trajectory of a projectile to be fired forward of the player character based on the orientation and position information of the player character.
  • the gazing point setting means can set, as the gazing point, an intersection coordinate closest to the virtual viewpoint among the intersection coordinates where the predicted trajectory intersects the obstacle.
  • the image processing program and computer-readable recording medium of the present invention can generate an image that does not give the player a sense of incongruity or pressure and does not impair the sense of immersion in the game.
  • FIG. 1 shows an example of a hardware configuration according to the present embodiment.
  • the information processing apparatus 1 of this embodiment is used by being connected to a controller 11 that is an input / output device, a speaker 12 that is an audio output device, and a display monitor 13 that is a display device.
  • the display monitor 13 is configured by a CRT, a liquid crystal display device, or the like, and displays a game screen including a player character, for example.
  • the controller 11 is provided with a cross button, operation buttons, a left joystick, and a right joystick. The player can perform a game operation by performing an input operation on the controller 11.
  • the controller 11 may include an output device such as a vibration generator or a sound generator.
  • a CPU 2 In the information processing apparatus 1, a CPU 2, a main memory 3, a BIOS-ROM 4, a communication interface 5, a storage unit 6, a peripheral interface 7, an audio processing unit 8, and an image processing unit 9 are connected to a bus arbiter 10 via a bus line. Configured.
  • the bus arbiter 10 performs bus arbitration in response to a bus use request from each device connected via the bus line, and controls the data flow.
  • the bus arbiter 10 also has a DMA function for transferring data between devices without using a CPU in response to a request from each device.
  • the bus arbiter 10 includes a high-speed bus arbiter 101 that controls a device that transfers data at a high speed and a low-speed bus arbiter 102 that controls a device that transfers data at a low speed, thereby increasing the data transfer speed of the entire system. Can do.
  • the CPU 2 executes a game program, controls the entire system, calculates coordinates for displaying an image, and the like, and controls the movement of a player character appearing in the game screen, for example, based on an operation signal transmitted from the controller 11. .
  • the game program includes the image processing program according to the present embodiment, and the CPU 2 executes the image processing program so that image processing according to the present embodiment, which will be described later, is performed.
  • the main memory 3 is used as a memory for storing programs and data necessary for the CPU 2 to perform processing.
  • the CPU 2 and the main memory 3 are commonly connected via the high-speed bus arbiter 101.
  • the BIOS-ROM 4 stores a program for starting the information processing apparatus 1 and a system program.
  • the communication interface 5 provides an interface such as a LAN line in order to connect to an external network.
  • the information processing apparatus 1 can communicate with other information processing apparatuses and network servers.
  • the storage unit 6 is configured by a recording medium such as a magnetic disk or an optical disk, and stores a game program and data including the image processing program in the present embodiment.
  • the CPU 2 reads the program and data stored in the storage medium according to the work content to the main memory 3.
  • the data read to the main memory 3 includes, for example, data defining objects including player characters and enemy characters, image data, sound data, and the like. Further, the CPU 2 transfers data recorded on a recording medium having a low data transfer speed to a recording medium having a high data transfer speed such as a magnetic disk, thereby improving the access speed of the entire information processing system.
  • the peripheral interface 7 provides interfaces such as USB, IEEE 1394, serial, parallel, infrared, and wireless for connection with peripheral devices such as the controller 11.
  • the peripheral interface 7 transmits the operation signal transmitted from the controller 11 to the low-speed bus arbiter 102.
  • the peripheral interface 7 can also transmit a vibration signal and a sound signal corresponding to the game situation to the controller 11.
  • the sound processing unit 8 includes a sound controller 81, and the sound controller 81 includes a sound memory 811.
  • the sound processing unit 8 reads sound data stored in the recording unit 6 or the sound memory 811 and generates sound.
  • the sound controller 81 outputs, for example, sound generated according to an operation by the player or a progress of the game to the speaker 13.
  • the image processing unit 9 includes a GPU 91 and a VRAM 92.
  • the VRAM 92 has storage areas such as a frame buffer 921, a texture buffer 922, and a Z buffer 923.
  • the frame buffer 921 is used to store pixel data for one frame for screen display.
  • the texture buffer 922 is used to store image data (texture) as a material when texture mapping is performed on polygons forming an object.
  • the Z buffer 923 is used to store the depth information of the object in each pixel that performs screen display.
  • the image processing unit 9 performs vertex processing based on polygon data (vertex coordinates, texture coordinates, color values, ⁇ values, normal vectors, etc.) forming the object, and performs pixel processing such as rasterization, texture mapping, hidden surface removal, etc. I do.
  • the image processing unit 9 stores the pixel data obtained by the pixel processing in the frame buffer 921.
  • polygons that form objects to be displayed according to the game situation are arranged in the virtual space, and two-dimensional as viewed from the virtual camera VP (virtual viewpoint) by the processing of the GPU 91. Generated by converting to an image.
  • the GPU 91 performs world conversion, light source calculation, view conversion, clipping, projection conversion, viewport conversion, and the like as vertex processing.
  • FIG. 2A shows an example of a view space.
  • the view space is a coordinate space obtained by transforming the world space based on information on the virtual camera VP, the gazing point GP, and the upward direction of the virtual camera VP, and the horizontal axis with respect to the direction of the gazing point GP from the virtual camera VP.
  • the x axis, the vertical axis is the y axis, and the depth is the z axis.
  • a near clip plane CP1 is set on the side close to the virtual camera VP within a range in which the viewing angle is swung in the x-axis direction and the y-axis direction with respect to the direction of the gazing point GP from the virtual camera VP.
  • a far clip plane CP2 is set on the far side.
  • the hexahedron surrounded by the near clip plane CP1 and the far clip plane CP2 and the plane indicating the viewing angle is called a view frustum, and an object placed inside is a drawing target.
  • FIG. 2B shows an example of a projection space that has undergone projective transformation. The view space shown in FIG.
  • 2A is represented by a viewing angle, an aspect ratio, a near clip plane CP1, and a far clip plane CP2. Based on the information, it is converted into a space in the range of ⁇ 1 ⁇ x ⁇ 1, ⁇ 1 ⁇ y ⁇ 1, and 0 ⁇ z ⁇ 1. Then, the vertex shader in the GPU 91 performs viewport conversion on the vertexes of the polygon converted into the projective space, and ends the vertex processing.
  • the GPU 91 performs rasterization and interpolation from polygon, line, and point data assembled by vertex processing as pixel processing.
  • the rasterized and interpolated pixel data is subjected to texture mapping, alpha test, depth test (hidden surface removal) based on depth information, blending, etc., and pixel data arranged on the screen is stored in the frame buffer 921. To do.
  • the display controller 911 in the GPU 91 periodically reads out pixel data recorded in the frame buffer 921 and transmits a video signal to the display monitor 13.
  • FIG. 3 is a diagram illustrating an example of data used for image processing in the information processing apparatus 1.
  • the data includes model related data and temporary data.
  • the model-related data includes player character data, enemy character data, and obstacle data that are objects.
  • the player character data is character data mainly controlled by an operation by the controller 11 from the player, and includes polygon data and face reference coordinates forming the player character.
  • the polygon data includes vertex coordinates, texture coordinates, color values, ⁇ values, and normal vectors, and the same applies to enemy character data and obstacle data described later.
  • the face reference coordinates are, for example, three-dimensional coordinates slightly above the player character's neck.
  • the enemy character data is data of a plurality of characters that are hostile to the player character, and includes polygon data forming the enemy character, face reference coordinates, and an action script.
  • the action script describes the action start condition and action contents of the enemy character. For example, when the CPU 2 determines that the player character has entered within the tracking start distance of the enemy character, the enemy character starts tracking the player character. When the CPU 2 determines that the player character has entered within the attack start distance of the enemy character, the enemy character starts attacking the player character.
  • the obstacle data is data related to a plurality of obstacles such as the ground GR, the wall W, and the ceiling CL that define a range in which the player character and the virtual camera VP cannot move.
  • Polygon data that forms the obstacle, virtual space Contains placement coordinates placed inside.
  • the temporary data is data in the virtual space, and is based on the coordinates and orientation information of the player character and the enemy character, the coordinates of the virtual camera VP (virtual viewpoint), the coordinates of the gazing point GP, the viewing angle ⁇ , and the gazing point GP.
  • the intersection coordinate CC closest to the gazing point GP the vector from the position of the virtual camera VP to the gazing point GP, and the normal of the obstacle at the intersection coordinate CC
  • the angle ⁇ formed by the vector and the value of the distance D between the position of the original virtual camera VP ′ and the position of the new virtual camera VP (intersection coordinate CC) are included.
  • the temporary data includes a value of the viewing angle magnification rate S for enlarging the current viewing angle.
  • the orientation information of the player character and the enemy character corresponds to, for example, the direction of the body or the direction of firing the projectile.
  • FIG. 4 is a diagram showing a screen example of a third person shooting game according to the present invention.
  • FIG. 5 is a view of FIG. 4 as viewed from above, and shows the setting position of the virtual camera VP, the gazing point GP, the viewing angle ⁇ , the position of the player character PC, the front direction (arrow direction), and the like. is there.
  • a player character PC, an enemy character EC, an obstacle object ground GR, walls W1 to W3, and a ceiling CL are arranged in a virtual space.
  • the player character PC is always displayed at the lower left of the screen. This is because the player character is not displayed at the center of the screen as the aiming position. By fixing the aiming position at the center of the screen in this way, the player can easily understand in which direction the player character PC attacks.
  • the gazing point GP is set to the front right (xp, 0, zp) of the player character PC
  • the position of the virtual camera VP is set to the right rear (xv, 0, -zv) of the player character.
  • xp, zp, xv, and zv are positive values, and each value is set so that the player character PC is included in the viewing frustum.
  • the CPU 2 stores the main memory 3 in which the positions of the gazing point GP and the virtual camera VP are returned to the coordinate system in the virtual space.
  • the virtual camera VP is set to one of the rear areas of the player character, and the gazing point GP is set to be shifted to the right or left front of the player character. Also good.
  • the gazing point GP may be set in the front area of the player character, and the position of the virtual camera VP may be set to be shifted to the right rear or left rear of the player character. Further, the position of the virtual camera VP may be set above the player character.
  • the CPU 2 sets the near clip plane CP1 and the far clip plane CP2 based on the distance from the virtual camera VP to the near clip plane CP1 with respect to the direction of the gazing point GP and the distance to the far clip plane CP2. Further, the CPU 2 sets the viewing angle ⁇ to a preset reference viewing angle ⁇ a, and forms a viewing frustum by the near clip plane CP1, the far clip plane CP2, and the view angle ⁇ a. At this time, each value is set so that the player character is included in the view frustum, and the near clip plane CP1 is set in the vicinity of the virtual camera VP as shown in FIG. CP2 is set far away (not shown).
  • the player can move the position of the player character by operating the left joystick of the controller 11, and can change the direction of the player character by operating the right joystick. That is, the player can move the player character not only in the front direction but also in the rear and left / right directions.
  • the CPU 2 updates the three-dimensional coordinates of the player character's face reference coordinates and the orientation information stored in the main memory 3, and the player character's face reference coordinates described above. , And the coordinate system based on the orientation is calculated, and the coordinate positions of the gazing point GP and the virtual camera VP are reset.
  • the player can fire a projectile such as a bullet fired from the weapon of the player character from the virtual camera VP to an arrival position on a straight line passing through the gazing point GP by operating the operation button of the controller 11. it can.
  • This arrival position is the aiming position in the center of the screen in FIG.
  • the arrival position at which a projectile such as a bullet arrives is an intersection coordinate where a straight line passing through the gazing point GP from the virtual camera VP intersects the object, and the position of the virtual camera VP.
  • the CPU 2 may reset the gazing point GP to the intersection coordinate CB or the coordinate of the enemy character and perform lock-on.
  • the CPU 2 calculates the expected trajectory of the projectile from the position of the player character in the front direction, and when there is an enemy character in the expected trajectory, the CPU 2 resets the gazing point GP to the coordinates of the enemy character. Also good. Thereby, even a beginner can easily aim at an enemy character. Then, the CPU 2 determines whether a projectile such as a bullet has reached the enemy character or obstacle, and reflects it in the game progress.
  • the virtual camera VP on the right rear side of the player character may collide with the wall surface and further pass through the wall surface.
  • FIG. 6 is a view of the state in which the virtual camera VP is positioned over the wall as viewed from above.
  • the virtual camera VP is located behind the wall W4 behind the player character PC. Therefore, if this state is drawn as it is, the wall W4 is positioned between the virtual camera VP and the player character PC, so that the entire screen is covered with the wall, and the front surface of the wall W4 to be originally displayed is displayed. The side image cannot be displayed.
  • the virtual camera VP collides with an obstacle such as the wall W4 and is located inside or behind the obstacle, the virtual camera VP is reset to the coordinates that collide with the wall W4, so The image is drawn.
  • FIG. 7 is a view of a virtual space showing a state in which the virtual camera VP is set to coordinates that collide with a wall
  • FIG. 8 is a view showing an example of a screen displayed by the virtual camera VP shown in FIG. It is.
  • FIG. 7 by resetting the virtual camera VP to the coordinate CC that collides with the wall W4 from the original virtual camera VP ′ initially set on the back side of the wall W4, as shown in FIG. , An image of the front side of the wall W4 on which the player character PC and the enemy character EC are located is displayed.
  • the viewing angle ⁇ is enlarged when the virtual camera VP is changed to the coordinates that collide with the wall W4.
  • FIG. 9 is a view of the virtual space showing the state in which the viewing angle is enlarged from above
  • FIG. 10 is a view showing an example of a screen displayed by the virtual camera VP shown in FIG.
  • the viewing angle ⁇ is set to ⁇ b that is larger than a preset reference viewing angle ⁇ a.
  • the drawing range is expanded and the object to be drawn is relatively reduced. Therefore, as shown in FIG. 10, the change in the image caused by abruptly moving the virtual camera VP forward is alleviated, and the sense of discomfort and pressure felt by the player can be suppressed.
  • FIG. 11 is a flowchart for executing the image processing in the present embodiment, and is a process for obtaining the angle of the viewing angle to be enlarged.
  • This image processing is realized by the CPU 2 executing an image processing program.
  • the positions of the virtual camera VP and the gazing point GP and the viewing angle ⁇ are set to ⁇ a (step S101).
  • ⁇ a is a predetermined value, and is a value determined so as to include the player character in the viewing frustum.
  • step S102 If there is an intersection coordinate (Yes in step S102), the coordinate of the intersection coordinate CC closest to the gazing point GP is acquired (S103).
  • the player character PC moves backward and approaches the wall W4 behind, so that the virtual camera VP on the right rear of the player character collides with the wall surface. However, it is a case where it passes over the wall surface.
  • step S104 the normal vector of the obstacle at the intersection coordinate CC is acquired (step S104).
  • step S105 an angle ⁇ formed by the vector from the virtual camera VP to the gazing point GP and the normal vector of the obstacle at the intersection coordinates CC is calculated (step S105).
  • intersection coordinate CC is reset to the position of the new virtual camera VP, and the distance D between the position of the original virtual camera VP and the intersection coordinate CC (the position of the new virtual camera VP) is calculated (step S106).
  • the viewing angle magnification S is calculated from the distance D and the angle ⁇ (step S107).
  • FIG. 12 is a top view of the player character moving in the direction of the arrow and moving to the right.
  • the wall W5 is arranged in the right direction of the player character PC with its normal vector having an angle ⁇ with respect to the vector of the virtual camera VP from the gazing point GP.
  • the virtual camera VP is also moving rightward with the direction of the gazing point GP as the front direction.
  • FIG. 13 is a view seen from above when the virtual camera VP collides with the wall W5 in the right direction after FIG. 12 and the virtual camera VP is reset to the intersection coordinate CC from the original virtual camera VP ′.
  • the virtual camera VP when the virtual camera VP is reset from the original virtual camera VP ′ to the intersection coordinate CC, when the virtual camera VP collides with an obstacle in the right direction, it collides with an obstacle behind.
  • the distance D becomes larger than the case.
  • the backward moving distance of the player character PC is the distance D as it is, but when colliding with the wall W5 with an angle (angle ⁇ > 0).
  • the distance D becomes larger than the moving distance of the player character PC in the right direction.
  • the viewing angle magnification S is adjusted by multiplying the distance D by cos ( ⁇ ).
  • a new viewing angle ⁇ b is calculated from the current viewing angle ⁇ a and the viewing angle expansion rate S (step S108).
  • the virtual camera VP when the vector of the virtual camera VP intersects the obstacle from the gazing point GP due to the movement of the player character, the virtual camera VP is set to the intersection coordinates, and the viewing angle is the angle ⁇ b calculated from the reference angle ⁇ a. To enlarge.
  • the viewing angle enlargement ratio S for calculating the angle of the viewing angle to be enlarged increases as the distance D increases.
  • the viewing angle can be gradually increased. In other words, even when the virtual camera VP cannot move backward due to the obstacle, it is possible to give the player a feeling that the virtual camera VP gradually falls backward (over the obstacle).
  • the viewing angles ⁇ a and ⁇ b may be horizontal viewing angles or vertical viewing angles. If either viewing angle is calculated, the viewing angle ⁇ a and ⁇ b are determined according to a preset aspect ratio. One viewing angle can be determined.
  • Information processing device 2 CPU 3 Main memory 4 BIOS-ROM 5 Communication Interface 6 Storage Unit 7 Peripheral Interface 8 Audio Processing Unit 9 Image Processing Unit 10 Bus Arbiter 11 Input / Output Device (Controller) 12 Audio output device (speaker) 13 Display device (display monitor)

Abstract

プレイヤに対して違和感や圧迫感を与えず、ゲームへの没入感を損なわない画像を生成する画像処理プログラムを提供する。画像処理プログラムは,プレイヤキャラクタと障害物とを含むオブジェクトが配置された仮想空間に、仮想視点、注視点、及び視野角に基づく視錐台を形成し、当該視錐台の内部に配置されたオブジェクトの画像を生成する画像処理プログラムであって、コンピュータを、前記プレイヤキャラクタの向き及び位置情報と、障害物の位置情報とを記憶する記憶手段、プレイヤキャラクタから前方の領域内に注視点を設定する注視点設定手段、プレイヤキャラクタから後方の領域内であって、当該プレイヤキャラクタから所定間隔を空けた位置に仮想視点を設定する視点設定手段、注視点から前記仮想視点までを結ぶ線分が、障害物と交差するか判定する判定手段、線分と障害物が交差する場合,線分と障害物が交差する座標であって且つ注視点に最も近い交差座標の位置に仮想視点を再設定し、視野角をあらかじめ設定された基準角度から拡大させる視野角拡大手段、として機能させる。

Description

画像処理プログラム及びコンピュータ読み取り可能な記録媒体
 本発明は、ビデオゲームやCG(Computer
Graphics)ビデオ等における表示画像の生成技術に関する。
 従来から、仮想空間内に配置されたプレイヤキャラクタを俯瞰視点にて操作するサードパーソンシューティングゲーム(TPS)や、ロールプレイングゲーム(RPG)が知られている。
 このようなゲームでは、プレイヤキャラクタを常に画面表示させるため、仮想カメラを、プレイヤキャラクタの後方の予め定められた位置に、かつ、プレイヤキャラクタの正面方向を向いて設定する場合が多い(例えば、特許文献1参照)。
 この場合、仮想カメラとプレイヤキャラクタとの間に障害物が存在すると、プレイヤキャラクタが画面表示されず、プレイヤはプレイヤキャラクタを操作できない。そこで、障害物の存在によって、仮想カメラの位置や注視点を移動制御する技術(特許文献2参照)や、障害物を透過処理する技術(特許文献3参照)が提案されている。
特開2006-305176号公報 特開2006-122328号公報 特許第3769747号公報
 しかしながら、特許文献2に開示された技術によれば、障害物の存在によって仮想カメラの位置や注視点を移動させるため、画面内におけるプレイヤキャラクタの向きや位置が急激に変更され、プレイヤに違和感を与えるという問題がある。また、仮想カメラを障害物との衝突位置に設定する場合には、プレイヤキャラクタが後方へ移動すると、プレイヤキャラクタと仮想カメラとの距離が狭くなる。つまり、プレイヤキャラクタが迫って来る画面となり、プレイヤに圧迫感を与えるという問題がある。
 更に、特許文献3に開示された技術によれば、障害物に対しての透過処理を行うため、本来であれば視認することができない画像が生成される。このため、プレイヤは、仮想空間におけるゲームへの没入感を損なうという問題がある。
 本発明は、上記の従来の問題点に鑑み提案されたものであり、その目的とするところは、プレイヤに対して違和感や圧迫感を与えず、ゲームへの没入感を損なわない画像を生成する画像処理プログラム及びコンピュータ読み取り可能な記録媒体を提供することにある。
 上記の課題を解決するため、本発明にあっては、請求項1に記載されるようにプレイヤキャラクタと障害物とを含むオブジェクトが配置された仮想空間に、仮想視点、注視点、及び視野角に基づく視錐台を形成し、当該視錐台の内部に配置されたオブジェクトの画像を生成する画像処理プログラムであって、コンピュータを、前記プレイヤキャラクタの向き及び位置情報と、前記障害物の位置情報とを記憶する記憶手段、前記プレイヤキャラクタから前方の領域内に前記注視点を設定する注視点設定手段、前記プレイヤキャラクタから後方の領域内であって、当該プレイヤキャラクタから所定間隔を空けた位置に前記仮想視点を設定する視点設定手段、前記注視点から前記仮想視点までを結ぶ線分が、前記障害物と交差するか判定する判定手段、前記線分と前記障害物が交差する場合,前記線分と前記障害物が交差する座標であって且つ前記注視点に最も近い交差座標の位置に前記仮想視点を再設定し、前記視野角をあらかじめ設定された基準角度から拡大させる視野角拡大手段、として機能させるための画像処理プログラムを要旨としている。
 また、請求項2に記載されるように、請求項1に記載の画像処理プログラムであって、前記視野角拡大手段は、前記視点設定手段によって設定された仮想視点と前記交差座標との距離を算出し、当該距離が大きいほど,前記視野角の拡大させる角度を大きくすることができる。
 また、請求項3に記載されるように、請求項2に記載の画像処理プログラムであって、前記記憶手段は、前記障害物のベクトル情報を記憶し、前記視野角拡大手段は、前記交差座標における前記障害物のベクトル情報を読み取り、前記交差座標から注視点GPへのベクトルと前記障害物のベクトルとの成す角度が大きいほど,前記視野角の拡大させる角度を小さくすることができる。
 また、請求項4に記載されるように、請求項1乃至3のいずれか一項に記載の画像処理プログラムであって、前記視点設定手段は、前記プレイヤキャラクタの右後方又は左後方の位置に仮想視点を設定することができる。
 また、請求項5に記載されるように、請求項4に記載の画像処理プログラムであって、前記オブジェクトには、敵キャラクタを含み、コンピュータを、さらに、前記仮想視点から前記注視点を通過する直線が、前記障害物又は敵キャラクタと交差する交差座標を算出し、当該交差座標のうち、最も仮想視点に近い交差座標を前記プレイヤキャラクタから発射する発射体の到達位置とする手段、として機能させることができる。
 また、請求項6に記載されるように、請求項4に記載の画像処理プログラムであって、
前記オブジェクトには、敵キャラクタを含み、コンピュータを、さらに、前記プレイヤキャラクタの向き及び位置情報に基づいて、当該プレイヤキャラクタの前方へ発射される発射体の予想弾道を算出する手段、として機能させ、前記注視点設定手段は、前記予想弾道が前記障害物と交差する交差座標のうち、最も仮想視点に近い交差座標を前記注視点として設定することができる。
 また、請求項7に記載されるように、請求項1乃至6のいずれか一項に記載の画像処理プログラムを記録するコンピュータ読み取り可能な記録媒体として構成することができる。
 本発明の画像処理プログラム及びコンピュータ読み取り可能な記録媒体にあっては、プレイヤに対して違和感や圧迫感を与えず、ゲームへの没入感を損なわない画像を生成することができる。
本発明の一実施形態にかかるハードウェア構成例を示す図である。 ビュー空間および射影空間の例を示す図である。 情報処理装置内で処理に用いられるデータ例を示す図である。 ゲーム画面例を示す図(その1)である。 仮想空間を上方から見た図(その1)である。 仮想空間を上方から見た図(その2)である。 仮想空間を上方から見た図(その3)である。 ゲーム画面例を示す図(その2)である。 仮想空間を上方から見た図(その4)である。 ゲーム画面例を示す図(その3)である。 視野角拡大処理の例を示すフローチャートである。 仮想空間を上方から見た図(その5)である。 仮想空間を上方から見た図(その6)である。
 以下、本発明の好適な実施形態につき説明する。なお、これにより本発明が限定されるものではない。
 (ハードウェアの構成)
 図1は、本実施の形態にかかるハードウェア構成の一例を示している。本実施形態の情報処理装置1は、入出力装置であるコントローラ11、音声出力装置であるスピーカ12及び表示装置であるディスプレイモニタ13に接続されて使用される。ここで、ディスプレイモニタ13は、CRTや液晶表示装置等によって構成され、例えば、プレイヤキャラクタを含むゲーム画面を表示する。また、図示しないが、コントローラ11は、十字ボタン、操作ボタン、左ジョイスティック、右ジョイスティックが設けられている。プレイヤは、このコントローラ11を入力操作することによって、ゲーム操作を行うことができる。なお、コントローラ11は、振動発生装置や音声発生装置等の出力装置を備えていても良い。
 情報処理装置1は、CPU2、メインメモリ3、BIOS-ROM4、通信インタフェース5、記憶部6、ペリフェラルインタフェース7、音声処理部8、及び画像処理部9が、バスラインを介してバスアービタ10に接続されて構成されている。
 バスアービタ10は、バスラインを介して接続された各デバイスからのバス使用要求に応じてバスアービトレーションを行い、データの流れを制御する。また、バスアービタ10は、各デバイスからの要求に対し、CPUを介さずにデバイス同士でのデータ転送を行うDMA機能も備えている。ここで、バスアービタ10には、データ転送が高速なデバイスを制御する高速バスアービタ101と、データ転送が低速なデバイスを制御する低速バスアービタ102とが含まれ、システム全体のデータ転送速度を高速化することができる。
 CPU2は、ゲームプログラムの実行やシステム全体の制御や画像表示のための座標計算等を行い、コントローラ11から送信される操作信号に基づいて、例えばゲーム画面内に登場するプレイヤキャラクタの動作を制御する。ゲームプログラムは,本実施の形態における画像処理プログラムを含み,CPU2が該画像処理プログラムを実行することで,後述する本実施の形態における画像処理が行われる。
 メインメモリ3は、CPU2が処理を行うのに必要なプログラムやデータを格納するメモリとして利用される。ここで、CPU2及びメインメモリ3は、高速バスアービタ101を介して共通接続されている。
 BIOS-ROM4は、情報処理装置1を起動するためのプログラムやシステムプログラムが格納されている。
 通信インタフェース5は、外部ネットワークに接続するために、LAN回線等のインタフェースを提供する。これにより、情報処理装置1は、他の情報処理装置やネットワークサーバ等との通信が可能になる。
 記憶部6は、磁気ディスクや光ディスク等の記録媒体によって構成され、本実施の形態における画像処理プログラムを含むゲームプログラムやデータが格納されている。CPU2は、作業内容に応じて記憶媒体に格納されたプログラムやデータをメインメモリ3に読み出す。ここで、メインメモリ3に読み出されるデータとしては、例えば、プレイヤキャラクタや敵キャラクタを含むオブジェクトを定義するデータ、画像データ、音データ等がある。更に、CPU2は、データ転送速度が低い記録媒体に記録されたデータを、磁気ディスクなどのデータ転送速度が高い記録媒体に転送し、情報処理システム全体のアクセス速度を向上させる。
 ペリフェラルインタフェース7は、コントローラ11等の周辺機器と接続するために、USB、IEEE1394、シリアル、パラレル、赤外線、無線等のインタフェースを提供する。ペリフェラルインタフェース7は、コントローラ11から送信された操作信号を、低速バスアービタ102へ送信する。なお、ペリフェラルインタフェース7は、コントローラ11へゲーム状況に応じた振動信号や音声信号を送信することもできる。
 音声処理部8には、サウンドコントローラ81が含まれ、サウンドコントローラ81には、サウンドメモリ811が含まれる。音声処理部8は、記録部6やサウンドメモリ811に格納された音データを読み出して音声を生成する。また、サウンドコントローラ81は、例えば、プレイヤによる操作やゲーム進行に応じて生成した音声をスピーカ13に出力する。
 画像処理部9には、GPU91、VRAM92が含まれる。ここで、VRAM92は、フレームバッファ921、テクスチャバッファ922、Zバッファ923等の格納領域を有している。フレームバッファ921は、画面表示を行う1フレーム分のピクセルデータを記憶するために利用される。テクスチャバッファ922は、オブジェクトを形成するポリゴンにテクスチャマッピングを行う場合に、素材となる画像データ(テクスチャ)を記憶するために利用される。Zバッファ923は、画面表示を行う各ピクセルにおけるオブジェクトの深度情報を記憶するために利用される。
 画像処理部9は、オブジェクトを形成するポリゴンのデータ(頂点座標、テクスチャ座標、色値やα値、法線ベクトル等)に基づいて頂点処理を行い、ラスタライズ、テクスチャマッピング、陰面消去等のピクセル処理を行う。次いで、画像処理部9は、ピクセル処理によって得られたピクセルデータをフレームバッファ921に記憶する。
 表示画像の生成に関しては、CPU2の制御のもと、ゲーム状況に従って表示すべきオブジェクトを形成するポリゴンが仮想空間内に配置され、GPU91の処理により、仮想カメラVP(仮想視点)から見た二次元画像に変換されて生成される。
 GPU91は、頂点処理として、ワールド変換、光源計算、ビュー変換、クリッピング、射影変換、ビューポート変換等が行われる。図2(a)は、ビュー空間の例を示している。ビュー空間は、ワールド空間を、仮想カメラVP、注視点GP、及び仮想カメラVPの上方方向の情報に基づいて変換した座標空間であり、仮想カメラVPから注視点GPの方向に対して横軸がx軸、縦軸がy軸、奥行きがz軸となる。そして、クリッピングとして、仮想カメラVPから注視点GPの方向に対してx軸方向およびy軸方向にそれぞれ視野角だけ振った範囲において、仮想カメラVPに近い側には近クリップ平面CP1が設定され、遠い側には遠クリップ平面CP2が設定される。近クリップ平面CP1と遠クリップ平面CP2と視野角を示す面で囲まれる六面体は、視錐台と呼ばれ、その内部に配置されるオブジェクトが描画対象となる。図2(b)は、射影変換を行った射影空間の例を示しており、図2(a)に示したビュー空間を、視野角、アスペクト比、近クリップ平面CP1、及び遠クリップ平面CP2の情報に基づいて、-1≦x≦1、-1≦y≦1、0≦z≦1の範囲の空間に変換している。そして、GPU91内のバーテックスシェーダは、射影空間へ変換されたポリゴンの頂点をビューポート変換し、頂点処理を終了する。
 GPU91は、ピクセル処理として、頂点処理によって組み立てられた多角形、線、及び点のデータからラスタライズ及び補間を行う。そして、このラスタライズ及び補間されたピクセルデータに対して、テクスチャマッピング、アルファテスト、深度情報に基づく深度テスト(陰面消去)、ブレンディング等を行って、画面に配置されるピクセルデータをフレームバッファ921に記憶する。
 そして、GPU91内のディスプレイコントローラ911は、フレームバッファ921に記録されたピクセルデータを周期的に読み出し、映像信号をディスプレイモニタ13に送信する。
 (各種データの説明)
 図3は、情報処理装置1内で画像処理に用いられるデータ例を示す図である。データには、モデル関連データと一時的データとが含まれる。
 モデル関連データには、オブジェクトであるプレイヤキャラクタデータと敵キャラクタデータと障害物データとが含まれている。
 プレイヤキャラクタデータは、主としてプレイヤからのコントローラ11による操作によって制御されるキャラクタのデータであって、プレイヤキャラクタを形成するポリゴンデータ、顔基準座標を含んでいる。ここで、ポリゴンデータは、頂点座標、テクスチャ座標、色値やα値、法線ベクトルを含み、後述する敵キャラクタデータや障害物データも同様である。なお、顔基準座標は、例えば、プレイヤキャラクタの首のやや上の三次元座標である。
 敵キャラクタデータは、プレイヤキャラクタと敵対する複数のキャラクタのデータであり、敵キャラクタを形成するポリゴンデータ、顔基準座標、行動スクリプトを含んでいる。行動スクリプトは、敵キャラクタの行動開始条件と行動内容とを記述したものである。例えば、CPU2は、その敵キャラクタの追尾開始距離以内にプレイヤキャラクタが入ったと判定すると、その敵キャラクタはプレイヤキャラクタの追尾を開始する。また、CPU2は、その敵キャラクタの攻撃開始距離以内にプレイヤキャラクタが入ったと判定すると、その敵キャラクタはプレイヤキャラクタへの攻撃を開始する。
 障害物データは、プレイヤキャラクタや仮想カメラVPが移動不可能な範囲を定義した、地面GRや壁W、天井CL等の複数の障害物に関するデータであり、障害物を形成するポリゴンデータ、仮想空間内に配置される配置座標を含んでいる。
 一時的データには、仮想空間内におけるデータであって、プレイヤキャラクタ及び敵キャラクタの座標及び向き情報、仮想カメラVP(仮想視点)の座標、注視点GPの座標、視野角θ、注視点GPから仮想カメラVPまでの線分と障害物とが交差する交差座標のうち最も注視点GPに近い交差座標CC、仮想カメラVPの位置から注視点GPへのベクトルと交差座標CCにおける障害物の法線ベクトルとのなす角度δ、元の仮想カメラVP’の位置と新たな仮想カメラVPの位置(交差座標CC)との距離Dの値が含まれる。さらに、一時的データには、現在の視野角を拡大するための視野角拡大率Sの値が含まれる。ここで、プレイヤキャラクタ及び敵キャラクタの向き情報は、例えば、身体の向き又は発射体を発射する方向に対応する。
 (動作)
 続いて,本実施の形態における画像処理プログラムの実行により具現される画像処理の動作について,サードパーソンシューティングゲームの画面例を用いて説明する。
 図4は、本発明にかかるサードパーソンシューティングゲームの画面例を示す図である。図5は、図4を上方から見た図であって、仮想カメラVP、注視点GP、視野角θの設定位置や、プレイヤキャラクタPCの位置及び正面方向(矢印方向)等を示した図である。
 図4において、プレイヤキャラクタPC、敵キャラクタEC、障害物のオブジェクトである地面GR、壁W1~W3、天井CLが仮想空間内に配置されている。また、図4において、プレイヤキャラクタPCは、常に画面左下に表示されるように構成されている。これは、照準位置となる画面中央にプレイヤキャラクタを表示させないためである。なお、このように照準位置を画面中央に固定することによって、プレイヤは、プレイヤキャラクタPCがどの向きに攻撃を行うかが分かりやすくなる。
 また、図5において、CPU2は、プレイヤキャラクタPCの顔基準座標Fを(x,y,z)=(0,0,0)とし、プレイヤキャラクタPCの右方向をx方向、上方向をy方向、正面方向をz方向とした座標系において、注視点GPをプレイヤキャラクタPCの右前方(xp,0,zp)、仮想カメラVPの位置をプレイヤキャラクタの右後方(xv,0,-zv)に設定する。ここで、xp、zp、xv及びzvは、正の値であって、視錐台内にプレイヤキャラクタPCが含まれるように各値が設定される。そして、CPU2は、注視点GP、仮想カメラVPの位置を仮想空間内の座標系に戻したものをメインメモリ3に記憶する。
 なお、画面中央にプレイヤキャラクタを表示させなければ良く、例えば、仮想カメラVPをプレイヤキャラクタの後方領域のいずれかに設定して、注視点GPをプレイヤキャラクタの右又は左前方にずらして設定しても良い。または、注視点GPをプレイヤキャラクタの前方領域に設定して、仮想カメラVPの位置をプレイヤキャラクタの右後方又は左後方にずらして設定しても良い。さらに,プレイヤキャラクタの頭上に仮想カメラVPの位置を設定してもよい。
 CPU2は、仮想カメラVPから注視点GPの方向に対する近クリップ平面CP1までの距離及び遠クリップ平面CP2までの距離に基づいて、近クリップ平面CP1及び遠クリップ平面CP2を設定する。さらに,CPU2は,視野角θをあらかじめ設定された基準の視野角θaの値に設定し、近クリップ平面CP1,遠クリップ平面CP2及び視野角θaにより,視錐台を形成する。このとき、視錐台内には、プレイヤキャラクタが含まれるように各値が設定され、近クリップ平面CP1は、図5に示されるように仮想カメラVPの近傍に設定されており、遠クリップ平面CP2は、図示されない遠方に設定されている。
 本ゲームでは、プレイヤは、コントローラ11の左ジョイスティックの操作によってプレイヤキャラクタの位置を移動させ、右ジョイスティックの操作によってプレイヤキャラクタの向きを変更することができる。つまり、プレイヤは、プレイヤキャラクタを、正面方向だけでなく、後方や左右方向へ移動させることができる。プレイヤが、プレイヤキャラクタの移動または向きの変更をすると、CPU2は、メインメモリ3に記憶されたプレイヤキャラクタの顔基準座標の三次元座標、及び向き情報を更新し、上述したプレイヤキャラクタの顔基準座標、及び向きを基準とした座標系を算出して注視点GP、仮想カメラVPの座標位置を設定し直す。
 また、プレイヤは、コントローラ11の操作ボタンの操作によって、プレイヤキャラクタの武器から発射される弾丸等の発射体を、仮想カメラVPから注視点GPを通過する直線上にある到達位置へ発射することができる。なお、この到達位置は、図4では、画面中央の照準位置となる。ここで、図5に示されるように、弾丸等の発射体が到達する到達位置は、仮想カメラVPから注視点GPを通過する直線がオブジェクトと交差する交差座標であって、仮想カメラVPの位置から最も近い交差座標CBに設定される。なお、交差座標CBにおいて交差するオブジェクトが敵キャラクタである場合、CPU2は、注視点GPを、交差座標CB又はその敵キャラクタの座標に再設定し、ロックオンを行っても良い。さらに、CPU2は、プレイヤキャラクタの位置から正面方向へ向けて、発射体の予想弾道を計算し、予想弾道内に敵キャラクタがいる場合、注視点GPを、その敵キャラクタの座標に再設定してもよい。これにより、初心者でも簡単に敵キャラクタを狙えることができる。そして、CPU2は、敵キャラクタや障害物に弾丸等の発射体が到達したかを判定し、ゲーム進行に反映する。
 ここで,プレイヤキャラクタが後方に後退するように移動し,後方にある壁に接近する場合を考える。この場合,プレイヤキャラクタの右後方にある仮想カメラVPが壁面に衝突し,さらに壁面を通り越してしまう場合がある。
 図6は,仮想カメラVPが壁を越えて位置する状態を上方から見た図である。仮想カメラVPは,プレイヤキャラクタPCの後方にある壁W4の裏側に位置する。従って,この状態をそのまま描画すると,仮想カメラVPとプレイヤキャラクタPCとの間に壁W4が位置することから,画面全体が壁に覆われた画像となってしまい,本来表示すべき壁W4の前面側の画像を表示することができない。
 そのため,仮想カメラVPが壁W4などの障害物と衝突し,その内部又はその裏側に位置する場合は,仮想カメラVPを壁W4と衝突する座標に設定し直すことで,壁W4より前面側の画像が描画される。
 図7は,仮想カメラVPを壁と衝突する座標に設定した状態を示す仮想空間を上方から見た図であり,図8は,図7に示す仮想カメラVPにより表示される画面例を示す図である。図7に示されるように,当初壁W4の裏側に設定された元の仮想カメラVP’から,壁W4との衝突する座標CCに仮想カメラVPを再設定することで,図8に示すように,プレイヤキャラクタPC及び敵キャラクタECが位置する壁W4の前面側の画像が表示される。
 このとき,再設定される仮想カメラVPは,元の仮想カメラVP’より距離D前方に位置するため,プレイヤキャラクタPCとの距離が縮まる。そうすると,図8に示すとおり,画面内におけるプレイヤキャラクタPCの大きさが大きくなり,プレイヤキャラクタPCが迫ってくるようにプレイヤが錯覚し,プレイヤに違和感及び圧迫感を与えることになる。
 本実施の形態における画像処理では,この違和感及び圧迫感をプレイヤに覚えさせないようにするために,仮想カメラVPを壁W4との衝突する座標に変更する場合,視野角θを拡大する。
 図9は,視野角を拡大した状態を示す仮想空間を上方から見た図であり,図10は,図9に示す仮想カメラVPにより表示される画面例を示す図である。図9に示すように,仮想カメラVPを,壁W4と衝突する座標CCに設定した場合,視野角θを,あらかじめ設定された基準の視野角θaよりも拡大させたθbとする。視野角を拡大することで,描画範囲が広がり,描画対象のオブジェクトが相対的に縮小される。そのため,図10に示すように,仮想カメラVPを急激に前方に移動させたことにより生じる画像の変化が緩和され,プレイヤが感じる違和感及び圧迫感を抑えることができる。
 図11は、本実施の形態における画像処理を実行するフローチャートであり,拡大させる視野角の角度を求める処理である。本画像処理は,CPU2が画像処理プログラムを実行することにより実現される。図11において、毎フレームもしくは数フレームおきに処理を開始すると(ステップS100)、仮想カメラVP、注視点GPの位置と、視野角θをθaに設定する(ステップS101)。ここで、θaは所定の値であって、視錐台内にプレイヤキャラクタを含むように定められた値である。
 次いで、注視点GPから仮想カメラVPまでの線分と障害物とが交差する交差座標があるか否かを判定する(ステップS102)。交差座標がない場合(ステップS102のNo)、仮想カメラVP、及び視野角θ(=θa)を確定し(ステップS109)、処理を終了する(ステップS110)。
 交差座標がある場合(ステップS102のYes)、注視点GPに最も近い交差座標CCの座標を取得する(S103)。交差座標がある場合は,図9で示したように,例えば,プレイヤキャラクタPCが後退して,後方にある壁W4に接近することで,プレイヤキャラクタの右後方にある仮想カメラVPが壁面に衝突し,さらに壁面を通り越してしまう場合である。
 次いで、交差座標CCにおける障害物の法線ベクトルを取得する(ステップS104)。次いで、仮想カメラVPから注視点GPへのベクトルと、交差座標CCにおける障害物の法線ベクトルとのなす角度δを算出する(ステップS105)。
 次いで、交差座標CCを新たな仮想カメラVPの位置に再設定し、元の仮想カメラVPの位置と交差座標CC(新たな仮想カメラVPの位置)との距離Dを算出する(ステップS106)。
 次いで、距離Dと角度δから、視野角拡大率Sを算出する(ステップS107)。ここで、視野角拡大率Sは、現在の視野角であるθaを何倍にするか決める値であって、S=1+(D×cos(δ)×C)の式によって算出される。なお、Cは定数である。
 視野角拡大率Sを求める上式で,距離Dに角度δを乗算するのは以下の理由による。図12は、プレイヤキャラクタが矢印方向を向き、右方向へ移動している場合の上から見た図である。壁W5は,その法線ベクトルが注視点GPから仮想カメラVPのベクトルに対して角度δを有して,プレイヤキャラクタPCの右方向に配置されている。プレイヤキャラクタPCの移動に伴い、仮想カメラVPも同様に、注視点GPの方向を正面方向として、右方向へ移動している。図13は、図12の後に仮想カメラVPが右方向にある壁W5に衝突し、仮想カメラVPが、元の仮想カメラVP’から交差座標CCに再設定された場合の上方から見た図である。ここで、上述したように、仮想カメラVPを、元の仮想カメラVP’から交差座標CCへ再設定する場合、仮想カメラVPが右方向にある障害物へ衝突すると、後方の障害物に衝突する場合と比べて距離Dが大きくなる。後方の障害物に衝突する場合(角度δ=0)は,プレイヤキャラクタPCの後方への移動距離がそのまま距離Dとなるが,壁W5に角度を有して衝突する場合(角度δ>0),図13に示すように,プレイヤキャラクタPCの右方向への移動距離よりも距離Dが大きくなる。
 つまり、プレイヤキャラクタPCが注視点GPと仮想カメラVPのベクトルに対して角度がある障害物に接近した場合,プレイヤキャラクタPCのわずかな移動により視野角の拡大が急激に行われ、プレイヤに対して違和感を与えてしまう。したがって、視野角拡大率Sを算出する際、距離Dにcos(δ)を掛けて拡大率を調整している。
 図11に戻り、次いで、現在の視野角θaと視野角拡大率Sから、新たな視野角θbを算出する(ステップS108)。ここで、視野角θbは、θb=arctan(tan(θa/2)×S)×2の式によって算出される。
 次いで、注視点GP、仮想カメラVPの位置、視野角θ(=θb)を確定し(ステップS109)、処理を終了する(ステップS110)。
 上述したとおり、プレイヤキャラクタの移動により注視点GPから仮想カメラVPのベクトルが障害物と交差する場合,仮想カメラVPをその交差座標に設定するとともに,視野角を基準角度θaから算出された角度θbに拡大させる。そして,拡大させる視野角の角度を算出するための視野角拡大率Sは、距離Dが大きいほど大きくなる。これによって、仮想カメラVPが後方の障害物に衝突し、さらにプレイヤキャラクタが後方へ移動していく場合であっても、徐々に視野角を大きくすることができる。つまり、仮想カメラVPが障害物によって後方へ移動できない場合であっても、プレイヤに対して、仮想カメラVPが徐々に後方へ下がっていく(障害物を越えていく)感覚を与えることができる。
 なお、視野角θa及びθbは、左右方向の視野角であっても、上下方向の視野角であってもよく、どちらか一方の視野角を算出すれば、予め設定されたアスペクト比によって、もう一方の視野角を求めることができる。
 (総括)
 以上に説明したように、注視点GPと仮想カメラVPとの間に障害物が存在しても、自然な形でプレイヤキャラクタを表示し、プレイヤに圧迫感等を感じさせなくすることができる。
 以上、本発明の好適な実施の形態により本発明を説明した。ここでは特定の具体例を示して本発明を説明したが、特許請求の範囲に定義された本発明の広範な趣旨および範囲から逸脱することなく、これら具体例に様々な修正および変更を加えることができることは明らかである。すなわち、具体例の詳細および添付の図面により本発明が限定されるものと解釈してはならない。
1   情報処理装置
2   CPU
3   メインメモリ
4   BIOS-ROM
5   通信インタフェース
6   記憶部
7   ペリフェラルインタフェース
8   音声処理部
9   画像処理部
10  バスアービタ
11  入出力装置(コントローラ)
12  音声出力装置(スピーカ)
13  表示装置(ディスプレイモニタ)

Claims (7)

  1.  プレイヤキャラクタと障害物とを含むオブジェクトが配置された仮想空間に、仮想視点、注視点、及び視野角に基づく視錐台を形成し、当該視錐台の内部に配置されたオブジェクトの画像を生成する画像処理プログラムであって、
     コンピュータを、
     前記プレイヤキャラクタの向き及び位置情報と、前記障害物の位置情報とを記憶する記憶手段、
     前記プレイヤキャラクタから前方の領域内に前記注視点を設定する注視点設定手段、
     前記プレイヤキャラクタから後方の領域内であって、当該プレイヤキャラクタから所定間隔を空けた位置に前記仮想視点を設定する視点設定手段、
     前記注視点から前記仮想視点までを結ぶ線分が、前記障害物と交差するか判定する判定手段、
     前記線分と前記障害物が交差する場合,前記線分と前記障害物が交差する座標であって且つ前記注視点に最も近い交差座標の位置に前記仮想視点を再設定し、前記視野角をあらかじめ設定された基準角度から拡大させる視野角拡大手段、
     として機能させるための画像処理プログラム。
  2.  請求項1に記載の画像処理プログラムであって、
     前記視野角拡大手段は、
     前記視点設定手段によって設定された仮想視点と前記交差座標との距離を算出し、当該距離が大きいほど,前記視野角の拡大させる角度を大きくする
     ことを特徴とする画像処理プログラム。
  3.  請求項2に記載の画像処理プログラムであって、
     前記記憶手段は、
     前記障害物のベクトル情報を記憶し、
     前記視野角拡大手段は、
     前記交差座標における前記障害物のベクトル情報を読み取り、前記交差座標から注視点GPへのベクトルと前記障害物のベクトルとの成す角度が大きいほど,前記視野角の拡大させる角度を小さくする
     ことを特徴とする画像処理プログラム。
  4.  請求項1乃至3のいずれか一項に記載の画像処理プログラムであって、
     前記視点設定手段は、
     前記プレイヤキャラクタの右後方又は左後方の位置に仮想視点を設定する
     ことを特徴とする画像処理プログラム。
  5.  請求項4に記載の画像処理プログラムであって、
     前記オブジェクトには、敵キャラクタを含み、
     コンピュータを、さらに、
     前記仮想視点から前記注視点を通過する直線が、前記障害物又は敵キャラクタと交差する交差座標を算出し、当該交差座標のうち、最も仮想視点に近い交差座標を前記プレイヤキャラクタから発射する発射体の到達位置とする手段、
     として機能させるための画像処理プログラム。
  6.  請求項4に記載の画像処理プログラムであって、
     前記オブジェクトには、敵キャラクタを含み、
     コンピュータを、さらに、
     前記プレイヤキャラクタの向き及び位置情報に基づいて、当該プレイヤキャラクタの前方へ発射される発射体の予想弾道を算出する手段、
     として機能させ、
     前記注視点設定手段は、
     前記予想弾道が前記障害物又は敵キャラクタと交差する交差座標のうち、最も仮想視点に近い交差座標を前記注視点として設定する
     ことを特徴とする画像処理プログラム。
  7.  請求項1乃至6のいずれか一項に記載の画像処理プログラムを記録するコンピュータ読み取り可能な記録媒体。
PCT/JP2011/065601 2010-09-30 2011-07-07 画像処理プログラム及びコンピュータ読み取り可能な記録媒体 WO2012043009A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US13/846,053 US9345958B2 (en) 2010-09-30 2013-03-18 Image processing apparatus for forming a view frustum on a display device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2010-220720 2010-09-30
JP2010220720A JP5614211B2 (ja) 2010-09-30 2010-09-30 画像処理プログラム及びコンピュータ読み取り可能な記録媒体

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US13/846,053 Continuation US9345958B2 (en) 2010-09-30 2013-03-18 Image processing apparatus for forming a view frustum on a display device

Publications (1)

Publication Number Publication Date
WO2012043009A1 true WO2012043009A1 (ja) 2012-04-05

Family

ID=45892487

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2011/065601 WO2012043009A1 (ja) 2010-09-30 2011-07-07 画像処理プログラム及びコンピュータ読み取り可能な記録媒体

Country Status (3)

Country Link
US (1) US9345958B2 (ja)
JP (1) JP5614211B2 (ja)
WO (1) WO2012043009A1 (ja)

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5367034B2 (ja) * 2011-08-24 2013-12-11 株式会社ソニー・コンピュータエンタテインメント 画像処理装置および画像処理方法
US9294539B2 (en) * 2013-03-14 2016-03-22 Microsoft Technology Licensing, Llc Cooperative federation of digital devices via proxemics and device micro-mobility
JP6319952B2 (ja) * 2013-05-31 2018-05-09 任天堂株式会社 情報処理プログラム、情報処理装置、情報処理システム、および情報処理方法
US9332285B1 (en) * 2014-05-28 2016-05-03 Lucasfilm Entertainment Company Ltd. Switching modes of a media content item
JP6629499B2 (ja) * 2014-06-09 2020-01-15 株式会社バンダイナムコエンターテインメント プログラムおよび画像生成装置
JP2016046642A (ja) * 2014-08-21 2016-04-04 キヤノン株式会社 情報処理システム、情報処理方法及びプログラム
MX2017004722A (es) * 2014-10-10 2017-11-30 Livebarn Inc Sistema y metodo para rastrear jugadores de manera optica en instalaciones deportivas.
JP6643775B2 (ja) * 2015-01-29 2020-02-12 株式会社バンダイナムコエンターテインメント ゲーム機、ゲームシステム及びプログラム
US10102672B2 (en) * 2015-03-16 2018-10-16 Square Enix Co., Ltd. Storage medium, information processing apparatus and control method
JP2016171989A (ja) * 2015-03-16 2016-09-29 株式会社スクウェア・エニックス プログラム、記録媒体、情報処理装置及び制御方法
JP6598522B2 (ja) * 2015-06-12 2019-10-30 任天堂株式会社 情報処理装置、情報処理システム、情報処理方法、及び情報処理プログラム
JP2017062598A (ja) * 2015-09-24 2017-03-30 ソニー株式会社 情報処理装置、情報処理方法、およびプログラム
JP6681352B2 (ja) * 2017-01-06 2020-04-15 任天堂株式会社 情報処理システム、情報処理プログラム、情報処理装置、情報処理方法、ゲームシステム、ゲームプログラム、ゲーム装置、及びゲーム方法
CN108694190A (zh) * 2017-04-08 2018-10-23 大连万达集团股份有限公司 浏览bim模型时消除被观察物体前置遮挡物的操作方法
JP6588942B2 (ja) * 2017-06-09 2019-10-09 株式会社カプコン ゲームプログラム、ゲーム装置およびサーバ装置
JP6415675B1 (ja) 2017-12-04 2018-10-31 キヤノン株式会社 生成装置、生成方法及びプログラム
CN109675307B (zh) * 2019-01-10 2020-02-21 网易(杭州)网络有限公司 游戏中的显示控制方法、装置、存储介质、处理器及终端
CN110215690B (zh) * 2019-07-11 2023-02-03 网易(杭州)网络有限公司 游戏场景中的视角切换方法、装置及电子设备
CN110841281B (zh) * 2019-11-12 2023-05-26 深圳市瑞立视多媒体科技有限公司 玩家角色位置高低偏移实现方法、装置及相关产品
CN111420402B (zh) 2020-03-18 2021-05-14 腾讯科技(深圳)有限公司 虚拟环境画面的显示方法、装置、终端及存储介质
CN116943214A (zh) * 2022-04-14 2023-10-27 腾讯科技(深圳)有限公司 虚拟道具的使用方法、装置、设备、介质及程序产品
CN116310241B (zh) * 2023-03-31 2023-10-13 北京易智时代数字科技有限公司 虚拟角色的位置控制方法、装置、电子设备和存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3141737B2 (ja) * 1995-08-10 2001-03-05 株式会社セガ 仮想画像生成装置及びその方法
JP2009273865A (ja) * 2008-04-17 2009-11-26 Konami Digital Entertainment Co Ltd ゲームプログラム、ゲーム装置及びゲーム制御方法
JP4474640B2 (ja) * 2004-05-11 2010-06-09 株式会社セガ 画像処理プログラム、ゲーム処理プログラムおよびゲーム情報処理装置

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7116326B2 (en) 2002-09-06 2006-10-03 Traffic.Com, Inc. Method of displaying traffic flow data representing traffic conditions
JP2006122328A (ja) * 2004-10-28 2006-05-18 Taito Corp ビデオゲーム機におけるカメラ位置決定方法
JP3786670B1 (ja) 2005-03-24 2006-06-14 株式会社バンダイナムコゲームス プログラム、情報記憶媒体、及び画像生成システム
JP2006305176A (ja) 2005-04-28 2006-11-09 Nintendo Co Ltd ゲームプログラムおよびゲーム装置
JP4459993B2 (ja) 2007-10-03 2010-04-28 株式会社スクウェア・エニックス 画像生成装置、画像生成プログラム及び画像生成プログラム記録媒体
JP5411473B2 (ja) * 2008-09-16 2014-02-12 株式会社バンダイナムコゲームス プログラム及びゲーム装置
JP2014235596A (ja) * 2013-06-03 2014-12-15 任天堂株式会社 情報処理プログラム、情報処理システム、情報処理装置、および情報処理方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3141737B2 (ja) * 1995-08-10 2001-03-05 株式会社セガ 仮想画像生成装置及びその方法
JP4474640B2 (ja) * 2004-05-11 2010-06-09 株式会社セガ 画像処理プログラム、ゲーム処理プログラムおよびゲーム情報処理装置
JP2009273865A (ja) * 2008-04-17 2009-11-26 Konami Digital Entertainment Co Ltd ゲームプログラム、ゲーム装置及びゲーム制御方法

Also Published As

Publication number Publication date
US20130225289A1 (en) 2013-08-29
US9345958B2 (en) 2016-05-24
JP5614211B2 (ja) 2014-10-29
JP2012075482A (ja) 2012-04-19

Similar Documents

Publication Publication Date Title
JP5614211B2 (ja) 画像処理プログラム及びコンピュータ読み取り可能な記録媒体
JP5597837B2 (ja) プログラム、情報記憶媒体、及び、画像生成装置
JP5161256B2 (ja) プログラム、情報記憶媒体、及び、画像生成装置
JP5614956B2 (ja) プログラム、画像生成システム
JP4489800B2 (ja) 画像生成装置及び方法、並びにプログラム及び記録媒体
US20090247250A1 (en) Program, game system, and movement control method
JP2007300974A (ja) プログラム、情報記憶媒体及び画像生成システム
KR20060047773A (ko) 화상 처리 프로그램, 게임 처리 프로그램 및 게임 정보처리 장치
US8514255B2 (en) Information storage medium, image control device, and image control method
JP5598703B2 (ja) プログラム、ゲーム装置及びその制御方法
JP2011215886A (ja) プログラム、情報記憶媒体、及び、画像生成装置
JP2009153681A (ja) プログラム、情報記憶媒体及びゲームシステム
JP2012215934A (ja) プログラム、情報記憶媒体、端末、及びサーバ
JP3786670B1 (ja) プログラム、情報記憶媒体、及び画像生成システム
US20210117070A1 (en) Computer-readable recording medium, computer apparatus, and method of controlling
JP4662271B2 (ja) プログラム、情報記憶媒体、及び画像生成システム
US20050020363A1 (en) Game system and game program
JP3786671B1 (ja) プログラム、情報記憶媒体、及び画像生成システム
JP5597869B2 (ja) プログラム、情報記憶媒体、及び、画像生成装置
JP5054908B2 (ja) プログラム、情報記憶媒体、及び画像生成システム
JP2009075739A (ja) プログラム、情報記憶媒体、および画像生成システム
JP2011255114A (ja) プログラム、情報記憶媒体及び画像生成システム
JP2011096017A (ja) プログラム、情報記憶媒体、及び端末
JP2006263321A (ja) プログラム、情報記憶媒体、及び画像生成システム
WO2023054596A1 (ja) プログラム、情報処理装置および情報処理方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11828570

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11828570

Country of ref document: EP

Kind code of ref document: A1