U.S. Pat. No. 9,050,538
COLLISION DETECTION AND MOTION SIMULATION IN GAME VIRTUAL SPACE
AssigneeSony Corporation; Sony Corporation Entertainment Inc.
Issue DateApril 3, 2012
Illustrative Figure
Abstract
An object placement managing unit (44) controls whether or not to change the position or direction of a first object according to a positional relationship between a passive area determined based on the position of the first object, and a judging area determined based on the position of a second object. The object placement managing unit (44) controls whether or not to change the position or direction of the second object according to a positional relationship between an active area determined based on the position of the first object and differing from the passive area, and the judging area.
Description
DETAILED DESCRIPTION OF THE INVENTION In the following, one embodiment of the present invention will be described in detail with reference to the accompanying drawings. FIG. 1is a diagram showing a structure of a game device10that functions as an information processing system according to an embodiment of the present invention. The game device10according to this embodiment is, for example, a game console, a portable game terminal, and a personal computer. As shown inFIG. 1, the game device10according to this embodiment includes a control unit12, a storage unit14, an operating unit16, and a display unit18. The control unit12is a program control device, such as a CPU (e.g., Central Processing Unit), that operates according to a program installed in the game device10. The storage unit14is a storage device, such as a ROM (e.g., Read-Only Memory) or a RAM (e.g., Random Access Memory), or a hard disk drive. The operating unit16is a keyboard, a mouse, or a controller of a consumer game device, or the like, and upon receipt of input of a user operation, outputs a signal indicating the content of the user operation to the control unit12. The display unit18is a display device, such as a liquid crystal display, and displays a variety of images according to an instruction from the control unit12. Note that the game device10may include a communication interface, such as a network board, an optical disc drive for reading an optical disc, such as a DVD-ROM (Digital Video Disc-Read Only Memory) or a Blu-ray (registered trademark) disk, and a USB (Universal Serial Bus) port. The game device10according to this embodiment executes a program to which the present invention is applied to thereby generate a virtual space20shown as an example inFIG. 2in the memory. As shown, the virtual space20according to this embodiment is a virtual 3D space where ...
DETAILED DESCRIPTION OF THE INVENTION
In the following, one embodiment of the present invention will be described in detail with reference to the accompanying drawings.
FIG. 1is a diagram showing a structure of a game device10that functions as an information processing system according to an embodiment of the present invention. The game device10according to this embodiment is, for example, a game console, a portable game terminal, and a personal computer. As shown inFIG. 1, the game device10according to this embodiment includes a control unit12, a storage unit14, an operating unit16, and a display unit18.
The control unit12is a program control device, such as a CPU (e.g., Central Processing Unit), that operates according to a program installed in the game device10. The storage unit14is a storage device, such as a ROM (e.g., Read-Only Memory) or a RAM (e.g., Random Access Memory), or a hard disk drive. The operating unit16is a keyboard, a mouse, or a controller of a consumer game device, or the like, and upon receipt of input of a user operation, outputs a signal indicating the content of the user operation to the control unit12. The display unit18is a display device, such as a liquid crystal display, and displays a variety of images according to an instruction from the control unit12.
Note that the game device10may include a communication interface, such as a network board, an optical disc drive for reading an optical disc, such as a DVD-ROM (Digital Video Disc-Read Only Memory) or a Blu-ray (registered trademark) disk, and a USB (Universal Serial Bus) port.
The game device10according to this embodiment executes a program to which the present invention is applied to thereby generate a virtual space20shown as an example inFIG. 2in the memory. As shown, the virtual space20according to this embodiment is a virtual 3D space where virtual objects, such as a player object22, a floor object24, a wall object26, a barrel object28, a spear object30, are placed as well as a viewpoint32.
In this embodiment, a virtual object includes a plurality of polygons, each having a texture mapped thereon. In this embodiment, a user of the game device10can operate the operating unit16to thereby move the player object22in the virtual space20.
In the program executed in the game device10according to this embodiment, the function of a physics engine for simulating the laws of physics, such as the laws of classical mechanics, is implemented.
FIG. 3is a functional block diagram of the game device10according to this embodiment. As shown inFIG. 3, the game device10functionally comprises a data storage unit40, an operation state obtaining unit42, an object placement managing unit44, and a spatial image generation and output unit46. The data storage unit40is implemented mainly using the storage unit14, while the other components are implemented mainly using the control unit12.
These functions are achieved by executing a program according to this embodiment in the game device10, or an information processing system. This program may be downloaded from another computer via a communication interface through a computer communication network or stored in a computer readable information storage medium, such as an optical disc (e.g., a CD-ROM (e.g., Compact Disc-Read-Only Memory) or a DVD ROM) or a USB memory, to be installed therefrom into the game device10via an optical disc drive, a USB (Universal Serial Bus) port, or the like.
In this embodiment, various data necessary for generating the virtual space20is stored in advance in the data storage unit40. In the data storage unit40, polygon data, texture data, and so forth, relating to a virtual object placed in the virtual space20are stored.
Further, in the data storage unit40, skeleton data50representative of a virtual skeleton of the player object22, such as is shown in, e.g.,FIG. 4, is stored. The skeleton data50includes, e.g., a bone52corresponding to a node in a tree structure and a joint54corresponding to a link in the tree structure. That is, in this embodiment, the joint54connects the bones52, and defines a parent-child relationship between the bones52. Further, according to the skeleton data50according to this embodiment, a bone52correlated to, e.g., a body part is set as a root node in the tree structure. The bone52correlated to the body part is hereinafter referred to as a root bone52a. In this embodiment, the posture of the player object22is uniquely determined based on the posture of the skeleton defined by a plurality of bones52. Therefore, in this embodiment, once the positions of the respective bones52and the directions in which the respective bones52are directed (hereinafter simply referred to as a direction of the bone52) are determined, it is possible to generate a polygon model of the player object22in conformity with the positions and directions of the respective bones52. Note that, in this embodiment, the bone52and the joint54are invisible virtual objects.
In this embodiment, ragdoll data56, shown as an example inFIG. 5, as well is stored in advance in the data storage unit40. The ragdoll data56is data relating to a ragdoll, or an object to be subjected to a physical simulation processing by the physics engine. The ragdoll data56includes a ragdoll part58and a joint60for connecting the ragdoll parts58. In this embodiment, two ragdoll parts58are connected by two joints60(a physical joint60aand an animation joint60b). In this embodiment, each ragdoll part58has a shape like, e.g., a column, a capsule, a sphere, or a combination thereof. Note that, in this embodiment, the ragdoll part58and the joint60are invisible virtual objects.
In the data storage unit40, a value of a parameter indicative of physical quantity (e.g., size, mass, inertia moment (inertia tensor in this embodiment), extent of applying gravity, friction factor, extent of influence of wind, velocity, angular velocity, maximum velocity, maximum angular velocity, impulse value (value indicating an impulse), and so forth) of each ragdoll part58and a value indicative of a movement type of each ragdoll part58are stored. These values are changeable as the game proceeds. Note that a movement type of the ragdoll part58will be described later.
In this embodiment, in the data storage unit40, a value of a parameter indicative of physical quantity (e.g., strain) correlated to a pair of joints60(a combination of the physical joint60aand the animation joint60b) for connecting the ragdoll parts58is also stored. These values are changeable as the game proceeds.
In this embodiment, in the data storage unit40, a value of a parameter indicative of physical quantity relating to the whole virtual space20as well is stored. In the data storage unit40, e.g., the value of a parameter indicative of a wind velocity at a position in the virtual space20is stored so as to be correlated to the position coordinates of the position. In this embodiment, the value of a parameter indicative of physical quantity relating to the whole virtual space20is changeable as time passes according to a predetermined rule.
In this embodiment, in the data storage unit40, data describing a correlation relationship between the bone52and the ragdoll part58and data describing a correlation relationship between the joint54included in the skeleton data50and one pair of joints60included in the ragdoll data56are stored. As shown inFIG. 5, in this embodiment, the bone52may or may not be correlated to the ragdoll part58. In the example shown inFIG. 5, no ragdoll part58is correlated to the bones52corresponding to the upper left arm, the upper right arm, the left thigh, and the right thigh, respectively. In this embodiment, the ragdoll part58correlated to the root bone52ais referred to as a root ragdoll part58a. In this embodiment, the ragdoll data56always includes the root ragdoll part58a.
In this embodiment, as shown inFIG. 5, the joint54included in the skeleton data50may or may not be correlated to one pair of joints60included in the ragdoll data56.
In this embodiment, in the data storage unit40, transformation rule data describing a rule for transforming the skeleton data50into the ragdoll data56and inverse transformation rule data describing a rule for inversely transforming the ragdoll data56into the skeleton data50are stored in advance. In this embodiment, for example, while data describing a transformation matrix Ti is stored in the data storage unit40, the transformation matrix Ti is used as the transformation rule data, and an inverse matrix of the transformation matrix Ti is used as the inverse transformation rule data.
In this embodiment, in the data storage unit40, data describing a rule for determining the position and direction of the bone52having no correlated ragdoll part58, based on the position and direction of its parent bone52(e.g., data indicative of a relative position and direction relative to the position and direction of its parent bone52) is stored in advance. In this embodiment, this data describes a rule correlated to a parent-child relationship between the bone52and its parent bone52. This data may describe a rule commonly applicable to the parent-child relationship of the bones52or a rule different for each parent-child relationship of the bones52.
In this embodiment, in the data storage unit40, motion data describing a manner of changing the posture of the skeleton is stored in advance so as to be correlated to each of a plurality of motions (e.g., walk, run, fall, and so forth). In this embodiment, the motion data includes a combination of the number of a frame among a plurality of pre-set key frames and a posture of the skeleton correlated to the frame number and described by the skeleton data50(e.g., the position and direction of each bone52in the local coordinate system). In this embodiment, the motion data additionally includes a motion identifier and data indicative of a state (a motion driving state or a full ragdoll state in this embodiment) correlated to that motion. Note that the motion driving state and the full ragdoll state will be described later. In this embodiment, data indicative of the current motion of the player object22is also stored.
In this embodiment, in the data storage unit40, shift condition data describing a condition under which a motion shifts is stored in advance. The shift condition data describes that, e.g., a motion shifts from “walk” to “run” under the condition that an input amount in excess of a predetermined value is input into a controller, that the current motion, whatever it is, shifts to “fall” under the condition that no foot place is available for the player object22, and so forth. In this embodiment, to the shift condition data is correlated data describing a setting for use in shifting a motion (e.g., data describing the manner of interpolation based on motions before and after a shift, a damping factor (a damping rate), an activating condition, and so forth). Note that the damping factor and the activating condition will be described later.
In this embodiment, the spatial image generation and output unit46generates an image showing a picture obtained by viewing from the viewpoint32set in the virtual space20in the viewing direction (hereinafter referred to as a spatial frame image) at a predetermined interval (e.g., 1/60th of a second), and displays on the display unit18.
Below, an example of a flow of processing executed for every frame (e.g., at an interval of 1/60th of a second) in the game device10in this embodiment under the condition that the motion of the player object22does not shift in the previous frame will be described referring to the flowchart shown as an example inFIGS. 6A and 6B. In this example processing, suppose that information relating the current position (not necessarily coincident with the position where the player object22is placed) and direction of a player in the ongoing game is set in advance.
Initially, the operation state obtaining unit42obtains the operation state of the operating unit16(specifically, e.g., the kind of a button pressed and an amount by which the button is pressed) (S101). Then, based on the posture of the skeleton at the time of starting this processing (a motion, a frame number, and so forth), the operation state obtained in the processing at S101, and the current position and direction of the player, the object placement managing unit44determines the values of various parameters that are used in describing a change of the player object22in the virtual space20(S102). Specifically, in the processing at S102, the object placement managing unit44determines, e.g., the number of a frame in which the player object22is to be set in a posture indicated by the motion data, movement and rotation amounts of the player object22in the world coordinate system, the kind of an event having occurred, and the like.
When it is determined in the processing at S102that any event has occurred, the object placement managing unit44executes a processing according to the kind of the event (S103). This processing will be described later in detail.
Thereafter, based on the current motion of the player object22and the frame number determined in the processing at S102, the object placement managing unit44determines the position and direction of each bone52in the local coordinate system (that is, the posture of the skeleton), and places the bone52according to the determination (S104).
Specifically, the object placement managing unit44places the root bone52aat a position displaced from the current position of the player by a movement amount determined in the processing at S102so as to be directed in the direction rotated from the current direction of the player by a rotation amount determined in the processing at S102. In the above, the object placement managing unit44may adjust the positions and directions of the respective bones52such that the longitudinal direction of the root bone52acoincides with the normal direction relative to the floor object24. Then, the object placement managing unit44determines the positions and directions of the respective bones52in the local coordinate systems according to the data obtained through interpolation based on the posture data correlated to the frame numbers of the key frames immediately before and after the frame having the frame number determined, and then places the remaining bones52according to the positions and directions determined in the local coordinate system.
Thereafter, the object placement managing unit44obtains the transformation rule data stored in the data storage unit40, then as to the bone52having a correlated ragdoll part58, determines the position and direction of the ragdoll part58correlated to such a bone, based on the placed skeleton and the transformation rule data, and places the respective ragdoll parts58according to the determination (S105). Specifically, the object placement managing unit44multiplies the value indicative of the position and direction of each bone52placed by the transformation matrix Ti to thereby determine the value indicative of the position and direction of the correlated ragdoll part58.
Further, the object placement managing unit44determines a reference position Pb and a reference direction Db, based on the parameter value determined in the processing at S102(S106). In the above, specifically, the object placement managing unit44determines as the reference position Pb, e.g., a position displaced from the position displaced from the current position of the player by the movement amount determined in the processing at S102further by an offset amount determined based on the kind of the motion determined in the processing at S102, and as the reference direction Db the direction displaced from the direction rotated from the current direction of the player object22by the rotation amount determined in the processing at S102further by an offset amount determined based on the kind of the motion determined in the processing at S102.
Then, the object placement managing unit44places a rigid object for collision detection62in the virtual space20such that a representative position (a position of a representative point) thereof coincides with the reference position Pb and the pre-determined front part thereof is directed in the reference direction Db (S107). In addition, the object placement managing unit44places five proxy objects64in the virtual space20such that the respective representative positions thereof coincide respectively with the reference position Pb and positions displaced up, down, left, and right, respectively, from the reference position Pb (S108).FIG. 7shows an example in which the rigid object for collision detection62and five proxy objects64are placed in the virtual space20. The reference position Pb and the reference direction Db are also shown inFIG. 7. Note that the proxy objects64then placed are mere candidates for the proxy object64to be used in this processing example. Therefore, one of these proxy objects64is determined in a processing to be described later as the proxy object64to be used in this processing example. In this embodiment, the five proxy objects64are all directed in the reference direction Db. In this embodiment, the rigid object for collision detection62and the proxy objects64are invisible oval virtual objects placed in the virtual space20. In this embodiment, the position of the center of gravity of the rigid object for collision detection62coincides with that of the proxy object64placed at the reference position Pb; the rigid object for collision detection62is analogous to the proxy object64; the rigid object for collision detection62is larger than the proxy object64.
The object placement managing unit44executes a physical simulation processing relative to the proxy object64, the rigid object for collision detection62, and the ragdoll (S109). As a result, the positions, the directions, and the velocity parameter values (a velocity parameter value is expressed as a 3D vector) of the proxy object64, the ragdoll, and a virtual object in contact with the ragdoll and/or the rigid object for collision detection62may be changed. That is, for example, the position of the proxy object64buried in the wall object26may be changed to a position outside the wall object26. Note that the physical simulation processing will be described later in detail.
Thereafter, the object placement managing unit44judges a state correlated to the current motion of the player object22(S110). In this embodiment, motions such as “walk”, “run” are correlated to a motion driving state, while motions such as “fall” to a full ragdoll state.
Under the condition that it is determined that the state correlated to the current motion of the player object22is the motion driving state, the object placement managing unit44determines as the proxy object64to be used in this processing example, the proxy object64having the shortest distance to the reference position Pb of the five proxy objects64after execution of the physical simulation processing (S111), and eliminates the other proxy objects64from the virtual space20. Further, as shown inFIG. 8, whether or not there exists another virtual object, such as the wall object26, on seven segments connecting the raycast start point Rs determined in the previous frame and seven raycast end points Re is judged, in which the seven raycast end points Re are defined at the representative point (e.g., the center of gravity) of the proxy object64and respective positions displaced from the representative point forward, backward, left, right, up, and down, respectively, by a predetermined length (S112). Under the condition that the seven segments all intersect another virtual object (S112: Y), the position and direction of the proxy object64are changed to those of the proxy object64determined in the previous frame (S113). That is, the position and direction of the proxy object64return to those of the proxy object64determined in the previous frame. That is, the position and direction of the proxy object64remain unchanged from those in the previous frame. In this case, the position of the raycast start point Rs in the next frame as well remains unchanged.
Meanwhile, there is a segment that does not intersect another virtual object (S112: N), one of raycast end points Re determined according to a predetermined priority order rule is determined as the raycast start point Rs in the next frame (S114). In this case, the position and direction of the proxy object64remain unchanged from those which are determined in the processing at S111.
After the processing at S113or S114ends, the object placement managing unit44determines the position and direction of the proxy object64as the current position and direction of the player in the next frame (S115).
Meanwhile, under the condition that it is judged in the processing at S110that the state correlated to the current motion of the player object22is the full ragdoll state, the position and direction of the root ragdoll part58asubjected to the physical simulation processing are determined as the current position and direction of the player in the next frame (S116).
After the processing at S115or S116ends, the object placement managing unit44determines the position and direction of the bone52correlated to each ragdoll part58, based on the ragdoll subjected to the physical simulation processing, and places the bone52according to the determination (S117). In the above, the object placement managing unit44executes the processing at S117first relative to the parent bone52and then to the child bone52, beginning with the root bone52a. Specifically, as to the bone52having a correlated ragdoll part58, the object placement managing unit44obtains the inverse transformation rule data stored in the data storage unit40, and determines the position and direction of such a bone52, based on the position and direction of the ragdoll part58subjected to the physical simulation processing and the inverse transformation rule data. That is, the object placement managing unit44multiplies the value indicative of the position and direction of the ragdoll part58by an inverse matrix of the transformation matrix Ti, to thereby determine the value indicative of the position and direction of the correlated bone52.
Meanwhile, as to the bone52having no correlated ragdoll part58, the object placement managing unit44determines the position and direction of such a bone52, based on the data indicating the relative position and direction relative to the position and direction of the parent bone52and the position and direction of the parent bone52, determined in the processing at S117. In this manner, the position and direction of the bone52having no correlated ragdoll part58are changed based on a change in the position and direction of its parent bone52.
Thereafter, the object placement managing unit44places the player object22to be rendered in the virtual space20based on the positions and directions of the respective bones52, determined in the processing at S117(S118), and then determines the motion of the player object22in the next frame, based on the player object22after being placed and the operation state of the operating unit16, obtained in the processing at S101(S119). Specifically, in the above, the motion in the next frame is determined based on, e.g., information indicating whether or not there is a place to stand on, an inclination angle of the place to stand on, both determined after placement of the player object22, an impulse value set for each ragdoll, and the shift condition data.
Further, the spatial image generation and output unit46generates a spatial frame image showing a picture obtained by viewing from the viewpoint32in the viewing direction, and displays on the display unit18(S120).
Below, a physical simulation processing at S109will be described referring to an example in which the barrel object28collides against the rigid object for collision detection62and the barrel object28collides against the proxy object64, shown inFIG. 9.
Initially, the object placement managing unit44specifies a pair of virtual objects that are determined in collision with each other. In this embodiment, as shown inFIG. 9, each virtual object has an invisible judging area (invisible collision detection area66) set thereon covering, and the object placement managing unit44determines a pair of virtual objects of which judging areas (collision detection areas66) are in contact or overlap with each other as a pair of virtual objects in collision with each other. In the example shown inFIG. 9, it is judged that the proxy object64is in collision with the barrel object28, and that the rigid object for collision detection62is in collision with the barrel object28. Note that in this embodiment, it is set in advance such that collision detection is not executed between the rigid object for collision detection62and the proxy object64.
Then, the object placement managing unit44obtains the mass parameter and velocity parameter values that are set for each of the barrel object28and the proxy object64shown inFIG. 9, and calculates the amount of change in the velocity parameter value of the proxy object64, based on the obtained values and an index indicative of an extent by which the proxy object64contacts the barrel object28(an extent of being buried). Thereafter, the object placement managing unit44changes the velocity parameter value by the calculated amount of change, and then, moves the proxy object64by a movement amount (e.g., a movement amount obtained by multiplying the changed velocity parameter value by a predetermined number of times) specified based on the changed velocity parameter value. In addition, the object placement managing unit44obtains the inertia tensor parameter and angular velocity parameter values that are set for each of the barrel object28and the proxy object64, shown inFIG. 9, and calculates the amount of change in the angular velocity parameter value of the proxy object64, based on the values obtained and an index indicative of an extent by which the proxy object64contacts the barrel object28(an extent of being buried). Thereafter, the object placement managing unit44changes the angular velocity parameter value by the calculated amount of change, and then, rotates the proxy object64by a rotation amount (e.g., a rotation amount obtained by multiplying the changed angular velocity parameter value by a predetermined number of times) specified based on the changed angular velocity parameter value.
Further, the object placement managing unit44obtains the mass parameter and velocity parameter values that are set for each of the barrel object28and the rigid object for collision detection62, shown inFIG. 9, and calculates the amount of change in the velocity parameter value of the barrel object28, based on the values obtained and an index indicative of an extent by which the rigid object for collision detection62contacts the barrel object28(an extent of being buried). Thereafter, the object placement managing unit44changes the velocity parameter value by the calculated amount of change, and then, moves the barrel object28by a movement amount (e.g., a movement amount obtained by multiplying the changed velocity parameter value by a predetermined number of times) specified based on the changed velocity parameter value. In addition, the object placement managing unit44obtains the inertia tensor parameter and angular velocity parameter values that are set for each of the barrel object28and the rigid object for collision detection62, and calculates the amount of change in the angular velocity parameter value of the barrel object28, based on the values obtained and an index indicative of an extent by which the rigid object for collision detection62contacts the barrel object28(an extent of being buried). Thereafter, the object placement managing unit44changes the angular velocity parameter value by the calculated amount of change, and then, rotates the barrel object28by a rotation amount (e.g., a rotation amount obtained by multiplying the changed angular velocity parameter value by a predetermined number of times) specified based on the changed angular velocity parameter value.
In this embodiment, the above described calculation of an amount of change is executed using the known physics engine function. Below, referring toFIG. 10, one example of a method for calculating a velocity parameter value by the physics engine will be described. In the description below, assume a case, as shown inFIG. 10, in which a left virtual object (a mass parameter value: mA, a velocity parameter value: vA (positive in the rightward direction)) collides against a right virtual object (a mass parameter value: mB, a velocity parameter value: vB (positive in the rightward direction)). The length d by which the virtual objects overlap with each other in the direction along the straight line connecting the centers of gravity of the virtual objects is used as an index indicative of an extent of contact between the virtual objects (an extent of being buried).
The post-collision velocity vA′ of the left virtual object is calculated as vA′=vA−(mB/(mA+mB))×(alpha×(vA−vB)+beta×d), and the post-collision velocity vB′ of the right virtual object is calculated as vB′=vB+(mA/(mA+mB))×(alpha×(vA−vB)+beta×d), wherein alpha and beta are predetermined adjustment values.
As described above, according to the physics engine, the amounts of change in the velocity parameter values of the virtual objects in collision are determined based on the ratio of the mass parameter values (the ratio of the mass parameter value of a collision partner relative to the sum of the mass parameter values), the relative velocity, the extent of contact between the virtual objects (the extent of being buried), and so forth. Similarly, according to the physics engine, the amounts of change in the angular velocity parameter values of the respective virtual objects in collision are determined based on the inertia tensor values of the respective virtual objects, the relative angular velocity, the extent of contact between the virtual objects (an extent of being buried), and so forth.
As the extent of contact between the virtual objects (an extent of being buried) inFIG. 9, e.g., the length by which the judging areas (the collision detection areas66) overlap with each other in the direction along the straight line connecting the projected points of the centers of gravity of the virtual objects when the virtual objects are projected onto a predetermined projection surface may be usable. In this embodiment, the longer the length is, the larger the above described amount of change becomes. For example, in the physical simulation processing applied to a collision between the rigid object for collision detection62and the barrel object28, the length d1shown inFIG. 9is used, while in the physical simulation processing applied to a collision between the proxy object64and the barrel object28, the length d2shown inFIG. 9is used.
In this embodiment, mass parameter and inertia tensor parameter values that are reasonable to be set for the player object22in view of the relationship with another virtual object in a game are set for the rigid object for collision detection62. Specifically, for example, values are set such that the mass ratio and the inertia tensor ratio between the player object22and another virtual object are compatible with those between the player and another object in a game. Meanwhile, values sufficiently larger than those of the mass parameter and the inertia tensor parameter that are reasonable to be set for the player object22in view of the relationship with another virtual object in a game are set as the values of the mass parameter and the inertia tensor parameter of the proxy object64.
In this embodiment, the mass parameter and inertia tensor parameter values to be set for the proxy object64are determined based on the attribute of a collision partner virtual object. In this embodiment, e.g., larger values of the mass parameter and the inertia tensor parameter of a collision partner virtual object lead to larger values of the mass parameter and the inertia tensor parameter of the proxy object64. For example, values in proportion to the values of the mass parameter and the inertia tensor parameter that are set for a collision partner virtual object are set as the values of the mass parameter and the inertia tensor parameter for the proxy object64. Further, e.g., the mass parameter and inertia tensor parameter values to be set for the proxy object64may be determined according to the kind of the collision partner virtual object (e.g., whether the virtual object is the wall object26or the barrel object28, and so forth).
In this embodiment, a parameter value correlated to the player object22that is a base for calculation of a change in the physical quantity (velocity or the like) of a collision partner virtual object (the mass parameter and inertia tensor parameter values set for the rigid object for collision detection62here) differs from a parameter value correlated to the player object22that is a base for calculation of a change in the physical quantity (velocity or the like) of the player object22(the mass parameter and inertia tensor parameter values set for the proxy object64here). Therefore, by setting a parameter value such that a calculated result by the physics engine does not become unstable due to influence of a round error or the like, it is possible to stabilize a calculated result by the physics engine. Therefore, it is possible to reduce possibility of lessening reality in expression of a collision.
Further, in this embodiment, as the rigid object for collision detection62is set larger than the proxy object64, it can happen that a collision partner virtual object collides against the rigid object for collision detection62but not the proxy object64. Further, as mass parameter and inertia tensor parameter values that are reasonable to be set for the player object22in view of the relationship with another virtual object in a game are set for the rigid object for collision detection62, it is expected that a collision partner virtual object moving can be expressed appropriately (e.g., when expressing a virtual object being blown off). Meanwhile, as values sufficiently larger than the mass parameter and inertia tensor parameter values that are reasonable (e.g., values in proportion to the values of the mass parameter and inertia tensor parameter set for the collision partner virtual object) are set as the mass parameter and inertia tensor parameter values of the proxy object64, it is expected that, under the condition that it is judged that a virtual object having large values for the mass parameter and inertia tensor parameter (e.g., the wall object26) collides against the proxy object64, the proxy object64stops sharply free from influence of a round error.
In this embodiment, as it is possible to set mass parameter and inertia tensor parameter values for the proxy object64that are in conformity with the attribute of a collision partner virtual object, wider variation can be ensured in setting a parameter value, and accordingly, wider variation can be ensured also in expression of a picture in which virtual objects collide against each other in the virtual space20.
In this embodiment, of a plurality of candidate proxy objects64, the proxy object64having the shortest distance to the reference position Pb is determined in the processing at S111as the proxy object64to be used in this processing example. This makes it possible to move the player object22toward a position as intended, and also to reduce the possibility of unrealistic expression of an image, such as the player object22being caught by the wall object26having fine concaves and convexes formed thereon, the player object22being blown off unexpectedly large due to a small step formed on the floor object24, and so forth. Further, as the proxy object64does not move when a virtual object exists on a segment that connects each of a predetermined number of points defined on the proxy object64determined in the processing at S111and the point defined on the proxy object64in the previous frame, it is possible to reduce the possibility of the proxy object64passing through the virtual object.
In this embodiment, the object placement managing unit44can further change the position and direction of a virtual object, based on a parameter value set for each virtual object indicative of an extent of influence of wind, and a wind velocity parameter value correlated to the position where the virtual object is placed.
Note that, basically, a physical simulation processing similar to the above described is executed with respect to a collision between the ragdoll part58and another virtual object, though there may be a difference due to a restriction condition by the joint60or the like. In this embodiment, the value of a movement type of each ragdoll part58is determined depending on the kind of a motion. Specifically, the value of a movement type may indicate, e.g., a key frame, a position control, a velocity control, joint control, position control (one way), velocity control (one way), joint control (one way), and so forth. The ragdoll part58having a movement type value indicative of a key frame does not change its position as a result of the physical simulation processing even after collision with another virtual object. The ragdoll part58having a movement type value indicative of position control is placed in a position determined based on the combination of the kind of a motion and a frame number, and then subjected to the physical simulation processing. The ragdoll part58having a movement type value indicative of velocity control is given a velocity parameter value determined based on the difference between the actual position and the position determined based on the combination of a motion kind and a frame number, and then subjected to the physical simulation processing. The ragdoll part58having a movement type value corresponding to “one way” described above is affected by a collision partner but does not affect a collision partner.
For the ragdoll part58having a movement type value indicative of joint control, the angle relative to its parent ragdoll part58, determined based on the combination of a motion kind and a frame number, is set as the angle of the animation joint60b, and a predetermined physical restriction condition is set for the physical joint60a. Then, after thus setting made to the joint60, the physical simulation processing is executed. Note that in the physical simulation processing, the angle of the animation joint60bremains unchanged, while the angle of the physical joint60ais changeable within a range that satisfies the physical restriction condition. In this embodiment, a result of the physical simulation processing applied to the animation joint60band that to the physical joint60aare mixed at a ratio according to a strain parameter value set for the joint60(e.g., for the strain parameter value 100%, the proportion of the animation joint60bis 100%, and for the strain parameter value 0%, the proportion of the physical joint60ais 100%), and the result of the mixture is considered as the final result of the physical simulation processing.
As described above with reference to the processing at S107, in this embodiment, the ragdoll part58subjected to the physical simulation processing is transformed into the correlated bone52, according to the inverse transformation rule data. Meanwhile, as to some bones52having no correlated ragdoll part58, the position and direction of such a bone52are determined based on the position and direction of its parent bone52. That is, in this embodiment, the total number of the ragdoll parts58to be subjected to the physical simulation processing is smaller than that of all bones52. Thus, in this embodiment, a calculation load in the physical simulation processing at S109executed in the game device10can be reduced, compared to a case in which all bones have correlated ragdoll parts58.
Further, when, e.g., the motion shifts in the processing at S119, the position and direction of the player object22may be determined according to the setting indicated by the data stored in the data storage unit40. Specifically, for example, the position of the player object22to be rendered may be determined, based on a result of interpolation based on a result of the processing at S118applied to the motion before the shift and that after the shift.
In this embodiment, when the motion shifts, the processing at S101to S120is modified according to the setting indicated by the data correlated to the shift condition data. For example, an interpolation is executed over some frames, based on a result of the processing applied to the motion before the shift and that after the shift at a ratio determined according to the setting indicated by the data correlated to the shift condition data, and the obtained interpolated result is considered as a final processing result. Note that in this embodiment, over some frames, the percentage of the processing result with the motion before the shift becomes smaller, while that after the shift becomes larger.
In this embodiment, it is possible that a virtual object that has been in the motion driving state up to the previous frame shifts to be in the full ragdoll state. In this case, in this embodiment, the object placement managing unit44executes the physical simulation processing in the full ragdoll state, using a velocity parameter value that is a result of processing executed in the motion driving state. In the above, in this embodiment, under the condition that the above described activating condition correlated to a motion shift is satisfied (e.g., under the condition that a component of the velocity parameter value, the component being in the vertically upward direction set for the virtual space20is equal to or larger than a predetermined value), a component of the velocity parameter value after the physical simulation processing in the full ragdoll state, the component being in the vertically upward direction set in advance for the virtual space20, is multiplied by a value of the above describing damping factor (e.g., the value that is set is any real value between 0 and 1) correlated to a motion shift, to thereby determine the final velocity parameter value. With the above, the direction of the vector indicative of the final velocity parameter value is displaced to be directed more vertically downward relative to the direction of the vector indicative of the velocity parameter value before the multiplication of the damping factor value. For example, under the condition that the velocity vector indicative of the velocity parameter is set as being directed from the current position of the player in the frame preceding by two to that in the frame preceding by one, the velocity vector indicative of the velocity parameter is changed to be directed more vertically downward than the direction set. This makes it possible to prevent a situation lack of reality (e.g., the player object22is blown up) after shifting to the full ragdoll state.
Below, an example of a processing at S103, which is executed depending on the kind of an event having occurred, will be described referring toFIG. 11. Suppose here that an event in which, e.g., the player object22obtains a spear object30occurs.FIG. 11is a diagram showing one example of a picture obtained by viewing the rigid object for collision detection62and the proxy object64from above the player object22when the event occurs.
As shown inFIG. 11, under the condition that the above described event occurs, the object placement managing unit44enlarges the proxy object64into a shape that contains both of the player object22and the spear object30, and eliminates the judging area (the collision detection area66) set on the spear object30. Then, the object placement managing unit44sets the judging area (the collision detection area66) covering the enlarged proxy object64as the judging area (the collision detection area66) correlated to both of the proxy object64and the spear object30. In this manner, a closed area containing both of the player object22and the spear object30is set as the judging area (the collision detection area66) correlated to both of the proxy object64and the spear object30. Further, in this embodiment, as shown inFIG. 11, the shapes of the rigid object for collision detection62and the judging area (the collision detection area66) covering the rigid object for collision detection62are also changed, following the change in the shape of the proxy object64, so as to contain the changed proxy object64.
In this embodiment, under the condition that the judging area (the collision detection area66) covering the proxy object64contacts (or overlaps with) the judging area (the collision detection area66) of another virtual object, it is judged that the proxy object64collides against the other virtual object, and under the condition that the judging area (the collision detection area66) covering the rigid object for collision detection62contacts (or overlaps with) the judging area (the collision detection area66) of another virtual object, it is determined that the rigid object for collision detection62collides against the other virtual object. Note that in the above, alternatively, it may be judged that the spear object30or the player object22collides against the other virtual object, instead of judging that the proxy object64or the rigid object for collision detection62collides against the other virtual object, under the condition that the judging area (the collision detection area66) of the proxy object64or the rigid object for collision detection62contacts (or overlaps with) the judging area (the collision detection area66) of the other virtual object.
In this manner, in this embodiment, it is possible to arrange such that the collision detection processing is not executed between the player object22and the spear object30after occurrence of an event in which the player object22obtains the spear object30.
Further, as shown inFIG. 11, the object placement managing unit44may set the proxy object64having a shape that partially includes a fan-shaped column, and determines the central angle theta of the fan shape of a cross section of the fan-shaped column, based on the angular velocity parameter value set for the player object22. Specifically, e.g., a value obtained by multiplying the angular velocity parameter value by one frame time interval may be set as the value of the central angle theta of the fan shape. In the example shown inFIG. 22, two fan-shaped columns are shown, and the centers of the respective fan shapes of cross sections of the respective fan-shaped columns are set at positions that are determined based on the positional relationship between the player object22and the spear object30(e.g., the neighbourhood of the player object22). As to the fan shapes of cross sections of the respective fan-shaped columns, a segment connecting the center of the fan shape and the tip end of the spear object30and a segment obtained by rotating the segment by the rotation angle theta in the inverse direction of the rotation direction of the player object22are defined as the respective radii of the respective fan shapes.
In this manner, even when a motion such as, e.g., brandishing an elongate virtual object, such as the spear object30, should be performed in the virtual space20with a virtual object, such as the wall object26, present on the orbit of the spear object30that moves in one frame, as shown inFIG. 11, it is possible to judge that the proxy object64collides against the wall object26and that the rigid object for collision detection62collides against the wall object26.
Alternatively, the object placement managing unit44may set the proxy object64having a shape that partially includes a rectangular parallelepiped having a depth corresponding to the distance by which the player object22and the spear object30move in the virtual space20within a predetermined period of time (e.g., a distance of movement in one frame).
Further, the object placement managing unit44may gradually enlarge the shape of the proxy object64and the judging area (the collision detection area66) covering the proxy object64after occurrence of an event in which the player object22obtains the spear object30.
Note that the present invention is not limited to the above-described embodiment.
For example, under the condition that the above described activating condition correlated to a motion shift is satisfied, the object placement managing unit44may multiply also a velocity component of a velocity parameter value other than the component in the vertically upward direction set for the virtual space20by a predetermined value, to thereby reduce the final velocity parameter value, or multiply an angular velocity parameter value by a predetermined value to thereby reduce the final angular velocity parameter value.
Further, in the processing at S112, the judgment as to whether or not there exists another virtual object on a segment may not be executed as to two segments, namely, the segments connecting the raycast start point Rs determined in the previous frame and the raycast end points at respective positions displaced forward and upward, respectively, by a predetermined length relative to the representative point of the proxy object64.
Further, e.g., the size of the rigid object for collision detection62may be changed depending on the kind of a virtual object that is determined as colliding against the rigid object for collision detection62. For example, under the condition that a collision partner virtual object is a virtual object that is better be blown off more largely, the rigid object for collision detection62may be set larger in the size.
In the processing at S111, of the positions of the five proxy objects64subjected to the physical simulation processing, the proxy object64having a coordinate value in a specific direction (e.g., a coordinate value in the vertical direction) that is closest to a coordinate value in the specific direction (e.g., a coordinate value in the vertical direction) of the reference position Pb may be determined as the proxy object64in the above described processing example.
Although the physical simulation processing is executed based on the velocity parameter values of the virtual objects in collision in this embodiment, the physical simulation processing may be executed based on other information relating to a relationship between the moving velocities of two virtual objects, such as, a relative velocity of one virtual object relative to another virtual object, and so forth, instead of the velocity parameter values of the virtual objects in collision.
This embodiment may be applied to an information processing system (e.g., a simulation system, an image processing system, and the like) other than the game device10. Note that the above described specific numerical values, specific character strings, and specific numerical values in the drawings are only example, and not limiting.
A program according to one embodiment of the present invention may be a program stored in a non-transitory computer readable information storage medium, for causing a computer to function as an information processing system for changing the posture of an object placed in a virtual space, wherein the object of which posture is to be changed includes a plurality of elements for which a connection relationship is defined, the plurality of elements are grouped into a first element of which at least one of the position and the direction is determined based on a relationship with another object placed in the virtual space, and a second element of which at least one of the position and the direction is determined based on a change in at least one of the position and the direction of the first element, and the program may include first element changing instructions to change at least one of the position and the direction of the first element according to a relationship between the value of a parameter correlated to the other object placed in the virtual space and the value of a parameter correlated to the first element, and second element changing instructions to change at least one of the position and the direction of the second element according to a change in at least one of the position and the direction of the first element connected thereto made by the first element changing instructions.
An information storage medium according to one embodiment of the present invention may be a non-transitory computer readable information storage medium storing a program for causing a computer to function as an information processing system for changing the posture of an object placed in a virtual space, wherein the object of which posture is to be changed includes a plurality of elements for which a connection relationship is defined, the plurality of elements are grouped into a first element of which at least one of the position and the direction is determined based on a relationship with another object placed in the virtual space, and a second element of which at least one of the position and the direction is determined based on a change in at least one of the position and the direction of the first element, and the program may include first element changing instructions to change at least one of the position and the direction of the first element according to a relationship between the value of a parameter correlated to the other object placed in the virtual space and the value of a parameter correlated to the first element, and second element changing instructions to change at least one of the position and the direction of the second element according to a change in at least one of the position and the direction of the first element connected thereto made by the first element changing instructions.
An information processing system according to the present invention may be an information processing system for changing the posture of an object placed in a virtual space, wherein the object of which posture is to be changed includes a plurality of elements for which a connection relationship is defined, the plurality of elements are grouped into a first element of which at least one of the position and the direction is determined based on a relationship with another object placed in the virtual space, and a second element of which at least one of the position and the direction is determined based on a change in at least one of the position and the direction of the first element, and the information processing system may comprise a first element changing unit for changing at least one of the position and the direction of the first element according to a relationship between the value of a parameter correlated to the other object placed in the virtual space and the value of a parameter correlated to the first element, and a second element changing unit for changing at least one of the position and the direction of the second element according to a change in at least one of the position and the direction of the first element connected thereto made by the first element changing unit.
An information processing method according to the present invention may be an information processing method for changing the posture of an object placed in a virtual space, wherein the object of which posture is to be changed includes a plurality of elements for which a connection relationship is defined, the plurality of elements are grouped into a first element of which at least one of the position and the direction is determined based on a relationship with another object placed in the virtual space, and a second element of which at least one of the position and the direction is determined based on a change in the position or direction of the first element, and the method may comprise changing at least one of the position and the direction of the first element according to a relationship between the value of a parameter correlated to the other object placed in the virtual space and the value of a parameter correlated to the first element, and changing at least one of the position and the direction of the second element according to a change in at least one of the position and the direction of the first element connected thereto made in changing at least one of the position and the direction of the first element.
It is expected that, when a skeleton model expressing a structure of bones, joints, and so forth of one object (e.g., an object representative of a person) is generated in advance and a simulation is executed by the physics engine relative to an element correlated to each bone, change in the posture of the object can be finely expressed.
In the above, it is expected that a larger number of elements to be simulated by the physics engine leads to a finer expression of a change in the posture of the object. However, it is also expected that a load in information processing is increased.
In one embodiment of the present invention, as the number of the first elements is smaller than that of the elements included in the objects of which posture is to be changed, it is possible to reduce a load in image processing, compared to a case in which at least one of the position and the direction of all elements are determined based on a relationship with other objects. Further, in one embodiment of the present invention, as at least one of the position and the direction of the second element is changed according to a change in at least one of the position and the direction of the first element connected thereto, a change in the posture of the object can be finely expressed. That is, as described above, in one embodiment of the present invention, a change in the posture of an object can be finely expressed, while reducing a load in image processing.
In one embodiment of the present invention, the program may further include rule information obtaining instructions to obtain rule information that describes a transformation rule and an inverse transformation rule, in which the transformation rule relates to transformation of the first element into a ragdoll part for which an amount of change in at least one of the position and the direction thereof is determined based on a relationship between the value of a parameter correlated thereto and the value of a parameter correlated to another object placed in the virtual space, and the inverse transformation rule relates to transformation of a ragdoll part into the first element, and the first element changing instructions may include instructions to transform the first element into a correlated ragdoll part according to the transformation rule described by the rule information in changing at least one of the position and the direction of the first element, then change at least one of the position and the direction of the ragdoll part, based on the relationship between the value of the parameter correlated to the ragdoll part and the value of the parameter correlated to the other object placed in the virtual space, and inversely transform the ragdoll part subjected to the change into the correlated first element according to the inverse transformation rule described by the rule information.
In one embodiment of the present invention, the second element changing instructions may include instructions to change at least one of the position and the direction of the second element according to a change in at least one of the position and the direction of the first element connected thereto made by the first element changing instructions, and a rule correlated to a combination of the second element and the first element connected thereto.
In one embodiment of the present invention, the program may further include instructions to image generating instructions to generate an image showing a picture obtained by viewing a virtual space where an object is placed from a viewpoint set in the virtual space.
A program according to one embodiment of the present invention may be a program stored in a non-transitory computer readable information storage medium for causing a computer to function as an information processing system for controlling movement of an object placed in a virtual space, the program including instructions to: determining instructions to determine a reference position that makes a reference in determining a destination of a moving target object and a plurality of candidate positions that are candidates for a destination of the moving target object, based on the current position of the moving target object; candidate position changing instructions to change at least some of the plurality of candidate positions, based on a relationship between the candidate position and the position of another object placed in the virtual space; and moving target object position changing instructions to change the position of the moving target object to a position closest to the reference position of the plurality of candidate positions including some of the candidate positions of which positions are changed by the candidate position changing instructions.
An information storage medium according to the present invention may be a non-transitory computer readable information storage medium storing a program for causing a computer to function as an information processing system for controlling movement of an object placed in a virtual space, the program including instructions to: determining instructions to determine a reference position that makes a reference in determining a destination of a moving target object and a plurality of candidate positions that are candidates for a destination of the moving target object, based on the current position of the moving target object; a candidate position changing instructions to change at least some of the plurality of candidate positions, based on a relationship between the candidate position and the position of another object paced in the virtual space; and moving target object position changing instructions to change the position of the moving target object to a position closest to the reference position of the plurality of candidate positions including some of the candidate positions of which positions are changed by the candidate position changing instructions.
An information processing system according to the present invention may be an information processing system for controlling movement of an object placed in a virtual space, comprising a determining unit for determining a reference position that makes a reference in determining a destination of a moving target object and a plurality of candidate positions that are candidates for a destination of the moving target object, based on the current position of the moving target object; a candidate position changing unit for changing at least some of the plurality of candidate positions, based on a relationship between the candidate position and the position of another object paced in the virtual space; and a moving target object position changing unit for changing the position of the moving target object to a position closest to the reference position of the plurality of candidate positions including some of the candidate positions of which positions are changed by the candidate position changing unit.
An information processing method according to the present invention may be an information processing method for controlling movement of an object placed in a virtual space, the method comprising: determining a reference position that makes a reference in determining a destination of a moving target object and a plurality of candidate positions that are candidates for a destination of the moving target object, based on the current position of the moving target object; changing at least some of the plurality of candidate positions, based on a relationship between the candidate position and the position of another object paced in the virtual space; and changing the position of the moving target object to a position closest to the reference position of the plurality of candidate positions including some of the candidate positions of which positions are changed.
There has been known an information processing system capable of moving an object placed in a virtual space according to an amount of input of an operation on a controller or the like by a user.
For example, it may happen that, when a destination position to which to move an object which a user can move is determined based on an input amount of an operation, the object, when being placed as determined, may be buried in another object (e.g., an object representative of a wall) placed in the virtual space. In order to prevent such happening, it is possible to execute a simulation processing by a physics engine relative to an object to move, or a moving target object, that is temporarily placed at a position determined based on an input amount of an operation, and then to determine the position of the moving target object that is specified as a result of the simulation processing as the destination position of the moving target object. That is, for example, under the condition that the position where the moving target object is temporarily placed is in a wall object, a position being pushed back out of the wall may be determined as the position of a destination of the moving target object.
In the above, however, when a user moves the moving target object along an edge of the wall object, the moving target object may likely be caught on the surface of the wall. This may result in an awkward expression of the object moving.
Further, when a position at which a moving target object is temporarily placed is in a small step, it may be possible that a position away from the step farther than expected is determined as a destination of the moving target object. In this case, the moving target object may possibly be blown off when overcoming the small step. This may also result in an awkward expression of the object moving.
In an embodiment of the present invention, as the position of a moving target object is changed to a position of the plurality of candidate positions that is closest to the reference position, it is possible to reduce the possibility of an awkward expression of the object placed and moving in the virtual space in the information processing system.
In an embodiment of the present invention, the program may further include judging instructions to judge whether or not there is another object on a segment connecting each of a plurality of positions that are set using the above mentioned position closest to the reference position as a reference and the position where the moving target object is placed, and by the object position changing instructions, the position of the moving target object to the closest position may be changed when it is judged as to at least one segment that there is no another object on the segment by the judging instructions, and the position of the moving target object may not be changed when otherwise.
In an embodiment of the present invention, the program may further include moving instructions to move the moving target object to a position calculated based on a velocity vector set for the moving target object after the position of the moving target object is changed by the moving target object position changing instructions, and the moving instructions may include instructions to move the moving target object further to a position calculated based on a velocity vector resulting from displacement of the velocity vector set for the moving target object so as to be directed in a direction that is set in advance for the virtual space, when a predetermined condition is satisfied.
In an embodiment of the present invention, the moving instructions may include instructions to move the moving target object further to a position calculated based on a velocity vector resulting from displacement of the velocity vector set for the moving target object so as to be directed in a direction that is set in advance for the virtual space as a vertically downward direction.
In one embodiment of the present invention, the program may further include image generating instructions to generate an image showing a picture obtained by viewing the virtual space where the object is placed from a viewpoint set in the virtual space.
A program according to one embodiment of the present invention may be a program stored in a non-transitory computer readable information storage medium, for causing a computer to function as an information processing system for judging whether or not an object placed in a virtual space is in contact with another object, the program including: a judging instructions to judge that a judging target object is in contact with another object under the condition that a judging area set in the virtual space so as to be correlated to the judging target object has a predetermined positional relationship with a judging area set in the virtual space so as to be correlated to the other object, and a judging area changing instructions to change, upon occurrence of a predetermined event, the judging area set in the virtual space so as to be correlated to a first object into a single judging area correlated to the first object and a second object different from the first object.
An information storage medium according to the present invention may be a non-transitory computer readable information storage medium storing a program for causing a computer to function as an information processing system for judging whether or not an object placed in a virtual space is in contact with another object, the program including: a judging instructions to judge that a judging target object is in contact with another object under the condition that a judging area set in the virtual space so as to be correlated to the judging target object has a predetermined positional relationship with a judging area set in the virtual space so as to be correlated to the other object, and a judging area changing instructions to change, upon occurrence of a predetermined event, the judging area set in the virtual space so as to be correlated to a first object into a single judging area correlated to the first object and a second object different from the first object.
An information processing system according to the present invention may be an information processing system for judging whether or not an object placed in a virtual space is in contact with another object, comprising a judging unit for judging that a determining object is in contact with another object when a judging area set in the virtual space so as to be correlated to the judging target object has a predetermined positional relationship with a judging area set in the virtual space so as to be correlated to the other object, and a judging area changing unit for changing, upon occurrence of a predetermined event, the judging area set in the virtual space so as to be correlated to a first object into a single judging area correlated to the first object and a second object different from the first object.
An information processing method according to the present invention may be an information processing method for judging whether or not an object placed in a virtual space is in contact with another object, comprising: judging that a judging target object is in contact with another object when a judging area set in the virtual space so as to be correlated to the judging target object has a predetermined positional relationship with a judging area set in the virtual space so as to be correlated to the other object, and changing, upon occurrence of a predetermined event, the judging area set in the virtual space so as to be correlated to a first object into a single judging area correlated to the first object and a second object different from the first object.
As to a pair of objects placed in a virtual space of which judging areas are in contact (or overlap) with each other, it is possible to express movement of the objects placed in the virtual space by simulating a collision between the pair of objects, using a physics engine.
In the above, however, when expressing a situation in which two objects (the character object and the item in the example below) are moving as if the two objects were a single object, such as a situation in a computer game in which a character object having an item is moving, these two objects are judged as being in collision, and thus, possibly tried to be separated from each other in the simulation using the physics engine. To avoid the above, desirably, contact judgment is not executed as to two objects that are moving as one (e.g., contact judgment is not executed between a character object and the item).
Further, it is possible that setting a single judging area not only for two objects that are moving as one, but also for two or more objects which no longer require contact judgement to be made as a result of occurrence of some event can reduce a processing load in contact judgement between objects placed in the virtual space.
In one embodiment of the present invention, as the judging area set in the virtual space so as to be correlated to the first object is changed into a single judging area correlated to a combination of the first object and a second object upon occurrence of a predetermined event, it is possible to reduce a processing load in executing contact judgement relative to objects placed in the virtual space.
In one embodiment of the present invention, the judging instructions may include instructions to judge that at least one of the first and second objects is in contact with the other object under the condition that the judging area changed by the judging area changing instructions has a predetermined positional relationship with a judging area correlated to another object.
In one embodiment of the present invention, the judging instructions may include instructions to judge that the determining object is in contact with the other object under the condition that the judging area set in the virtual space so as to be correlated to a judging target object overlaps with the judging area set in the virtual space so as to be correlated to another object.
In one embodiment of the present invention, the judging area changing instructions may include instructions to change the judging area set in the virtual space so as to be correlated to the first object into a single judging area that is a closed area containing the judging area set in the virtual space so as to be correlated to the first object and the judging area set in the virtual space so as to be correlated to the second object.
In one embodiment of the present invention, the judging area changing instructions may include instructions to gradually enlarge the judging area set in the virtual space so as to be correlated to the first object or the judging area set in the virtual space so as to be correlated to the second object after occurrence of a predetermined event such that the judging area becomes a single judging area correlated to both of the first object and the second object.
In one embodiment of the present invention, at least one of the first and second objects is an object moving in the virtual space, and the judging area changing instructions may instructions to change the judging area set in the virtual space so as to be correlated to the first object into a single judging area that at least partially includes an area having a shape according to at least one of the length by which at least one of the first and second objects moves in the virtual space in a predetermined period of time and the angle by which at least one of the first and second objects rotates in a predetermined period of time.
In one embodiment of the present invention, the program may further include image generating instructions to generate an image showing a picture obtained by viewing a virtual space where the first and second objects are placed from a viewpoint set in the virtual space.
While there have been described what are at present considered to be certain embodiments of the invention, it will be understood that various modifications may be made thereto, and it is intended that the appended claims cover all such modifications as fall within the true spirit and scope of the invention.
Claims
- A non-transitory computer readable information storage medium storing a program for causing a computer to function as an information processing system for simulating a collision between objects placed in a virtual space, the program including: first control instructions, the first control instructions being instructions to change at least one of a position and a direction of a first object according to a positional relationship between a first area for judging and a second area for judging;and second control instructions, the second control instructions being instructions to change at least one of a position and a direction of a second object according to a positional relationship between a third area for judging and the second area for judging;wherein the first area for judging surrounds a first representation, the first representation representing a rigid object of the first object, the second area for judging surrounds a second representation, the second representation representing the second object, the third area for judging surrounds a third representation, the third representation representing a proxy object of the first object, the proxy object is different than the rigid object;and wherein the first control instructions include instructions to change at least one of the position and the direction of the first object by an amount that is determined, in changing at least one of the position and direction of the first object, based on moving velocity information relating to a relationship between a moving velocity of the first object and a moving velocity of the second object when the first object collides against the second object, passive physical quantity information having at least one of a value correlated to the mass and a value correlated to the inertia moment of the first object, and partner physical quantity information indicating physical quantity correlated to at least one of the mass and the inertia moment of the second object, and the second control instructions include instructions to change at least one of the position and the direction of the second object by an amount that is determined based on active physical quantity information having at least one of a value correlated to the mass and a value correlated to the inertia moment of the first object and differing from the value of the passive physical quantity information, and the partner physical quantity information.
- The medium according to claim 1 , wherein the first control instructions include instructions to change at least one of the position and the direction of the first object under a condition that at least a part of the first area for judging overlaps with at least a part of the second area for judging, and the second control instructions include instructions to change at least one of the position and the direction of the second object under a condition that at least a part of the third area for judging overlaps with at least a part of the second area for judging.
- A medium according to claim 1 , wherein the program further includes setting instructions to set a value of the active physical quantity information according to attribute of the second object, and the second control instructions include instructions to change at least one of the position and the direction of the second object by an amount that is determined based on the active physical quantity information of which value is set by the setting instructions.
- The medium according to claim 1 , wherein the program further includes image generating instructions to generate an image showing a picture obtained by viewing the virtual space where the first object and the second object are placed from a viewpoint set in the virtual space.
- An apparatus comprising a microprocessor operating under the control of a computer program for causing a computer to function as an information processing system for simulating a collision between objects placed in a virtual space, the program including: first control instructions, the first control instructions being instructions to change at least one of a position and a direction of a first object according to a positional relationship between a first area for judging and a second area for judging;and second control instructions, the second control instructions being instructions to change at least one of a position and a direction of a second object according to a positional relationship between a third area for judging and the second area for judging;wherein the first area for judging surrounds a first representation, the first representation representing a rigid object of the first object, the second area for judging surrounds a second representation, the second representation representing the second object, the third area for judging surrounds a third representation, the third representation representing a proxy object of the first object, the proxy object is different than the rigid object;and wherein the first control instructions include instructions to change at least one of the position and the direction of the first object by an amount that is determined, in changing at least one of the position and direction of the first object, based on moving velocity information relating to a relationship between a moving velocity of the first object and a moving velocity of the second object when the first object collides against the second object, passive physical quantity information having at least one of a value correlated to the mass and a value correlated to the inertia moment of the first object, and partner physical quantity information indicating physical quantity correlated to at least one of the mass and the inertia moment of the second object, and the second control instructions include instructions to change at least one of the position and the direction of the second object by an amount that is determined based on active physical quantity information having at least one of a value correlated to the mass and a value correlated to the inertia moment of the first object and differing from the value of the passive physical quantity information, and the partner physical quantity information.
- An information processing system for assisting expression of a situation in which objects placed in a virtual space collide against each other, comprising: a first control unit configured to change at least one of a position and a direction of a first object according to a positional relationship between a first area for judging and a second area for judging;and a second control unit configured to change at least one of a position and a direction of a second object according to a positional relationship between a third area for judging and the second area for judging;wherein the first area for judging surrounds a first representation, the first representation representing a rigid object of the first object, the second area for judging surrounds a second representation, the second representation representing the second object, the third area for judging surrounds a third representation, the third representation representing a proxy object of the first object, the proxy object is different than the rigid object;and wherein the first control unit is further configured to change at least one of the position and the direction of the first object by an amount that is determined, in changing at least one of the position and direction of the first object, based on moving velocity information relating to a relationship between a moving velocity of the first object and a moving velocity of the second object when the first object collides against the second object, passive physical quantity information having at least one of a value correlated to the mass and a value correlated to the inertia moment of the first object, and partner physical quantity information indicating physical quantity correlated to at least one of the mass and the inertia moment of the second object, and the second control unit is further configured to change at least one of the position and the direction of the second object by an amount that is determined based on active physical quantity information having at least one of a value correlated to the mass and a value correlated to the inertia moment of the first object and differing from the value of the passive physical quantity information, and the partner physical quantity information.
- An information processing method for simulating a collision between objects placed in a virtual space collide against each other, the method comprising: controlling to change at least one of a position and a direction of a first object according to a positional relationship between a first area for judging and a second area for judging;and controlling to change at least one of a position and a direction of a second object according to a positional relationship between a third area for judging and the second area for judging;wherein the first area for judging surrounds a first representation, the first representation representing a rigid object of the first object, the second area for judging surrounds a second representation, the second representation representing the second object, the third area for judging surrounds a third representation, the third representation representing a proxy object of the first object, the proxy object is different than the rigid object;and controlling to change at least one of the position and the direction of the first object by an amount that is determined, in changing at least one of the position and direction of the first object, based on moving velocity information relating to a relationship between a moving velocity of the first object and a moving velocity of the second object when the first object collides against the second object, passive physical quantity information having at least one of a value correlated to the mass and a value correlated to the inertia moment of the first object, and partner physical quantity information indicating physical quantity correlated to at least one of the mass and the inertia moment of the second object, and controlling to change at least one of the position and the direction of the second object by an amount that is determined based on active physical quantity information having at least one of a value correlated to the mass and a value correlated to the inertia moment of the first object and differing from the value of the passive physical quantity information, and the partner physical quantity information.
Disclaimer: Data collected from the USPTO and may be malformed, incomplete, and/or otherwise inaccurate.