Game program, information processing system, information processing device, and information processing method
The game program addresses the lack of realistic tracing on deforming terrain by projecting trace polygon meshes onto terrain polygon meshes, enhancing the representation of transformation and destruction actions on terrain objects.
Patent Information
- Application Number
- JP2024011600
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2024-01-30
- Publication Date
- 2026-02-04
- Estimated Expiration
- 2044-01-30
AI Technical Summary
Conventional games do not effectively allow for leaving traces on deforming terrain, lacking realism in deformation and trail representation.
A game program that stores terrain volume data and terrain polygon mesh data, updates voxel values and polygon meshes based on player actions, and projects trace polygon meshes onto the terrain to leave traces of transformation or destruction actions.
Enables realistic tracing of deformation and destruction actions on terrain objects by projecting trace polygon meshes onto terrain polygon meshes, allowing for natural and detailed trail representation.
Smart Images

Figure 0007811228000001 
Figure 0007811228000002 
Figure 0007811228000003
Abstract
Description
[Technical Field]
[0001] The present invention relates to a game program, an information processing system, an information processing device, and an information processing method that are capable of executing a game using terrain. [Background technology]
[0002] Conventionally, there have been games in which polygons of tracks are generated when a character glides, and a trajectory is drawn by applying textures to the tracks (see, for example, Patent Document 1). [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Application Laid-Open No. 2002-140723 Summary of the Invention [Problem to be solved by the invention]
[0004] However, in the above-mentioned conventional games, deformation of the ground was not anticipated, and there was room for improvement in leaving a trail when the terrain was deformed.
[0005] Therefore, an object of the present invention is to provide a game program, an information processing system, an information processing device, and an information processing method that are capable of leaving traces on freely deforming terrain. [Means for solving the problem]
[0006] In order to solve the above problems, the present invention employs the following configuration.
[0007] A game program of this embodiment is a game program executed on a computer of an information processing device, and causes the computer to store in a storage medium: terrain volume data, the data representing a terrain object in a virtual space, the terrain volume data holding, for each voxel included in a voxel space arranged in the virtual space, a voxel value indicating the degree to which the object occupies a space defined by the voxels; and terrain polygon mesh data, generated based on the terrain volume data and indicating a terrain polygon mesh representing the surface of the terrain object. The game program also causes the computer to have a player character perform a transformation action in the virtual space to deform the terrain object based on a player's operation input, and, when the transformation action hits the terrain object, update the voxel values of voxels included in a transformation range set based on the position of the hit of the transformation action, and update the terrain polygon mesh data in accordance with the update of the voxel values. The game program also causes the computer to project a trace polygon mesh toward the terrain polygon mesh at a location where the transformation action hits the terrain object, and to set, for each vertex included in the trace polygon mesh, coordinates of vertices that can be projected onto the terrain polygon mesh based on the projected position, and to set so that polygons including vertices that cannot be projected onto the terrain polygon mesh are not displayed, thereby placing the trace polygon mesh on the terrain polygon mesh.The game program then causes the computer to generate an image of the virtual space by a drawing process that includes drawing the terrain polygon mesh or a display terrain polygon mesh that is generated separately from the terrain polygon mesh and is used to display the surface of the terrain object, and drawing the trace polygon mesh using a trace texture that indicates a trace of the transformation action.
[0008] According to the above, when a transformation action hits a terrain object, a trace polygon mesh is projected onto the terrain polygon mesh at the location of the hit, and the coordinates of vertices that can be projected are set based on the projection position, while vertices that cannot be projected are hidden. This makes it possible to place a trace polygon mesh on the terrain object in a simple manner, and to leave a trace of the transformation action on the terrain object.
[0009] In the above configuration, the transformation action may be a destruction action that destroys the terrain object. When the destruction action hits the terrain object, the game program may cause the computer to update the voxel values of voxels included in the transformation range to values that indicate that the terrain object does not exist.
[0010] Based on the above, it is possible to destroy a terrain object by a destruction action, and leave traces of the destruction action on the terrain object.
[0011] In the above configuration, the destructive action may be an action performed in a specified direction from the player character, and the game program may cause the computer to project the trace polygon mesh from a start position based on the position of the player character in the direction in which the destructive action was performed, thereby projecting the trace polygon mesh at a location where the destructive action hit.
[0012] Based on the above, a destruction action can be performed in a specified direction from the position of the player character, and a trace polygon mesh can be placed on the terrain object according to the position of the player character and the direction of the destruction action.
[0013] In the above configuration, the game program may further cause the computer to, when drawing the trace polygon mesh, not draw portions of the trace polygon mesh within a predetermined range at the back of the trace polygon mesh where the terrain object does not exist, but draw portions of the trace polygon mesh within the predetermined range.
[0014] According to the above, in the process of drawing a trace polygon mesh, by drawing the part of the trace polygon mesh where a terrain object exists within a specified range at the back side, it is possible to leave some of the traces and hide other parts of the traces.
[0015] In the above configuration, the game program may further cause the computer to, when the destruction action is further performed on the terrain object on which the trace polygon mesh is placed, project the trace polygon mesh again onto the terrain polygon mesh, set coordinates of vertices that can be projected onto the terrain polygon mesh based on the projected positions, and set polygons including vertices that cannot be projected onto the terrain polygon mesh so as not to be displayed, thereby placing the trace polygon mesh on the terrain polygon mesh.
[0016] According to the above, if a destruction action is further performed on a terrain object on which a trace polygon mesh is placed, a trace can be left on the destroyed terrain object by performing the same projection process again.
[0017] In the above configuration, the game program may further cause the computer to set the opacity of vertices included in the trace polygon mesh that are in contact with the polygons that are set not to be displayed to be lower than the opacity of other vertices that can be projected onto the terrain polygon mesh.
[0018] According to the above, by lowering the opacity of vertices that are in contact with polygons that are set to be hidden, it is possible to make vertices that are close to vertices that cannot be projected onto the terrain object semi-transparent, thereby making it possible to make the boundaries of traces displayed on the terrain object more natural.
[0019] In the above configuration, the game program may cause the computer to generate the terrain polygon mesh using an algorithm that arranges polygons based on the voxel values so that vertex positions are determined between voxels where the terrain object does not exist and voxels where the terrain object does exist, and may cause the computer to recalculate vertex positions of the terrain polygon mesh in a range that includes at least the voxels whose voxel values have been updated based on the deformation action being hit.
[0020] Based on the above, when a voxel value is updated, the terrain polygon mesh can be updated, and the terrain object can be easily deformed.
[0021]
[0013] Another embodiment of the game program is a game program executed on a computer of an information processing device, and causes the computer to store, in a storage medium, terrain polygon mesh data indicating a terrain polygon mesh representing the surface of a terrain object in a virtual space. The game program causes the computer to generate a deformation event that deforms the terrain object in the virtual space, and deforms the terrain polygon mesh based on the occurrence of the deformation event. The game program also causes the computer to project a trace polygon mesh onto the terrain polygon mesh at a location where the deformation event occurred, and to set, for each vertex included in the trace polygon mesh, coordinates of vertices that can be projected onto the terrain polygon mesh based on the projected position, and to set polygons including vertices that cannot be projected onto the terrain polygon mesh so as not to be displayed, thereby placing the trace polygon mesh on the terrain polygon mesh. The game program then causes the computer to generate an image of the virtual space by a drawing process that includes drawing the terrain polygon mesh or a display terrain polygon mesh that is generated separately from the terrain polygon mesh and is used to display the surface of the terrain object, and drawing the trace polygon mesh using a trace texture that shows traces of the deformation event.
[0022] According to the above, when a deformation event occurs, a trace polygon mesh is projected onto a terrain polygon mesh at the location where the event occurred, and the coordinates of vertices that can be projected are set based on the projection position, while vertices that cannot be projected are hidden. This makes it possible to place a trace polygon mesh on a terrain object in a simple manner, and to leave traces of the deformation event on the terrain object.
[0023] In the above configuration, the game program may further cause the computer to control such that, when the deformation event occurs again for the terrain object on which the trace polygon mesh is placed, the terrain polygon mesh is deformed, and the portion of the trace polygon mesh corresponding to the portion of the terrain polygon mesh that has not been deformed remains, and the portion of the trace polygon mesh corresponding to the deformed portion of the terrain polygon mesh is not displayed.
[0024] According to the above, when a deformation event occurs again for a terrain object on which a trace polygon mesh is placed, the terrain polygon mesh can be deformed and a trace can be left in the portion of the terrain polygon mesh that has not been deformed.
[0025] Further, other embodiments may be an information processing system that executes the game program, an information processing device, or an information processing method. [Effects of the Invention]
[0026] According to the present invention, a trace polygon mesh can be placed on a terrain object using a simple method, and for example, a trace of a deformation action can be left on the terrain object. [Brief explanation of the drawings]
[0027] [Figure 1] FIG. 1 illustrates an example of a game system. [Figure 2] A block diagram showing an example of the internal configuration of a main unit. [Figure 3] A block diagram showing an example of the internal configuration of the main unit, left controller, and right controller. [Figure 4] FIG. 1 is a diagram showing an example of a terrain object that is a voxel object. [Figure 5] 5A and 5B are diagrams showing an example of the state before and after a part of the terrain object shown in FIG. 4 is deleted. [Figure 6]5A and 5B are diagrams showing an example of the state before and after a part of the terrain object shown in FIG. 4 is deleted. [Figure 7] A diagram showing an example of the contents of voxel data. [Figure 8] A diagram showing an example of property information indicating the properties of a material [Figure 9] A diagram showing an example of texture information indicating the texture of a material. [Figure 10] A diagram showing an example of a mesh generation method [Figure 11] FIG. 10 is a diagram showing an example of a game image including a terrain object. [Figure 12] FIG. 10 is a diagram showing an example of a game image in which the player character PC performs a destruction action on a terrain object TO. [Figure 13] An example of a game image after a destruction action hits a terrain object TO. [Figure 14] FIG. 14 shows an example of a game image when a destruction action hits a terrain object TO from the state of FIG. 13. [Figure 15] A diagram for explaining how to add a trace tr to a terrain object TOJ. [Figure 16] A diagram showing an example of how the trace polygon mesh trpm is projected onto the terrain object TOJ. [Figure 17] A diagram showing an example of a vertex Vtf that cannot be projected onto the terrain object TOJ. [Figure 18] 10A and 10B are diagrams showing an example of a trace polygon mesh trpM before and after removing unnecessary vertices when the trace polygon mesh trpM is projected onto a terrain object TOJ. [Figure 19] A diagram showing a state in which another terrain object TOJ is placed on a terrain object TO and the player character PC performs a destruction action on the terrain object TOJ. [Figure 20] A diagram showing the state of the terrain object TOJ with the trace polygon mesh trpm placed before a destruction action is performed. [Figure 21]A diagram showing the state after a destruction action is performed on a terrain object with a trace polygon mesh (trpm) placed on it. [Figure 22] FIG. 2 is a diagram showing an example of various data used in game processing in the game system 1. [Figure 23] A flowchart showing an example of the flow of game processing executed by the game system 1. [Figure 24] A flowchart showing an example of the destructive action processing in step S5. [Figure 25] A flowchart showing an example of the trace processing in step S25. DETAILED DESCRIPTION OF THE INVENTION
[0028] [1. Game system configuration] A game system according to an example of this embodiment will be described below. FIG. 1 is a diagram showing an example of a game system. An example of a game system 1 according to this embodiment includes a main unit (information processing device; in this embodiment, it functions as a game device main unit) 2, a left controller 3, and a right controller 4. The main unit 2 is a device that executes various processes (e.g., game processes) in the game system 1. The left controller 3 and right controller 4 are devices equipped with operation units that allow the user to perform inputs.
[0029] The left controller 3 and the right controller 4 are each detachable from the main unit 2. In other words, the game system 1 can be used as an integrated device by attaching the left controller 3 and the right controller 4 to the main unit 2. The game system 1 can also be used with the main unit 2, the left controller 3, and the right controller 4 separate from each other. In the following, the left controller 3 and the right controller 4 may be collectively referred to as the "controller."
[0030] Fig. 2 is a block diagram showing an example of the internal configuration of main unit 2. In addition to the configuration shown in Fig. 1, main unit 2 includes components 17, 21, 23, 81 to 85, and 91 shown in Fig. 2. Some of these components 17, 21, 23, 81 to 85, and 91 may be mounted on an electronic circuit board as electronic components and housed within housing 11.
[0031] The main device 2 includes a display 12. The display 12 displays images generated by the main device 2. In this embodiment, the display 12 is a liquid crystal display (LCD). However, the display 12 may be any type of display device.
[0032] The main unit 2 also has a left terminal 17, which is a terminal for the main unit 2 to communicate with the left controller 3 via a wired connection, and a right terminal 21, which is a terminal for the main unit 2 to communicate with the right controller 4 via a wired connection.
[0033] The main unit 2 includes a processor 81. The processor 81 is an information processing unit that executes various types of information processing executed in the main unit 2, and may be composed of, for example, only a CPU (Central Processing Unit), or may be composed of an SoC (System-on-a-chip) that includes multiple functions such as a CPU function and a GPU (Graphics Processing Unit) function. The processor 81 executes various types of information processing by executing an information processing program (for example, a game program) stored in a storage unit (specifically, an internal storage medium such as flash memory 84, or an external storage medium inserted into slot 23, etc.).
[0034] The main device 2 includes a flash memory 84 and a DRAM (Dynamic Random Access Memory) 85 as examples of internal storage media built into the main device 2. The flash memory 84 and the DRAM 85 are connected to the processor 81. The flash memory 84 is a memory used primarily to store various types of data (which may be programs) saved in the main device 2. The DRAM 85 is a memory used to temporarily store various types of data used in information processing.
[0035] The main unit 2 includes a slot 23. The slot 23 has a shape that allows a predetermined type of storage medium to be inserted therein. The predetermined type of storage medium is, for example, a storage medium (e.g., a dedicated memory card) dedicated to the game system 1 and the same type of information processing device. The predetermined type of storage medium is used, for example, to store data used by the main unit 2 (e.g., application save data, etc.) and / or programs executed by the main unit 2 (e.g., application programs, etc.).
[0036] 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 from and to a predetermined type of storage medium (e.g., a dedicated memory card) inserted into the slot 23 in accordance with instructions from the processor 81.
[0037] The processor 81 reads and writes data from and to the flash memory 84, DRAM 85, and the above-mentioned storage media as appropriate, to execute the above-mentioned information processing.
[0038] The main unit 2 includes 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 this embodiment, the network communication unit 82 connects to a wireless LAN and communicates with external devices using a method conforming to the Wi-Fi standard as a first communication mode. The network communication unit 82 also performs wireless communication with other main units 2 of the same type using a predetermined communication method (e.g., communication using a proprietary protocol or infrared communication) as a second communication mode. Note that wireless communication using the second communication mode enables wireless communication with other main units 2 located within a closed local network area, and realizes a function that enables so-called "local communication," in which data is transmitted and received by direct communication between multiple main units 2.
[0039] The main unit 2 is equipped 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 right controller 4. Any communication method may be used between the main unit 2 and the left controller 3 and right controller 4, but in this embodiment, the controller communication unit 83 performs communication with the left controller 3 and right controller 4 in accordance with the Bluetooth (registered trademark) standard.
[0040] The processor 81 is connected to the above-mentioned left side terminal 17 and right side terminal 21. When the processor 81 performs wired communication with the left controller 3, it transmits data to the left controller 3 via the left side terminal 17 and receives operation data from the left controller 3 via the left side terminal 17. When the processor 81 performs wired communication with the right controller 4, it transmits data to the right controller 4 via the right side terminal 21 and receives operation data from the right controller 4 via the right side terminal 21. In this way, in the present embodiment, the main unit 2 can perform both wired and wireless communication with the left controller 3 and the right controller 4, respectively.
[0041] The display 12 is also connected to the processor 81. The processor 81 displays on the display 12 an image generated (for example, by executing the above-described information processing) and / or an image acquired from the outside.
[0042] 3 is a block diagram showing an example of the internal configuration of the main unit 2, the left controller 3, and the right controller 4. Note that details of the internal configuration of the main unit 2 are omitted in FIG. 3 because they are shown in FIG. 2.
[0043] The left controller 3 is equipped with a terminal 42 that enables the left controller 3 to communicate with the main unit 2 via a wired connection. The left controller 3 also has a communication control unit 101 that communicates with the main unit 2. As shown in FIG. 3 , the communication control unit 101 is connected to each component, including the terminal 42. In this embodiment, the communication control unit 101 is capable of communicating with the main unit 2 via both wired communication via the terminal 42 and wireless communication without using the terminal 42. The communication control unit 101 controls the method of communication between the left controller 3 and the main unit 2. That is, when the left controller 3 is attached to the main unit 2, the communication control unit 101 communicates with the main unit 2 via the terminal 42. When the left controller 3 is detached from the main unit 2, the communication control unit 101 communicates wirelessly with the main unit 2 (specifically, the controller communication unit 83).
[0044] The left controller 3 also includes a memory 102, such as a flash memory. The communication control unit 101 is configured, for example, by a microcomputer (also called a microprocessor), and executes firmware stored in the memory 102 to perform various processes.
[0045] The left controller 3 has one or more buttons 103. The left controller 3 also has an analog stick (referred to as "stick" in FIG. 3) 32. The buttons 103 and analog stick 32 repeatedly output information relating to operations performed on them to the communication control unit 101 at appropriate timing.
[0046] The communication control unit 101 acquires information about the input (specifically, information about the operation) from each input unit (specifically, the buttons 103 and the analog stick 32). The communication control unit 101 transmits operation data including the acquired information (or information obtained by performing a predetermined process on the acquired information) to the main unit 2. The operation data is repeatedly transmitted once every predetermined time. The interval at which the information about the input is transmitted to the main unit 2 may or may not be the same for each input unit.
[0047] By transmitting the above operation data to the main unit 2, the main unit 2 can obtain the input performed on the left controller 3. In other words, the main unit 2 can determine the operation of moving the left controller 3 and the operation of the button 103 and analog stick 32 based on the operation data.
[0048] The left controller 3 is equipped with a power supply unit 108. In this 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 to each part of the left controller 3 (specifically, each part that receives power from the battery).
[0049] As shown in FIG. 3, the right controller 4 is equipped with a communication control unit 111 that communicates with the main unit 2. The right controller 4 also has a memory 112 that is 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 memory 112 have the same functions as the communication control unit 101 and memory 102 of the left controller 3. Therefore, the communication control unit 111 can communicate with the main unit 2 both via wired communication via the terminal 64 and via wireless communication that does not use the terminal 64 (specifically, communication in accordance with the Bluetooth (registered trademark) standard), and controls the method of communication that the right controller 4 uses with the main unit 2.
[0050] The right controller 4 has input units similar to those of the left controller 3. Specifically, the right controller 4 has a button 113 and an analog stick 52. These input units have the same functions as those of the left controller 3 and operate in the same manner.
[0051] The right controller 4 is equipped with a power supply unit 118. The power supply unit 118 has the same functions as the power supply unit 108 of the left controller 3 and operates in the same manner.
[0052] [2. Overview of processing in the game system] Next, an overview of the processing executed in the game system 1 will be described with reference to Figs. 4 to 11. In this embodiment, the game system 1 generates a game image in which terrain objects and characters (for example, a player character operated by a player) are arranged in a game space, which is a three-dimensional virtual space, and displays the game image on a display device. Note that in this embodiment, the display device on which the game image is displayed may be the above-mentioned display 12 or a stationary monitor.
[0053] [2-1. Voxel] In this embodiment, the shapes of some objects in the game space are defined by voxel data. Here, a voxel is a rectangular parallelepiped (more specifically, cubic) region arranged in a grid pattern in the game space, and voxel data is data set for each voxel. Hereinafter, an object whose shape is defined by voxel data will be referred to as a "voxel object." In this embodiment, the game system 1 stores voxel data for each of a plurality of voxels set in the game space as data for generating voxel objects in the game space.
[0054] Fig. 4 is a diagram showing an example of a terrain object that is a voxel object. As shown in Fig. 4, in this embodiment, the shape of a terrain object that represents terrain such as the ground is defined by voxel data (i.e., it is a voxel object). Each cube shown in Fig. 4 represents a terrain object. Note that in Fig. 4, the edges of the terrain object are shown with thick lines, but these thick lines are added to make the drawing easier to read, and in reality, the edges of the terrain object do not need to be displayed thick.
[0055] The terrain object shown in FIG. 4 is generated according to a rule that, for example, "if a parameter included in the voxel data set for a voxel is greater than a predetermined value, a cube is placed at the position of the voxel, and if the parameter is equal to or less than the predetermined value, nothing is placed at the position of the voxel." The terrain object shown in FIG. 4 is shown for the purpose of clearly illustrating the relationship between voxels and voxel objects. In this embodiment, a voxel object is actually generated (based on voxel data) according to a rule that results in a shape that is complex compared to the length of one side of a voxel, such as the terrain object shown in FIG. 10 (described later). Note that the rule for determining the shape of a voxel object based on voxel data is arbitrary. In other embodiments, the game system 1 may generate a voxel object as shown in FIG. 4 or a voxel object as shown in FIG. 11 based on object data.
[0056] The shape of a voxel object can be changed by changing the voxel data of each voxel. FIGS. 5 and 6 are diagrams showing an example of the state before and after a portion of the terrain object shown in FIG. 4 is deleted. That is, when the hatched portion of the terrain object shown in FIG. 5 is destroyed, the terrain object changes to a shape as shown in FIG. 6. At this time, the game system 1 can easily erase the terrain object by rewriting the voxel data (described later) for the voxels in the hatched portion so that they indicate that the terrain object does not exist. Note that when adding a terrain object, the game system 1 can easily change the shape of the terrain object by changing the voxel data of each voxel, just as when erasing a terrain object.
[0057] In this way, the game system 1 can freely change the shape of a voxel object by rewriting the voxel data. For example, when a terrain object is destroyed in a game for some reason (for example, when a player character hits the terrain object), resulting in a change in the shape of the terrain object, the game system 1 can freely change the shape of the terrain object by changing the voxel data used to generate the terrain object, rather than directly changing the data indicating the outer shape of the terrain object (i.e., a mesh, which will be described later).
[0058] 7 is a diagram showing an example of the contents of voxel data. In this embodiment, the game space can be divided into a plurality of voxels arranged in a grid pattern. The game system 1 associates voxel data with each voxel in the game space and stores the data. The voxel data indicates, for example, whether a voxel object exists in the voxel corresponding to the voxel data.
[0059] As shown in Fig. 7, the voxel data includes density data. The density data is data of density that indicates the degree to which an object is contained within the area in which each voxel is defined. As will be described in detail later, the position and shape of the surface of the voxel object (i.e., the mesh described later) are determined based on the density. In other words, in this embodiment, the density is also data used to create a mesh that defines the surface of the voxel object.
[0060] In this embodiment, the density can be an integer value ranging from a lower limit (e.g., 0) to an upper limit (e.g., 255). In this embodiment, the game system 1 assumes that when the density value set for a voxel is high, the proportion of the volume within the voxel is large, and when the density value is low, the proportion of the volume occupied by the voxel object within the voxel is small. For example, when the density is 0, no object exists within the voxel; when the density is 255, the entire voxel is occupied by the object; and when the density is between these values, the voxel is occupied by the object at a proportion corresponding to the value. The shape of the voxel mesh, i.e., the shape of the voxel object, is then determined based on the density. However, the shape of the voxel object generated based on the density does not necessarily have a volume that exactly matches the proportion indicated by the density. For example, a method for generating a voxel object such as that shown in FIG. 4 and a method for generating a voxel object such as that shown in FIG. 11 may have different volumes even though they are based on the same density.
[0061] In other embodiments, the density may indicate whether the entire area of the voxel is occupied by voxel objects or whether the area of the voxel does not contain any voxel objects. For example, the density data may be data that can only take on the value 0 or 1.
[0062] As shown in Fig. 7, the voxel data includes material data. The material data indicates the material (in other words, the substance) of a voxel object generated from the voxel data. In this embodiment, materials such as sand, rock, and soil are set for the voxel object. That is, in this embodiment, multiple types of materials are prepared as materials that can be set for the voxel object, and one of the multiple types of materials is set for the voxel object.
[0063] As shown in FIG. 7, in this embodiment, the material data indicates identification information of the material (referred to as a "material ID"). Furthermore, in this embodiment, the game system 1 stores material information indicating the properties and texture of the material for each material provided in the game. In this embodiment, the material information associates the material ID with the properties of the material and the appearance of the material (specifically, the texture). Specifically, the material information associates the material ID with identification information of the properties of the material (referred to as a "property ID") and identification information of the texture of the material (referred to as a "texture ID") (see FIG. 7).
[0064] Fig. 8 is a diagram showing an example of property information indicating the properties of a material. As shown in Fig. 8, the game system 1 stores property information that associates the above property ID with information indicating the content of the property indicated by the property ID. The property of a material is a property that a voxel object to which the material is set has in the game, and is, for example, information such as weight and slipperiness shown in Fig. 8. Note that the specific content of the property is arbitrary, and for example, the following information may be set as the property of a material: ·temperature Breakability (for example, the number of times a voxel object can be impacted before it breaks) Whether other objects are glued to the voxel object - The amount of health recovered by the player character when the player character destroys a voxel object The amount of in-game currency the player character will acquire when they destroy a voxel object. The specific content of the properties set for the material is arbitrary. In other embodiments, information different from the above may be set as information indicating the properties of the material.
[0065] 9 is a diagram showing an example of texture information indicating the texture of a material. As shown in Fig. 9, the game system 1 stores texture information that associates the above texture ID with the texture indicated by the texture ID.
[0066] In addition to texture information, any information related to color and / or pattern may be set as data defining the appearance of a voxel object. For example, a crack pattern may be set as information related to the appearance of a voxel object. By using such a pattern, the game system 1 can generate an image of a voxel object that appears cracked.
[0067] As described above, in this embodiment, the material data defines the properties of a voxel object and the texture to be used for the voxel object by the material ID. For example, if the material ID indicated by the material data included in the voxel data is "002," the property indicated by the property ID "001" associated with that material ID in the material information is set as the property of the voxel object corresponding to that voxel data (see the arrow in FIG. 7). In addition, in the above case, the texture indicated by the texture ID "002" associated with that material ID in the material information is applied to the voxel object corresponding to that voxel data (see the arrow in FIG. 7).
[0068] As described above, in this embodiment, the game system 1 manages the properties and textures of materials separately. Therefore, in this embodiment, it is possible to easily set multiple types of materials that have the same properties but different appearances (i.e., textures), or multiple types of materials that have different properties but the same appearance.
[0069] Note that the material data may be any data that can identify the properties and / or texture of a material. For example, in other embodiments, the material data may indicate the property ID and texture ID, or may have a data structure that actually includes data indicating the properties and texture of the material.
[0070] Furthermore, the material data may be information about a material that further indicates information other than the properties and textures described above. For example, the material data may include effect data that indicates an effect that is generated when an effect generation condition set for a voxel object (e.g., a part of the voxel object is destroyed, or a character steps on the voxel object) is satisfied. The effect data may be data that indicates an effect image (e.g., an effect image that expresses that a voxel object has been destroyed) or data that indicates an effect sound (footsteps when a character walks on a voxel object).
[0071] As shown in Figure 7, the voxel data includes state data that indicates the state of a voxel object. The specific content of the state data is arbitrary. For example, the state data may be data that indicates whether a voxel object is wet or not, or data that indicates the amount of damage that has been inflicted on the voxel object. The content of the state data may be updated during the game.
[0072] [2-2.Mesh] In this embodiment, the surface of a voxel object is represented by a mesh. A mesh is a collection of multiple faces (specifically, polygons) arranged in a game space. In this embodiment, the game system 1 generates a mesh of a voxel object based on voxel data of each voxel set in the game space. An example of generating a mesh based on voxel data will be described below.
[0073] Fig. 10 is a diagram showing an example of a method for generating a mesh. Note that in Fig. 10, voxels and meshes are expressed in two dimensions for the purpose of making the drawing easier to see and the explanation easier to understand, but in reality, a three-dimensional mesh is generated based on voxels in a three-dimensional space.
[0074] As described above, in this embodiment, the density set for a voxel is set in the range of 0 to 255. Furthermore, in this embodiment, voxels with a density equal to or greater than a reference value are considered to be inside the object, and voxels with a density less 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 outside the object (i.e., reference value = 1); the reference value may be, for example, 128. In the example shown in FIG. 10 , the density of voxel 201 and the other voxels outside is set to 0, the density of voxel 202 is set to 100, which is less than the reference value, and the densities of voxels 203 and 204 are set to 150 and 200, which are equal to or greater than the reference value. In this embodiment, the game system 1 generates vertices between voxels with densities equal to or greater than the reference value and voxels with densities less than the reference value. Specifically, a determination is made as to whether to generate a vertex for each area spanning eight adjacent voxels (four in the drawing) (areas surrounded by dotted lines in the drawing). That is, vertices are generated in regions that span both voxels with densities above and below the reference value. Furthermore, if adjacent vertices (the boundaries of the aforementioned regions containing each vertex) pass between voxels with densities above and below the reference value and voxels with densities below the reference value, a polygon mesh is generated by connecting those vertices. The coordinates of the vertices are determined by comparing the densities of adjacent voxels along each of the X, Y, and Z axes and interpolating based on the difference in density. In this case, coordinate calculations can also be performed based on normal information. Normal information may be stored in advance for at least some voxels. If normal information is not stored, normal information may also be calculated based on the densities of adjacent voxels. Note that in FIG. 10, the density of voxel 202 is below the reference value, so voxel 202 is treated as outside the object when determining whether a vertex exists. However, the density value of voxel 202 itself is used to calculate the coordinates of the vertices to be generated. If the reference value were set to a value lower than the density of the voxel 202, the result would be that more vertices would be added to the upper right and upper left sides of the voxel 202 in FIG.
[0075] By generating a polygon mesh as described above, it is possible to generate a shape whose volume reflects the density of each voxel to some extent. However, depending on the relationship with adjacent voxels, it is possible that a voxel with a density of 0 may include a portion of an area within the object, or that a voxel with a density of 255 may include a portion of an area outside the object. Furthermore, in this embodiment, voxels with a density less than the reference value are processed as being outside the object, so that the number of vertices is reduced compared to when voxels are processed as being inside the object, resulting in a smaller volume. In other words, it is not necessary to calculate a polygon mesh so that the volume strictly corresponds to the density value.
[0076] 11 is a diagram showing an example of a game image including a terrain object. In this embodiment, by generating a mesh as described above, it is possible to make a voxel object have a shape with complex irregularities compared to the length of one side of a voxel, for example.
[0077] Note that any method may be used to generate a mesh based on voxel data. For example, in another embodiment, if the density of voxel data is greater than a predetermined value, a mesh may be generated such that cubes are placed in the voxels (see FIG. 4).
[0078] The game system 1 determines the appearance (i.e., color and / or pattern) of each face of the mesh generated as described above, depending on the material specified by the voxel data. Specifically, the game system 1 determines the texture to be used for drawing each face of the mesh based on the voxel data, and generates an image of the voxel object by mapping the determined texture to each face. The texture to be mapped to each face of the mesh is determined based on voxel data of voxels (referred to as target voxels) used to generate the face, among the voxels in which the voxel object exists. The target voxels may be, for example, one or more voxels arranged around the face, depending on the mesh generation method. In other words, the texture to be mapped to a face of the mesh is determined to be a texture corresponding to the material set for one or more voxels arranged around the face.
[0079] In another embodiment, one voxel data may include multiple types (e.g., two types) of material data. In this case, the voxel data includes ratio data relating to the multiple types of material data. The ratio data is data for determining a texture to be used for a voxel object, and indicates the ratio of influence that each material (specifically, the texture corresponding to the material) indicated by the multiple types of material data has on the appearance (specifically, the color and / or pattern) of the voxel object. When determining a texture to be mapped to each face of a mesh, the texture is determined based on various data (specifically, density data, multiple types of material data, and ratio data) included in the voxel data of the target voxel. For example, when multiple types of materials are set for a target voxel corresponding to one face, the texture corresponding to the material (one type) with the greatest influence may be used in consideration of the ratio, or each texture corresponding to the multiple types of materials may be used in consideration of the ratio.
[0080] In other embodiments, there may be both voxel objects that use voxel data including one type of material data and voxel objects that use voxel data including two types of material data.
[0081] (Game Processing Overview) Next, the transformation of terrain objects (voxel objects) performed in the game of this embodiment will be described. In the game of this embodiment, terrain objects and a player character PC are placed in a virtual space. The terrain objects are objects that form terrain such as the ground or mountains, and different terrain objects are placed depending on the game scene. For example, in a rocky mountain scene, objects that resemble rocks and soil are placed in the virtual space as terrain objects. In another scene, objects that resemble grasslands and objects that resemble rivers, lakes, etc. are placed as terrain objects. In addition to these, terrain objects that form various terrains are placed depending on the desert scene, volcano scene, city scene, etc. Note that the terrain objects may also be objects that resemble artificial structures such as roads, bridges, and buildings.
[0082] Based on the player's operation input, the player character PC moves on the terrain object, jumps on the terrain object, and performs a transformation action on the terrain object. A transformation action is an action that transforms the terrain and can change the voxel value (specifically, density) set in each voxel. In this embodiment, the player character PC performs a destruction action that destroys the terrain object as an example of a transformation action that transforms the terrain object. FIG. 12 is a diagram showing an example of a game image in which the player character PC performs a destruction action on a terrain object TO.
[0083] As shown in FIG. 12, the player character PC performs a punch as an example of a destructive action in response to an instruction from the player. Specifically, the player character PC performs the destructive action in a direction corresponding to a directional input by the player (e.g., a directional input using a joystick). For example, the player character PC performs the destructive action in any of the following directions: horizontal, downward, and upward. As shown in FIG. 12, when the player character PC performs a destructive action toward a terrain object TO, the destructive action may hit the terrain object TO. Whether the destructive action has hit the terrain object TO is determined based on the position of the player character PC, the direction of the destructive action, and the terrain polygon mesh representing the surface of the terrain object TO. When it is determined that the destructive action has hit the terrain object TO, a hit position is determined. The hit position is determined based on the position of the player character PC, the direction of the destructive action, and the terrain polygon mesh.
[0084] FIG. 13 is a diagram showing an example of a game image after a destruction action hits a terrain object TO. As shown in FIG. 13, when a destruction action hits a terrain object TO, a trace tr is added to the terrain object TO at the location where the destruction action hit. The trace tr indicates that the destruction action hit the terrain object TO, and is displayed on the surface of the terrain object TO including the hit location. The trace tr is, for example, an image that looks like the terrain object TO has been cracked.
[0085] FIG. 14 is a diagram showing an example of a game image when a destruction action hits a terrain object TO from the state of FIG. 13. As shown in FIG. 14, when a destruction action is further performed by the player character PC and the destruction action hits a terrain object TO, the terrain object TO included in a predetermined destruction range including the hit position is destroyed. In other words, the terrain object TO included in the destruction range no longer exists, and a hole (void) is created in the terrain object TO. When a terrain object TO included in the destruction range is destroyed, part of the trace tr included in the destruction range also disappears, but part of the trace tr not included in the destruction range remains.
[0086] In this way, when a destruction action hits a terrain object TO, a trace tr is added to the surface of the terrain object TO. Also, when a destruction action hits a terrain object TO, a part of the terrain object TO is destroyed.
[0087] In the above description, it has been assumed that when a destruction action hits the terrain object TO once, a trace tr is added, and when the destruction action hits the terrain object TO once more, the terrain object TO is destroyed. This is merely an example, and the number of times the destruction action is hit before the trace tr is added and the number of times the destruction action is hit before the terrain object TO is destroyed are not limited to this. For example, when a destruction action hits the terrain object TO multiple times, a trace tr may be added, and when the destruction action hits the terrain object TO one or more times, the terrain object TO may be destroyed. Furthermore, when a destruction action hits the terrain object TO one or more times, a trace tr may be added and the terrain object TO may be destroyed. In other words, the addition of the trace tr and the destruction of the terrain object TO may be performed at the same time.
[0088] Next, a specific method for adding a trace tr onto a land object will be described. Figure 15 is a diagram for explaining a method for adding a trace tr onto a land object TOJ.
[0089] As shown in FIG. 15, when a destruction action of the player character PC hits a terrain object TOJ placed in virtual space, a trace polygon mesh trpM is placed at a start position (initial position) based on the position of the player character PC. The trace polygon mesh trpM is used to add a trace tr on 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 placed at the start position is deformed and placed so as to fit along the surface of the terrain object TOJ. Specifically, the trace polygon mesh trpM placed at the start position is projected toward the terrain object TOJ.
[0090] FIG. 16 is a diagram showing an example of how the trace polygon mesh trpM is projected onto the terrain object TOJ. As shown in FIG. 16, each vertex Vt of the trace polygon mesh trpM is projected onto the surface of the terrain object TOJ (terrain polygon mesh TOJPM representing the surface of the terrain object TOJ). In FIG. 16, white circles represent vertices Vt of the trace polygon mesh trpM before projection, and black circles represent 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 parallel to the direction of the destruction action passing through the vertex Vt is cast (a ray cast is performed), and the intersection between the line and the terrain polygon mesh TOJPM is calculated. Based on the intersection, the coordinates of the vertex Vt' after projection are set. The vertex Vt' after projection is set at a position closer to the vertex Vt before projection than the intersection. This allows the trace polygon mesh trpM to be displayed preferentially over the terrain polygon mesh TOJPM. The vertex Vt' after projection may be set at the position of the intersection.
[0091] In this way, by projecting each vertex Vt of the trace polygon mesh trpM onto the terrain object TOJ, the trace polygon mesh trpM is positioned so as to follow the surface of the terrain object TOJ. Then, a trace texture (for example, an image showing a cracked rock) showing the trace of the destruction action is applied to the trace polygon mesh trpM. This leaves a trace tr indicating that the destruction action has hit the terrain object TOJ, making it possible to display how the rock cracks due to the destruction action.
[0092] Here, there are cases where a vertex Vt of the trace polygon mesh trpm cannot be projected onto the terrain object TOJ. For example, if a line parallel to the direction of the destruction action passing through the vertex Vt does not intersect with 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.
[0093] FIG. 17 is a diagram showing an example of a vertex Vtf that cannot be projected onto the terrain object TOJ. In FIG. 17, a white triangle represents a vertex Vtf that cannot be projected onto the terrain object TOJ. A black circle represents a vertex Vt2 that can be projected onto the terrain object TOJ. A white circle represents a vertex Vt1 that can be projected onto the terrain object TOJ and that is in contact with a polygon St1 that includes the vertex Vtf. As shown in FIG. 17, if a vertex Vtf among the multiple vertices Vt of the trace polygon mesh trpm cannot be projected onto the terrain object TOJ, the vertex Vtf is excluded from the display as an unnecessary vertex. The polygon St1 that includes the excluded vertex Vtf is also excluded from the display as an unnecessary polygon. The vertex Vt1 that is in contact with the polygon St1 is made semi-transparent. The other vertices Vt2 that can be projected onto the terrain object TOJ are set to be displayed.
[0094] For example, the opacity of a vertex Vtf that cannot be projected onto the terrain object TOJ is set to "0" so that it is not displayed. The vertex Vtf may also be set so that it is not connected to other vertices. As a result, the polygon St1 containing the vertex Vtf is not displayed as part of the trace tr. The opacity of the vertex Vt1 that contacts the polygon St1 is lower than that of the vertex Vt2. The opacity of the vertex Vt2 is set to a predetermined value (e.g., the maximum value). In this way, the vertex Vtf that cannot be projected onto the terrain object TOJ is hidden, the vertex Vt2 that can be projected onto the terrain object TOJ is displayed, and the vertex Vt1 between them is made semi-transparent. This allows the trace tr to be left only on the terrain object TOJ that was hit by the destruction action. Furthermore, by lowering the opacity of the vertex Vt1, the outline of the boundary of the trace tr is blurred, allowing the trace to be displayed in a natural and unnatural way.
[0095] Note that vertices Vtf that cannot be projected onto the terrain object TOJ may be deleted from the trace polygon mesh trpm. That is, the position information of the vertices Vtf that cannot be projected onto the terrain object TOJ may be deleted from the memory. This may prevent the vertices Vtf that cannot be projected onto the terrain object TOJ and the polygons that include them from being displayed.
[0096] FIG. 18 is a diagram showing an example of the trace polygon mesh trpMZ before and after removing unnecessary vertices when the trace polygon mesh trpMZ is projected onto the land object TOJ.
[0097] As shown in Figure 18, vertices Vtf (points indicated by white triangles) are unnecessary vertices that cannot be projected onto the terrain object TOJ, and vertices Vt (points indicated by black circles) are vertices that are projected onto the terrain object TOJ. If the unnecessary vertices Vtf are excluded after projection, as shown in the right diagram of Figure 18, the trace polygon mesh trpM is attached to the terrain object TOJ, and no part of the trace polygon mesh trpM is displayed outside the terrain object TOJ. This makes it possible for a destruction action to hit the terrain object TOJ, leaving a trace tr only on the terrain object TOJ at the location of the hit.
[0098] In this embodiment, multiple voxel spaces are set in the virtual space, and multiple land objects are formed based on the voxel data of each voxel space. Figure 19 is a diagram showing a state in which another land object TOJ is placed on a land object TO, and the player character PC performs a destruction action on the land object TOJ.
[0099] A field voxel space representing the entire game field is fixed in the virtual space. A terrain object TO (a terrain polygon mesh TOPM representing the surface of the terrain object TO) is formed by setting voxel values (specifically, density data and material data) for the voxel data of each voxel in the field voxel space. The player character PC progresses through the game by moving on the terrain object TO and performing destruction actions on the terrain object TO to create holes in it. The terrain object TO is a voxel object fixed in the virtual space, and represents, for example, the ground, a slope, or a mountain rising from the ground. A second voxel space, which is movable in the virtual space, is also set separately from the field voxel space, and a voxel value is set for the voxel data of each voxel in the second voxel space. As a result, 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 placed on the ground.
[0100] As shown in FIG. 19, when a destruction action is performed by the player character PC, it is determined which terrain object the destruction action hit. For example, when the destruction action hits a terrain object TOJ defined by the second voxel space, the trace polygon mesh trpM is projected onto the terrain object TOJ as described above. Vertices Vtf of the trace polygon mesh trpM that cannot be projected onto the terrain object TOJ are excluded as unnecessary vertices. For this reason, as shown in FIG. 19, of the trace polygon mesh trpM, the portion projected onto the terrain object TOJ (the solid line portion along the terrain object TOJ) is displayed, and the portion projected onto the terrain object TO (the dashed line portion along the terrain object TO) is not displayed. As a result, the trace tr is displayed only on the surface of the terrain object TOJ that was hit by the destruction action.
[0101] Although not shown in the figure, when a destruction action hits a terrain object TO defined by the field voxel space, a trace polygon mesh trpM is projected onto the terrain object TO. Of the trace polygon mesh trpM, the portion projected onto the terrain object TO is displayed, while the portion projected onto terrain objects other than the terrain object TO is not displayed. As a result, the trace tr is displayed only on the surface of the terrain object TO that was hit by the destruction action.
[0102] That is, when a plurality of terrain objects exist in the virtual space, a trace polygon mesh trp m is projected onto the surface of a terrain object that has been hit by a destruction action, and a trace tr is left on the terrain object.
[0103] When a destruction action hits a terrain object TOJ, a trace polygon mesh (trpm) is placed, and it is determined whether a line parallel to the direction of the destruction action and passing through a vertex (Vt) intersects with the terrain polygon mesh (TOJPM). If a line parallel to the direction of the destruction action and passing through a vertex (Vt) does not intersect with the terrain polygon mesh (TOJPM) hit by the destruction action, the vertex (Vt) is treated as a vertex that cannot be projected onto the terrain object TOJ. Even if a line (L) parallel to the direction of the destruction action and passing through a certain vertex (Vts) intersects with the terrain polygon mesh (TOJPM), the vertex (Vts) may be treated as a vertex that cannot be projected onto the terrain object TOJ. For example, if the intersection of the line (L) parallel to the direction of the destruction action and passing through a vertex (Vts) with the terrain polygon mesh (TOJPM) is too far from the hit position of the destruction action, the vertex (Vts) may be treated as a vertex that cannot be projected onto the terrain object TOJ. For example, if such a vertex Vts is projected onto the terrain object TOJ and remains as part of the trace polygon mesh trpM, the trace polygon mesh trpM may have an unnaturally elongated shape. For this reason, such a vertex Vts may be treated as a vertex that cannot be projected onto the terrain object TOJ and may be excluded from the trace polygon mesh trpM after projection. Note that such a vertex Vts does not have to be excluded as a vertex that cannot be projected onto the terrain object TOJ.
[0104] Next, a description will be given of the processing that is performed when a destructive action is performed on a terrain object on which a trace polygon mesh trpm is placed.
[0105] FIG. 20 is a diagram showing the state before a destruction action is performed on a terrain object TOJ on which a trace polygon mesh trpm is placed. FIG. 21 is a diagram showing the state after a destruction action is performed on a terrain object on which a trace polygon mesh trpm is placed. FIGS. 20 and 21 show cross-sectional views of a terrain object TOJ on which a trace polygon mesh trpm is placed. As shown in FIGS. 20 and 21, a virtual camera VC is placed on the left side, and an image of the virtual space seen from the virtual camera VC is displayed on the display as a game image.
[0106] 20, when a destruction action is performed on a terrain object TOJ, a trace polygon mesh trpm is placed on the terrain object TOJ before it is destroyed. In this case, the image of the virtual space viewed from the virtual camera VC is an image in which a trace tr is added to the terrain object TOJ, making it appear as if the terrain object TOJ is cracked.
[0107] On the other hand, as shown in FIG. 21 , if a further destruction action is performed on the terrain object TOJ on which the trace polygon mesh trpm is placed, destroying a part of the terrain object TOJ, a cavity will be created in the terrain object TOJ. In this case, the trace polygon mesh trpm maintains the same shape as before the destruction, but the part of the trace polygon mesh trpm corresponding to the part of the terrain object TOJ that is not destroyed is displayed, and the part of the trace polygon mesh trpm corresponding to the part of the terrain object TOJ that is destroyed is hidden. Specifically, the part of the trace polygon mesh trpm where the terrain object TOJ exists within a predetermined range on the far side as viewed from the virtual camera VC (the solid line part in FIG. 21 ) is displayed. On the other hand, the part of the trace polygon mesh trpm where the terrain object TOJ does not exist within a predetermined range on the far side as viewed from the virtual camera VC (the dashed line part in FIG. 21 ) is not displayed. More specifically, when drawing an image, the depth value of the terrain polygon mesh TOJPM representing the surface of the terrain object TOJ is compared for each pixel with the depth value of the trace polygon mesh trpm. If the comparison shows that the trace polygon mesh trpM is in the foreground and the difference in depth value is within a predetermined range, the foreground trace polygon mesh trpM is drawn, and if the difference in depth value exceeds the predetermined range, the background terrain polygon mesh TOJPM is drawn. As a result, a hole is made in part of the terrain object TOJ, the trace tr in the hole part disappears, and an image is displayed in which the trace tr appears to remain around the hole.
[0108] Note that, if a further destruction action is performed on the terrain object TOJ on which the trace polygon mesh trpM is placed, a process of projecting the trace polygon mesh trpM onto the destroyed terrain object TOJ may be performed again. In this case, when the terrain object TOJ is destroyed, the trace polygon mesh trpM on the terrain object TOJ is deleted, and a new plate-shaped trace polygon mesh trpM is placed at the start position and projected toward the destroyed terrain object TOJ. Then, the solid line portion of the trace polygon mesh trpM shown in FIG. 21 is displayed as the trace tr. Furthermore, the dashed line portion of the trace polygon mesh trpM shown in FIG. 21 is hidden. As a result, an image similar to that shown in FIG. 21 is displayed. Note that in this case, the vertices of the trace polygon mesh trpM may be projected onto the surface of the terrain object TOJ at the back of the hole. In this case, the trace polygon mesh trpM is placed so as to follow the surface of the destroyed terrain object TOJ, and has a shape having the solid line portion (the portion around the hole) shown in FIG. 21 and a portion along the surface of the hole (inside the hole). This leaves a trace tr of the destruction action around and inside the hole. Note that in this case, the portion of the trace polygon mesh trpM that is attached inside the hole may be hidden. This allows the trace tr to be left only around the hole.
[0109] As described above, in the game of this embodiment, traces of destructive actions can be left on a terrain object. When leaving traces on a terrain object, it is possible to examine the shape of the terrain object and deform the trace polygon mesh to match the shape of the terrain object. However, this method can result in high processing costs when examining the shape of a complex terrain object. In particular, when the shape of a terrain object is freely deformed during a game in response to player operations, the shape of the terrain object tends to become complex, which could result in processing running out of time. However, the method of projecting the trace polygon mesh onto the terrain object and removing unnecessary vertices as described above allows the trace polygon mesh to be positioned on the terrain object so that it matches the shape of the terrain object with relatively simple calculations. Therefore, traces can be left on the terrain object even if the terrain object changes during the game.
[0110] (Game processing details) Next, details of the game processing in the game system 1 will be described with reference to FIGS.
[0111] Fig. 22 is a diagram showing an example of various data used in game processing in the game system 1. As shown in Fig. 22, 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.
[0112] The game program is a program for executing the game processing in this embodiment (the game processing shown in FIG. 23). The game program is stored in advance in a storage medium inserted in the slot 23 or in the flash memory 84, and is read into the DRAM 85 when the game is executed.
[0113] The field voxel space data is data relating to the entire field voxel space. The field voxel space data includes terrain volume data. The terrain volume data includes voxel data for each voxel in the field voxel space. The terrain volume data is data for representing terrain objects in virtual space, and for each voxel included in the field voxel space, it holds a voxel value (voxel data) indicating the extent to which the object occupies the space defined by the voxel. Each voxel data includes density data, material data, and a damage value. A terrain is formed in the virtual space by setting density and material for each voxel in the terrain volume data and generating a mesh based on the voxel data. Initial terrain volume data is pre-stored in a storage medium or flash memory 84 installed in the slot 23. At the start of the game, the terrain volume data stored in the storage medium or flash memory 84 installed in the slot 23 is loaded into the DRAM 85. This creates an initial terrain. For example, a terrain object representing a flat ground and a terrain object representing a rocky mountain are formed as the initial terrain. The terrain is changed by updating each voxel data included in the terrain volume data stored in the DRAM 85 while the game is being played.
[0114] The second voxel space data is data relating to a second voxel space arranged in the virtual space and different from the field voxel space. The second voxel space data includes second terrain volume data. The second terrain volume data holds a plurality of voxel data for representing a voxel object (e.g., a terrain object TOJ representing a substantially spherical rock) that can move in the virtual space.
[0115] The player character data is data relating to the player character PC, and includes data indicating the position and posture in the virtual space, and data indicating the shape of the player character PC (polygon mesh data).
[0116] The terrain polygon mesh data is data that indicates a terrain polygon mesh that represents the surface of a terrain object. The terrain polygon mesh data includes, for example, data that indicates the position of each vertex in the terrain polygon mesh. The terrain polygon mesh data is generated based on the terrain volume data. Note that when multiple voxel spaces and multiple terrain objects are arranged in the virtual space, terrain polygon mesh data corresponding to each terrain object is stored.
[0117] The trace polygon mesh data is data related to the trace polygon mesh, and includes data indicating the position of each vertex in the trace polygon mesh, data related to the lines connecting the vertices, and data related to the opacity of each vertex. When a destruction action is performed at multiple locations on a terrain object, a trace tr is left at each location. Trace polygon mesh data corresponding to each trace tr is stored.
[0118] 22, various other data are stored in the game system 1. For example, data relating to enemy characters that can move in a virtual space may be stored in the game system 1. The enemy characters may be voxel objects or 3D objects whose shapes are predetermined by polygon meshes.
[0119] Fig. 23 is a flowchart showing an example of the flow of game processing executed by the game system 1. The game processing shown in Fig. 23 is started in response to, for example, an instruction to start the game being given by the player.
[0120] In this embodiment, the processor 81 of the main unit 2 executes the game program to perform the processing of each step shown in FIG. 23. However, in other embodiments, some of the processing of each step may be performed by a processor (e.g., a dedicated circuit) other than the processor 81. Furthermore, if the game system 1 is capable of communicating with another information processing device (e.g., a server), some of the processing of each step shown in FIG. 23 may be performed in the other information processing device. Furthermore, the processing of each step shown in FIG. 23 is merely an example, and the order of the processing of each step may be reversed, or another process may be performed in addition to (or instead of) the processing of each step, as long as the same result is obtained.
[0121] 23 using a memory (for example, DRAM 85). That is, the processor 81 stores information obtained by each processing step in the memory, and when using the information in a subsequent processing step, reads the information from the memory and uses it.
[0122] 23, in step S1, processor 81 sets a virtual space in an initial state. Specifically, processor 81 acquires terrain volume data representing the terrain of the virtual space in the initial state from a storage medium inserted in slot 23, and stores some or all of the acquired terrain volume data in DRAM 85. Processor 81 also reads player character data from the storage medium, sets the initial position and orientation of the player character, and stores this in DRAM 85. Processor 81 also sets the initial position and orientation of the virtual camera, and stores this in DRAM 85.
[0123] The voxel data stored in DRAM 85 may be voxel data for the entire range of the virtual space, or may be voxel data for a portion of the virtual space used to generate a game image. For example, processor 81 may generate an image of an object using voxel data for voxels included in a portion of the virtual space (for example, a range within a predetermined distance from the position of the virtual camera). When voxel data for a portion of the virtual space is written, the same process as step S1 is executed at an appropriate timing during the execution of the series of processes in steps S2 to S10 (for example, when the position of the virtual camera has moved a predetermined distance or more).
[0124] In step S2, processor 81 generates a mesh for the voxel object. Specifically, for the terrain object, a terrain polygon mesh is generated based on terrain volume data (terrain volume data of the above-mentioned field voxel space data, second terrain volume data, etc.). The terrain polygon mesh is generated according to the method described above in "[2-2. Mesh]". Processor 81 also generates meshes for voxel objects other than the terrain object using a similar method. After step S2, the game starts, and the processes of steps S3 to S10 are repeatedly executed at predetermined frame time intervals (for example, 1 / 60 second intervals) during the game.
[0125] In step S3, the processor 81 controls the actions of the player character PC. For example, the processor 81 moves the player character PC, causes the player character PC to perform destructive actions, or causes the player character PC to jump, based on operation data received from the controllers 3 and 4. The destructive actions of the player character PC may include multiple actions such as punching, kicking, throwing a rock, firing a bullet, etc. Following step S3, the process of step S4 is executed.
[0126] In step S4, processor 81 determines whether or not a destructive action has been performed by player character PC. Processor 81 determines whether or not a predetermined button on the controller has been pressed. If the determination result in step S4 is positive, 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.
[0127] In step S5, processor 81 performs destructive action processing. Here, it is first determined whether or not a destructive action performed by the player character PC has hit a terrain object. If the destructive action has hit a terrain object, the terrain object is destroyed or a trace tr is added to the terrain object. Details of the destructive action processing in step S5 will be described later. Next, processor 81 performs the processing of step S6.
[0128] In step S6, processor 81 determines whether or not to update the mesh. Here, if the destruction action hits the terrain object in step S5 and the terrain object is destroyed (if the voxel data is updated), processor 81 determines to update the terrain polygon mesh. If the determination result in step S6 is positive, the process of step S7 is executed. On the other hand, if the determination result in step S6 is negative, the process of step S8 is executed.
[0129] 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 was changed in step S5. As a result, the vertex positions of the terrain polygon mesh are recalculated based on the updated voxel data. The updated terrain polygon mesh is stored in the DRAM 85 as terrain polygon mesh data. Following step S7, the processing of step S8 is executed.
[0130] In step S8, the processor 81 performs a drawing process to generate an image (game image) of the virtual space as seen from the virtual camera. Here, the processor 81 draws each polygon mesh (terrain polygon mesh, trace polygon mesh, polygon mesh representing the player character PC, etc.) using a texture image corresponding to each polygon mesh. The game system 1 stores a terrain texture image representing the terrain and a trace texture image representing the trace for each type of terrain (type of material). For example, when a destruction action hits a rocky terrain, the terrain polygon mesh is drawn using the terrain texture image representing the rocky terrain, and the trace polygon mesh is drawn using a trace texture image (an image of a cracked rock) corresponding to the rocky terrain. Specifically, the processor 81 calculates a depth value (a value representing the position in the imaging direction of the virtual camera) for each pixel of each polygon mesh, and draws the polygon mesh with the smaller calculated depth value. Here, when processor 81 draws a trace polygon mesh, it draws the portion where a terrain polygon mesh exists within a predetermined range on the far side of the virtual camera, and does not draw the portion where a terrain polygon mesh does not exist within the predetermined range on the far side of the virtual camera. As a result, when a destruction action hits a terrain object, a trace tr is displayed at the hit location. When a terrain object on whose surface a trace polygon mesh is arranged is destroyed, a trace tr is displayed around the destroyed portion, and the trace tr disappears from the destroyed portion. In this case, the terrain polygon mesh inside the destroyed portion is drawn. Following step S8, the processing of step S9 is executed.
[0131] In step S9, processor 81 outputs the game image generated in step S8 to the display. After step S9, the process proceeds to step S10.
[0132] In step S10, processor 81 determines whether or not to end the game. For example, processor 81 determines whether or not an instruction to end the game has been given by the user. If the determination result in step S10 is negative, the processing of step S3 is executed again. Thereafter, the series of processing from steps S3 to S10 is repeatedly executed until it is determined in step S10 that the game should be ended. On the other hand, if the determination result in step S10 is positive, processor 81 ends the game processing shown in FIG. 23.
[0133] (Destructive Action Processing) The destructive action processing in step S5 will be described in detail below with reference to Fig. 24. Fig. 24 is a flowchart showing an example of the destructive action processing in step S5.
[0134] In step S21, processor 81 determines whether the destruction action has hit the terrain object. Specifically, processor 81 determines whether the destruction action has hit the terrain object based on a 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, processor 81 uses an object for collision detection to determine whether the destruction action has hit the terrain object. For example, processor 81 flies the object for collision detection a predetermined distance from the position of the player character PC in the direction of the destruction action and determines whether the object has collided with the terrain polygon mesh. Note that, as terrain polygon meshes representing the shape of the terrain object, a terrain polygon mesh for collision detection for determining whether the destruction action has hit and a terrain polygon mesh for display for displaying the terrain (generating a game image) are prepared. Here, processor 81 determines whether the destruction action has hit the terrain object using the terrain polygon mesh for collision detection. The terrain polygon mesh for collision detection represents the shape of the terrain object and is coarser than the terrain polygon mesh for display. By using a terrain polygon mesh for collision detection, it is possible to reduce the processing load associated with collision detection for determining whether or not a destruction action has hit. The terrain polygon mesh for collision detection and the terrain polygon mesh for display may be the same. That is, a single terrain polygon mesh representing the shape of a terrain object may be prepared, and collision detection and rendering processing may be performed based on that terrain polygon mesh. If processor 81 determines YES in step S21, it then executes the processing of step S22, and if it determines NO in step S21, it ends the processing shown in FIG. 24.
[0135] In step S22, processor 81 sets a hit position of the destruction action and also sets a destruction range. Specifically, processor 81 first 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, processor 81 sets a predetermined destruction range including the hit position. The destruction range indicates the range in which the terrain object will be destroyed. The destruction range has a predetermined shape, and may be, for example, a sphere, a cylinder, a cone, an ellipsoid, or a shape obtained by deforming an ellipsoid asymmetrically in the left-right direction. Furthermore, the size and / or shape of the destruction range may differ depending on the type of terrain object, the type of destruction action, etc. After processing step S22, processor 81 executes processing step S23.
[0136] In step S23, processor 81 determines whether to destroy the terrain object hit by the destruction action. If the destruction condition is met, processor 81 determines to destroy the terrain object. The destruction condition is based on the type of destruction action, the material of the terrain object included in the destruction range, and the number of times the destruction action has hit the terrain object included in the destruction range. For example, if a terrain object is set to be destroyed when a destruction action is hit three times, the destruction condition is met when the destruction action is hit for the third time. Specifically, a damage value is stored in each voxel of the terrain object, and when a destruction action is hit, the damage value of each voxel included in the destruction range is added. Then, if the damage value exceeds a predetermined value, the voxel is destroyed. If processor 81 determines YES in step S23, it next executes the process of step S26. If processor 81 determines NO in step S23, it next executes the process of step S24.
[0137] In step S24, processor 81 determines whether or not to leave a trace on the terrain object. For example, a trace may or may not be left depending on the relationship between the type of destruction action and the type (type of material) of the terrain object. Also, a trace may or may not be left depending on the number of times the destruction action hits. Based on these, processor 81 determines whether or not to leave a trace on the terrain object. For example, when the type of destruction action is a punch and the type (type of material) of the terrain object is rock, if the destruction action hits the terrain object twice, it is determined that a trace will be left. If processor 81 determines YES in step S24, it then executes the processing of step S25. If processor 81 determines NO in step S24, it ends the processing shown in FIG. 24. Note that if it is not determined in step S24 that a trace will be left, processor 81 may change the texture image of the terrain object within a predetermined range including the hit position. For example, if the destruction action hits the terrain object once, the texture image of the terrain object may be changed in the next trace processing without placing a trace polygon mesh on the terrain object. In this case, the display mode (e.g., color) of the terrain object can be changed without adding a trace polygon mesh to the terrain object. On the other hand, if the destruction action hits the terrain object twice, the determination in step S24 may be YES, and a trace polygon mesh may be placed on the terrain object in the next trace processing.
[0138] In step S25, processor 81 executes trace processing for leaving a trace on the landform object hit by the destructive action. Details of the trace processing of step S25 will be described below with reference to Fig. 25. Fig. 25 is a flowchart showing an example of the trace processing of step S25.
[0139] (Trace Processing) In step S31, the processor 81 first places the trace polygon mesh trpm in the virtual space. Specifically, the processor 81 places the plate-shaped trace polygon mesh trpm at a start position based on the position of the player character PC so as to be perpendicular to the direction of the destruction action. The start position (initial position) at which the trace polygon mesh trpm is placed may be slightly behind the player character PC or may be the position of the player character PC. Moreover, the start position at which the trace polygon mesh trpm is placed may be in front of the player character PC. Following step S31, the processing of step S32 is performed.
[0140] In step S32, processor 81 projects each vertex of the trace polygon mesh trpM onto the terrain polygon mesh hit by the destruction action. Specifically, processor 81 extends a straight line from the position of each vertex of the trace polygon mesh trpM placed at the start position in the direction of the destruction action, and determines whether or not the straight line intersects with the terrain polygon mesh. Furthermore, if the straight line intersects with the terrain polygon mesh, processor 81 calculates the coordinates of the intersection. Following step S32, the processing of step S33 is performed.
[0141] In step S33, the processor 81 sets the coordinates of the vertices of the trace polygon mesh trpM that was projected onto the terrain polygon mesh in the processing of step S32. Specifically, the processor 81 sets the coordinates of the vertices based on the intersection calculated in step S32. For example, the processor 81 sets the coordinates of a position on the virtual camera side of the intersection as the coordinates of the vertices of the trace polygon mesh trpM after projection. Following step S33, the processing of step S34 is performed.
[0142] In step S34, the processor 81 excludes unnecessary vertices. Here, if the processor 81 cannot calculate the intersection in the processing of step S32, that is, if the processor 81 cannot project a vertex of the trace polygon mesh trpm onto the terrain polygon mesh hit by the destruction action, the processor 81 excludes the vertex (vertex Vtf in FIG. 17) as an unnecessary vertex. Specifically, the processor 81 sets the vertex Vtf that cannot be projected onto the terrain polygon mesh so that it is not displayed. For example, the processor 81 may set the vertex Vtf to be transparent, or may set it so that it is not connected to other vertices. As a result, polygons including the excluded vertex are not displayed. Following step S34, the processing of step S35 is performed.
[0143] In step S35, the processor 81 performs processing to set the opacity of each vertex of the trace polygon mesh trpM after projection. Specifically, the processor 81 sets the opacity of each vertex (vertex Vt2 in FIG. 17) of the trace polygon mesh trpM projected onto the terrain polygon mesh to a predetermined value (for example, the maximum value). In addition, the processor 81 sets the opacity of the vertex (vertex Vt1 in FIG. 17) that contacts the polygon including the vertex excluded in step S34 to a value smaller than the predetermined value. When the processing of step S35 has been executed, the processor 81 ends the processing shown in FIG. 25, and returns the processing to FIG. 24.
[0144] Returning to FIG. 24, when the process of step S25 is executed, processor 81 ends the process shown in FIG.
[0145] On the other hand, in step S26, processor 81 performs a voxel data update process. Specifically, processor 81 stores a value indicating that no terrain object exists in the voxel data of voxels included in the destruction range. For example, processor 81 sets the voxel density of voxels within the destruction range to "0." This destroys the terrain object included in the destruction range. The process of step S7 is executed based on the updated voxel data, thereby updating the shape of the terrain object.
[0146] The processing shown in the above flowchart is merely an example, and the order and content of the processing may be changed as appropriate.
[0147] As described above, in this embodiment, when a destruction action hits a terrain object, a trace polygon mesh is projected toward the terrain object at the location where the destruction action hit. The coordinates of vertices that can be projected onto the terrain object are set based on the projected position (the intersection calculated in step S32), and polygons including vertices that cannot be projected onto the terrain object are set so as not to be displayed. A trace texture is then applied to the trace polygon mesh placed on the terrain object, and a rendering process is performed. This makes it possible to leave a trace of the destruction action on the terrain object at the location where the destruction action hit. For example, it is possible to leave a trace over an area wider 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 it is also possible to leave a trace of the destruction action on complex terrain while reducing processing costs.
[0148] In this embodiment, the trace polygon mesh is projected in the direction of the destructive action from a starting position based on the position of the player character. This allows the trace polygon mesh to be projected in accordance with the direction of the destructive action at the location where the destructive action was performed, leaving traces of the destructive action on the terrain object.
[0149] In this embodiment, a part of the trace polygon mesh is displayed even after the terrain object is destroyed by a destructive action, so that a trace of the destruction action hit can be left behind even after the terrain object is destroyed.
[0150] Furthermore, in this embodiment, when a terrain object having a trace polygon mesh disposed on its surface is destroyed, the trace polygon mesh itself is not destroyed, and a portion of the trace polygon mesh is not displayed. That is, even if the terrain object is destroyed, the vertices of the trace polygon mesh are not deleted or their positions are not changed, and the trace polygon mesh itself maintains its shape along the surface of the terrain object before the destruction. Then, in the rendering process, pixels of the trace polygon mesh corresponding to the destroyed terrain object are not displayed. Specifically, in the rendering process of the trace polygon mesh, portions of the trace polygon mesh where no terrain object exists within a predetermined range behind the trace polygon mesh are not rendered, while portions of the trace polygon mesh where a terrain object exists within a predetermined range behind the trace polygon mesh are rendered. This makes it possible to reduce processing costs and express the destruction of a terrain object having a trace polygon mesh disposed on its surface. For example, it is possible to change the shape of the trace polygon mesh itself by deleting vertices of the trace polygon mesh corresponding to the destroyed terrain object. In this case, it is necessary to calculate the shape of the part of the trace polygon mesh to be deleted, which may increase processing costs. However, in the above embodiment, even if a terrain object as a voxel object is destroyed, the trace polygon mesh itself is not destroyed, and in the drawing process, the part of the trace polygon mesh that corresponds to the part of the destroyed terrain object is hidden, so processing costs can be reduced.
[0151] (Variation) Although the present embodiment has been described above, the above embodiment is merely an example, and the following modifications may be made, for example.
[0152] For example, in the above embodiment, a destruction action was performed using a part of the player character PC (specifically, an arm). In other embodiments, the player character PC may perform any other destruction action. For example, in other embodiments, the destruction action performed by the player character PC may use the entire player character PC. Furthermore, the destruction action performed by the player character PC does not have to use at least a part of the player character PC. For example, the destruction action may be performed by the player character PC throwing a predetermined object. When the predetermined object thrown by the player character PC hits a terrain object, it is considered that the destruction action has hit the terrain object, and a trace may be left on the terrain object. Furthermore, when the predetermined object thrown by the player character PC hits a terrain object, the terrain object may be destroyed.
[0153] In the above embodiment, the player character PC is caused to perform a destruction action that destroys a terrain object. In other embodiments, the player character PC may be caused to perform an action to add a terrain object. For example, the player character PC may be caused to perform an action to pile up soil or an action to stack blocks. When an action to add terrain hits a terrain object (for example, when soil is piled up on the ground or blocks are stacked), terrain may be added. The player character PC may also be caused to perform an action to bend the terrain object. That is, the player character PC may be caused to perform a transformation action to deform (add, destroy, or bend) the terrain object. When a transformation action hits a terrain object, a transformation range is set based on the position where the transformation action hit, and the voxel values of voxels included in the transformation range are updated, thereby deforming the terrain object. Even in such cases, the above-mentioned trace polygon mesh may be projected onto the terrain object so that a trace of the destruction action remains on the terrain object at the location where the transformation action hit.
[0154] In the above embodiment, when a transformation action hits a terrain object, a plate-shaped trace polygon mesh is initially placed in the virtual space and projected onto the terrain object. The shape of the initially placed trace polygon mesh is not limited to a plate shape and may be any shape.
[0155] In the above embodiment, the player character PC is caused to perform a transformation action (e.g., a destruction action), and when the transformation action hits a terrain object, a trace is left on the terrain object. In other embodiments, traces may be left on the terrain object when any transformation event that transforms the terrain object occurs, not just when the player character PC is caused to perform a transformation action. The transformation event may be, for example, an action of the player character PC, or an event that occurs unrelated to the player character PC. For example, the transformation event may be an event in which a predetermined object (e.g., a meteorite) falls from the sky, an event in which an enemy character throws a predetermined object, an event in which the terrain changes at a predetermined time, or the like. In other words, "the occurrence of a transformation event" may include the player character PC's transformation action hitting the terrain object, another object hitting the terrain object unrelated to the player character PC, the arrival of a predetermined time, etc.
[0156] In the above embodiment, 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 another embodiment, the terrain object may not be a voxel object, but may be a 3D object whose shape is determined based on pre-prepared polygon data. In this case, the terrain polygon mesh representing the surface of the terrain object is stored in advance, and the terrain polygon mesh is deformed in response to the occurrence of a transformation action. At the location where the transformation action occurred, a trace polygon mesh is projected onto the terrain polygon mesh, and the coordinates of vertices that can be projected onto the terrain polygon mesh are set based on the projected positions. Furthermore, settings are made to prevent polygons including vertices that cannot be projected onto the terrain polygon mesh from being displayed. As a result, the trace polygon mesh is placed on the terrain polygon mesh. Then, the terrain polygon mesh and the trace polygon mesh are drawn.
[0157] In the above embodiment, for voxels within the destruction range (an example of a deformation range), the density of the voxels was set to "0," thereby setting a value indicating that no object exists in the voxel. As a result, the portion of the voxel object within the destruction range was erased, destroying the voxel object. Destruction (erasure) of a voxel object is not limited to setting the density in the voxel data to "0," but may also be performed by setting the density to another value. For example, with regard to density, the "value indicating the absence of an object" is not limited to "0" but may be any value less than a reference value (e.g., 128). With regard to density, the "value indicating the presence of an object" may be a value in the range of 1 to 255, or may be a value equal to or greater than the reference value. Furthermore, destruction of a voxel object may be performed by other methods than changing the density in the voxel data. For example, a flag indicating the presence or absence of an object may be stored in the voxel data, and when the flag is ON, it indicates that an object exists in the voxel, and when the flag is OFF, it indicates that no object exists in the voxel (i.e., a cavity).
[0158] Furthermore, the above-described processing may be executed in any other information processing device or information processing system, not limited to the game system 1. The information processing system may be configured by multiple devices, and the multiple devices may be connected via a network (for example, a LAN, the Internet, etc.).
[0159] Furthermore, the configurations according to the above-described embodiments and their modifications can be combined in any manner as long as they are not inconsistent with each other. Furthermore, the above is merely an example of the present invention, and various other improvements and modifications may be made thereto. [Explanation of symbols]
[0160] 1. Game System 81 processors 85 DRAM TO, TOJ Terrain Object PC player character tr trace trpm Trace polygon mesh
Claims
1. A game program executed on a computer of an information processing device, the computer terrain volume data representing a terrain object in a virtual space, the data holding a voxel value for each voxel included in a voxel space arranged in the virtual space indicating the degree to which the object occupies the space defined by the voxel; terrain polygon mesh data that is generated based on the terrain volume data and indicates a terrain polygon mesh that represents the surface of the terrain object, and causing a player character to perform a transformation action in the virtual space to transform the terrain object based on an operation input by a player; When the transformation action hits the terrain object, updating the voxel values of voxels included in a deformation range that is set based on the position where the deformation action hits; updating the terrain polygon mesh data in accordance with the update of the voxel values; a trace polygon mesh is projected toward the terrain polygon mesh at a location where the deformation action hits the terrain object, and for each vertex included in the trace polygon mesh, coordinates of the vertex that can be projected onto the terrain polygon mesh are set based on the projected position, and polygons including vertices that cannot be projected onto the terrain polygon mesh are set so as not to be displayed, thereby placing the trace polygon mesh on the terrain polygon mesh; A game program that generates an image of the virtual space by a drawing process that includes drawing the terrain polygon mesh or a display terrain polygon mesh that is generated separately from the terrain polygon mesh and is used to display the surface of the terrain object, and drawing the trace polygon mesh using a trace texture that shows traces of the transformation action.
2. the transformation action is a destruction action that destroys the terrain object, The computer, The game program according to claim 1 , wherein, when the destruction action hits the terrain object, the voxel values for voxels included in the deformation range are updated to values indicating that the terrain object does not exist.
3. the destruction action is an action performed from the player character in a specified direction, The computer, 3. The game program according to claim 2, wherein the trace polygon mesh is projected from a starting position based on the position of the player character in a direction in which the destructive action was performed, thereby projecting the trace polygon mesh at a location where the destructive action hit.
4. The computer further comprises:
4. A game program as described in claim 2 or 3, wherein, in drawing the trace polygon mesh, portions where the terrain object does not exist within a predetermined range behind the trace polygon mesh are not drawn, and portions where the terrain object exists within the predetermined range are drawn.
5. The computer further comprises:
4. The game program according to claim 2 or 3, wherein, when the destruction action is further performed on the terrain object on which the trace polygon mesh is placed, the trace polygon mesh is again projected toward the terrain polygon mesh, the coordinates of vertices that can be projected onto the terrain polygon mesh are set based on the projected positions, and polygons including vertices that cannot be projected onto the terrain polygon mesh are set so as not to be displayed, thereby placing the trace polygon mesh on the terrain polygon mesh.
6. The computer further comprises:
2. A game program as described in claim 1, wherein the opacity of vertices included in the trace polygon mesh that are in contact with the polygon set to not be displayed is set to be lower than the opacity of other vertices that can be projected onto the terrain polygon mesh.
7. The computer, generating the terrain polygon mesh using an algorithm that arranges polygons based on the voxel values so that vertex positions are determined between voxels where the terrain object does not exist and voxels where the terrain object exists; The game program according to claim 1 , further comprising: a step of recalculating vertex positions of the terrain polygon mesh in a range including at least the voxels whose voxel values have been updated, based on the fact that the deformation action has been hit.
8. A game program executed on a computer of an information processing device, the computer storing terrain polygon mesh data indicative of a terrain polygon mesh representing the surface of a terrain object in a virtual space in a storage medium; generating a transformation event that transforms the topographical object in the virtual space; deforming the terrain polygon mesh based on the occurrence of the deformation event; projecting a trace polygon mesh onto the terrain polygon mesh at a location where the deformation event occurred, and for each vertex included in the trace polygon mesh, setting the coordinates of the vertex that can be projected onto the terrain polygon mesh based on the projected position, and setting so that polygons including vertices that cannot be projected onto the terrain polygon mesh are not displayed, thereby placing the trace polygon mesh on the terrain polygon mesh; A game program that generates an image of the virtual space by a drawing process that includes drawing the terrain polygon mesh or a display terrain polygon mesh that is generated separately from the terrain polygon mesh and is used to display the surface of the terrain object, and drawing the trace polygon mesh using a trace texture that shows traces of the deformation event.
9. The computer further comprises:
9. The game program according to claim 8, wherein when the deformation event occurs again for the terrain object on which the trace polygon mesh is placed, the terrain polygon mesh is deformed, and the portion of the trace polygon mesh corresponding to the portion of the terrain polygon mesh that has not been deformed is left intact, and the portion of the trace polygon mesh corresponding to the deformed portion of the terrain polygon mesh is not displayed.
10. An information processing system including a processor and a storage medium, The storage medium includes: terrain volume data representing a terrain object in a virtual space, the data holding a voxel value for each voxel included in a voxel space arranged in the virtual space indicating the degree to which the object occupies the space defined by the voxel; terrain polygon mesh data that is generated based on the terrain volume data and indicates a terrain polygon mesh that represents the surface of the terrain object; The processor: causing a player character to perform a transformation action in the virtual space to transform the terrain object based on an operation input by a player; When the transformation action hits the terrain object, updating the voxel values of voxels included in a deformation range that is set based on the position where the deformation action hits; updating the terrain polygon mesh data in response to the update of the voxel values; projecting a trace polygon mesh toward the terrain polygon mesh at a location where the deformation action hits the terrain object, and for each vertex included in the trace polygon mesh, setting the coordinates of the vertex that can be projected onto the terrain polygon mesh based on the projected position, and setting so 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; An information processing system that generates an image of the virtual space by a drawing process that includes drawing the terrain polygon mesh or a display terrain polygon mesh generated separately from the terrain polygon mesh for displaying the surface of the terrain object, and drawing the trace polygon mesh using a trace texture that shows traces of the deformation action.
11. the transformation action is a destruction action that destroys the terrain object, The processor: The information processing system according to claim 10 , wherein when the destruction action hits the terrain object, the voxel values for voxels included in the deformation range are updated to values indicating that the terrain object does not exist.
12. the destruction action is an action performed from the player character in a specified direction, The processor:
12. The information processing system according to claim 11, wherein the projection at the location where the destructive action hits is performed by projecting the trace polygon mesh from a starting position based on the position of the player character in the direction in which the destructive action was performed.
13. The processor further comprises:
13. An information processing system according to claim 11 or 12, wherein, in drawing the trace polygon mesh, portions where the terrain object does not exist within a predetermined range behind the trace polygon mesh are not drawn, and portions where the terrain object exists within the predetermined range are drawn.
14. The processor further comprises:
13. The information processing system according to claim 11 or 12, wherein, when the destruction action is further performed on the terrain object on which the trace polygon mesh is placed, the trace polygon mesh is again projected toward the terrain polygon mesh, the coordinates of vertices that can be projected onto the terrain polygon mesh are set based on the projected positions, and polygons including vertices that cannot be projected onto the terrain polygon mesh are set so as not to be displayed, thereby placing the trace polygon mesh on the terrain polygon mesh.
15. The processor further comprises: The information processing system of claim 10, wherein the opacity of the vertices included in the trace polygon mesh that are in contact with the polygons that are set not to be displayed is set to be lower than the opacity of other vertices that can be projected onto the terrain polygon mesh.
16. The processor: generating the terrain polygon mesh by an algorithm that arranges polygons based on the voxel values so that vertex positions are determined between voxels where the terrain object does not exist and voxels where the terrain object exists; The information processing system according to claim 10 , wherein, based on the hit of the deformation action, vertex positions of the terrain polygon mesh are recalculated in a range including at least the voxels whose voxel values have been updated.
17. An information processing system including a processor and a storage medium, The storage medium includes: Terrain polygon mesh data indicating a terrain polygon mesh representing the surface of a terrain object in virtual space is stored; The processor: generating a transformation event that transforms the topographical object in the virtual space; deforming the terrain polygon mesh based on the occurrence of the deformation event; projecting a trace polygon mesh onto the terrain polygon mesh at a location where the deformation event occurred, and for each vertex included in the trace polygon mesh, setting the coordinates of the vertex that can be projected onto the terrain polygon mesh based on the projected position, and setting so 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; An information processing system that generates an image of the virtual space by a drawing process that includes drawing the terrain polygon mesh or a display terrain polygon mesh generated separately from the terrain polygon mesh for displaying the surface of the terrain object, and drawing the trace polygon mesh using a trace texture that shows traces of the deformation event.
18. The processor further comprises:
18. The information processing system of claim 17, wherein when the deformation event occurs again for the terrain object on which the trace polygon mesh is placed, the terrain polygon mesh is deformed, and the portion of the trace polygon mesh corresponding to the portion of the terrain polygon mesh that has not been deformed is left intact, and the portion of the trace polygon mesh corresponding to the deformed portion of the terrain polygon mesh is not displayed.
19. An information processing device including a processor, the processor comprising: terrain volume data representing a terrain object in a virtual space, the data holding a voxel value for each voxel included in a voxel space arranged in the virtual space indicating the degree to which the object occupies the space defined by the voxel; terrain polygon mesh data that is generated based on the terrain volume data and indicates a terrain polygon mesh that represents the surface of the terrain object, and causing a player character to perform a transformation action in the virtual space to transform the terrain object based on an operation input by a player; When the transformation action hits the terrain object, updating the voxel values of voxels included in a deformation range that is set based on the position where the deformation action hits; updating the terrain polygon mesh data in response to the update of the voxel values; projecting a trace polygon mesh toward the terrain polygon mesh at a location where the deformation action hits the terrain object, and for each vertex included in the trace polygon mesh, setting the coordinates of the vertex that can be projected onto the terrain polygon mesh based on the projected position, and setting so 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; An information processing device that generates an image of the virtual space by a drawing process that includes drawing the terrain polygon mesh or a display terrain polygon mesh generated separately from the terrain polygon mesh for displaying the surface of the terrain object, and drawing the trace polygon mesh using a trace texture that shows traces of the deformation action.
20. An information processing method executed by a processor, comprising: terrain volume data representing a terrain object in a virtual space, the data holding a voxel value for each voxel included in a voxel space arranged in the virtual space indicating the degree to which the object occupies the space defined by the voxel; terrain polygon mesh data that is generated based on the terrain volume data and indicates a terrain polygon mesh that represents the surface of the terrain object, and is stored in a storage medium; The processor: causing a player character to perform a transformation action in the virtual space to transform the terrain object based on an operation input by a player; When the transformation action hits the terrain object, updating the voxel values of voxels included in a deformation range that is set based on the position where the deformation action hits; updating the terrain polygon mesh data in response to the update of the voxel values; projecting a trace polygon mesh toward the terrain polygon mesh at a location where the deformation action hits the terrain object, and for each vertex included in the trace polygon mesh, setting the coordinates of the vertex that can be projected onto the terrain polygon mesh based on the projected position, and setting so 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; An information processing method for generating an image of the virtual space by a drawing process including drawing the terrain polygon mesh or a display terrain polygon mesh generated separately from the terrain polygon mesh for displaying the surface of the terrain object, and drawing the trace polygon mesh using a trace texture that shows 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
Program, recording medium, game character drawing method and game machine
JP2004062666A
Image processing program and image processor
JP2009043118A
Data processing apparatus, data processing method, and program
JP2022171068A
Method and system for generating polygon meshes approximating surfaces using root-finding and iteration for mesh vertex positions
JP2023178274A