Computer program product, information processing system, information processing device, and information processing method
By updating the terrain polygon mesh data in the game program and projecting traces with polygon mesh, the problem of unnatural trajectory display on freely deformed terrain is solved, and natural and efficient display of terrain deformation or damage traces is achieved.
Patent Information
- Application Number
- CN202510106172.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-01-30
- Filing Date
- 2025-01-23
- Publication Date
- 2025-08-01
AI Technical Summary
In existing games, the method of leaving traces on the trajectory when the terrain is deformed has not been fully optimized, especially on freely deformed terrain, the trajectory display is not natural and effective enough.
Through the game program executed in the information processing device, the terrain polygonal mesh data is updated, and deformation actions are performed on the terrain based on the player's operation input, the polygonal mesh is used to project traces, and the texture is used to draw deformation or damage traces, combined with the drawing processing of the terrain polygonal mesh, a virtual space image is generated.
It realizes that the deformation or damage traces are left on the terrain objects are naturally left, which improves the nature and effectiveness of the trajectory display, reduces the processing complexity, and adapts to freely deformed terrain.
Smart Images

Figure CN120393426A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a computer program product, an information processing system, an information processing apparatus, and an information processing method capable of executing a game using terrain. Background Art
[0002] Conventionally, there has been the following type of game: when a character slides, polygons of sliding traces are generated and textures are attached thereto, thereby drawing a trajectory (for example, refer to Japanese Patent Laid-Open No. 2002-140723).
[0003] However, in the above-described conventional game, deformation of the ground is not assumed, and there is room for improvement in leaving a trajectory when the terrain is deformed.
[0004] Therefore, an object of the present invention is to provide a computer program product, an information processing system, an information processing apparatus, and an information processing method capable of adding a trace to a freely deformable terrain. Summary of the Invention
[0005] To solve the above problems, the present invention adopts the following configuration.
[0006] The game program of this embodiment is a game program executed in a computer of an information processing apparatus, and the game program causes the computer to perform the following processes: storing terrain object data and terrain polygon mesh data in a storage medium, wherein the terrain object data is data for representing a terrain object in a virtual space, and holds a voxel value for each voxel included in a voxel space arranged in the virtual space, the voxel value indicating the degree to which the object occupies the space defined by the voxel, and the terrain polygon mesh data is a terrain polygon mesh generated based on the terrain object data and representing the surface of the terrain object. Further, the game program causes the computer to perform the following processes: based on an operation input by a player, causing a player character to perform a deformation action that deforms the terrain object in the virtual space; in a case where the deformation action hits the terrain object, updating the voxel value of the voxels included in a deformation range set based on the position hit by the deformation action, and updating the terrain polygon mesh data in correspondence with the update of the voxel value. Further, the game program causes the computer to perform the following processes: at the place where the deformation action hits the terrain object, projecting a polygon mesh for a trace onto the terrain polygon mesh, setting, for each vertex included in the polygon mesh for the trace, the coordinates of the vertex that can be projected onto the terrain polygon mesh based on the position onto which the polygon mesh for the trace is projected, and setting not to display a polygon including a vertex that cannot be projected onto the terrain polygon mesh, thereby arranging the polygon mesh for the trace on the terrain polygon mesh. Moreover, the game program causes the computer to perform the following processes: generating an image of the virtual space through a drawing process including drawing of the terrain polygon mesh or a terrain polygon mesh for display and drawing of the polygon mesh for the trace, wherein the terrain polygon mesh for display is separately generated from the terrain polygon mesh and is for displaying the surface of the terrain object, and the drawing of the polygon mesh for the trace uses a texture for the trace representing the trace of the deformation action.
[0007] According to the above, in a case where the deformation action hits the terrain object, at the hit place, projecting the polygon mesh for the trace onto the terrain polygon mesh, setting the coordinates of the vertex that can be projected based on the position onto which the polygon mesh for the trace is projected, and setting the vertex that cannot be projected not to be displayed. Thereby, it is possible to arrange the polygon mesh for the trace on the terrain object by a simple method, and it is possible to leave a trace of the deformation action on the terrain object.
[0008] In the above structure, it can also be that the deformation action is a destruction action that destroys the terrain object. It can also be that the game program causes the computer to further perform the following process: when the destruction action hits the terrain object, update the voxel value to a value indicating the non-existence of the terrain object for the voxels included in the deformation range.
[0009] According to the above, it is possible to destroy the terrain object through the destruction action and leave a trace of the destruction action on the terrain object.
[0010] In the above structure, it can also be that the destruction action is an action performed from the player character towards a specified direction. It can also be that the game program causes the computer to further perform the following process: project the trace polygon mesh from the start position based on the position of the player character in the direction of the destruction action, and perform the projection at the place where the destruction action hits.
[0011] According to the above, it is possible to perform a destruction action from the position of the player character towards the specified direction, and it is possible to arrange the trace polygon mesh on the terrain object according to the position of the player character and the direction of the destruction action.
[0012] In the above structure, it can also be that the game program causes the computer to further perform the following process: in the drawing of the trace polygon mesh, do not draw the part where the terrain object does not exist within a specified range inside the trace polygon mesh, but draw the part where the terrain object exists within the specified range.
[0013] According to the above, in the drawing process of the trace polygon mesh, draw for the part where the terrain object exists within the specified range inside the trace polygon mesh, so that it is possible to leave a part of the trace without showing the traces of other parts.
[0014] In the above structure, it can also be that the game program causes the computer to further perform the following process: when the destruction action is further performed on the terrain object on which the trace polygon mesh is arranged, project the trace polygon mesh onto the terrain polygon mesh again, set the coordinates of the vertices that can be projected onto the terrain polygon mesh based on the position where the trace polygon mesh is projected, and set it so that the polygon containing the vertices that cannot be projected onto the terrain polygon mesh is not displayed, thereby arranging the trace polygon mesh on the terrain polygon mesh.
[0015] According to the above, in the case where a destruction action is further performed on the terrain object configured with the polygon mesh for traces, the same projection process is performed again, whereby traces can be left on the damaged terrain object.
[0016] In the above structure, it may also be that the game program causes the computer to further perform the following process: setting the opacity of the vertices in the polygon mesh for traces that are adjacent to the polygons set not to be displayed to be lower than the opacity of other vertices that can be projected onto the terrain polygon mesh.
[0017] According to the above, by making the opacity of the vertices adjacent to the polygons set not to be displayed low, the vertices close to the vertices that cannot be projected onto the terrain object can be made semi-transparent. Thus, the boundary of the traces displayed on the terrain object can be made natural.
[0018] In the above structure, it may also be that the game program causes the computer to further perform the following process: based on the voxel value, generating the terrain polygon mesh by the following algorithm: arranging polygons in such a way as to determine the vertex positions between the voxels where the terrain object does not exist and the voxels where the terrain object exists; and recalculating the vertex positions of the terrain polygon mesh in at least the range including the voxels whose voxel values are updated based on the hit of the deformation action.
[0019] According to the above, the terrain polygon mesh can be updated when the voxel value is updated, so that the deformation of the terrain object can be easily performed.
[0020] In addition, a game program according to other embodiments is a computer program product executed in a computer of an information processing apparatus, and the computer program product causes the computer to perform the following processing: storing terrain polygon mesh data representing a terrain polygon mesh in a storage medium, the terrain polygon mesh representing the surface of a terrain object in a virtual space. The game program causes the computer to perform the following processing: causing a deformation event to occur in the virtual space, the deformation event deforming the terrain object; deforming the terrain polygon mesh based on the occurrence of the deformation event. In addition, the game program causes the computer to perform the following processing: at the location where the deformation event has occurred, projecting a polygon mesh for a trace onto the terrain polygon mesh, and for each vertex included in the polygon mesh for the trace, setting the coordinates of the vertex that can be projected onto the terrain polygon mesh based on the position onto which the polygon mesh for the trace is projected, and setting it such that a polygon including a vertex that cannot be projected onto the terrain polygon mesh is not displayed, thereby arranging the polygon mesh for the trace on the terrain polygon mesh. Moreover, the game program causes the computer to perform the following processing: generating an image of the virtual space through a rendering process including rendering of the terrain polygon mesh or the terrain polygon mesh for display and rendering of the polygon mesh for the trace, wherein the terrain polygon mesh for display is generated separately from the terrain polygon mesh and is used to display the surface of the terrain object, and the rendering of the polygon mesh for the trace uses a texture for the trace representing the trace of the deformation event.
[0021] According to the above, in the case where a deformation event has occurred, at the location where the deformation event has occurred, a polygon mesh for a trace is projected onto the terrain polygon mesh, the coordinates of the vertices that can be projected are set based on the position onto which the polygon mesh for the trace is projected, and the vertices that cannot be projected are set not to be displayed. Thereby, the polygon mesh for the trace can be arranged on the terrain object by a simple method, and a trace of the deformation event can be left on the terrain object.
[0022] In the above structure, it may also be that the game program causes the computer to further perform the following processing: in the case where the deformation event occurs again for the terrain object on which the polygon mesh for the trace is arranged, deforming the terrain polygon mesh and controlling it in such a way that a part of the polygon mesh for the trace corresponding to the non-deformed part of the terrain polygon mesh is left, and a part of the polygon mesh for the trace corresponding to the deformed part of the terrain polygon mesh is not displayed.
[0023] In the case where a deformation event occurs again in the terrain object configured with the polygon mesh for traces, the terrain polygon mesh can be deformed, and traces can be left on the part of the terrain polygon mesh that has not been deformed.
[0024] In addition, other embodiments may be an information processing system that executes the game program, may also be an information processing device, or may also be an information processing method.
[0025] According to the present invention, the polygon mesh for traces can be configured on the terrain object by a simple method. For example, traces of deformation actions can be left on the terrain object.
[0026] The above and other objects, features, aspects, and effects of the present invention will be further clarified from the following detailed description in comparison with the accompanying drawings. Description of the Drawings
[0027] Figure 1 It is a diagram showing an example of a game system.
[0028] Figure 2 It is a block diagram showing an example of the internal structure of the main device.
[0029] Figure 3 It is a block diagram showing an example of the internal structures of the main device, the left controller, and the right controller.
[0030] Figure 4 It is a diagram showing an example of a terrain object as a voxel object.
[0031] Figure 5 It is a diagram showing Figure 4 an example of the situation before and after a part of the terrain object shown is deleted.
[0032] Figure 6 It is a diagram showing Figure 4 an example of the situation before and after a part of the terrain object shown is deleted.
[0033] Figure 7 It is a diagram showing an example of the content of voxel data.
[0034] Figure 8 It is a diagram showing an example of property information indicating the properties of a material.
[0035] Figure 9 It is a diagram showing an example of texture information indicating the texture of a material.
[0036] Figure 10 It is a diagram showing an example of a method for generating a mesh.
[0037] Figure 11 This is a diagram showing an example of a game image including a terrain object.
[0038] Figure 12 This is a diagram showing an example of a game image when a player character PC performs a destruction action on a terrain object TO.
[0039] Figure 13 This is a diagram showing an example of a game image after the destruction action hits the terrain object TO.
[0040] Figure 14 This is a diagram showing from Figure 13 the state where the destruction action further hits the terrain object TO. This is an example of a game image.
[0041] Figure 15 This is a diagram for explaining a method of attaching a trace tr to a terrain object TOJ.
[0042] Figure 16 This is a diagram showing an example of a situation where a trace polygon mesh trpm is projected onto a terrain object TOJ.
[0043] Figure 17 This is a diagram showing an example of a vertex Vtf that cannot be projected onto a terrain object TOJ. [[ID=2)]]
[0044] Figure 18 This is a diagram showing an example of a trace polygon mesh trpm before and after excluding unnecessary vertices when the trace polygon mesh trpm is projected onto a terrain object TOJ.
[0045] Figure 19 This is a diagram showing a situation where another terrain object TOJ is arranged on a terrain object TO and a player character PC performs a destruction action on the terrain object TOJ.
[0046] Figure 20 This is a diagram showing the state before performing a destruction action on a terrain object TOJ on which a trace polygon mesh trpm is arranged.
[0047] Figure 21 This is a diagram showing the state after performing a destruction action on a terrain object on which a trace polygon mesh trpm is arranged.
[0048] Figure 22 This is a diagram showing an example of various data used in game processing in the game system 1.
[0049] Figure 23 This is a flowchart showing an example of the flow of game processing executed by the game system 1.
[0050] Figure 24It is a flowchart showing an example of the destruction operation process in step S5.
[0051] Figure 25 It is a flowchart showing an example of the trace process in step S25. Detailed implementation mode
[0052] [1. Structure of the game system]
[0053] Next, a game system according to an example of the present embodiment will be described. Figure 1 It is a diagram showing an example of the game system. An example of the game system 1 in the present embodiment includes a main body device (information processing device, which functions as the main body of the game device in the present embodiment) 2, a left controller 3, and a right controller 4. The main body device 2 is a device that executes various processes (for example, game processes) in the game system 1. The left controller 3 and the right controller 4 are devices having operation units for user input.
[0054] The left controller 3 and the right controller 4 can be respectively attached to and detached from the main body device 2. That is, the game system 1 can be used as a device in which the left controller 3 and the right controller 4 are respectively installed on the main body device 2 to be integrated. In addition, the game system 1 can also independently use the main body device 2, the left controller 3, and the right controller 4. In addition, hereinafter, the left controller 3 and the right controller 4 may be collectively referred to as "controllers".
[0055] Figure 2 It is a block diagram showing an example of the internal structure of the main body device 2. In addition to having the Figure 1 structure shown, the main body device 2 also has Figure 2 each of the components 17, 21, 23, 81 to 85, and 91 shown. Some of these components 17, 21, 23, 81 to 85, and 91 can also be installed as electronic components on a circuit board and housed in a housing 11.
[0056] The main body device 2 is provided with a display 12. The display 12 is used to display the images generated by the main body device 2. In the present embodiment, it is assumed that the display 12 is a liquid crystal display device (LCD). However, the display 12 can be any type of display device.
[0057] In addition, the main body device 2 is provided with a left terminal 17 as a terminal for wired communication between the main body device 2 and the left controller 3, and a right terminal 21 for wired communication between the main body device 2 and the right controller 4.
[0058] The main device 2 includes a processor 81. The processor 81 is an information processing unit that executes various information processes performed in the main device 2. For example, it can be composed of only a CPU (Central Processing Unit), or can be composed of an SoC (System-on-a-chip) including multiple functions such as CPU function and GPU (Graphics Processing Unit) function. The processor 81 executes various information processes by executing an information processing program (such as a game program) stored in a storage unit (specifically, an internal storage medium such as a flash memory 84, or an external storage medium installed in the slot 23, etc.).
[0059] As an example of the internal storage medium built in itself, the main device 2 includes a flash memory 84 and a DRAM (Dynamic Random Access Memory) 85. The flash memory 84 and the DRAM 85 are connected to the processor 81. The flash memory 84 is a memory mainly used for storing various data (which can also be programs) saved in the main device 2. The DRAM 85 is a memory used for temporarily storing various data used in information processing.
[0060] The main device 2 includes a slot 23. The slot 23 is provided on the upper side surface of the housing 11. The slot 23 has a shape capable of mounting a storage medium of a specified type. The storage medium of the specified type is, for example, a storage medium dedicated to the game system 1 and information processing devices of the same type as it (for example, a dedicated memory card). The storage medium of the specified type is used, for example, to store data used in the main device 2 (such as save data of an application, etc.) and / or a program executed in the main device 2 (such as a program of an application, etc.). In addition, the main device 2 includes a power button 28.
[0061] The main device 2 includes a slot interface (hereinafter abbreviated as "I / F".) 91. The slot I / F 91 is connected to the processor 81. The slot I / F 91 is connected to the slot 23, and reads and writes data of a storage medium of a specified type (such as a dedicated memory card) installed in the slot 23 according to the instruction of the processor 81.
[0062] The processor 81 appropriately reads or writes data among the flash memory 84, the DRAM 85, and the above-mentioned respective storage media to execute the above-mentioned information processes.
[0063] The main device 2 is provided with a network communication unit 82. The network communication unit 82 is connected to the processor 81. The network communication unit 82 communicates with external devices via a network (specifically, wireless communication). In the present embodiment, the network communication unit 82 is connected to a wireless LAN and communicates with external devices in a manner compliant with the Wi-Fi standard as the first communication method. In addition, the network communication unit 82 performs wireless communication with other main devices 2 of the same type by a specified communication method (for example, communication based on a custom protocol, infrared communication) as the second communication method. Furthermore, the wireless communication based on the above second communication method can perform wireless communication with other main devices 2 arranged within a closed local area network, realizing the function of so-called "local communication" capable of transmitting and receiving data by directly communicating between a plurality of main devices 2.
[0064] The main device 2 is provided with a controller communication unit 83. The controller communication unit 83 is connected to the processor 81. The controller communication unit 83 performs wireless communication with the left controller 3 and / or the right controller 4. The communication method between the main device 2 and the left controller 3 and the right controller 4 is arbitrary. In the present embodiment, the controller communication unit 83 communicates with the left controller 3 and with the right controller 4 in a manner compliant with the Bluetooth (registered trademark) standard.
[0065] The processor 81 is connected to the above-mentioned left terminal 17 and right terminal 21. When the processor 81 performs wired communication with the left controller 3, it sends data to the left controller 3 via the left terminal 17 and receives operation data from the left controller 3 via the left terminal 17. In addition, when the processor 81 performs wired communication with the right controller 4, it sends data to the right controller 4 via the right terminal 21 and receives operation data from the right controller 4 via the right terminal 21. Thus, in the present embodiment, the main device 2 can perform both wired communication and wireless communication with the left controller 3 and the right controller 4 respectively.
[0066] In addition, the display 12 is connected to the processor 81. The processor 81 displays an image generated (for example, by performing the above-mentioned information processing) and / or an image acquired from the outside on the display 12.
[0067] Figure 3 is a block diagram showing an example of the internal structures of the main device 2, the left controller 3, and the right controller 4. In addition, regarding the details of the internal structure related to the main device 2, Figure 2 has been shown, so Figure 3 is omitted.
[0068] The left controller 3 is provided with a terminal 42 for the left controller 3 to communicate with the main body device 2 in a wired manner. In addition, the left controller 3 is provided with a communication control unit 101 that communicates with the main body device 2. As Figure 3 shown, the communication control unit 101 is connected to each component including the terminal 42. In the present embodiment, the communication control unit 101 can communicate with the main body device 2 through both wired communication via the terminal 42 and wireless communication without passing through the terminal 42. The communication control unit 101 controls the communication method of the left controller 3 with respect to the main body device 2. That is, when the left controller 3 is installed on the main body device 2, the communication control unit 101 communicates with the main body device 2 via the terminal 42. In addition, when the left controller 3 is detached from the main body device 2, wireless communication is performed between the communication control unit 101 and the main body device 2 (specifically, the controller communication unit 83).
[0069] In addition, the left controller 3 is provided with a memory 102 such as a flash memory, for example. The communication control unit 101 is constituted by a microcomputer (also referred to as a microprocessor), for example, and executes various processes by executing the firmware stored in the memory 102.
[0070] The left controller 3 is provided with one or more buttons 103. In addition, the left controller 3 is provided with an analog joystick (described as "joystick" in Figure 3 ). The buttons 103 and the analog joystick 32 repeatedly output information related to the operations performed on themselves to the communication control unit 101 at appropriate times.
[0071] The communication control unit 101 acquires information related to input (specifically, information related to operations) from each input unit (specifically, the buttons 103 and the analog joystick 32). The communication control unit 101 transmits operation data including the acquired information (or information obtained by subjecting the acquired information to prescribed processing) to the main body device 2. In addition, the operation data is repeatedly transmitted at a rate of once every prescribed time. In addition, the intervals for transmitting information related to input to the main body device 2 may be the same or different for each input unit.
[0072] By transmitting the above operation data to the main body device 2, the main body device 2 can know the input performed on the left controller 3. That is, the main body device 2 can determine the operations of moving the left controller 3 and the operations on the buttons 103 and the analog joystick 32 based on the operation data.
[0073] The left controller 3 is provided with a power supply unit 108. In the present embodiment, the power supply unit 108 has a battery and a power control circuit. Although not shown, the power control circuit is connected to the battery and is also connected to each part of the left controller 3 (specifically, the parts that receive the power supply from the battery).
[0074] As shown Figure 3 in FIG. 1, the right controller 4 includes a communication control unit 111 that communicates with the main unit 2. In addition, the right controller 4 includes a memory 112 connected to the communication control unit 111. The communication control unit 111 is connected to each component including the terminal 64. The communication control unit 111 and the memory 112 have the same functions as the communication control unit 101 and the memory 102 of the left controller 3. Therefore, the communication control unit 111 can communicate with the main unit 2 by both wired communication via the terminal 64 and wireless communication without passing through the terminal 64 (specifically, communication conforming to the Bluetooth (registered trademark) standard), and the right controller 4 controls the communication method with the main unit 2.
[0075] The right controller 4 includes the same input units as those of the left controller 3. Specifically, the right controller 4 includes a button 113 and an analog joystick 52. These input units have the same functions as the input units of the left controller 3 and operate in the same manner.
[0076] The right controller 4 includes a power supply unit 118. The power supply unit 118 has the same function as the power supply unit 108 of the left controller 3 and operates in the same manner.
[0077] [2. Outline of Processing in the Game System]
[0078] Next, with reference to Figures 4 to 11 FIG. 2, an outline of the processing executed in the game system 1 will be described. In the present embodiment, the game system 1 generates a game image in which terrain objects and characters (for example, player characters operated by players) are arranged in a game space that is a three-dimensional virtual space, and causes the display device to display the game image. In addition, in the present embodiment, the display device for displaying the game image may be the above-described display 12 or a stationary monitor.
[0079] [2-1. Voxel]
[0080] In the present embodiment, for several objects in the game space, their shapes are defined by voxel data. Here, a voxel refers to a rectangular parallelepiped (more specifically, a cube)-shaped region arranged in a grid pattern in the game space, and voxel data refers to data set for each voxel. Hereinafter, an object whose shape is defined by voxel data is referred to as a "voxel object". In the present embodiment, the game system 1 stores voxel data as data for generating voxel objects in the game space for each of the plurality of voxels set in the game space.
[0081] Figure 4 is a diagram showing an example of a terrain object as a voxel object. As shown Figure 4As shown, in the present embodiment, the shape of the terrain object representing terrain such as the ground is defined by voxel data (that is, it is a voxel object). Figure 4 Each of the cubes shown represents a terrain object. In addition, in Figure 4 , the part that becomes the edge of the terrain object is shown by a thick line, but this thick line is marked for the purpose of making the drawing easier to view, and in fact, it is not necessary to thicken the edge of the terrain object.
[0082] In addition, Figure 4 The terrain object shown is generated, for example, according to the following rule: "When the parameter included in the voxel data set for the voxel is greater than the specified value, a cube is arranged at the position of the voxel, and when it is equal to or less than the specified value, nothing is arranged at the position of the voxel." Figure 4 The terrain object shown is shown for the purpose of exemplifying the relationship between the voxel and the voxel object in an easy-to-understand manner. In the present embodiment, in fact, for example, as the terrain object shown in Figure 10 , according to a rule that forms a shape more complex than the length of one side of the voxel, (based on the voxel data), the voxel object is generated. In addition, the rule for determining the shape of the voxel object based on the voxel data is arbitrary. In other embodiments, the game system 1 can generate a voxel object as shown in Figure 4 based on the object data, or can also generate a voxel object as shown in Figure 11 .
[0083] For the voxel object, its shape can be changed by changing the voxel data of each voxel. Figure 5 And Figure 6 are diagrams showing an example of the situation before and after a part of the terrain object shown in Figure 4 is deleted. That is, when the slanted part in the terrain object shown in Figure 5 is damaged, the terrain object changes to the shape shown in Figure 6 . At this time, the game system 1 rewrites the voxel data described later for the voxels of the above slanted part to indicate that there is no terrain object, and thus the terrain object can be easily eliminated. In addition, in the game system 1, when adding a terrain object, the voxel data of each voxel is also changed in the same way as when eliminating the terrain object, and thus the shape of the terrain object can be easily changed.
[0084] In this way, the game system 1 can freely change the shape of the voxel object by rewriting the voxel data. For example, in the game, when the terrain object is damaged for some reason (e.g., the player character strikes the terrain object) and as a result the shape of the terrain object changes, the game system 1 can freely change the shape of the terrain object by changing the voxel data used in the generation of the terrain object without directly changing the data representing the external shape of the terrain object (i.e., the mesh described later).
[0085] Figure 7 FIG. is an example showing the content of the voxel data. Here, in the present embodiment, the game space can be divided into a plurality of voxels arranged in a grid pattern. The game system 1 stores each voxel in the game space in association with voxel data. The voxel data represents the presence or absence of a voxel object in the voxel corresponding to the voxel data, etc.
[0086] As Figure 7 shown, the voxel data includes density data. The density data is data of density, and this density represents the degree of inclusion of an object in the region defined for each voxel. Details will be described later, but the position and shape of the surface of the voxel object (i.e., the mesh described later) are determined based on the above density. That is, in the present embodiment, the above density is also data used for creating a mesh that defines the surface of the voxel object.
[0087] In the present embodiment, the density can take an integer value in the range from a lower limit value (e.g., 0) to an upper limit value (e.g., 255). In the present embodiment, it is assumed that in the game system 1, when the value of the density set for a voxel is high, the proportion of the volume occupied by the voxel object in the voxel is large, and when the value of the density is low, the above proportion in the voxel is small. For example, when the density is 0, there is no object in the voxel, when the density is 255, the voxel is entirely an object, and when the density is a value therebetween, the object can occupy a proportion corresponding to the value in the voxel. Moreover, the shape of the voxel mesh, i.e., the shape of the voxel object, is determined based on the density. However, the shape of the voxel object generated based on the above density does not need to be a volume that is strictly consistent with the proportion indicated by the density. For example, in the method of generating a voxel object such as Figure 4 and the method of generating a voxel object such as Figure 11 even based on the same density, the volumes may sometimes be different.
[0088] In other embodiments, the density may also represent either the state in which the voxel object occupies the entire region within the voxel or the state in which the region within the voxel does not contain the voxel object. For example, the density data may be data that can only take either 0 or 1.
[0089] As shown Figure 7 in FIG. 239, the voxel data includes material data. The material data represents the material (in other words, substance) of the voxel object generated according to the voxel data. Here, in the present embodiment, materials such as sand, rock, and soil are set in the voxel object, for example. That is, in the present embodiment, as the materials that can be set for the voxel object, multiple types of materials are prepared, and any one of the multiple types of materials is set for the voxel object.
[0090] As shown Figure 7 in FIG. 240, in the present embodiment, the material data represents the identification information of the material (referred to as "material ID"). In addition, in the present embodiment, the game system 1 stores material information representing the properties and textures of the materials for each material prepared in the game. In the present embodiment, the material information associates the material ID, the properties of the material, and the appearance of the material (specifically, the texture). Specifically, the material information is information that associates the material ID, the identification information of the properties of the material (referred to as "property ID"), and the identification information of the texture of the material (referred to as "texture ID") (see Figure 7 ).
[0091] Figure 8 FIG. 241 is a diagram showing an example of property information representing the properties of a material. As shown Figure 8 in FIG. 242, the game system 1 stores property information obtained by associating the above-mentioned property ID with information representing the content of the property indicated by the property ID. The property of the material refers to the property that the voxel object to which the material is set has in the game. For example, it is information such as the weight and slipperiness shown Figure 8 in FIG. 243. In addition, the specific content of the property is arbitrary. For example, as the property of the material, the following information may also be set.
[0092] · Temperature
[0093] · Fragility (for example, the number of times until the voxel object is destroyed when an impact is applied to the voxel object)
[0094] · Whether the voxel object adheres to other objects
[0095] · The amount of the player character's physical strength restored when the player character destroys the voxel object
[0096] · The amount of in-game currency obtained by the player character when the player character destroys the voxel object
[0097] In addition, the specific content of the property set for the material is arbitrary. In other embodiments, as the information representing the property of the material, information different from the above may also be set.
[0098] Figure 9 This is a diagram showing an example of texture information representing the texture of a material. As Figure 9 shown, the game system 1 stores texture information obtained by associating the above texture ID with the texture represented by the texture ID.
[0099] In addition, as data for specifying the appearance of a voxel object, in addition to the information of the texture, any information related to color and / or pattern can also be set. For example, as information related to the appearance of a voxel object, a crack pattern can also be set. By using such a pattern, the game system 1 can generate an image of a voxel object that represents an appearance with cracks added.
[0100] As described above, in the present embodiment, the material data specifies the properties of the voxel object and the texture for the voxel object through the material ID. For example, when the material ID shown in the material data included in the voxel data is "002", the property indicated by the property ID "001" associated with the material ID in the material information is set as the property of the voxel object corresponding to the voxel data (refer to the arrow shown in Figure 7 ). In addition, in the above case, the texture indicated by the texture ID "002" associated with the material ID in the material information is applied to the voxel object corresponding to the voxel data (refer to the arrow shown in Figure 7 ).
[0101] As described above, in the present embodiment, the game system 1 manages the properties and textures of the material separately. Therefore, in the present embodiment, it is possible to easily set multiple types of materials with the same properties but different appearances (i.e., textures), and multiple types of materials with different properties but the same appearance.
[0102] In addition, the material data can be any data that can be used to determine the properties and / or textures of the material. For example, in other embodiments, the material data can also be data representing the above property ID and texture ID, and can also have a data structure that actually includes data representing the properties and textures of the material.
[0103] In addition, the material data is information related to the material, and can also represent other information different from the above properties and textures. For example, the material data can also include effect data representing the effects that occur when the effect occurrence conditions set for the voxel object are satisfied (for example, a part of the voxel object is damaged, or a character steps on the voxel object). In addition, the effect data can also be data representing an effect image (for example, an effect image representing the voxel object being damaged), or can also be data representing an effect sound (the sound of footsteps when a character walks on the voxel object).
[0104] AsFigure 7 As shown, the voxel data includes state data representing the state of the voxel object. The specific content of the state data is arbitrary. For example, the state data can be data representing whether the voxel object is wet or data representing the amount of damage applied to the voxel object. The content of the state data can sometimes be updated in the game.
[0105] [2-2. Mesh]
[0106] In this embodiment, the surface of the voxel object is represented by a mesh. A mesh refers to a set of multiple faces (specifically, polygons) arranged in the game space. In this embodiment, the game system 1 generates a mesh of the voxel object based on the voxel data set for each voxel in the game space. Hereinafter, an example of generating a mesh based on the voxel data will be described.
[0107] Figure 10 is a diagram showing an example of a method for generating a mesh. In addition, in Figure 10 , for the purpose of making the drawings easy to view and the description easy to understand, the voxels and the mesh are two-dimensionally represented, but in fact, a three-dimensional mesh is generated based on the voxels in the three-dimensional space.
[0108] As described above, in this embodiment, the density set for the voxels is in the range of between 0 and 255. Additionally, in this embodiment, voxels with a density equal to or higher than the reference value are considered to be inside the object, and voxels with a density lower than the reference value are considered to be outside the object. It is not necessary to define only voxels with a density of 0 as being outside the object (i.e., reference value = 1), and this reference value is set to 128, for example. In Figure 10In the example shown, the density is set to 0 in voxel 201 and other voxels on the outside, the density of voxel 202 is set to 100 which is lower than the reference value, and the densities in voxels 203 and 204 are set to 150 and 200 which are above the reference value. In the present embodiment, the game system 1 generates vertices between voxels with a density above the reference value and voxels with a density less than the reference value. Specifically, for each region spanning 8 (4 in the drawing) adjacent voxels (the region surrounded by dotted lines in the drawing), a determination is made as to whether to generate vertices. That is, vertices are generated in a region that spans both voxels with a density above the reference value and voxels with a density less than the reference value. And, when passing between adjacent vertices (the boundaries of the above-mentioned regions each containing a vertex) through the boundary between a voxel with a density above the reference value and a voxel with a density less than the reference value, these vertices are connected to generate a polygon mesh. The densities of adjacent voxels are compared for each of the X, Y, and Z axes, and the coordinates of the vertices are determined by interpolation based on the density difference. At this time, coordinate calculation can also be performed based on normal information, but it can also be that normal information is pre-held for at least some voxels, and in the case where normal information is not held, the normal information can also be calculated based on the densities of adjacent voxels to each other. In addition, in Figure 10 since the density of voxel 202 is lower than the reference value, voxel 202 is regarded as outside the object in the determination of the presence or absence of vertices, but the density value itself of voxel 202 is used for the coordinate calculation of the generated vertices. Assuming that the reference value is set to a value lower than the density of voxel 202, as a result, in Figure 10 vertices are further increased at the upper right and upper left sides of voxel 202.
[0109] By generating a polygon mesh as described above, it is possible to generate a shape of a volume that to some extent reflects the density of each voxel. However, depending on the relationship with adjacent voxels, there are sometimes cases where a voxel with a density of 0 contains a region inside a part of the object, or a voxel with a density of 255 contains a region outside a part of the object. In addition, in the present embodiment, voxels with a density lower than the reference value are treated as outside the object, so compared with the case of treating them as inside the object, the number of vertices is reduced, and correspondingly the volume is also reduced. That is, there is no need to calculate the polygon mesh in such a way that it becomes a volume strictly corresponding to the density value.
[0110] Figure 11 is a diagram showing an example of a game image including a terrain object. In the present embodiment, by generating a mesh as described above, it is possible to make the voxel object have a concavo-convex shape that is more complex than the length of one side of the voxel, for example.
[0111] In addition, the method for generating a mesh based on voxel data is arbitrary. For example, in other embodiments, a mesh may also be generated in such a way that a cube is arranged for a voxel when the density of the voxel data is greater than a specified value (refer to Figure 4 ).
[0112] For each face of the mesh generated as described above, the game system 1 determines the appearance (i.e., color and / or pattern) of each face according to the material determined by the above voxel data. Specifically, the game system 1 determines the texture for rendering each face of the mesh based on the above voxel data, and maps the determined texture onto each face, thereby generating an image of the voxel object. In addition, the texture mapped onto each face of the mesh is determined based on the voxel data of the voxel (referred to as the object voxel) used to generate the face among the voxels where the voxel object exists. In addition, although it also depends on the mesh generation method, the object voxel is, for example, one or more voxels arranged around the face. That is, the texture mapped onto the face of the mesh is determined as a texture corresponding to the material set for one or more voxels arranged around the face.
[0113] In addition, in other embodiments, a voxel data may contain multiple types (for example, two types) of material data. In this case, the voxel data contains ratio data related to the multiple types of material data. The ratio data is data for determining the texture for the voxel object, and represents the ratio of the influence of each material (specifically, the texture corresponding to the material) shown by the multiple types of material data on the appearance (specifically, color and / or pattern) of the voxel object. In addition, when determining the texture mapped onto each face of the mesh, the texture is determined based on various data (specifically, density data, multiple types of material data, and ratio data) contained in the voxel data of the object voxel. For example, when multiple types of materials are set for the object voxel corresponding to one face, either the texture corresponding to the material with the greatest influence degree (one type) may be used considering the above ratio, or the textures corresponding to the multiple types of materials may be used considering the above ratio.
[0114] In addition, in other embodiments, there may be both voxel objects using voxel data containing one type of material data and voxel objects using voxel data containing two types of material data.
[0115] (Overview of game processing)
[0116] Next, the deformation of the terrain object (voxel object) performed in the game of this embodiment will be described. In the game of this embodiment, the terrain object and the player character PC are arranged in the virtual space. The terrain object is an object that forms terrains such as the ground and mountains, and different terrain objects are arranged according to the game scene. For example, in the scene of a rocky mountain, as the terrain object, objects imitating rocks and soil are arranged in the virtual space. In addition, in other scenes, as the terrain object, objects imitating grasslands and objects imitating rivers, lakes, etc. are arranged. In addition to this, terrain objects for forming various terrains are also arranged according to the desert scene, volcanic scene, street scene, etc. In addition, the terrain object may also be an object imitating artificial structures such as roads, bridges, and buildings.
[0117] The player character PC moves on the terrain object, jumps on the terrain object, or performs a deformation action on the terrain object based on the player's operation input. The deformation action is an action that deforms the terrain and is an action that may change the voxel value (specifically, density) set for each voxel. In this embodiment, as an example of the deformation action that deforms the terrain object, the player character PC performs a destruction action of destroying the terrain object. Figure 12 This is a diagram showing an example of a game image when the player character PC performs a destruction action on the terrain object TO.
[0118] As Figure 12 shown, the player character PC performs a punch as an example of the destruction action according to the player's instruction. Specifically, the player character PC performs the destruction action in the direction corresponding to the player's direction input (for example, direction input using a joystick). For example, the player character PC performs the destruction action in any direction among the horizontal direction, downward direction, and upward direction. As Figure 12 shown, when the player character PC performs a destruction action on the terrain object TO, the destruction action may hit the terrain object TO. The determination of whether the destruction action hits the terrain object TO is based on the position of the player character PC, the direction of the destruction action, and the terrain polygon mesh representing the surface of the terrain object TO. When it is determined that the destruction action hits the terrain object TO, the hit position is determined. The hit position is determined based on the position of the player character PC, the direction of the destruction action, and the terrain polygon mesh.
[0119] Figure 13 This is a diagram showing an example of a game image after the destruction action hits the terrain object TO. As Figure 13As shown, when a destruction action hits the terrain object TO, at the location hit by the destruction action, a mark tr is added to the terrain object TO. The mark tr indicates that the destruction action has hit the terrain object TO and is shown on the surface of the terrain object TO that includes the hit position. The mark tr is, for example, an image such as a crack added to the terrain object TO.
[0120] Figure 14 It is a figure showing an example of a game image when a destruction action further hits the terrain object TO starting from the state of Figure 13 As shown in Figure 14 when the player character PC further performs a destruction action and the destruction action hits the terrain object TO, the terrain object TO included in a specified destruction range that includes the hit position is destroyed. That is, the terrain object TO included in the destruction range becomes non-existent, and a hole (void) is created in the terrain object TO. When the terrain object TO included in the destruction range is destroyed, a part of the mark tr included in the destruction range also disappears, but a part of the mark tr not included in the destruction range remains.
[0121] In this way, when a destruction action hits the terrain object TO, a mark tr is added to the surface of the terrain object TO. In addition, when a destruction action hits the terrain object TO, a part of the terrain object TO is destroyed.
[0122] Furthermore, in the above, it was explained as follows: when a destruction action hits the terrain object TO once, a mark tr is added, and when the destruction action hits the terrain object TO one more time, the terrain object TO is destroyed. This is a simple example, and the number of times the destruction action hits until the mark tr is added and the number of times the destruction action hits until the terrain object TO is destroyed are not limited to this. For example, it could be that when a destruction action hits the terrain object TO multiple times, a mark tr is added, and when the destruction action hits the terrain object TO one more time or multiple times, the terrain object TO is destroyed. Also, it could be that when a destruction action hits the terrain object TO multiple times or once, a mark tr is added and the terrain object TO is destroyed. That is, the addition of the mark tr and the destruction of the terrain object TO can also occur at the same timing.
[0123] Next, a specific method for adding the mark tr to the terrain object is explained. Figure 15 It is a figure for explaining the method of adding the mark tr to the terrain object TOJ.
[0124] As shown in Figure 15As shown, when the destruction action of the player character PC hits the terrain object TOJ arranged in the virtual space, a trace polygon mesh trpm is arranged at the start position (initial position) based on the position of the player character PC. The trace polygon mesh trpm is used to attach a trace tr to the terrain object TOJ hit by the destruction action. The trace polygon mesh trpm is a plate-shaped object formed by a plurality of polygons including a plurality of vertices Vt. The trace polygon mesh trpm arranged at the start position is deformed and arranged along the surface of the terrain object TOJ. Specifically, the trace polygon mesh trpm arranged at the start position is projected toward the terrain object TOJ.
[0125] Figure 16 FIG. is an example showing a case where the trace polygon mesh trpm is projected onto the terrain object TOJ. As Figure 16 shown, each vertex Vt of the trace polygon mesh trpm is projected onto the surface of the terrain object TOJ (the terrain polygon mesh TOJPM representing the surface of the terrain object TOJ). In Figure 16 FIG., the white dots are the vertices Vt of the trace polygon mesh trpm before projection, and the black dots are the vertices Vt' of the trace polygon mesh trpm after projection. Each vertex Vt is projected in the direction of the destruction action. For example, a straight line passing through the vertex Vt and parallel to the direction of the destruction action is projected (ray-casting is performed), the intersection point of this straight line and the terrain polygon mesh TOJPM is calculated, and the coordinates of the projected vertex Vt' are set based on this intersection point. The projected vertex Vt' is set at a position closer to the side of the vertex Vt before projection than the intersection point. Thereby, the trace polygon mesh trpm is displayed preferentially over the terrain polygon mesh TOJPM. In addition, the projected vertex Vt' may also be set at the position of the intersection point.
[0126] In this way, each vertex Vt of the trace polygon mesh trpm is projected onto the terrain object TOJ, and thereby the trace polygon mesh trpm is arranged along the surface of the terrain object TOJ. Moreover, a trace texture representing the trace of the destruction action (for example, an image showing cracked rocks) is applied to the trace polygon mesh trpm. Thereby, it is possible to leave a trace tr indicating that the destruction action has hit the terrain object TOJ, and to display a case where cracks are caused in the rock by the destruction action.
[0127] Here, the vertex Vt of the polygon mesh trpm for the trace sometimes cannot be projected onto the terrain object TOJ. For example, when the straight line passing through the vertex Vt and parallel to the direction of the destruction action does not intersect the terrain polygon mesh TOJPM, the vertex Vt cannot be projected onto the terrain object TOJ. Such a vertex Vt is excluded as an unnecessary vertex.
[0128] Figure 17 is a diagram showing an example of the vertex Vtf that cannot be projected onto the terrain object TOJ. In Figure 17 the white triangles represent the vertex Vtf that cannot be projected onto the terrain object TOJ. In addition, the black dots represent the vertex Vt2 that can be projected onto the terrain object TOJ. In addition, the white dots represent the vertex Vt1 that is adjacent to the polygon St1 containing the vertex Vtf and can be projected onto the terrain object TOJ. As Figure 17 shown, when the vertex Vtf among the multiple vertices Vt of the polygon mesh trpm for the trace cannot be projected onto the terrain object TOJ, the vertex Vtf is excluded as an unnecessary vertex from the display object. In addition, the polygon St1 containing the excluded vertex Vtf is excluded as an unnecessary polygon from the display object. In addition, the vertex Vt1 adjacent to the polygon St1 is made semi-transparent. The vertex Vt2 that can be projected onto other terrain objects TOJ is set to be displayed.
[0129] For example, for the vertex Vtf that cannot be projected onto the terrain object TOJ, the opacity of the vertex Vtf is set to "0" so as not to be displayed. In addition, the vertex Vtf can also be set not to be connected to other vertices. As a result, the polygon St1 containing the vertex Vtf is not displayed as part of the trace tr. In addition, for the vertex Vt1 adjacent to the polygon St1, the opacity is reduced to be lower than that of the vertex Vt2. In addition, for the vertex Vt2, the opacity is set to a specified value (for example, the maximum value). In this way, the vertex Vtf that cannot be projected onto the terrain object TOJ can be not displayed, while the vertex Vt2 that can be projected onto the terrain object TOJ can be displayed, and the intermediate vertex Vt1 is made semi-transparent. As a result, the trace tr can be left only on the terrain object TOJ hit by the destruction action. In addition, by reducing the opacity of the vertex Vt1, the contour of the boundary of the trace tr can be blurred, thereby displaying a natural trace without a sense of incongruity.
[0130] In addition, vertices Vtf that cannot be projected onto the terrain object TOJ can also be deleted from the trace polygon mesh trpm. That is, the position information of vertices Vtf that cannot be projected onto the terrain object TOJ can also be deleted from the memory. Thereby, it is also possible to set not to display vertices Vtf that cannot be projected onto the terrain object TOJ and polygons including such vertices Vtf.
[0131] Figure 18 FIG. is an example of the trace polygon mesh trpm before and after excluding unnecessary vertices when the trace polygon mesh trpm is projected onto the terrain object TOJ.
[0132] As Figure 18 shown, vertex Vtf (the point represented by a white triangle) is an unnecessary vertex that cannot be projected onto the terrain object TOJ, and vertex Vt (the point represented by a black dot) is a vertex that is projected onto the terrain object TOJ. When unnecessary vertex Vtf is excluded after projection, as shown in the right figure of Figure 18 , the trace polygon mesh trpm is attached to the terrain object TOJ, and a part of the trace polygon mesh trpm is prevented from being displayed outside the terrain object TOJ. Thereby, when a destruction action hits the terrain object TOJ, it is possible to leave a trace tr only on the terrain object TOJ at the hit location.
[0133] In addition, in the present embodiment, a plurality of voxel spaces are set in the virtual space, and a plurality of terrain objects are formed based on the voxel data of each voxel space. Figure 19 FIG. is a diagram showing a situation where another terrain object TOJ is arranged on the terrain object TO and a player character PC performs a destruction action on the terrain object TOJ.
[0134] In the virtual space, the field voxel space representing the entire game field is fixed. By setting voxel values (specifically, density data and material data) for the voxel data of each voxel in the field voxel space, a terrain object TO (a terrain polygon mesh TOPM representing the surface of the terrain object TO) is formed. The player character PC plays the game while moving on the terrain object TO or making a hole in the terrain object TO by performing a destruction action on the terrain object TO. The terrain object TO is a voxel object fixed in the virtual space, and is, for example, an object representing the ground, a slope, a mountain rising from the ground, etc. In addition, a second voxel space that can move in the virtual space is set separately from the field voxel space, and voxel values are set for the voxel data of each voxel in the second voxel space. Thereby, another terrain object TOJ (a terrain polygon mesh TOJPM representing the surface of the terrain object TOJ) is formed on the terrain object TO. The terrain object TOJ is, for example, a rock arranged on the ground.
[0135] As Figure 19 shown, in the case where a destruction action is performed by the player character PC, it is determined which terrain object the destruction action hits. For example, in the case where the destruction action hits the terrain object TOJ defined by the second voxel space, as described above, the projection trace of the terrain object TOJ is represented by the polygon mesh trpm. The trace that cannot be projected onto the terrain object TOJ is excluded as an unnecessary vertex using the vertex Vtf of the polygon mesh trpm. Therefore, as Figure 19 shown, the trace is displayed by the part (the solid line part along the terrain object TOJ) of the polygon mesh trpm that is projected onto the terrain object TOJ, and the part (the dashed line part along the terrain object TO) that is projected onto the terrain object TO is not displayed. Thus, the trace tr is displayed only on the surface of the terrain object TOJ hit by the destruction action.
[0136] In addition, although not shown in the figure, in the case where the destruction action hits the terrain object TO defined by the field voxel space, the projection trace of the terrain object TO is represented by the polygon mesh trpm. The part of the polygon mesh trpm that is projected onto the terrain object TO is displayed, and the part that is projected onto a terrain object other than the terrain object TO is not displayed. Thus, the trace tr is displayed only on the surface of the terrain object TO hit by the destruction action.
[0137] That is, in the case where there are multiple terrain objects in the virtual space, the projection trace of the polygon mesh trpm is projected onto the surface of the terrain object hit by the destruction action to leave the trace tr on the terrain object.
[0138] In addition, when the destruction action hits the terrain object TOJ, the configuration trace uses a polygonal mesh trpm, and it is determined whether a straight line passing through the vertex Vt and parallel to the direction of the destruction action intersects the terrain polygonal mesh TOJPM. When the straight line passing through the vertex Vt and parallel to the direction of the destruction action does not intersect the terrain polygonal mesh TOJPM hit by the destruction action, the vertex Vt is regarded as a vertex that cannot be projected onto the terrain object TOJ. Here, there can also be the following situation: Even when the straight line L passing through a certain vertex Vts and parallel to the direction of the destruction action intersects the terrain polygonal mesh TOJPM, the vertex Vts is also regarded as a vertex that cannot be projected onto the terrain object TOJ. For example, it can also be that when the intersection point of the straight line L passing through the vertex Vts and parallel to the direction of the destruction action and the terrain polygonal mesh TOJPM is too far from the hit position of the destruction action, such a vertex Vts is regarded as a vertex that cannot be projected onto the terrain object TOJ. In the case where, for example, such a vertex Vts is projected onto the terrain object TOJ and remains as a part of the trace polygonal mesh trpm, the trace polygonal mesh trpm sometimes becomes an unnaturally extended shape. Therefore, such a vertex Vts can also be regarded as a vertex that cannot be projected onto the terrain object TOJ and excluded from the projected trace polygonal mesh trpm. In addition, such a vertex Vts can also not be excluded as a vertex that cannot be projected onto the terrain object TOJ.
[0139] Next, the processing in the case where a destruction action is performed on the terrain object with the trace polygonal mesh trpm configured thereon will be described.
[0140] Figure 20 FIG. is a diagram showing the state before a destruction action is performed on the terrain object TOJ with the trace polygonal mesh trpm configured thereon. Figure 21 FIG. is a diagram showing the state after a destruction action is performed on the terrain object with the trace polygonal mesh trpm configured thereon. In Figure 20 and Figure 21 show cross-sectional views of the terrain object TOJ with the trace polygonal mesh trpm configured thereon. As Figure 20 and Figure 21 shown, it is assumed that a virtual camera VC is arranged on the left side, and an image of the virtual space seen from the virtual camera VC is displayed as a game image on the display.
[0141] As Figure 20As shown, when a destruction operation is performed on the terrain object TOJ, the trace polygon mesh trpm is arranged on the terrain object TOJ before destruction. In this case, the image of the virtual space when observed from the virtual camera VC becomes an image with a trace tr added to the terrain object TOJ, becoming an image where a crack is added to the terrain object TOJ.
[0142] On the other hand, as Figure 21 shown, when a further destruction operation is performed on the terrain object TOJ on which the trace polygon mesh trpm is arranged and thus a part of the terrain object TOJ is destroyed, a cavity is generated in the terrain object TOJ. In this case, the trace polygon mesh trpm maintains the same shape as before destruction, but the part of the trace polygon mesh trpm corresponding to the undamaged part of the terrain object TOJ is displayed, and the part corresponding to the damaged part of the terrain object TOJ is not displayed. Specifically, the part of the trace polygon mesh trpm where the terrain object TOJ exists within a specified range inside when observed from the virtual camera VC ( Figure 21 solid line part) is displayed. On the other hand, the part of the trace polygon mesh trpm where the terrain object TOJ does not exist within a specified range inside when observed from the virtual camera VC ( Figure 21 dashed line part) is not displayed. More specifically, when drawing the image, for each pixel, the depth value of the terrain polygon mesh TOJPM representing the surface of the terrain object TOJ is compared with the depth value of the trace polygon mesh trpm. When the result of the comparison is that the trace polygon mesh trpm is in the front side and the difference in depth values is within the specified range, the front-side trace polygon mesh trpm is drawn, and when the difference in depth values exceeds the specified range, the inner terrain polygon mesh TOJPM is drawn. Thus, the following image is displayed: a part of the terrain object TOJ is perforated, the trace tr in the perforated part disappears, and the trace tr remains around the hole.
[0143] In addition, when a further destruction operation is performed on the terrain object TOJ on which the trace polygon mesh trpm is arranged, it is also possible to perform the process of projecting the trace polygon mesh trpm onto the terrain object TOJ after destruction again. In this case, when the terrain object TOJ is destroyed, the trace polygon mesh trpm on the terrain object TOJ is deleted, a plate-shaped trace polygon mesh trpm is newly arranged at the starting position, and this trace polygon mesh trpm is projected onto the terrain object TOJ after destruction. Then, Figure 21 the solid line part of the trace polygon mesh trpm shown is displayed as the trace tr. In addition, Figure 21The dashed part of the trace polygon mesh trpm shown is not displayed. Thus, an image Figure 21 identical to that is displayed. Additionally, in this case, the vertices of the trace polygon mesh trpm can also be projected onto the surface of the terrain object TOJ in the hole. In this case, the trace polygon mesh trpm is arranged along the surface of the damaged terrain object TOJ and has a shape with Figure 21 the solid line part shown (the part around the hole) and the part along the surface of the hole (inside the hole). Thus, traces tr of the destruction action are left around the hole and inside the hole. Additionally, in this case, the part of the trace polygon mesh trpm attached inside the hole can also be not displayed. Thus, it is possible to leave only the trace tr around the hole.
[0144] As described above, in the game of this embodiment, it is possible to leave traces of the destruction action on the terrain object. When leaving a trace on the terrain object, the shape of the terrain object is considered and the trace polygon mesh is deformed to match the shape of the terrain object. However, in this method, when the shape of the terrain object is complex, the processing cost sometimes increases during shape investigation. Particularly, when the shape of the terrain object freely deforms in the game according to the player's operation, the shape of the terrain object easily becomes complex and the processing may not keep up. However, in the method of projecting the trace polygon mesh onto the terrain object and excluding unnecessary vertices as described above, it is possible to arrange the trace polygon mesh on the terrain object to match the shape of the terrain object through relatively simple calculations. Therefore, even when the terrain object changes in the game, it is possible to leave a trace on the terrain object.
[0145] (Details of game processing)
[0146] Next, the details of the game processing in the game system 1 will be described with reference to Figures 22 to 25 .
[0147] Figure 22 is a diagram showing an example of various data used in the game processing in the game system 1. As Figure 22 shown, the game system 1 stores a game program, field voxel space data, second voxel space data, player character data, terrain polygon mesh data, and trace polygon mesh data.
[0148] The game program is a program for executing the game processing in this embodiment ( Figure 23 the game processing shown). The game program is pre-stored in the storage medium or flash memory 84 installed in the slot 23 and is read into the DRAM 85 when the game is executed.
[0149] The site voxel space data is data related to the entire site voxel space. The site voxel space data includes terrain body data. The terrain body data includes voxel data of each voxel in the site voxel space. The terrain body data is data for representing terrain objects in the virtual space, and holds voxel values (voxel data) for each voxel included in the site voxel space. This voxel value indicates the degree to which the object occupies the space defined by the voxel. Each voxel data includes density data, material data, and damage value. Density and material are set for each voxel in the terrain body data, and a mesh is generated based on the voxel data, thereby forming a terrain in the virtual space. Initial terrain body data is pre-stored in the storage medium or flash memory 84 installed in the slot 23. At the start of the game, the terrain body data stored in the storage medium or flash memory 84 installed in this slot 23 is read into the DRAM 85. Thereby, an initial terrain is formed. For example, as the initial terrain, a terrain object representing a flat ground and a terrain object representing a rocky mountain are formed. During the execution of the game, the terrain is changed by updating the voxel data included in the terrain body data stored in the DRAM 85.
[0150] The second voxel space data is data related to a second voxel space different from the site voxel space arranged in the virtual space. The second voxel space data includes second terrain body data. The second terrain body data holds a plurality of voxel data for representing voxel objects (for example, a terrain object TOJ representing a roughly spherical rock) that can move in the virtual space.
[0151] The player character data is data related to the player character PC, and includes data representing the position and posture in the virtual space, and data representing the shape of the player character PC (polygon mesh data).
[0152] The terrain polygon mesh data is data representing a terrain polygon mesh that represents the surface of a terrain object. The terrain polygon mesh data includes, for example, data representing the positions of the respective vertices in the terrain polygon mesh. The terrain polygon mesh data is generated based on the above-mentioned terrain body data. In addition, when a plurality of voxel spaces and a plurality of terrain objects are arranged in the virtual space, the terrain polygon mesh data corresponding to each terrain object is stored.
[0153] The polygon mesh data for traces is data related to the polygon mesh for traces, and includes data representing the positions of the respective vertices in the polygon mesh for traces, data related to the lines connecting the respective vertices, and data related to the opacity of the respective vertices. When a destruction action is performed at a plurality of locations of the terrain object, traces tr are left at each location. The polygon mesh data for traces corresponding to each trace tr is stored.
[0154] In addition to storing Figure 22 the data shown, the game system 1 also stores various kinds of data. For example, data related to enemy characters that can move in the virtual space can also be stored in the game system 1. The enemy characters can be either voxel objects or 3D objects whose shapes are predetermined by a polygon mesh.
[0155] Figure 23 FIG. is a flowchart showing an example of the flow of game processing executed by the game system 1. Figure 23 The game processing shown, for example, starts in response to an instruction by the player to start the game.
[0156] In addition, in the present embodiment, it is assumed that the processor 81 of the main body device 2 executes Figure 23 the processing of each step shown by executing the above game program. However, in other embodiments, part of the processing of each step shown above may be executed by another processor (for example, a dedicated circuit, etc.) other than the processor 81. In addition, when the game system 1 can communicate with other information processing devices (for example, a server), part of the processing of each step shown may also be executed in other information processing devices. In addition, Figure 23 the processing of each step shown is merely a simple example, and as long as the same result can be obtained, the processing order of each step can be changed, and other processing can also be executed in addition to (or instead of) the processing of each step. Figure 23 The processing of each step shown is merely a simple example, and as long as the same result can be obtained, the processing order of each step can be changed, and other processing can also be executed in addition to (or instead of) the processing of each step.
[0157] In addition, the processor 81 uses a memory (for example, DRAM 85) to execute Figure 23 the processing of each step shown. That is, the processor 81 stores the information obtained through each processing step in the memory, and when using this information in subsequent processing steps, reads out this information from the memory and uses this information.
[0158] As Figure 23 shown, in step S1, the processor 81 sets a virtual space in an initial state. Specifically, the processor 81 acquires terrain body data representing the terrain of the virtual space in the initial state from the storage medium installed in the slot 23, and stores part or all of the acquired terrain body data in the DRAM 85. In addition, the processor 81 reads out player character data from the above storage medium, sets the initial position and posture of the player character, and stores them in the DRAM 85. In addition, the processor 81 sets the initial position and posture of the virtual camera and stores them in the DRAM 85.
[0159] In addition, the voxel data stored in the DRAM 85 can be either the voxel data in the entire range of the virtual space or the voxel data in a partial range of the virtual space used to generate game images. For example, the processor 81 can also generate an image of an object using the voxel data of the voxels included in a partial range (e.g., a range within a specified distance from the position of the virtual camera) in the virtual space. Additionally, when reading in voxel data related to a partial range of the virtual space, the same processing as in step S1 above is performed at an appropriate timing during the execution of the series of processes in steps S2 to S10 (e.g., when the position of the virtual camera has moved more than a specified distance).
[0160] In step S2, the processor 81 generates a mesh for the voxel object. Specifically, for the terrain object, a terrain polygon mesh is generated based on the terrain voxel data (the terrain voxel data of the above-mentioned site voxel space data, the second terrain voxel data, etc.). The terrain polygon mesh is generated according to the method described in the above "[2-2. Mesh]". In addition, for voxel objects other than the terrain object, the processor 81 generates a mesh by the same method. After step S2, the game starts, and the processes in steps S3 to S10 are repeatedly executed at a specified frame time interval (e.g., an interval of 1 / 60 second) in the game.
[0161] In step S3, the processor 81 controls the actions of the player character PC. For example, the processor 81 moves the player character PC, or makes the player character PC perform a destruction action, or makes the player character PC jump based on the operation data received from the controllers 3 and 4. The destruction action of the player character PC can also be punching, kicking, throwing a stone, firing a bullet, etc., or multiple actions. After step S3, the process of S4 is executed.
[0162] In step S4, the processor 81 determines whether a destruction action has been performed by the player character PC. The processor 81 determines whether a specified button on the controller has been pressed. If the determination result in step S4 is affirmative, the process of step S5 is executed. On the other hand, if the determination result in step S4 is negative, the process of step S8 is executed.
[0163] In step S5, the processor 81 performs destruction action processing. Here, first, it is determined whether the destruction action performed by the player character PC has hit the terrain object. If the destruction action has hit the terrain object, the terrain object is destroyed or a mark tr is added to the terrain object. The details of the destruction action processing in step S5 will be described later. Then, the processor 81 executes the process of step S6.
[0164] In step S6, the processor 81 determines whether to update the mesh. Here, when the destruction action hits a terrain object in step S5 and thus the terrain object is destroyed (when the voxel data is updated), the processor 81 determines to update the terrain polygon mesh. When the determination result in step S6 is affirmative, the process of step S7 is executed. On the other hand, when the determination result in step S6 is negative, the process of step S8 is executed.
[0165] In step S7, the processor 81 updates the mesh. Specifically, the processor 81 updates the terrain polygon mesh for the terrain object whose voxel data has been changed in step S5. Thereby, based on the updated voxel data, the vertex positions of the terrain polygon mesh are recalculated. The updated terrain polygon mesh is stored in the DRAM 85 as terrain polygon mesh data. After step S7, the process of S8 is executed.
[0166] In step S8, the processor 81 generates an image (game image) of the virtual space seen from the virtual camera by performing a rendering process. Here, the processor 81 uses the texture images corresponding to the respective polygon meshes (terrain polygon mesh, trace polygon mesh, polygon mesh representing the player character PC, etc.) to perform the rendering of the respective polygon meshes. In addition, the game system 1 stores the terrain texture image representing the terrain and the trace texture image representing the trace for each type of terrain (each type of material). For example, when the destruction action hits a terrain of rock, the terrain polygon mesh is rendered using the terrain texture image representing the terrain of rock, and the trace polygon mesh is rendered using the trace texture image corresponding to the terrain of rock (an image with cracks added to the rock). Specifically, the processor 81 calculates the depth value (a value representing the position in the shooting direction of the virtual camera) for each pixel of each polygon mesh, and performs the rendering of the polygon mesh with the smaller calculated depth value. Here, when the processor 81 renders the trace polygon mesh, it renders the part where the terrain polygon mesh exists within a specified range inside the virtual camera, and does not render the part where the terrain polygon mesh does not exist within the specified range inside the virtual camera. Thereby, when the destruction action hits a terrain object, a trace tr is displayed at the hit location. When the terrain object with the trace polygon mesh configured on its surface is destroyed, a trace tr is displayed around the destroyed part, and the trace tr of the destroyed part disappears. In this case, the terrain polygon mesh inside the destroyed part is rendered. After step S8, the process of S9 is executed.
[0167] In step S9, the processor 81 outputs the game image generated in step S8 to the display. After step S9, the process of S10 is executed.
[0168] In step S10, the processor 81 determines whether to end the game. For example, the processor 81 determines whether the user has given an instruction to end the game. If the determination result in step S10 is negative, the process of step S3 is executed again. Thereafter, the series of processes of steps S3 to S10 are repeatedly executed until it is determined in step S10 that the game ends. On the other hand, if the determination result in step S10 is positive, the processor 81 ends Figure 23 the game process shown.
[0169] (Destruction action process)
[0170] Next, refer to Figure 24 to explain the details of the destruction action process in step S5. Figure 24 FIG. is a flowchart showing an example of the destruction action process in step S5.
[0171] In step S21, the processor 81 determines whether the destruction action has hit a terrain object. Specifically, the processor 81 determines whether the destruction action has hit a terrain object based on the terrain polygon mesh representing the shape of the terrain object, the position of the player character PC, and the direction of the destruction action. For example, the processor 81 uses an object for collision determination to determine whether the destruction action has hit a terrain object. For example, the processor 81 makes the object for collision determination fly out a specified distance in the direction of the destruction action from the position of the player character PC, and determines whether the object has collided with the terrain polygon mesh. In addition, as the terrain polygon mesh representing the shape of the terrain object, a terrain polygon mesh for collision determination used to determine whether the destruction action has hit and a display terrain polygon mesh for displaying the terrain (generating a game image) are prepared. Here, the processor 81 uses the terrain polygon mesh for collision determination to determine whether the destruction action has hit a terrain object. The terrain polygon mesh for collision determination represents the shape of the terrain object and is coarser than the display terrain polygon mesh. By using the terrain polygon mesh for collision determination, the processing load related to the collision determination of whether the destruction action has hit can be reduced. In addition, the terrain polygon mesh for collision determination and the display terrain polygon mesh may be the same. That is, it is also possible to prepare one terrain polygon mesh representing the shape of the terrain object and perform collision determination and drawing processing based on this terrain polygon mesh. If the processor 81 determines "yes" in step S21, the process of step S22 is then executed. If the processor 81 determines "no" in step S21, the Figure 24 process shown ends.
[0172] In step S22, the processor 81 sets the hit position of the destruction action and sets the destruction range. Specifically, first, the processor 81 sets the hit position based on the terrain polygon mesh, the position of the player character PC, and the direction of the destruction action. Next, the processor 81 sets a prescribed destruction range that includes the hit position. The destruction range represents the range when the terrain object is destroyed. The destruction range is a pre-determined shape, such as a sphere, a cylinder, a cone, an ellipsoid, a shape obtained by deforming the ellipsoid asymmetrically in the left-right direction, etc. In addition, the size and / or shape of the destruction range may also vary according to the type of the terrain object, the type of the destruction action, etc. After the processing in step S22, the processor 81 executes the processing in step S23.
[0173] In step S23, the processor 81 determines whether to destroy the terrain object hit by the destruction action. When the destruction condition is satisfied, the processor 81 determines to destroy the terrain object. The destruction condition is a condition based on the type of the destruction action, the material of the terrain object included in the destruction range, and the number of times the destruction action hits the terrain object included in the destruction range. For example, when it is set to be destroyed when the destruction action hits 3 times, the destruction condition is satisfied according to the hit of the third destruction action. Specifically, a damage value is stored in each voxel of the terrain object, and when the destruction action hits, the damage value of each voxel included in the destruction range is added. Moreover, when the damage value exceeds a prescribed value, the voxel is destroyed. When the processor 81 determines "yes" in step S23, it then executes the processing in step S26. When the processor 81 determines "no" in step S23, it then executes the processing in step S24.
[0174] In step S24, the processor 81 determines whether to leave a mark on the terrain object. For example, depending on the relationship between the type of the destruction action and the type of the terrain object (type of material), sometimes a mark is left, and sometimes no mark is left. In addition, depending on the number of times the destruction action hits, sometimes a mark is left, and sometimes no mark is left. The processor 81 determines whether to leave a mark on the terrain object based on these. For example, when the type of the destruction action is a punch and the type of the terrain object (type of material) is a rock, and the destruction action hits the terrain object 2 times, it is determined that a mark is left. When the processor 81 determines "yes" in step S24, it then executes the processing in step S25. When the processor 81 determines "no" in step S24, it ends. Figure 24The processing shown below. In addition, when it is not determined in step S24 that a mark is left, the processor 81 can also change the texture image of the terrain object within a specified range including the hit position. For example, when the destruction action hits the terrain object once, in the subsequent mark processing, the mark polygon mesh is not arranged on the terrain object, but the texture image of the terrain object is changed. In this case, although the mark polygon mesh is not attached to the terrain object, the display mode (e.g., color) of the terrain object can be changed. On the other hand, when the destruction action hits the terrain object twice, it is determined as "Yes" in step S24, and the mark polygon mesh is arranged on the terrain object in the subsequent mark processing.
[0175] In step S25, the processor 81 performs mark processing for leaving a mark on the terrain object hit by the destruction action. Next, the details of the mark processing in step S25 will be described with reference to Figure 25 to illustrate the details of the mark processing in step S25. Figure 25 is a flowchart showing an example of the mark processing in step S25.
[0176] (Mark Processing)
[0177] In step S31, the processor 81 first arranges the mark polygon mesh trpm in the virtual space. Specifically, the processor 81 arranges the plate-shaped mark polygon mesh trpm in a direction perpendicular to the direction of the destruction action at the start position based on the position of the player character PC. The start position (initial position) for arranging the mark polygon mesh trpm can be slightly behind the player character PC, can be the position of the player character PC, or can also be in front of the player character PC. Next, the process of step S32 is performed after step S31.
[0178] In step S32, the processor 81 projects each vertex of the mark polygon mesh trpm onto the terrain polygon mesh hit by the destruction action. Specifically, the processor 81 extends a straight line from the position of each vertex of the mark polygon mesh trpm arranged at the start position in the direction of the destruction action, and determines whether the straight line intersects the terrain polygon mesh. In addition, when the straight line intersects the terrain polygon mesh, the processor 81 calculates the coordinates of the intersection point. Next, the process of step S33 is performed after step S32.
[0179] In step S33, the processor 81 sets the coordinates of the vertices of the polygon mesh trpm of the trace projected onto the terrain polygon mesh in the process of step S32. Specifically, the processor 81 sets the coordinates of the vertices based on the intersection points calculated in step S32. For example, the processor 81 sets the coordinates of the position on the virtual camera side of the intersection point as the coordinates of the vertices of the polygon mesh trpm for the projected trace. Then, the process of step S34 is performed after step S33.
[0180] In step S34, the processor 81 excludes unnecessary vertices. Here, when the above intersection points cannot be calculated in the process of step S32, that is, when the vertices of the polygon mesh trpm for the trace cannot be projected onto the terrain polygon mesh hit by the destruction action, the processor 81 excludes this vertex ( Figure 17 vertex Vtf) as an unnecessary vertex. Specifically, the processor 81 sets it not to display the vertex Vtf that cannot be projected onto the terrain polygon mesh. For example, the processor 81 can set the vertex Vtf to be transparent, or can set it not to be connected to other vertices. Thereby, the polygon containing the excluded vertex is not displayed. Then, the process of step S35 is performed after step S34.
[0181] In step S35, the processor 81 performs the process of setting the opacity of each vertex of the polygon mesh trpm for the projected trace. Specifically, the processor 81 sets the opacity of each vertex ( Figure 17 vertex Vt2) of the polygon mesh trpm for the trace projected onto the terrain polygon mesh to a specified value (for example, the maximum value). In addition, the processor 81 sets the opacity of the vertex ( Figure 17 vertex Vt1) adjacent to the polygon containing the vertex excluded in step S34 to a value smaller than the specified value. When the processor 81 has performed the process of step S35, it ends Figure 25 the process shown, and returns the process to Figure 24 .
[0182] Return to Figure 24 , when the processor 81 has performed the process of step S25, it ends Figure 24 the process shown.
[0183] On the other hand, in step S26, the processor 81 performs voxel data update processing. Specifically, the processor 81 stores a value indicating the absence of a terrain object in the voxel data of the voxels included in the destruction range. For example, the processor 81 sets the density of the voxels in the destruction range to "0". Thereby, the terrain objects included in the destruction range are destroyed. The process of step S7 is performed based on the updated voxel data, thereby updating the shape of the terrain object.
[0184] In addition, the processes shown in the above flowchart are merely illustrative examples, and the order, content, etc. of the processes can be appropriately changed.
[0185] As described above, in the present embodiment, when a destruction action hits a terrain object, a polygon mesh for a trace is projected toward the terrain object at the location where the destruction action hits. Based on the position where the polygon mesh for the trace is projected (the intersection point calculated in step S32), the coordinates of the vertices that can be projected onto the terrain object are set, and it is set not to display the polygon including the vertices that cannot be projected onto the terrain object. Then, a trace texture is applied to the polygon mesh for the trace disposed on the terrain object for rendering processing. Thereby, it is possible to leave a trace of the destruction action on the terrain object at the location where the destruction action hits. For example, it is possible to leave a trace in a range larger than the destruction range including the hit position of the destruction action (a range on the surface of the terrain object wider than the surface of the terrain object included in the destruction range), and in addition, it is possible to suppress the processing cost and leave a trace of the destruction action on complex terrain.
[0186] In addition, in the present embodiment, the polygon mesh for the trace is projected in the direction of the destruction action from the start position based on the position of the player character. Thereby, it is possible to project the polygon mesh for the trace in the direction of the destruction action at the location where the destruction action is performed, and thus it is possible to leave a trace of the destruction action on the terrain object.
[0187] In addition, in the present embodiment, a part of the polygon mesh for the trace is also displayed even after the terrain object is destroyed due to the destruction action. Thereby, it is possible to leave a trace of the destruction action hitting even after the terrain object is destroyed.
[0188] In addition, in the present embodiment, when a terrain object having a polygon mesh for a mark on its surface is destroyed, instead of destroying the polygon mesh for the mark itself, a part of the polygon mesh for the mark is made invisible. That is, even if the terrain object is destroyed, the vertices of the polygon mesh for the mark are not deleted or the positions of the vertices are not changed, and the polygon mesh for the mark itself maintains the shape along the surface of the terrain object before destruction. Then, in the rendering process, the pixels of the polygon mesh for the mark corresponding to the part of the destroyed terrain object are made invisible. Specifically, in the rendering process of the polygon mesh for the mark, the part where there is no terrain object is not drawn within a specified range inside the polygon mesh for the mark, and the part where there is a terrain object is drawn within the specified range inside the polygon mesh for the mark. Thereby, the processing cost can be reduced and the situation where a terrain object having a polygon mesh for a mark on its surface is destroyed can be shown. For example, it was also considered to delete the vertices of the polygon mesh for the mark corresponding to the part of the destroyed terrain object and change the shape of the polygon mesh for the mark itself. In this case, it is necessary to calculate the shape of the part of the polygon mesh for the mark to be deleted, which sometimes increases the processing cost. However, in the above-described embodiment, even if the terrain object as a voxel object is destroyed, the polygon mesh for the mark itself is not destroyed, and in the rendering process, the part of the polygon mesh for the mark corresponding to the part of the destroyed terrain object is made invisible, so that the processing cost can be reduced.
[0189] (Modification example)
[0190] The above describes the present embodiment, but the above embodiment is a simple example, and for example, the following modifications can be added.
[0191] For example, in the above embodiment, a part of the player character PC (specifically, the arm part) is used to perform the destruction action. In other embodiments, the player character PC can also perform any other destruction actions. For example, in other embodiments, the destruction action performed by the player character PC can also use the entire player character PC. In addition, the destruction action performed by the player character PC may not use at least a part of the player character PC. For example, the player character PC can also perform the destruction action by throwing a specified object. It can also be that when the specified object thrown by the player character PC hits the terrain object, the destruction action hits the terrain object and leaves a mark on the terrain object. In addition, it can also be that when the specified object thrown by the player character PC hits the terrain object, the terrain object is destroyed.
[0192] In addition, in the above-described embodiment, it is assumed that the player character PC performs a destruction action of destroying a terrain object. In other embodiments, the player character PC may also perform an action for adding a terrain object. For example, the player character PC may perform an action of piling up dirt or an action of stacking bricks. Moreover, it may be that when the action for adding a terrain hits a terrain object (for example, when a dirt pile is built on the ground or when bricks are stacked), a terrain is added. In addition, the player character PC may perform an action of bending a terrain object. That is, the player character PC may perform a deformation action for deforming (adding, destroying, bending) a terrain object. When the deformation action hits a terrain object, a deformation range is set based on the position hit by the deformation action, and the voxel values of the voxels included in the deformation range are updated, thereby deforming the terrain object. It may also be that, in this case, the above-described trace polygon mesh is projected onto the terrain object to leave a trace of the destruction action on the terrain object at the location where the deformation action hits.
[0193] In addition, in the above-described embodiment, when the deformation action hits a terrain object, a plate-shaped trace polygon mesh is initially arranged in the virtual space and projected onto the terrain object. The shape of the initially arranged trace polygon mesh is not limited to plate-shaped and may be any shape.
[0194] In addition, in the above-described embodiment, it is assumed that when the player character PC performs a deformation action (for example, a destruction action) and the deformation action hits a terrain object, a trace is left on the terrain object. In other embodiments, not limited to the case where the player character PC performs a deformation action, a trace may also be left on a terrain object when any deformation event that deforms the terrain object occurs. The deformation event may be, for example, an action of the player character PC or an event that occurs independently of the player character PC. For example, the deformation event may also be an event of a specified object (for example, a meteorite) falling from the air, an event of an enemy character throwing a specified object, an event of the terrain changing when a specified time is reached, etc. That is, "occurring a deformation event" may also include the deformation action of the player character PC hitting a terrain object, other objects hitting the terrain object independently of the player character PC, reaching a specified time, etc.
[0195] In addition, in the above-described embodiment, it is assumed that the terrain object is a voxel object, and the terrain polygon mesh representing the surface of the terrain object is generated based on voxel data. In other embodiments, the terrain object may not be a voxel object, but may be a 3D object whose shape is determined based on polygon data prepared in advance. In this case, the terrain polygon mesh representing the surface of the terrain object is stored in advance, and the terrain polygon mesh deforms according to the occurrence of a deformation action. A trace polygon mesh is projected onto the terrain polygon mesh at the location where the deformation action has occurred, and the coordinates of the vertices that can be projected onto the terrain polygon mesh are set based on the positions onto which the trace polygon mesh is projected. In addition, it is set not to display the polygon including the vertices that cannot be projected onto the terrain polygon mesh. Thus, the trace polygon mesh is arranged on the terrain polygon mesh. Then, the terrain polygon mesh and the trace polygon mesh are drawn.
[0196] In addition, in the above-described embodiment, for the voxels within the destruction range (an example of the deformation range), a value indicating the non-existence of an object is set for the voxels by setting the density of the voxels to "0". Thus, the part within the destruction range in the voxel object is eliminated, and the voxel object is destroyed. The destruction (elimination) of the voxel object is not limited to being performed by setting the density in the voxel data to "0", and may also be performed by setting the density to other values. For example, regarding the density, the "value indicating the non-existence of an object" is not limited to "0", and may be any value lower than a reference value (e.g., 128). In addition, regarding the density, the "value indicating the existence of an object" may be a value in the range of 1 to 255, or may be a value equal to or higher than the reference value. In addition, it is not limited to changing the density in the voxel data, and the voxel object may be destroyed by other methods. For example, it may be that a flag indicating whether an object exists is stored in the voxel data, and when the flag is set to "on", it indicates that an object exists in the voxel, and when the flag is set to "off", it indicates that no object exists in the voxel (that is, a void).
[0197] In addition, the above-described processing is not limited to being executed in the game system 1, and may also be executed in any other information processing device or information processing system. The information processing system may also be composed of multiple devices, and the multiple devices may also be connected via a network (e.g., LAN, Internet, etc.).
[0198] In addition, the structures according to the above-described embodiment and its modification examples can be arbitrarily combined as long as they do not contradict each other. In addition, the above is merely an illustration of the present invention, and various improvements and modifications may be added in addition to the above.
[0199] Several system examples, method examples, device examples, and apparatus examples are illustrated, but it should be understood that the appended claims are not limited to the disclosed systems, methods, devices, and apparatuses, and various improvements and modifications can be made without departing from the spirit and scope of the appended claims, which is self-evident.
Claims
1. A computer program product comprising a program executed in a computer of an information processing apparatus, the program causing the computer to perform the following processes: Storing terrain object data and terrain polygon mesh data in a storage medium, wherein, The terrain object data is data for representing a terrain object in a virtual space, and holds a voxel value for each voxel included in a voxel space arranged in the virtual space, the voxel value representing the degree to which the object occupies the space defined by the voxel. The terrain polygon mesh data is generated based on the terrain object data and represents a terrain polygon mesh showing the surface of the terrain object. Based on an operation input by a player, causing a player character to perform a deformation action that deforms the terrain object in the virtual space. When the deformation action hits the terrain object, Updating the voxel value of the voxels included in a deformation range set based on the position hit by the deformation action. Updating the terrain polygon mesh data in correspondence with the update of the voxel value. At the place where the deformation action hits the terrain object, for each vertex included in a polygon mesh for projecting a trace onto the terrain polygon mesh, setting the coordinates of the vertex that can be projected onto the terrain polygon mesh based on the position onto which the polygon mesh for the trace is projected, and setting so as not to display a polygon including a vertex that cannot be projected onto the terrain polygon mesh, thereby arranging the polygon mesh for the trace on the terrain polygon mesh. And Generating an image of the virtual space through a rendering process including rendering of the terrain polygon mesh or a display terrain polygon mesh and rendering of the polygon mesh for the trace, wherein the display terrain polygon mesh is generated separately from the terrain polygon mesh and is for displaying the surface of the terrain object, and the rendering of the polygon mesh for the trace uses a texture for the trace representing the trace of the deformation action.
2. The computer program product according to claim 1, wherein, The deformation action is a destruction action for destroying the terrain object, Causing the computer to further perform the following process: When the destruction action hits the terrain object, updating the voxel value of the voxels included in the deformation range to a value representing the non-existence of the terrain object.
3. The computer program product according to claim 2, wherein, The destruction action is an action performed from the player character in a specified direction, Causing the computer to further perform the following process: Performing the projection at the place where the destruction action hits by projecting the polygon mesh for the trace from a start position based on the position of the player character in the direction in which the destruction action is performed.
4. The computer program product according to claim 2 or 3, wherein, Causing the computer to further perform the following process: In the drawing of the polygon mesh for the trace, within a specified range inside the polygon mesh for the trace, a portion where the terrain object does not exist is not drawn, while a portion where the terrain object exists is drawn within the specified range.
5. The computer program product according to claim 2 or 3, wherein the computer further performs the following processing: In the case where the destruction action is further performed on the terrain object configured with the polygon mesh for the trace, the polygon mesh for the trace is projected again onto the terrain polygon mesh, and based on the position where the polygon mesh for the trace is projected, the coordinates of the vertices that can be projected onto the terrain polygon mesh are set, and it is set not to display the polygons including the vertices that cannot be projected onto the terrain polygon mesh, thereby configuring the polygon mesh for the trace on the terrain polygon mesh.
6. The computer program product according to any one of claims 1 to 5, wherein the computer further performs the following processing: The opacity of the vertices in the polygon mesh for the trace that are adjacent to the polygons set not to be displayed is set to be lower than the opacity of the other vertices that can be projected onto the terrain polygon mesh.
7. The computer program product according to any one of claims 1 to 6, wherein the computer further performs the following processing: Based on the voxel values, the terrain polygon mesh is generated by the following algorithm: polygons are configured in such a way as to determine vertex positions between voxels where the terrain object does not exist and voxels where the terrain object exists; and Based on the hit of the deformation action, the vertex positions of the terrain polygon mesh in at least the range including the voxels whose voxel values are updated are recalculated.
8. A computer program product comprising a program executed in a computer of an information processing device, the program causing the computer to perform the following processing: Storing terrain polygon mesh data representing a terrain polygon mesh in a storage medium, the terrain polygon mesh representing the surface of a terrain object in a virtual space; Causing a deformation event to occur in the virtual space, the deformation event deforming the terrain object; Based on the occurrence of the deformation event, deforming the terrain polygon mesh; At the place where the deformation event has occurred, projecting a polygon mesh for a trace onto the terrain polygon mesh, and for each vertex included in the polygon mesh for the trace, based on the position where the polygon mesh for the trace is projected, setting the coordinates of the vertices that can be projected onto the terrain polygon mesh, and setting not to display the polygons including the vertices that cannot be projected onto the terrain polygon mesh, thereby configuring the polygon mesh for the trace on the terrain polygon mesh; and An image of the virtual space is generated through a rendering process that includes rendering of the terrain polygon mesh or a terrain polygon mesh for display and rendering of the polygon mesh for the trace, where the terrain polygon mesh for display is generated separately from the terrain polygon mesh and is used to display the surface of the terrain object, and the rendering of the polygon mesh for the trace uses a trace texture representing the trace of the deformation event.
9. The computer program product according to claim 8, wherein the computer is further caused to perform the following process: In the case where the deformation event occurs again for the terrain object configured with the polygon mesh for the trace, the terrain polygon mesh is deformed and controlled in such a way that a part of the polygon mesh for the trace corresponding to a non-deformed part of the terrain polygon mesh is left, and a part of the polygon mesh for the trace corresponding to the deformed part of the terrain polygon mesh is not displayed.
10. An information processing system comprising a processor and a storage medium, wherein terrain body data and terrain polygon mesh data are stored in the storage medium, where the terrain body data is data for representing a terrain object in a virtual space, and holds a voxel value for each voxel included in a voxel space arranged in the virtual space, and the voxel value represents the degree to which the object occupies the space defined by the voxel. the terrain polygon mesh data is generated based on the terrain body data and represents a terrain polygon mesh showing the surface of the terrain object. the processor performs the following processes: Based on an operation input of a player, a deformation action that deforms the terrain object is performed by the player character in the virtual space; In the case where the deformation action hits the terrain object, the voxel value of the voxels included in the deformation range set based on the position hit by the deformation action is updated; the terrain polygon mesh data is updated corresponding to the update of the voxel value; At the place where the deformation action hits the terrain object, a polygon mesh for the trace is projected onto the terrain polygon mesh. For each vertex included in the polygon mesh for the trace, coordinates of the vertex that can be projected onto the terrain polygon mesh are set based on the position onto which the polygon mesh for the trace is projected, and it is set not to display the polygon including the vertex that cannot be projected onto the terrain polygon mesh, thereby arranging the polygon mesh for the trace on the terrain polygon mesh; and An image of the virtual space is generated through a rendering process that includes rendering of the terrain polygon mesh or a terrain polygon mesh for display and rendering of the polygon mesh for the trace, where the terrain polygon mesh for display is generated separately from the terrain polygon mesh and is used to display the surface of the terrain object, and the rendering of the polygon mesh for the trace uses a trace texture representing the trace of the deformation action.
11. The information processing system according to claim 10, wherein the deformation action is a destruction action that destroys the terrain object. The processor also performs the following processing: In the case where the destruction action hits the terrain object, the voxel value is updated to a value indicating the non-existence of the terrain object for the voxels included in the deformation range.
12. The information processing system according to claim 11, wherein the destruction action is an action performed from the player character toward a specified direction, the processor also performs the following processing: The projection is performed at the location hit by the destruction action by projecting the trace polygon mesh from a start position based on the position of the player character in the direction of the destruction action.
13. The information processing system according to claim 11 or 12, wherein the processor also performs the following processing: In the drawing of the trace polygon mesh, a portion where the terrain object does not exist is not drawn within a specified range inside the trace polygon mesh, and a portion where the terrain object exists is drawn within the specified range.
14. The information processing system according to claim 11 or 12, wherein the processor also performs the following processing: In the case where the destruction action is further performed on the terrain object on which the trace polygon mesh is arranged, the trace polygon mesh is projected again onto the terrain polygon mesh, the coordinates of the vertices that can be projected onto the terrain polygon mesh are set based on the positions onto which the trace polygon mesh is projected, and polygons including vertices that cannot be projected onto the terrain polygon mesh are set not to be displayed, whereby the trace polygon mesh is arranged on the terrain polygon mesh.
15. The information processing system according to any one of claims 10 to 14, wherein the processor also performs the following processing: The opacity of the vertices in the trace polygon mesh that are adjacent to the polygons set not to be displayed is set to be lower than the opacity of the other vertices that can be projected onto the terrain polygon mesh.
16. The information processing system according to any one of claims 10 to 15, wherein the processor also performs the following processing: Based on the voxel value, the terrain polygon mesh is generated by the following algorithm: polygons are arranged in such a way as to determine vertex positions between voxels where the terrain object does not exist and voxels where the terrain object exists; and Based on the hit of the deformation action, the vertex positions of the terrain polygon mesh in at least the range including the voxels whose voxel values are updated are recalculated.
17. An information processing system comprising a processor and a storage medium, wherein terrain polygon mesh data representing a terrain polygon mesh is stored in the storage medium, and the terrain polygon mesh represents the surface of a terrain object in a virtual space, the processor performs the following processing: Cause a deformation event to occur in the virtual space, the deformation event deforming the terrain object; Based on the occurrence of the deformation event, deform the terrain polygon mesh; At the location where the deformation event has occurred, for the trace polygon mesh projected onto the terrain polygon mesh, for each vertex included in the trace polygon mesh, based on the position onto which the trace polygon mesh is projected, set the coordinates of the vertices that can be projected onto the terrain polygon mesh, and set it such that polygons including vertices that cannot be projected onto the terrain polygon mesh are not displayed, thereby arranging the trace polygon mesh on the terrain polygon mesh; and Generate an image of the virtual space through a rendering process including rendering of the terrain polygon mesh or the terrain polygon mesh for display and rendering of the trace polygon mesh, where the terrain polygon mesh for display is generated separately from the terrain polygon mesh and is used to display the surface of the terrain object, and the rendering of the trace polygon mesh uses a trace texture representing the trace of the deformation event.
18. The information processing system according to claim 17, wherein, The processor further performs the following processing: In the case where the deformation event occurs again for the terrain object on which the trace polygon mesh is arranged, deform the terrain polygon mesh, and control it in such a way that the part of the trace polygon mesh corresponding to the non-deformed part of the terrain polygon mesh remains, and the part of the trace polygon mesh corresponding to the deformed part of the terrain polygon mesh is not displayed.
19. An information processing apparatus including a processor that performs the following processing: Store terrain body data and terrain polygon mesh data in a storage medium, where The terrain body data is data for representing a terrain object in a virtual space, and holds a voxel value for each voxel included in a voxel space arranged in the virtual space, and the voxel value represents the degree to which the object occupies the space defined by the voxel; The terrain polygon mesh data is generated based on the terrain body data and represents a terrain polygon mesh that represents the surface of the terrain object; Based on an operation input by a player, cause a player character to perform a deformation action that deforms the terrain object in the virtual space; In the case where the deformation action hits the terrain object, Update the voxel value of the voxels included in the deformation range set based on the position hit by the deformation action, Update the terrain polygon mesh data in correspondence with the update of the voxel value; At the location where the deformation action hits the terrain object, project a trace polygon mesh onto the terrain polygon mesh, and for each vertex included in the trace polygon mesh, set the coordinates of the vertices that can be projected onto the terrain polygon mesh based on the position onto which the trace polygon mesh is projected, and set it such that polygons including vertices that cannot be projected onto the terrain polygon mesh are not displayed, thereby arranging the trace polygon mesh on the terrain polygon mesh; and An image of the virtual space is generated by a rendering process that includes rendering of the terrain polygon mesh or a terrain polygon mesh for display and rendering of the polygon mesh for traces, where the terrain polygon mesh for display is generated separately from the terrain polygon mesh and is used to display the surface of the terrain object, and the rendering of the polygon mesh for traces uses a trace texture representing the traces of the deformation action.
20. An information processing method, which is an information processing method executed using a processor, where terrain body data and terrain polygon mesh data are stored in a storage medium, where the terrain body data is data for representing a terrain object in a virtual space, and holds a voxel value for each voxel included in a voxel space arranged in the virtual space, and the voxel value represents the degree to which the object occupies the space defined by the voxel. the terrain polygon mesh data is generated based on the terrain body data and represents a terrain polygon mesh for displaying the surface of the terrain object. the processor performs the following processing: Based on an operation input by a player, cause a player character to perform a deformation action that deforms the terrain object in the virtual space; When the deformation action hits the terrain object, update the voxel value of the voxels included in a deformation range set based on the position hit by the deformation action; update the terrain polygon mesh data in correspondence with the update of the voxel value; At the location where the deformation action hits the terrain object, project a polygon mesh for traces onto the terrain polygon mesh, and for each vertex included in the polygon mesh for traces, set the coordinates of the vertex that can be projected onto the terrain polygon mesh based on the position onto which the polygon mesh for traces is projected, and set it so that a polygon including a vertex that cannot be projected onto the terrain polygon mesh is not displayed, thereby arranging the polygon mesh for traces on the terrain polygon mesh; and An image of the virtual space is generated by a rendering process that includes rendering of the terrain polygon mesh or a terrain polygon mesh for display and rendering of the polygon mesh for traces, where the terrain polygon mesh for display is generated separately from the terrain polygon mesh and is used to display the surface of the terrain object, and the rendering of the polygon mesh for traces uses a trace texture representing the traces of the deformation action.
Citation Information
Patent Citations
Three-dimensional image processing method, its processor, computer readable recording medium recorded with three-dimensional image processing program, and video game device
JP2002140723A