Game program, game system, game device, and game processing method
The game program addresses the challenge of reflecting material changes in voxel-based game objects by using density and material IDs, along with forced and release flags, to ensure material integrity during updates, enhancing the realism of virtual space interactions.
Patent Information
- Application Number
- JP2024123266
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2044-07-30
AI Technical Summary
Existing game programs struggle to reflect material changes in objects managed using voxel data while retaining material information, leading to difficulties in maintaining material integrity during updates.
A game program that sets density and material IDs for voxels, updates voxel data based on events, and generates display and determination meshes to reflect material changes while preserving material information, using forced change flags and release flags to manage material updates.
Enables the reflection of material changes in game objects based on voxel data while maintaining material integrity, allowing for dynamic and realistic material updates in virtual spaces.
Smart Images

Figure 2025113129000001_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a game program, a game system, a game device, and a game processing method for generating an object in a virtual space using voxel data.
Background Art
[0002] Conventionally, objects have been managed using voxel data, and object meshes have been generated in a virtual space based on the voxel data (see, for example, Non-Patent Document 1).
Prior Art Documents
Non-Patent Documents
[0003]
Non-Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] In games, it is desirable to reflect materials in the appearance of objects and the effects that occur in the game. However, when the material is changed, it may become difficult to restore the material information.
[0005] Therefore, an object of the present invention is to provide a game program, a game system, a game device, and a game processing method that can execute a game that reflects material changes while retaining material information for an object based on voxel data.
Means for Solving the Problems
[0006] In order to achieve the above object, the present invention can adopt configurations such as the following (1) to (6), for example.
[0007] (1) One configuration example of the game program of the present invention is for a computer of an information processing apparatus, and is voxel data defined in a virtual space. For each of a plurality of voxels, a density indicating the degree to which the space defined by the voxel is virtually occupied by the content, and a material ID indicating the type of the content, which is a material ID that can be set up to a first number that is plural, are at least set. Based on the voxel data, a display mesh corresponding to the voxel data and drawn based on a virtual camera is generated. The vertex coordinates of the display mesh are determined based on at least the density included in the voxel data, and the material of the display mesh is determined by setting a plurality of material IDs for each of the plurality of polygons included in the display mesh based on at least the plurality of material IDs included in the voxel data. Based on game processing, a voxel update range is generated in the virtual space. In response to the generation of the voxel update range, for each of the voxels in the voxel data that correspond to the voxel update range in the virtual space, at least one of the density and the material ID is updated, and the display mesh is updated corresponding to the updated voxel data. A determination mesh used for collision determination in the virtual space, the vertex coordinates of the determination mesh are determined based on at least the density included in the voxel data, and the material of the determination mesh is determined by setting one material ID for each of the plurality of polygons included in the determination mesh based on at least the plurality of material IDs included in the voxel data. Based on the collision determination between the determination shape corresponding to the determination target based on the game processing and the determination mesh, an in-game action associated with the material ID set for the polygon in the determination mesh where the collision is determined is generated, and the drawing of the polygon is performed based on texture mapping by blending one or more textures associated with each of the material IDs set for each of the polygons included in the display mesh, thereby causing the drawing of the virtual space including the display mesh. The voxel data further includes a forced change flag for each voxel.For voxels with the forced change flag on, regardless of the set material ID, the material of the display mesh and the material of the determination mesh are determined such that they have only the material corresponding to the forced change flag.
[0008] According to the configuration of (1) above, for an object based on voxel data, it is possible to reflect a material change while retaining the material information.
[0009] (2) In the configuration of (1) above, when a first event in the game occurs based on game processing, the computer may further update the forced change flag to off for the voxels with the forced change flag on within a predetermined range.
[0010] According to the configuration of (2) above, when the material information is rewritten, the original material information is lost, but it is possible to return to the original material when the reflection of the material change is cancelled by controlling the forced change flag to off.
[0011] (3) In the configuration of (2) above, the voxel data may further include a release flag indicating that the forced change flag has changed from on to off for each voxel. The computer may further set the release flag to on for the voxels whose forced change flag has been changed from on to off in response to the first event, and generate a predetermined effect at the position in the virtual space corresponding to the voxels with the release flag on.
[0012] According to the configuration of (3) above, by retaining the information by the release flag indicating that the reflection of the material change has been cancelled, it is possible to generate a predetermined effect at the position in the virtual space corresponding to the cancelled voxels.
[0013] (4) In the configuration of (3) above, in the initial state, the forced change flag and the release flag of the voxel data may be off. When the computer initializes the voxel data based on the data in the state before the occurrence of the first event, at the time of the initialization, the forced change flag may be updated to on for voxels within a predetermined range.
[0014] According to the configuration of (4) above, when the voxel data is initialized, the drawing of the effect can be terminated.
[0015] (5) In the configuration of (3) above, after the computer generates a predetermined effect, the release flag of the voxels with the release flag on may be updated to off.
[0016] According to the configuration of (5) above, by returning the release flag to off after generating the effect, the drawing of the effect can be terminated.
[0017] (6) In any one of the configurations of (1) to (5) above, when a second event in the game occurs in the computer based on the game processing, among the plurality of voxel update ranges, a first voxel update range is generated, and for the voxels corresponding to the first voxel update range, which are voxels having a material ID of a type set in advance as destructible and having the forced change flag off, the density may be decreased.
[0018] According to the configuration of (6) above, it is also possible to provide a game in which voxels can be forcibly set to a non-destructible state and the density of the voxels can be decreased by releasing the setting.
[0019] Further, the present invention may be implemented in the form of a game system, a game device, and a game processing method.
Effects of the Invention
[0020] According to the present invention, for an object based on voxel data, it is possible to reflect a material change while retaining material information.
Brief Description of the Drawings
[0021]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Figure 13
Figure 14
Figure 15
Figure 16
Figure 17
Figure 18
Figure 19
Figure 20
Figure 21
Figure 22
Figure 23
Figure 24
Figure 25
Figure 26
Figure 27
Figure 28
Figure 29
Figure 30
Figure 31
Figure 32
Figure 33
Figure 34
Mode for Carrying Out the Invention
[0022] [1. Configuration of the Game System] Hereinafter, a game system according to an example of the present embodiment will be described. An example of the game system 1 in the present embodiment includes a main body device (information processing device; functioning as a game device main body in the present embodiment) 2, a left controller 3, and a right controller 4. The left controller 3 and the right controller 4 are each detachable from the main body device 2. That is, the game system 1 can be used as a device in which the left controller 3 and the right controller 4 are each attached to the main body device 2 and integrated. Also, the game system 1 can be used with the main body device 2, the left controller 3, and the right controller 4 as separate entities (see FIG. 2). Hereinafter, the hardware configuration of the game system 1 of the present embodiment will be described, and then the control of the game system 1 of the present embodiment will be described.
[0023] FIG. 1 is a diagram showing an example of a state in which the left controller 3 and the right controller 4 are attached to the main body device 2. As shown in FIG. 1, the left controller 3 and the right controller 4 are each attached to the main body device 2 and integrated. The main body device 2 is a device that executes various processes (for example, game processing) in the game system 1. The main body device 2 includes a display 12. The left controller 3 and the right controller 4 are devices that include an operation unit for the user to input.
[0024] FIG. 2 is a diagram showing an example of a state where the left controller 3 and the right controller 4 are removed from the main body device 2. As shown in FIGS. 1 and 2, the left controller 3 and the right controller 4 are detachable from the main body device 2. In the following, the left controller 3 and the right controller 4 may be collectively referred to as the "controller".
[0025] FIG. 3 is a six-sided view showing an example of the main body device 2. As shown in FIG. 3, the main body device 2 includes a substantially plate-shaped housing 11. In the present embodiment, the main surface of the housing 11 (in other words, the front surface, that is, the surface on which the display 12 is provided) is generally rectangular in shape.
[0026] Note that the shape and size of the housing 11 are arbitrary. As an example, the housing 11 may be of a portable size. Also, the main body device 2 alone or the integrated device in which the left controller 3 and the right controller 4 are attached to the main body device 2 may be a portable device. Further, the main body device 2 or the integrated device may be a hand-held device. Also, the main body device 2 or the integrated device may be a transportable device.
[0027] As shown in FIG. 3, the main body device 2 includes a display 12 provided on the main surface of the housing 11. The display 12 displays an image generated by the main body device 2. In the present embodiment, the display 12 is a liquid crystal display (LCD). However, the display 12 may be any type of display device.
[0028] Also, the main body device 2 includes a touch panel 13 on the screen of the display 12. In the present embodiment, the touch panel 13 is of a type capable of multi-touch input (for example, a capacitance type). However, the touch panel 13 may be of any type, for example, a type capable of single-touch input (for example, a resistive film type).
[0029] The main body device 2 includes a speaker (i.e., the speaker 88 shown in FIG. 6) inside the housing 11. As shown in FIG. 3, speaker holes 11a and 11b are formed in the main surface of the housing 11. Then, the output sound of the speaker 88 is output from these speaker holes 11a and 11b respectively.
[0030] The main body device 2 further includes a left terminal 17 which is a terminal for the main body device 2 to perform wired communication with the left controller 3, and a right terminal 21 for the main body device 2 to perform wired communication with the right controller 4.
[0031] As shown in FIG. 3, the main body device 2 includes a slot 23. The slot 23 is provided on the upper surface of the housing 11. The slot 23 has a shape that can accommodate a predetermined type of storage medium. 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 to store, for example, data (e.g., save data of an application, etc.) used in the main body device 2 and / or programs (e.g., application programs, etc.) executed in the main body device 2. Also, the main body device 2 includes a power button 28.
[0032] The main body device 2 includes a lower terminal 27. The lower terminal 27 is a terminal for the main body device 2 to communicate with the cradle. In this embodiment, the lower terminal 27 is a USB connector (more specifically, a female connector). When the integrated device or the main body device 2 alone is placed on the cradle, the game system 1 can display the image generated and output by the main body device 2 on a stationary monitor. Also, in this embodiment, the cradle has a function of charging the placed integrated device or the main body device 2 alone. Further, the cradle has a function of a hub device (specifically, a USB hub).
[0033] FIG. 4 is a six-sided view showing an example of the left controller 3. As shown in FIG. 4, the left controller 3 includes a housing 31. In the present embodiment, the housing 31 has a vertically long shape, that is, a shape that is long in the vertical direction (that is, the y-axis direction shown in FIGS. 1 and 4). The left controller 3 can also be gripped in a vertically long orientation when removed from the main body device 2. The housing 31 has a shape and size that can be gripped with one hand, particularly the left hand, when gripped in a vertically long orientation. Also, the left controller 3 can be gripped in a horizontally long orientation. When the left controller 3 is gripped in a horizontally long orientation, it may be gripped with both hands.
[0034] The left controller 3 includes an analog stick 32. As shown in FIG. 4, the analog stick 32 is provided on the main surface of the housing 31. The analog stick 32 can be used as a direction input unit capable of inputting a direction. The user can input a direction according to the tilting direction (and an input of a magnitude according to the tilted angle) by tilting the analog stick 32. Note that the left controller 3 may include, as a direction input unit, a cross key or a slide stick capable of slide input instead of the analog stick. Also, in the present embodiment, it is possible to input by pressing the analog stick 32.
[0035] The left controller 3 is provided with various operation buttons. The left controller 3 has four operation buttons 33 to 36 (specifically, a right arrow button 33, a down arrow button 34, an up arrow button 35, and a left arrow button 36) on the main surface of the housing 31. Further, the left controller 3 is provided with a recording button 37 and a -(minus) button 47. The left controller 3 has a first L button 38 and a ZL button 39 at the upper left of the side surface of the housing 31. Also, the left controller 3 has a second L button 43 and a second R button 44 on the side surface of the housing 31 on the side where it is attached when attached to the main body device 2. These operation buttons are used to give instructions according to various programs (for example, an OS program or an application program) executed by the main body device 2.
[0036] Also, the left controller 3 is provided with a terminal 42 for the left controller 3 to perform wired communication with the main body device 2.
[0037] FIG. 5 is a six-sided view showing an example of the right controller 4. As shown in FIG. 5, the right controller 4 includes a housing 51. In the present embodiment, the housing 51 has a vertically long shape, that is, a shape that is long in the vertical direction. The right controller 4 can also be held in a vertically long orientation when removed from the main body device 2. The housing 51 has a shape and size that can be held with one hand, particularly the right hand, when held in a vertically long orientation. Also, the right controller 4 can be held in a horizontally long orientation. When the right controller 4 is held in a horizontally long orientation, it may be held with both hands.
[0038] Similar to the left controller 3, the right controller 4 includes an analog stick 52 as a direction input unit. In this embodiment, the analog stick 52 has the same configuration as the analog stick 32 of the left controller 3. Also, instead of the analog stick, the right controller 4 may be provided with a cross key or a slide stick capable of slide input. Further, similar to the left controller 3, the right controller 4 includes four operation buttons 53 to 56 (specifically, an A button 53, a B button 54, an X button 55, and a Y button 56) on the main surface of the housing 51. Additionally, the right controller 4 includes a + (plus) button 57 and a home button 58. Moreover, the right controller 4 includes a first R button 60 and a ZR button 61 at the upper right of the side surface of the housing 51. Also, similar to the left controller 3, the right controller 4 includes a second L button 65 and a second R button 66.
[0039] Furthermore, the right controller 4 includes a terminal 64 for the right controller 4 to perform wired communication with the main body device 2.
[0040] FIG. 6 is a block diagram showing an example of the internal configuration of the main body device 2. In addition to the configuration shown in FIG. 3, the main body device 2 includes each of the components 81 to 91, 97, and 98 shown in FIG. 6. Some of these components 81 to 91, 97, and 98 may be mounted on an electronic circuit board as electronic components and housed in the housing 11.
[0041] The main body device 2 includes a processor 81. The processor 81 is an information processing unit that executes various information processes to be executed in the main body device 2. For example, it may be composed of only a CPU (Central Processing Unit), or it may be composed of a SoC (System-on-a-chip) including a plurality of functions such as a CPU function and a GPU (Graphics Processing Unit) function. The processor 81 executes various information processes by executing an information processing program (for example, a game program) stored in a storage unit (specifically, an internal storage medium such as a flash memory 84, or an external storage medium mounted on the slot 23, etc.).
[0042] As an example of an internal storage medium built into the main body device 2, the main body device 2 includes a flash memory 84 and a DRAM (Dynamic Random Access Memory) 85. The flash memory 84 and the DRAM 85 are connected to the processor 81. The flash memory 84 is mainly a memory used to store various data (which may be a program) stored in the main body device 2. The DRAM 85 is a memory used to temporarily store various data used in information processing.
[0043] The main body 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 to and from a predetermined type of storage medium (for example, a dedicated memory card) mounted on the slot 23 according to an instruction from the processor 81.
[0044] The processor 81 appropriately reads and writes data between the flash memory 84 and the DRAM 85, and each of the above storage media, and executes the above information processes.
[0045] The main body device 2 includes a network communication unit 82. The network communication unit 82 is connected to the processor 81. The network communication unit 82 communicates (specifically, wirelessly) with an external device via a network. In the present embodiment, the network communication unit 82 connects to a wireless LAN and communicates with an external device by a method compliant with the Wi-Fi standard as a first communication mode. Further, the network communication unit 82 performs wireless communication with other main body devices 2 of the same type by a predetermined communication method (for example, communication by a proprietary protocol or infrared communication) as a second communication mode. Note that the wireless communication by the second communication mode enables wireless communication with other main body devices 2 arranged 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 a plurality of main body devices 2.
[0046] The main body device 2 includes a controller communication unit 83. The controller communication unit 83 is connected to the processor 81. The controller communication unit 83 performs wireless communication with the left controller 3 and / or the right controller 4. The communication method between the main body device 2 and the left controller 3 and the right controller 4 is arbitrary, but in the present embodiment, the controller communication unit 83 communicates with the left controller 3 and the right controller 4 in accordance with the Bluetooth (registered trademark) standard.
[0047] The processor 81 is connected to the above-described left terminal 17, right terminal 21, and lower terminal 27. When the processor 81 performs wired communication with the left controller 3, it transmits data to the left controller 3 via the left terminal 17 and receives operation data from the left controller 3 via the left terminal 17. Also, when the processor 81 performs wired communication with the right controller 4, it transmits data to the right controller 4 via the right terminal 21 and receives operation data from the right controller 4 via the right terminal 21. Further, when the processor 81 communicates with the cradle, it transmits data to the cradle via the lower terminal 27. Thus, in the present embodiment, the main body device 2 can perform both wired communication and wireless communication with the left controller 3 and the right controller 4, respectively. Also, when the left controller 3 and the right controller 4 are attached to the main body device 2 as an integrated device or when the main body device 2 alone is attached to the cradle, the main body device 2 can output data (e.g., image data and audio data) to a stationary monitor or the like via the cradle.
[0048] Here, the main body device 2 can communicate with a plurality of left controllers 3 simultaneously (in other words, in parallel). Also, the main body device 2 can communicate with a plurality of right controllers 4 simultaneously (in other words, in parallel). Therefore, a plurality of users can simultaneously input to the main body device 2 using sets of the left controller 3 and the right controller 4, respectively. As an example, while the first user inputs to the main body device 2 using the first set of the left controller 3 and the right controller 4, it is possible for the second user to input to the main body device 2 using the second set of the left controller 3 and the right controller 4.
[0049] Also, the display 12 is connected to the processor 81. The processor 81 displays an image generated (e.g., by executing the above-described information processing) and / or an image acquired from the outside on the display 12.
[0050] The main body device 2 includes a codec circuit 87 and speakers (specifically, a left speaker and a right speaker) 88. The codec circuit 87 is connected to the speakers 88 and the audio input / output terminal 25, and is also connected to the processor 81. The codec circuit 87 is a circuit that controls the input / output of audio data to / from the speakers 88 and the audio input / output terminal 25.
[0051] The main body device 2 includes a power control unit 97 and a battery 98. The power control unit 97 is connected to the battery 98 and the processor 81. Also, although not shown, the power control unit 97 is connected to each part of the main body device 2 (specifically, each part that receives power supply from the battery 98, the left terminal 17, and the right terminal 21). The power control unit 97 controls the power supply from the battery 98 to each of the above parts based on a command from the processor 81.
[0052] Also, the battery 98 is connected to the lower terminal 27. When an external charging device (for example, a cradle) is connected to the lower terminal 27 and power is supplied to the main body device 2 via the lower terminal 27, the supplied power is charged to the battery 98.
[0053] FIG. 7 is a block diagram showing an example of the internal configuration of the main body device 2, the left controller 3, and the right controller 4. Note that the details of the internal configuration regarding the main body device 2 are shown in FIG. 6, and thus are omitted in FIG. 7.
[0054] The left controller 3 includes a communication control unit 101 that communicates with the main body device 2. As shown in FIG. 7, the communication control unit 101 is connected to each component including the terminal 42. In the present embodiment, the communication control unit 101 can communicate with the main body device 2 by both wired communication via the terminal 42 and wireless communication without using the terminal 42. The communication control unit 101 controls the communication method that the left controller 3 performs with respect to the main body device 2. That is, when the left controller 3 is attached to the main body device 2, the communication control unit 101 communicates with the main body device 2 via the terminal 42. Also, when the left controller 3 is detached from the main body device 2, the communication control unit 101 performs wireless communication with the main body device 2 (specifically, the controller communication unit 83). The wireless communication between the controller communication unit 83 and the communication control unit 101 is performed in accordance with, for example, the Bluetooth (registered trademark) standard.
[0055] Also, the left controller 3 includes a memory 102 such as a flash memory. The communication control unit 101 is configured by, for example, a microcomputer (also referred to as a microprocessor) and executes various processes by executing the firmware stored in the memory 102.
[0056] The left controller 3 includes each button 103 (specifically, buttons 33 to 39, 43, 44, and 47). Also, the left controller 3 includes an analog stick (described as "stick" in FIG. 7) 32. Each button 103 and the analog stick 32 output information regarding the operation performed on themselves to the communication control unit 101 repeatedly at appropriate timings.
[0057] The communication control unit 101 acquires information regarding input (specifically, information regarding operations or detection results by sensors) from each input unit (specifically, each button 103 and the analog stick 32). The communication control unit 101 transmits operation data including the acquired information (or information obtained by performing predetermined processing on the acquired information) to the main body device 2. Note that the operation data is repeatedly transmitted at a rate of once every predetermined time. Note that the intervals at which the information regarding input is transmitted to the main body device 2 may be the same or different for each input unit.
[0058] By transmitting the above operation data to the main body device 2, the main body device 2 can obtain the input performed on the left controller 3. That is, the main body device 2 can determine operations on each button 103 and the analog stick 32 based on the operation data.
[0059] The left controller 3 includes a power supply unit 108. In the present embodiment, the power supply unit 108 has a battery and a power control circuit. Although not shown, the power control circuit is connected to the battery and is also connected to each part of the left controller 3 (specifically, each part that receives power supply from the battery).
[0060] As shown in FIG. 7, the right controller 4 includes a communication control unit 111 that communicates with the main body device 2. The right controller 4 also includes a memory 112 connected to the communication control unit 111. The communication control unit 111 is connected to each component including the terminal 64. The communication control unit 111 and the memory 112 have the same functions as the communication control unit 101 and the memory 102 of the left controller 3. Therefore, the communication control unit 111 can communicate with the main body device 2 both by wired communication via the terminal 64 and by wireless communication without using the terminal 64 (specifically, communication according to the Bluetooth (registered trademark) standard), and controls the communication method that the right controller 4 performs with the main body device 2.
[0061] The right controller 4 includes the same input units as those of the left controller 3. Specifically, it includes each button 113 and the analog stick 52. These input units have the same functions as those of the left controller 3 and operate in the same manner.
[0062] The right controller 4 includes a power supply unit 118. The power supply unit 118 has the same function as the power supply unit 108 of the left controller 3 and operates in the same manner.
[0063] [2. Overview of Processing in the Game System] Next, with reference to FIGS. 8 to 24, an overview of the processing executed in the game system 1 will be described. In the present embodiment, the game system 1 generates a game image in which terrain objects and characters (for example, player characters operated by a player) are arranged in a game space, which is a three-dimensional virtual space, and displays it on a display device. In the present embodiment, the display device on which the game image is displayed may be the above-described display 12 or a stationary monitor.
[0064] [2-1. Voxel] In the present embodiment, for some objects in the game space, the shape is defined by voxel data. Here, a voxel is a rectangular parallelepiped (more specifically, a cubic) region arranged in a grid pattern in the game space, and voxel data is data indicating information regarding each voxel. Hereinafter, an object whose shape is defined by voxel data will be referred to as a "voxel object". In the present embodiment, the game system 1 stores voxel data as data for generating voxel objects in the game space for a plurality of voxels set in the game space.
[0065] FIG. 8 is a diagram showing an example of a terrain object that is a voxel object. As shown in FIG. 8, in the present embodiment, a terrain object representing a terrain such as the ground is defined in shape by voxel data (that is, it is a voxel object). Each cube shown in FIG. 8 represents a terrain object. In FIG. 8, the portions that are the sides of the terrain object are shown as thick lines, but these thick lines are added for the purpose of making the drawing easier to view, and in reality, it is not necessary for the sides of the terrain object to be displayed thickly.
[0066] The terrain object shown in FIG. 8 is generated, for example, according to the rule that "when the 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 when it is less than or equal to the predetermined value, nothing is placed at the position of the voxel". The terrain object shown in FIG. 8 is shown for the purpose of easily illustrating the relationship between voxels and voxel objects. In the present embodiment, in reality, for example, like the terrain object shown in FIG. 13 described later, a voxel object is generated according to a rule that results in a complex shape (based on voxel data). Note that the rule for determining the shape of the voxel object based on voxel data is arbitrary. In other embodiments, the game system 1 may generate a voxel object as shown in FIG. 8 or a voxel object as shown in FIG. 13 based on object data.
[0067] Regarding the voxel object, the shape can be changed by changing the voxel data of each voxel. FIGS. 9 and 10 are diagrams showing an example of the state before and after a part of the terrain object shown in FIG. 8 is deleted. That is, when the hatched portion of the terrain object shown in FIG. 9 is destroyed, the terrain object changes to the shape shown in FIG. 10. At this time, the game system 1 can easily erase the terrain object by rewriting the voxel data described later so as to indicate that there is no terrain object for the voxels in the hatched portion. Note that when the game system 1 adds a terrain object, it can easily change the shape of the terrain object by changing the voxel data of each voxel in the same manner as when erasing the terrain object.
[0068] In this way, the game system 1 can freely change the shape of the voxel object by rewriting the voxel data. For example, when the shape of a terrain object changes as a result of being destroyed for some reason (e.g., a player character strikes the terrain object) in the game, the game system 1 does not directly change the data indicating the outer shape of the terrain object (i.e., the mesh described later), but can freely change the shape of the terrain object by changing the voxel data used for generating the terrain object.
[0069] In the present embodiment, it is assumed that voxels are defined throughout the game space (that is, the voxel space in which voxels are set corresponds to the entire game space). However, the voxel space does not necessarily have to be set throughout the game space, and it may be set in a partial area of the game space. When the voxel space is set in a partial area of the game space, the shape of the voxel object is defined by voxel data regarding the voxels in the voxel space, and the position of the voxel object in the game space is defined by the position of the voxel space in the game space. Further, a main voxel space set throughout the game space and a sub-voxel space set in a partial area of the game space may be set in the game space. At this time, the game system 1 stores voxel data for each voxel space.
[0070] FIG. 11 is a diagram showing an example of voxel data. The voxel data includes density data, a first material ID, a second material ID, material mixing ratio data, state data, material replacement flag data, and post-release flag data for each voxel defined in the game space. In the voxel data in the present embodiment, these data are set for each voxel.
[0071] The density data indicates the density, which is an index used to define the shape of the voxel object based on the voxel (specifically, the shape defined by a mesh described later). Although details will be described later, the position and shape of the surface of the voxel object (that is, the mesh described later) are determined based on the above density.
[0072] In this embodiment, the density can take an integer value in the range from a lower limit value (for example, 0) to an upper limit value (for example, 255). In this embodiment, when the value of the density set for a voxel is high, the ratio of the volume occupied by the region within the voxel object within the voxel tends to be large, and when the value of the density is low, the ratio tends to be small. The surface shape of the voxel object is determined based on the density. Thus, the density is an index that affects the ratio of the volume occupied by the region within the voxel object within the voxel. It can also be said that the density is an index indicating the degree to which the space of the voxel is virtually occupied by the content (i.e., the virtual content of the voxel object). For example, when the density is 0, the inside of the voxel is empty, when the density is 255, all of the inside of the voxel is the content of the voxel object, and when the density is a value between 0 and 255, the inside of the voxel can be occupied by the content of the voxel object at a ratio corresponding to the value. Then, based on the above density, the shape of the mesh, that is, the surface shape of the voxel object can be determined. The mesh can be said to be the surface of the part where the content exists in the voxel, or it can also be said to be the boundary between the part where the content exists and the part where it does not exist in the voxel. Note that the volume occupied by the region within the voxel object generated based on the above density does not necessarily have to be exactly the same as the volume indicated by the ratio of the density. For example, in the method of generating a voxel object as shown in FIG. 8 and the method of generating a voxel object as shown in FIG. 13, even if based on the same density, the volume of the voxel object may be different.
[0073] In other embodiments, the density may indicate either a state in which the volume occupied by the region within the voxel object occupies the entire region within the voxel or a state in which the volume occupied by the region within the voxel object is not included in the region within the voxel. For example, the density data may be data that can only take 0 or 1.
[0074] The first material ID and the second material ID are information indicating the material (in other words, substance) of the voxel. Here, in the present embodiment, materials such as sand, rock, or soil are set for the voxel. Note that in the game system 1, a plurality of types of materials are prepared as materials that can be set for the voxel (refer to the material data shown in FIG. 12). In the present embodiment, up to two materials out of the plurality of types of prepared materials can be set for one voxel. The first material ID is an ID indicating the first material set for the voxel, and the second material ID is an ID indicating the second material set for the voxel. Although details will be described later, the material of the voxel object (that is, the material set for the polygon of the voxel object) is determined based on the material set for the voxel.
[0075] As described above, in the present embodiment, the voxel data includes the ID indicating the material. However, in other embodiments, the voxel data may be a data structure including data directly indicating the content of the material (that is, the name, properties, and drawing setting information described later).
[0076] The material mixing ratio data is an example of data indicating the ratio of each material in the voxel. In the present embodiment, since the number of material IDs set for one voxel is up to two, the material mixing ratio data indicating one of the ratio of the material indicated by the first material ID and the material indicated by the second material ID can also represent the other ratio. In the present embodiment, the material mixing ratio is a value indicating the ratio of the second material to the whole composed of the first material and the second material by a value of 0 or more and 1 or less. For example, when the material mixing ratio set for a certain voxel is 0.4, it represents that in the voxel, the first material and the second material are composed in a ratio of 0.6:0.4. Although details will be described later, the appearance and properties of the voxel object are determined based on the material. The material mixing ratio is used to determine the appearance and properties of the voxel object. In other embodiments, the material mixing ratio may be a value indicating the ratio of the first material. Also, the ratio of the materials in the voxel may be represented by respective values indicating the ratio of each material. In particular, in other embodiments, when three or more types of materials can be set instead of up to two types, the ratio of the materials in the voxel is represented as a plurality of values respectively indicating the ratio of each material.
[0077] Note that in the present embodiment, it is not always necessary to set two types of materials for the voxel, and one type of material may be set. For example, when one type of material is set for a certain voxel, the first material ID indicates the material, and the material mixing ratio is set to 0.
[0078] The state data indicates the state set for the voxel. The specific content and number of types of the state data are arbitrary. In the present embodiment, the state data includes data indicating the amount of damage set for the voxel. Note that in other embodiments, the state data may include, for example, data indicating whether the voxel is in a wet state (and the degree thereof).
[0079] The material replacement flag data indicates whether the material replacement flag set for the voxel is set to on. The material replacement flag is set to on when the material in the voxel is to be replaced with the material corresponding to the material replacement flag (for example, a special material described later) while maintaining the information of the material of the voxel indicated by the material ID. On the other hand, when the material replacement flag is off, the material indicated by the material ID set for the voxel is regarded as the material of the voxel. In this embodiment, by turning the material replacement flag on / off, the material of the voxel can be replaced with the material corresponding to the material replacement flag, or the replacement with the material can be canceled. Note that, in [2-1. Voxel] to [2-6. Generation of Mesh], an example where the material replacement flag is set to off is used for explanation, and an example where the material replacement flag is set to on is explained in [2-7. Process of Replacing with a Specific Material] described later. Note that the material replacement flag is not only on / off, but also information indicating which of a plurality of types of special materials to replace with when it is on, and it may be possible to perform replacement with a plurality of types of special materials.
[0080] The post-release flag data indicates whether the post-release flag set for the voxel is set to on. The post-release flag is set to on when the material replacement flag in the voxel is released from on to off. And the post-release flag set to on is set to off by satisfying a predetermined condition. When the post-release flag is set to on, a rendering process that performs a special expression corresponding to the post-release flag at the position in the game space based on the voxel (for example, a rendering process that displays a post-release effect at the surface position of the display mesh related to the voxel (refer to [2-6. Generation of Mesh] described later)) is performed. Note that in [2-1. Voxel] to [2-6. Generation of Mesh], an example where the post-release flag is set to off is used for explanation, and an example where the post-release flag is set from off to on is explained in [2-7. Process of Replacing with a Specific Material] described later.
[0081] As described above, in this embodiment, since the voxel data includes the material ID, the game system 1 stores the material data that defines the content of the material indicated by the material ID. FIG. 12 is a diagram showing an example of the material data. As shown in FIG. 12, in the material data in this embodiment, for each material, the material ID, the name, properties, and rendering setting information set for the material are associated with each other.
[0082] The name included in the material data is the name set for the material (for example, soil, sand, grass, etc.). Note that during the game, the name of the material of the voxel object may be displayed. In order to perform such a display, the material data includes information on the name of the material.
[0083] The properties included in the material data are the properties set for the material. The properties of the material are the properties that the voxel object set with the material has in the game. Note that the specific content and number of types of the properties of the material are arbitrary. For example, at least any one of the following information may be set as the property of the material. · Hardness · Weight · Slipperiness · Damage setting when the player character comes into contact · Temperature · Whether another object can adhere to the voxel object · The amount of the player character's physical strength recovered when the player character destroys or acquires the voxel object · The amount of in-game currency that the player character acquires when the player character destroys or acquires the voxel object In other embodiments, information different from the above may be set as the information indicating the properties of the material.
[0084] In this embodiment, the material data includes an ID indicating the property as information for specifying the property of the material (see FIG. 12). Although not shown, the game system 1 stores property information in which the content of the property (for example, the value indicating the above-mentioned weight or slipperiness) is associated with the property ID for each prepared property. The game system 1 can specify the specific content of the property set for the material by referring to the above property information.
[0085] The drawing settings included in the material data are information indicating settings related to drawing, such as the texture used for drawing the voxel object to which the material is applied. In the present embodiment, the material data includes, as information on the drawing settings, the ID of the texture used for drawing the voxel object to which the material is applied (see FIG. 12). Although not shown, the game system 1 stores texture information associating a texture ID with the texture indicated by the texture ID for each prepared texture. The game system 1 can specify the specific content of the texture set for the material by referring to the above texture information. In other embodiments, as information on the drawing settings, in addition to the texture information, any information related to the shading settings may be set. For example, the reflectivity, information related to the normal, etc. may be set.
[0086] Also, the material data may include data other than the data shown in FIG. 12. For example, the material data may include data related to sound settings. For example, the data related to sound settings may be data that defines the footsteps output when the player character walks on the voxel object based on the voxel.
[0087] Note that the material data may be data in any format that can identify the properties of the material and / or the drawing settings. For example, in other embodiments, the material data may have a data structure that includes data directly indicating the properties of the material and / or the drawing settings, instead of a data structure that includes a material ID and a texture ID.
[0088] [2-2. Update of Voxel Data] During the game, the voxel object is deformed by updating the above-mentioned voxel data. In this embodiment, when a game event (hereinafter referred to as "update event") for updating the voxel object occurs, the game system 1 updates the voxel data. The specific content of the update event is arbitrary. The update event may be, for example, that a character appearing in the game performs an action to deform the voxel object (for example, the player character punches the voxel object), or an event that deforms the voxel object occurs (for example, an object thrown by the character contacts the voxel object, or a bomb explodes).
[0089] FIG. 13 is a diagram showing an example of the game space when an update event occurs. The situation shown in FIG. 13 is a situation where the player character 201 performs a punch action on the terrain object 202 which is a voxel object. Although details will be described later, in the example shown in FIG. 13, the voxel data is updated so that the terrain object 202 around the position where the punch action by the player character 201 hits is deleted. As a result, the state where the terrain object 202 is destroyed by the punch action of the player character 201 is expressed.
[0090] In this embodiment, when an update event occurs, the game system 1 sets an update range (update range 203 shown in FIG. 13) for updating the voxel object in the game space. The position, shape, and size of the update range are arbitrary. The position of the update range may be determined based on, for example, the position where an object related to the generated update event (for example, a player character who performed a punch) contacts the voxel object. In the example shown in FIG. 13, the position of the update range 203 may be determined based on the position where the punch by the player character 201 hits, and for example, the hit position or the position a predetermined distance forward from the hit position may be the center position of the update range 203. The shape and size of the update range may be determined in advance to be a shape corresponding to the type of the update event. For example, when an update event due to the punch of the player character 201 occurs, the shape and size of the update range may be determined as a sphere with a predetermined size as shown in FIG. 13. Also, the size of the update range may be determined according to a value indicating the degree of influence of the generated update event (for example, the strength of the punch or the size of the explosion).
[0091] The game system 1 changes the density of the voxels corresponding to the set update range. Note that the voxels corresponding to the update range are, for example, the voxels within the update range or the voxels overlapping with the update range. As a result of the change in density, the mesh of the voxel object is changed by the process described later, so that the shape of the voxel object (the visible shape and the shape used for collision determination) is changed. Note that in other embodiments, in addition to changing the density of the voxels included in the update range, the game system 1 may change the material (that is, the first material, the second material, and the material mixing ratio) in the voxels or change the state of the voxels.
[0092] In this embodiment, the game system 1 determines whether a voxel is included in the update range by using an SDF (Signed Distance Field). The game system 1 sets an SDF indicating the update range set in the game space, and makes the above determination based on the value of the SDF. The SDF represents, with a sign, the distance from a defined shape for any position. FIG. 14 is a diagram showing an example of the update range. In the example shown in FIG. 14, a spherical update range is set in the game space. For example, in the example shown in FIG. 14, among the positions in the game space, the SDF value becomes negative for the positions inside the shape represented by the SDF, and the SDF value becomes positive for the positions outside the shape represented by the SDF. In this example, it is possible to determine whether it is included in the update range based on whether the SDF value is positive or negative. Also, by using the value of the signed distance, not only simple inside / outside determination but also processing such as correction and interpolation can be performed.
[0093] In the above, an example in which a change is added to the voxel object such that the voxel object within the update range is deformed as if it were erased has been described, but the changes added to the voxel object using the update range are not limited to this. For example, a change in which a voxel object is newly added within the update range (that is, the volume occupied by the region within the voxel object increases by the amount of the update range) may be added to the voxel object. Also, a change may be added to the voxel object such that only the material of the voxels within the update range changes without changing the density of the voxels. Further, a change combining a change in the density of the voxels and a change in the material may be added.
[0094] [2-3. Calculation of Vertices] When the density of the voxels is updated as described above, the game system 1 sets vertices based on the updated voxel data. The above vertices can be the vertices of the mesh of the voxel object. Although details will be described later, in this embodiment, the above vertices are simplified, and the simplified vertices become the vertices of the mesh of the voxel object.
[0095] FIG. 15 is a diagram showing an example of a method for setting vertices. In FIGS. 15 to 24 described below, for the purpose of making the drawings easier to view and the explanations easier to understand, voxels, vertices, meshes, etc. are represented two-dimensionally, but actually, vertices and meshes are set in a three-dimensional space based on voxels in the three-dimensional space. In this embodiment, the game system 1 uses a method of setting vertices at coordinates based on the positions and densities of a plurality of surrounding voxels for a portion where a voxel having a density indicating its existence (i.e., a density equal to or higher than a reference value described later) and a voxel having a density indicating its non-existence (i.e., a density less than the reference value described later) are adjacent. Details of this method will be described below.
[0096] As described above, in this embodiment, the density set for each voxel is set in the range of 0 to 255. A voxel with a density of 0 is completely in the air, and a voxel with a density of 255 represents a state where it is completely filled. Densities between 0 and 255 are treated interpolatively and used for vertex determination. And in this embodiment, voxels with a density greater than or equal to a reference value are virtually treated as being inside the object, and voxels with a density less than the reference value are treated as being outside the object. It can also be said that voxels with a density greater than or equal to the reference value are virtually treated as voxels indicating existence, and voxels with a density less than the reference value are virtually treated as voxels indicating non-existence. It is not necessary to define only voxels with a density of 0 as being outside the object (i.e., set the reference value = 1), and the reference value can be, for example, 128. In the example shown in FIG. 15, in voxel 211 and other outer voxels, the density is 0, in voxel 212 the density is 100 which is less than the reference value, and in voxels 213 and 214 the densities are set to 150 and 210 which are greater than or equal to the reference value. In this embodiment, the game system 1 generates vertices between voxels with a density greater than or equal to the reference value and voxels with a density less than the reference value. Specifically, for each region spanning 8 adjacent voxels (4 in the drawing) (the region surrounded by the dotted line in the drawing), a determination is made as to whether to generate a vertex. That is, vertices are generated in regions spanning both voxels with a density greater than or equal to the reference value and voxels with a density less than the reference value. The coordinates of the vertices are determined by comparing the densities of adjacent voxels for each of the X, Y, and Z axes and performing interpolation based on the density difference. In addition, by setting normal information that defines the position and direction of the straight line connecting the vertices, the coordinates of the vertices can be further calculated based on the normal information. The normal information may be retained in advance for at least some of the voxels, or if it is not retained, the normal information may also be calculated based on the densities of adjacent voxels. In FIG. 15, since the density of voxel 212 is less than the reference value, in the determination of the presence or absence of vertices, voxel 212 is treated as being outside the object, but the density value of voxel 212 itself is used for the calculation of the coordinates of the generated vertices.If the reference value is set to a value lower than the density of voxel 212, the result is that more vertices will appear on the upper right side and the upper left side of voxel 212 in FIG. 15.
[0097] By setting the vertices as described above, when generating a mesh that connects each set vertex (or each vertex after performing the simplification process described later on each set vertex), it is possible to generate a shape having a volume that 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 includes a region within a part of the object, or a voxel with a density of 255 includes a region outside a part of the object. Also, in the present embodiment, since voxels with a value less than the reference value are processed as outside the object, the volume becomes smaller by the amount that the number of vertices is less compared to the case of processing as inside the object. Thus, there is no need to calculate the polygon mesh so as to have a volume that exactly corresponds to the density value.
[0098] [2-4. Determination of Vertex Material] The game system 1 determines the material for each vertex set as described above. The material of a vertex is determined based on the materials of the voxels around the vertex. The voxels around a vertex are, for example, the voxels used for determining whether to generate the vertex (that is, the voxels that overlap with the "region spanning voxels" described above). Note that in other embodiments, the voxels used for determining the material of a vertex do not have to be the same as the voxels used for determining the generation of the vertex, and they may be different.
[0099] FIG. 16 is a diagram showing an example of a method for determining the material of a vertex. In the example shown in FIG. 16, it is assumed that a vertex 219 is set for four voxels 215 to 218, and the four voxels 215 to 218 are the above-mentioned "voxels around the vertex". In the actual three-dimensional space, the number of voxels around the vertex is eight. Also, in the example shown in FIG. 16, for voxel 215, the density is set to 255, the first material is "sand", and the material mixing ratio is 0 (that is, the first material: the second material = 1:0, or the second material may not be set). For voxel 216, the density is set to 0 (the first and second materials may not be set). For voxel 217, the density is set to 204, the first material is "sand", the second material is "grass", and the material mixing ratio is 0.3 (that is, the first material: the second material = 0.7:0.3). For voxel 218, the density is set to 153, the first material is "soil", the second material is "grass", and the material mixing ratio is 0.4 (that is, the first material: the second material = 0.6:0.4). Also, it is assumed that the coordinates indicating the position of vertex 219 are (X, Y) = (0.8, 0.6). Note that the coordinate system of these coordinates has the left-right direction in FIG. 16 as the X coordinate, the up-down direction as the Y coordinate, and the center position of the lower-left voxel 217 among the center positions of voxels 215 to 218 (the position of the white circle shown in FIG. 13) as (0, 0).
[0100] When determining the material of a vertex, the game system 1 calculates an evaluation value for each material in the surrounding voxels based on the density of the material and a weight value based on the distance from the voxel to the vertex. First, the weight value is calculated for each voxel, and is calculated so that it becomes larger as the distance from the center position of the voxel to the vertex is closer. In the present embodiment, when the center position of the voxel is (x1, y1) and the coordinates of the vertex are (x2, y2), the weight value for a certain voxel is calculated according to the following formula (1). (Weight value) = |(1 - x1) - x2|·|(1 - y1) - y2|…(1) In the example shown in FIG. 16, the weight values of each of the voxels 215 to 218 calculated according to the above formula (1) are as follows. (Weight value of voxel 215)=|(1 - 0) - 0.8|·|(1 - 1) - 0.6| = 0.12 (Weight value of voxel 216)=|(1 - 1) - 0.8|·|(1 - 1) - 0.6| = 0.48 (Weight value of voxel 217)=|(1 - 0) - 0.8|·|(1 - 0) - 0.6| = 0.08 (Weight value of voxel 218)=|(1 - 1) - 0.8|·|(1 - 0) - 0.6| = 0.32
[0101] Also, the game system 1 calculates the density of the material for each voxel. Here, the density of the material is a value obtained by multiplying the ratio of the material occupied by the material among the materials set in the voxel by the density of the voxel. In the present embodiment, as the density of the voxel, a value obtained by normalizing the values from 0 to 255 described above to values from 0 to 1 is used. In the example shown in FIG. 16, for voxel 215, since the only material set is sand, the above ratio regarding the sand material is 1, and since the density of the voxel is 1, the density of the sand material is 1. For voxel 216, since the density is 0 and no material is set, the density of the material is not calculated. Or, if some material is set, the density of the material is 0. For voxel 217, the above ratios of the set sand material and grass material are 0.7 and 0.3 respectively, and since the density of the voxel is 204 / 255 = 0.8, the density of the sand material is 0.7·0.8 = 0.56, and the density of the grass material is 0.3·0.8 = 0.24. For voxel 218, the above ratios of the set soil material and grass material are 0.6 and 0.4 respectively, and since the density of the voxel is 153 / 255 = 0.6, the density of the soil material is 0.6·0.6 = 0.36, and the density of the soil material is 0.4·0.6 = 0.24.
[0102] Then, the game system 1 calculates the above evaluation value for each material based on the above weight value and the density of the material. In the present embodiment, the evaluation value of the material is a value obtained by attaching a weight according to the weight value for each voxel to the density of the material calculated for each voxel and summing for each surrounding voxel. In the example shown in FIG. 16, for the evaluation value of the sand material, the density of the material for voxel 215 is 1 and the weight value is 0.12, and the density of the material for voxel 217 is 0.56 and the weight value is 0.08. Therefore, 1·0.12 + 0.56·0.08 = 0.1648. Also, for the evaluation value of the grass material, the density of the material for voxel 217 is 0.24 and the weight value is 0.08, and the density of the material for voxel 218 is 0.24 and the weight value is 0.32. Therefore, 0.24·0.08 + 0.24·0.32 = 0.096. Also, for the evaluation value of the soil material, the density of the material for voxel 218 is 0.36 and the weight value is 0.32. Therefore, 0.36·0.32 = 0.1152.
[0103] The game system 1 determines the vertex materials based on the evaluation values for each material. Specifically, a predetermined number of materials are determined as the vertex materials in descending order of the evaluation values. In this embodiment, two materials with large evaluation values are determined as the vertex materials. In the example shown in FIG. 16, since the evaluation values of the materials of sand, grass, and soil are 0.1648, 0.096, and 0.1152 respectively, the vertex materials are determined as the sand material and the soil material. Further, the game system 1 calculates the ratio of the two determined materials based on the above evaluation values. In this embodiment, the ratio of the two materials may be expressed as a second material ratio, which is the ratio of the second material to the whole, similar to the above material mixing ratio. In the example shown in FIG. 16, for example, when the first material is the soil material and the second material is set as the sand material, the second material ratio is shown as 0.1648 / (0.1648 + 0.1152) ≈ 0.59. Note that in other embodiments, as the value representing the ratio of the two materials, a value indicating the ratio of the first material may be used. Also, respective values indicating the ratio of each material may be used.
[0104] In this embodiment, the game system 1 generates and stores vertex data indicating the position of the vertex, the material IDs of the first and second materials set for the vertex, and the ratio of the materials. However, the method of managing the materials set for the vertex is arbitrary. In other embodiments, the vertex data may be a data structure including data directly indicating the contents of the first and second materials.
[0105] As described above, in this embodiment, for each vertex, the game system 1 calculates, based on the voxel data of a plurality of surrounding voxels, a priority parameter (for example, an evaluation value) for each material ID included in the voxel data of the surrounding voxels. Then, based on the priority parameter, the game system 1 selects up to a predetermined number (here, two) of material IDs with high priority and determines them as the material ID of the vertex. Note that the specific parameter used as the priority parameter is not limited to the above evaluation value. For example, in other embodiments, an evaluation value calculated using the density of the material instead of the above weight value may be used as the priority parameter.
[0106] In this embodiment, as an example of the priority parameter, the evaluation value is calculated based on the densities of a plurality of voxels around the vertex so that the priority of the material set in the voxel with a higher density becomes higher (that is, the evaluation value of the material becomes larger and the material is more likely to be selected). According to this, the material of the vertex can be determined by reflecting the magnitude of the density set in the voxel.
[0107] In this embodiment, as an example of the priority parameter, the evaluation value is calculated based on the distance from the reference position (specifically, the center position) of a plurality of voxels around the vertex to the vertex so that the priority of the material set in the voxel closer to the vertex becomes higher. According to this, the material of the vertex can be determined by reflecting the distance between the voxel and the vertex.
[0108] In this embodiment, as an example of the priority parameter, it can also be said that the evaluation value is calculated based on the material mixing ratio of a plurality of voxels around the vertex so that the priority of the material with a higher material mixing ratio becomes higher. According to this, when a plurality of materials are set in one voxel, the material of the vertex can be determined by reflecting the ratio of each material.
[0109] [2-5. Simplification of Vertex] In this embodiment, the game system 1 simplifies each vertex calculated as described above. That is, the game system 1 reduces the number of vertices by grouping some of the vertices calculated as described above and replacing them with a single vertex. Although details will be described later, the coordinates (i.e., positions) and materials of the vertices to be replaced are set based on a plurality of vertices before replacement. By such simplification, the number of vertices and the number of polygons constituting the mesh of the voxel object can be reduced, and the amount of memory used for processing can be reduced or the processing load can be reduced.
[0110] In this embodiment, the game system 1 simplifies by expressing each vertex using an SVO (Sparse Voxel Octree). FIG. 17 is a diagram showing an example of vertex simplification. In FIG. 17, one square indicated by a solid line shown in (a) shown in FIG. 17 represents one vertex division region. Here, the vertex division region is a square region having the center position of the voxel as a vertex (in the actual three-dimensional space, the vertex division region is a cube or a rectangular parallelepiped), and is a region having the dotted lines in FIGS. 15 and 16 described above as sides. Also, in FIG. 17, the vertex division region in which the character "v" is shown inside indicates the vertex division region in which a vertex is set.
[0111] In this embodiment, the game system 1 determines whether simplification is possible for the vertices within a predetermined number (four in FIG. 17, eight in the actual three-dimensional space) of mutually adjacent vertex division regions. When it is determined that simplification is possible, simplification is performed on the vertices within the predetermined number of vertex division regions.
[0112] As shown in Fig. 17, (a) is the state before simplification. In the example shown in Fig. 17, it is assumed that the vertex division regions within the range surrounded by the dotted line can be simplified. At this time, the game system 1 simplifies such that the vertices within each of the predetermined number of vertex division regions determined to be simplifiable are replaced by one vertex (see (b) shown in Fig. 17). As a result, the vertices within the predetermined number of vertex division regions are simplified to one vertex.
[0113] In this embodiment, the game system 1 performs simplification in multiple stages. The number of stages is arbitrary, but in Fig. 17, the first two stages are illustrated and described. (b) shown in Fig. 17 shows the state after the first-stage simplification, and (c) shown in Fig. 17 shows the state after the second-stage simplification. In the second-stage simplification, it is determined whether simplification is possible for the vertices generated by the first-stage simplification. In the example shown in Fig. 17, as a result of determining that the vertex division regions within the range surrounded by the dotted line in (b) shown in Fig. 17 can be simplified, the vertices of the vertex division regions are simplified, resulting in the state shown in (c) shown in Fig. 17. Note that the determination conditions for whether the first-stage simplification is possible and the determination conditions for whether the second-stage simplification is possible may be the same or different.
[0114] Regarding the determination of whether simplification is possible, the specific method is arbitrary. In this embodiment, as conditions for the above determination, conditions related to the shape of the voxel object and conditions related to the material are used. In this embodiment, when both the conditions related to the shape of the voxel object and the conditions related to the material are satisfied, it is determined that simplification is possible, and when at least one of the conditions related to the shape of the voxel object and the conditions related to the material is not satisfied, it is determined that simplification is impossible.
[0115] The condition regarding the shape means, for example, that the shape formed by each vertex before simplification and the shape formed by each vertex after simplification are not significantly changed. For example, whether or not the shape formed by each vertex is significantly changed before and after simplification can also be determined by calculating an index indicating the error between the mesh before simplification and the mesh after simplification and determining whether or not the index is less than or equal to a predetermined allowable value. Also, for example, when the shape formed by each vertex before simplification is a hollow shape, while the shape formed by each vertex after simplification is not a hollow shape (that is, information indicating that it is hollow is lost due to simplification), it is also determined that the condition regarding the shape is not satisfied. Whether or not the above situation occurs can be determined, for example, based on the density of each voxel corresponding to the vertex division region to be determined. Also, for example, when the shape formed by each vertex before simplification is a shape that can be represented only by two or more vertices and cannot be represented by a single vertex, it is also determined that the condition regarding the shape is not satisfied. Note that, as the condition regarding the shape of the voxel object, the same conditions as those of the conventional method using SVO may be used.
[0116] In addition, as a condition regarding materials, in the present embodiment, a condition regarding the number of types of materials set for each vertex within the above-mentioned predetermined number of vertex division regions to be simplified is used. FIG. 18 is a diagram showing an example of the condition regarding materials. (a) shown in FIG. 18 shows a case where the materials of vertices 221 to 224 are (grass), (grass), (grass and soil), and (grass and soil), respectively, and (b) shown in FIG. 18 shows a case where the materials of vertices 221 to 224 are (grass and sand), (grass), (grass and soil), and (grass and soil), respectively. In the present embodiment, the condition regarding materials is that the total number of types of materials set for each of the above-mentioned vertices to be simplified is equal to or less than a predetermined number. For example, the condition regarding materials is set to be equal to or less than the number of materials that can be set for one vertex. In the present embodiment, the above-mentioned predetermined number is 2. For example, in the case of (a) shown in FIG. 18, the total number of types of materials set for each of the vertices 221 to 224 to be simplified is two types, namely grass and soil, so the condition regarding materials is satisfied. At this time, on the condition that the above-mentioned condition regarding the shape of the object is satisfied, each of the vertices 221 to 224 is determined to be simplifiable. On the other hand, in the case of (b) shown in FIG. 18, the total number of types of materials set for each of the vertices 221 to 224 to be simplified is three types, namely grass, soil, and sand, so the condition regarding materials is not satisfied. At this time, regardless of whether the above-mentioned condition regarding the shape of the object is satisfied, each of the vertices 221 to 224 is determined to be non-simplifiable.
[0117] In the game system 1, even if materials are strictly classified into different types, a plurality of types of materials with the same set properties but different appearances may be prepared. For some of such a plurality of types of materials, in the determination of conditions related to the materials, they may be regarded as the same type and the determination may be made. For example, regarding soil materials, there may be a case where a plurality of types of soil materials with the same properties but similar appearances (e.g., texture color and pattern) are prepared. In such a case, the game system 1 may regard the plurality of types of soil materials as the same type and make a determination on the conditions related to the materials.
[0118] Here, in the present embodiment, regarding vertices, similar to voxels, up to two types of materials can be set. On the other hand, in the present embodiment, when the total number of types of materials set for each vertex to be simplified is three or more, simplification is not performed. That is, when the total number of types of materials exceeds the number of materials that can be set for one vertex, simplification is not performed. Therefore, even if the number of vertices is reduced by simplification, the information on the materials set for the vertices will not be lost due to simplification, and the information on the materials can be maintained.
[0119] In this embodiment, the material of the simplified vertex is determined based on the material of each vertex before simplification. Specifically, the game system 1 sets one or two types of materials set for the vertices before simplification as the first material and the second material for the vertices after simplification. Thereby, the information of the material can be maintained. Note that the ratio of the materials after simplification is determined based on the ratio of the materials of each vertex before simplification. In this embodiment, the ratio of the materials after simplification is calculated in the same manner as the method of calculating the ratio of the materials of each vertex using the above evaluation value. That is, the game system 1 calculates a weight value based on the distance between the vertex after simplification and the vertex before simplification, and based on the weight value and the density of the material at the vertex before simplification (note that the evaluation value of the material described in [2-4. Determination of Vertex Material] above can be used as the density of the material here), calculates the evaluation value for each material. Then, the ratio of the materials is calculated based on the calculated evaluation value of each material.
[0120] [2-6. Mesh Generation] In this embodiment, based on each vertex simplified as described above, a mesh of the voxel object is generated. FIG. 19 is a diagram showing an example of a mesh generated based on each vertex. Note that the square shown in FIG. 19 indicates the above-described vertex division region, or the vertex division region in which a plurality of vertex division regions are combined into one by simplification. As shown in FIG. 19, the game system 1 generates a mesh composed of polygons having sides that are straight lines connecting adjacent vertices in the vertex division region. Each polygon constituting the mesh is a triangle or a quadrilateral.
[0121] In this embodiment, the game system 1 generates two types of meshes: a display mesh and a determination mesh. The display mesh is a mesh used for displaying voxel objects. The determination mesh is a mesh used for collision determination of voxel objects. Although details will be described later, by using the above two types of meshes, the game system 1 can perform processing using meshes suitable for each of the display and collision determination of voxel objects.
[0122] In this embodiment, the game system 1 generates the display mesh and the determination mesh based on the data of the above-mentioned SVO (that is, based on each simplified vertex). According to this, by sharing the vertex data used for generating the two types of meshes, the processing efficiency can be improved. In other embodiments, the game system 1 may not perform vertex simplification and may generate the display mesh and / or the determination mesh based on non-simplified vertices.
[0123] In this embodiment, the game system 1 generates the determination mesh to have a simpler shape than the display mesh. Specifically, the game system 1 ensures that the number of vertices of the determination mesh is less than the number of vertices of the display mesh. Here, in this embodiment, the SVO data is data that holds the data of the vertices before simplification and the data of the simplified vertices in an octree structure, and also includes the data used for determining whether simplification is possible. This data includes, for example, the data of vertices calculated as candidates for the vertices after simplification (referred to as temporary vertices), and the data of the above-mentioned index indicating the error between the vertices before simplification and the temporary vertices. For example, the game system 1 may use, for the generation of the determination mesh, those vertices among the temporary vertices for which the above index is less than or equal to a predetermined threshold (this threshold is set to be larger than the above tolerance value). According to this, the number of vertices of the determination mesh can be made less than the number of vertices of the display mesh. By making the number of vertices of the determination mesh less than the number of vertices of the display mesh, the processing load due to collision determination can be reduced. Also, since the number of vertices of the display mesh is not excessively reduced, the appearance of the voxel object can be expressed in detail.
[0124] Note that in other embodiments, the display mesh and the determination mesh may be generated based on the same data or different data. Also, the display mesh and the determination mesh may have the same shape (however, even in this case, the materials set for both may be different). Also, the number of vertices of the determination mesh may be the same as the number of vertices of the display mesh, or may be more than the number of vertices of the display mesh.
[0125] [2-6-1. Determination of the Material of the Display Mesh] Next, an example of a method for determining the material and appearance of the display mesh will be described. In the present embodiment, the game system 1 determines the material for each polygon constituting the display mesh. Although details will be described later, in the present embodiment, the polygon corresponding to the above polygon is drawn using up to two textures corresponding to up to two materials. Therefore, the game system 1 ensures that for each polygon constituting the mesh, ultimately, the number of materials set for one polygon is two or less. In other embodiments, three or more materials may be set. For example, in embodiments where there are three or more materials for voxels and vertices, the same number of materials may be set for the polygon.
[0126] In the present embodiment, a quadrilateral may be formed as the polygon constituting the display mesh (see FIG. 19). When determining the material of the display mesh, the game system 1 first divides the quadrilateral constituting the display mesh into two triangles under certain conditions. Hereinafter, with reference to FIG. 20, the process of dividing the quadrilateral into two triangles will be described.
[0127] FIG. 20 is a diagram showing an example in which a quadrilateral constituting a mesh is divided into two triangles. (a) shown in FIG. 20 shows the quadrilateral before division formed by vertices 231 to 234, which are part of the vertices of the mesh, and (b) shown in FIG. 20 shows the two triangles obtained by dividing the quadrilateral. In the example shown in FIG. 20, assume that the materials of each of the vertices 231 to 234 are grass, soil, sand, grass, and grass, respectively.
[0128] In this embodiment, when there are three or more types of materials set at each vertex of a quadrilateral in total, the game system 1 determines whether the division condition is satisfied. In this embodiment, the division condition is that by dividing the quadrilateral into two triangles, the total number of types of materials set at each vertex of the triangles can be made two or less. When the division condition is satisfied, the game system 1 divides the quadrilateral into two triangles such that the total number of types of materials set at each vertex is two or less. In the example shown in FIG. 20, the materials set at each vertex 231 to 234 forming the quadrilateral are three types: grass, soil, and sand. Also, when the above quadrilateral is divided into a triangle formed by vertices 231, 232, 234 and a triangle formed by vertices 231, 233, 234, the materials set at each vertex of the former triangle are two types: sand and grass, and the materials set at each vertex of the latter triangle are two types: grass and soil (see (b) shown in FIG. 20). Therefore, for the above quadrilateral, the division condition is satisfied, so the game system 1 divides the quadrilateral into two triangles.
[0129] Note that since there are two ways to divide a quadrilateral into two triangles, when the division condition is satisfied for the triangles divided by at least one of the two ways, the game system 1 performs the above division by the method that satisfies the division condition. On the other hand, when the division condition is not satisfied for the triangles divided by either of the two ways, the division is performed by either method.
[0130] By performing the division as described above, the game system 1 can generate two triangles in which the materials set at each vertex are two or less so as to minimize the omission of information on three or more types of materials set at each vertex of the quadrilateral. Here, as described above, each polygon constituting the mesh is drawn using up to two types of textures. Therefore, by performing the above division, the game system 1 can draw the polygon using two types of textures so as to minimize the omission of the information on the materials set at each vertex.
[0131] In this embodiment, the game system 1 sets a polygon corresponding to the polygon after the above division. That is, the vertices of the polygon after the above division become the vertices of the polygon of the display mesh.
[0132] In this embodiment, for each polygon constituting the display mesh, when there are three or more types of materials set for each vertex of one polygon in total, the game system 1 determines the material of the polygon by selecting two types of materials. FIG. 21 is a diagram showing an example of a method for determining the material of a polygon constituting the display mesh. In the example shown in FIG. 21, for vertex 241 of the triangular polygon constituting the display mesh, let the first material be "grass", the second material be "soil", and the material ratio of the first material: the second material = 0.8:0.2. Also, for vertex 242 of the above polygon, let the first material be "grass", the second material be "sand", and the material ratio of the first material: the second material = 0.5:0.5. Also, for vertex 243 of the above polygon, let the first material be "sand", the second material be "soil", and the material ratio of the first material: the second material = 0.7:0.3.
[0133] When there are three or more types of materials set for each vertex of the polygon in total, the game system 1 calculates a determination value for each material. The determination value is calculated as the value obtained by summing the ratios for each vertex where the material is set. Then, the game system 1 selects two materials in order from the ones with larger determination values as the materials of the polygon. In the example shown in FIG. 21, the determination value of the grass material is 0.8 + 0.5 = 1.3, the determination value of the sand material is 0.5 + 0.7 = 1.2, and the determination value of the soil material is 0.2 + 0.3 = 0.5. Therefore, as the materials of the polygon shown in FIG. 21, the grass and sand materials are selected (see (a) shown in FIG. 21).
[0134] Note that the specific method for selecting the material of the polygon of the display mesh is arbitrary. In other embodiments, the material of the polygon of the display mesh may be selected by any method based on the information set at the vertices of the polygon. For example, for the material of the polygon of the display mesh, the material with the largest ratio at one vertex is specified for each vertex, and the material with the largest number of times specified for each vertex may be selected as the material of the polygon.
[0135] In this embodiment, the material of the polygon selected as described above is indicated by the materials set at each vertex of the polygon. That is, when the material of the polygon is selected, the game system 1 changes the materials set at each vertex of the polygon (that is, the material IDs included in the vertex data) to the selected material. In the example shown in FIG. 21, for vertices 241 and 243, before the selection of the material of the polygon, the materials of grass and soil, and sand and soil are set respectively (see (a) shown in FIG. 21). When the materials of grass and sand are selected as the material of the polygon as described above, the materials set at each of vertices 241 and 243 are changed to grass and sand (see (b) shown in FIG. 21). Note that for vertex 242, since the material set before the selection is the same as the selected material of the polygon, the material is not changed. As described above, when two types of materials are selected as the material of the polygon, the information of the materials of the third type and later set at each vertex of the polygon will be deleted.
[0136] In addition, the game system 1 changes the ratio of the materials set at the vertices according to the change of the materials set at the vertices. For example, for vertex 241, the content is changed from the first material being grass and the second material being soil to the first material being grass and the second material being sand. Here, since the ratio of the sand material is 0, the material ratio is the first material : the second material = 1 : 0. In this way, the above change formally changes the material of each vertex in order to represent the material of the polygon by the materials of each vertex of the polygon.
[0137] According to the above, since the material set at each vertex of one polygon is only the material corresponding to the texture used for the drawing described later, it is possible to facilitate the execution of the drawing process using the texture.
[0138] Note that due to the above change, it may be the case that all the materials of a certain vertex are changed (that is, none of the materials before the change match the materials after the change). Such a case is, for example, when the material set at the vertex before the change is soil and the materials selected as the material of the polygon are grass and sand. In such a case, the ratio of the materials at the vertex may be set based on the ratio of the materials at the other vertices of the polygon. For example, in the above example, when the first material set at one of the other vertices of the triangular polygon is grass and the material ratio is grass : sand = 1 : 0, and the material set at another vertex is sand and the material ratio is sand : grass = 1 : 0, the material ratio at the vertex may be set to grass : sand = 0.5 : 0.5. Also, the game system 1 may determine the ratio of the materials at the vertex in consideration of the distance between the vertex and the other vertices (for example, based on a weight value that increases as the distance gets closer).
[0139] As described above, in the present embodiment, for each polygon, the game system 1 selects up to a predetermined number (here, two) of the material IDs set for the vertices included in the polygon (that is, the material IDs set for the vertices of the polygon corresponding to the polygon) and determines them as the material ID of the polygon. According to this, the game system 1 can perform the drawing process while suppressing the number of textures used while reflecting the material set for the vertices in the appearance of the polygon.
[0140] In the present embodiment, for all the materials of the vertices constituting the polygon, when the number of the materials is less than or equal to the predetermined number, the game system 1 determines the material as the material of the polygon, and when the material exceeds the predetermined number, based on the priority parameter of each vertex (specifically, based on the determination value calculated based on the above-described evaluation value), a predetermined number of materials with high priority are selected and determined as the material of the polygon. As a result, even when a total of more than a predetermined number of materials are set for each vertex, the material of the polygon can be set to a predetermined number or less of materials considering the priority.
[0141] As described above, in the present embodiment, the first and second materials set for each vertex of one polygon are changed to be two types of materials set for the polygon. Here, when such a change is made, there may be a discrepancy in the first and second materials set for the vertices shared by two adjacent polygons.
[0142] FIG. 22 is a diagram showing an example of materials set for each vertex of two adjacent polygons. FIG. 22 shows a state (the state (b) shown in FIG. 20) in which two polygons are formed by the respective vertices 231 to 234 shown in FIG. 20. In the example shown in FIG. 22, since the materials of the first polygon formed by vertices 231, 233, and 234 are determined to be grass and sand, the first and second materials of these vertices should be set to grass and sand, respectively. On the other hand, since the materials of the second polygon formed by vertices 231, 232, and 234 are determined to be grass and soil, the first and second materials of these vertices should be set to grass and soil, respectively. Therefore, in the example shown in FIG. 22, there is a conflict in the materials to be set for vertices 231 and 234 shared by the two polygons.
[0143] Therefore, in the present embodiment, when there is a conflict in the materials to be set for the vertices shared by the two polygons, the game system 1 adds another vertex at the same position with respect to the vertex. FIG. 22(b) is a diagram showing an example of a state in which vertex 231' is added for vertex 231 and vertex 234' is added for vertex 234. In the example of FIG. 22, the game system 1 sets the first and second materials to grass and sand according to the materials of the first polygon for vertices 231 and 234. Also, for vertices 231' and 234', the first and second materials are set to grass and soil according to the materials of the second polygon. In this way, by formally setting two vertices as the vertices shared by the two polygons (that is, generating two vertex data with the same position and different materials), it is possible to suppress the occurrence of conflicts in the materials set for the vertices.
[0144] The game system 1 generates a display mesh composed of polygons whose vertices and materials are determined as described above. Further, the game system 1 performs the drawing of the voxel object by performing the drawing of the polygon based on the material information (that is, the first material and the second material) set for each vertex.
[0145] FIG. 23 is a diagram showing an example of applying a texture to a polygon. FIG. 23 shows a triangular polygon formed by the vertices 241 to 243 shown in FIG. 21. Note that the materials set for the vertices 241 to 243 are those shown in (b) shown in FIG. 21.
[0146] Regarding the position of the vertex of the polygon, the drawing is performed by a mapping that blends the texture of the first material and the texture of the second material set for the vertex at the ratio of the materials set for the vertex (that is, using the ratio as the blend rate). Note that the textures of the first and second materials used for the drawing are the textures indicated by the drawing setting information associated with each material ID associated with the data of the vertex in the above-described material data (see FIG. 12). In the example shown in FIG. 23, regarding the position of the vertex 241, since the material ratio is grass: sand = 1: 0, the drawing is performed using only the grass texture. Also, regarding the position of the vertex 243, since the first material is sand and the material ratio is sand: grass = 1: 0, the drawing is performed using only the sand texture. Also, regarding the position of the vertex 242, since the first material is grass, the second material is sand, and the material ratio is grass: sand = 0.5: 0.5, the drawing is performed by blending the grass texture and the sand texture at a blend rate of 0.5: 0.5.
[0147] Also, for positions other than the vertices of the polygon, the game system 1 determines the blend rate by interpolating the blend rates at each vertex. Then, the textures of the two materials set for each vertex are drawn by a mapping that blends based on the interpolated blend rate. Note that the specific method of interpolation is arbitrary. As an example, the blend rate between vertices is linearly interpolated. In FIG. 23, the positions where the ratio of the texture of the grass material is applied is high are shown in white, and the positions where the ratio of the texture of the sand material is applied is high are shown in black. In the example shown in FIG. 23, the grass texture is applied at vertex 241, the blend ratio of the sand texture increases as it approaches vertex 243, the blend rate of grass and sand becomes 1:1 at the position of vertex 242, and only the sand texture is applied at the position of vertex 243. In this way, by blending and drawing the two textures set for the polygon (that is, set for each vertex of the polygon) at a blend rate according to the ratio of the materials, the appearance at the boundary between different materials in the display mesh can be made natural. As a result, the appearance of the display mesh with multiple types of materials set can be made natural.
[0148] [2-6-2. Determination of the Material of the Mesh for Judgment] Next, an example of a method for determining the material of the mesh for judgment will be described. Although details will be described later, in this embodiment, collision detection of the voxel object is performed using the mesh for judgment, and processing may be executed according to the material of the voxel object for which collision is detected. Therefore, in this embodiment, the material is also determined for the mesh for judgment.
[0149] In this embodiment, for each polygon constituting the determination mesh, the game system 1 ensures that there is one type of material set for each polygon. Specifically, the game system 1 determines the material set for the polygon of the determination mesh based on the material information set for the vertices of the polygon (that is, the information on the first and second materials and the ratio of the materials).
[0150] FIG. 24 is a diagram showing an example of a method for determining the material of a polygon constituting a determination mesh. FIG. 24 shows an example of determining the material for a triangular polygon formed by the respective vertices 241 to 243 shown in FIG. 21. Note that the materials set for the respective vertices 241 to 243 are those shown in (a) shown in FIG. 21.
[0151] When determining the material of a polygon, the game system 1 calculates a determination value for each material set for each vertex of the polygon. In this embodiment, the method for calculating the determination value is the same as the method for calculating the determination value used for selecting the material of the polygon of the display mesh. Note that the specific method for calculating the determination value is arbitrary. In other embodiments, the determination value may be calculated by any method based on the information set for the vertices of the polygon of the determination mesh.
[0152] In the example shown in FIG. 24, for each material, the determination value is as follows: for the grass material, the determination value is 1.3; for the sand material, the determination value is 1.2; and for the soil material, the determination value is 0.5, similar to the case shown in FIG. 21 described above. Therefore, the grass material is selected as the material of the polygon shown in FIG. 24.
[0153] As described above, in the present embodiment, for each polygon, the game system 1 selects up to a predetermined number (here, 1) of the material IDs set for the vertices included in the polygon (that is, the material IDs set for the vertices of the polygon corresponding to the polygon) and determines them as the material ID of the polygon. According to this, the game system 1 can suppress the number of materials set for the determination mesh to be equal to or less than the predetermined number. As a result, it is possible to suppress the complexity of the processing according to the type of material that is performed according to the result of the collision determination using the determination mesh. Note that the method for determining the material of the polygon of the determination mesh is arbitrary and is not limited to the above. In other embodiments, the material of the polygon of the determination mesh may be determined by any method based on the information set for the vertices of the polygon.
[0154] Also, in the present embodiment, up to two types of materials are set for the polygons of the display mesh, while only one type of material is set for the polygons of the determination mesh. According to this, for the polygons of the display mesh, two types of textures can be used to achieve a natural appearance, and for the determination mesh, it is possible to suppress the complexity of the processing that is performed according to the result of the collision determination using the determination mesh. Note that in other embodiments, the number of types of materials that can be set for the polygons of the display mesh and the determination mesh is arbitrary. The number of materials that can be set for the polygons of the display mesh and the number of materials that can be set for the polygons of the determination mesh may both be plural, may be the same, or may be different.
[0155] In addition, in the present embodiment, the number of material types set for one voxel is up to two, and the number of material types set for one polygon in the display mesh is up to two. According to this, while suppressing the data amount of the voxel data, the information of the material set in the voxel data can be reflected in the material of the display mesh. Further, in the present embodiment, the number of material types set for the vertices set based on the voxel data is also up to two (see FIG. 16). According to this, since two types of materials can be set for the vertices generated during the process of obtaining the display mesh from the voxel data, the information of the material set in the voxel data can be reflected in the display mesh without loss of material information during the process.
[0156] Also, in other embodiments, the game system 1 may set materials differently for vertices used to generate a display mesh and vertices used to generate a determination mesh with respect to vertices set based on voxel data. For example, the game system 1 may set up to two types of materials for vertices used to generate a display mesh as described above, and may set one type of material for vertices used to generate a determination mesh. Then, for the materials of the polygons of the display mesh, two types of materials may be set in the same manner as above, and as the material of the polygon of the determination mesh, one type of material may be set based on the one type of material set for each vertex of the polygon. Note that when setting one type of material for vertices used to generate a determination mesh, the material for which the above-described determination value calculated for each material is the largest may be set as the material of the vertex. Also by the above, as in this embodiment, the number of types of materials set for one polygon in the display mesh can be up to two, and the number of types of materials set for one polygon in the determination mesh can be one. Therefore, it is possible to reflect the material information set in the voxel data in the display mesh, and it is possible to suppress the complexity of the processing performed according to the result of the collision determination using the determination mesh.
[0157] As described above, in this embodiment, a display mesh and a determination mesh can be set for one voxel object. However, depending on the game situation, it is not necessary to set both the display mesh and the determination mesh for one voxel object at the same time (for example, it is not necessary to set both in the processing in one frame). For example, the determination mesh may be generated in a range where collision determination is performed in the game space, and may not be generated in a range where collision determination is not performed. As an example, the game system 1 may generate a determination mesh for voxel objects within a predetermined range centered on the player character, and may not generate a determination mesh for voxel objects outside the predetermined range, but only generate a display mesh.
[0158] In addition, for the display mesh, the game system 1 may store data related to the generated mesh in memory, and in a frame after the mesh is generated, use the data without re-executing the process of generating the mesh except for the updated range. According to this, the processing load for generating the display mesh can be reduced. For the determination mesh, the data related to the generated mesh may not be stored in memory, and the mesh may be sequentially generated as needed (for example, every time collision determination needs to be performed). According to this, the memory area used for generating the mesh can be saved.
[0159] In the above, the method of generating each mesh (that is, the display mesh and the determination mesh) based on the voxel data after the change when the voxel data is changed from the initial state has been described. Note that the above method can also be used when generating each mesh based on the voxel data in the initial state, for example, at the start of the game. However, each mesh based on the voxel data in the initial state does not necessarily need to be generated based on the voxel data in the initial state at the start of the game, and may be prepared in advance before the game starts.
[0160] [Processing to Replace with a Specific Material] Next, with reference to FIGS. 25 to 32, an example of the process of replacing the material of the voxels for which the material replacement flag is set to on with the material corresponding to the material replacement flag will be described. In the following, it is assumed that terrain objects such as the ground and walls are voxel objects, and an example will be described in which the player character performs an action and as a result of collision detection, an action in the game occurs.
[0161] Note that the above "action in the game" is any change that occurs in the game, for example, a change caused by "processing to reflect the result of contact between objects". The "action in the game" may be based on a collision determination between a determination mesh and a determination shape corresponding to a determination target based on game processing (for example, a determination area set for an object such as a player character). The above action may occur on an object corresponding to the determination mesh or on an object corresponding to the determination target. The content of the "action in the game" may be associated with the material set for the polygon on which the collision is determined in the collision determination that is the cause of the occurrence of the action (that is, the content of the action may be determined by the material).
[0162] FIG. 25 is a diagram showing an example of a game image representing a state in which an area of a special material is set on a terrain object. In the example shown in FIG. 25, the material for the polygon of a part of the area 251 of the determination mesh and the display mesh of the terrain object that is the ground is set to a special material. Also, the material for the polygon of the area 252 other than the area 251 of the determination mesh and the display mesh of the terrain object is set to "rock".
[0163] In this embodiment, when the material replacement object 250 is provided on the terrain object, the material replacement flag of the voxels of the terrain object in a predetermined replacement range based on the installation position of the material replacement object 250 is set to on. As a result, among the determination mesh and the display mesh of the terrain object that is the ground, the material for the polygon in the above replacement range is set to the special material. Note that the above replacement range may be any range as long as it is determined based on the installation position of the material replacement object 250. As an example, the above replacement range may be a range of a predetermined shape centered on the installation position, or a range of a predetermined shape extending in a predetermined direction from the installation position. As another example, the above replacement range may be a range of an arbitrary shape determined by the design of the game stage with reference to the installation position of the material replacement object 250. Typically, the above replacement range is set to include the installation position of the material replacement object 250 as illustrated in FIG. 25. However, in other embodiments, the above replacement range may be set to a range that does not include the installation position.
[0164] The voxels corresponding to the region 251 are each set with a material ID indicating a material different from the "special material" in the same manner as the voxels corresponding to the region 252. For example, a material ID indicating a material such as "rock" or "soil" is set. Then, when the material replacement flag of the voxels corresponding to the region 251 is set to on, the material for the polygon of the determination mesh and the display mesh related to the voxels is set to the special material according to the setting while maintaining the information by the material ID.
[0165] As shown in FIG. 26, in the present embodiment, when setting the material of the vertex of the mesh, material substitution is performed using a material substitution flag. For example, after the vertices of the mesh described in [2-3. Calculation of Vertices] are calculated, the material of the vertex is determined based on the materials of the voxels around the vertex. However, for the voxels with the material substitution flag turned on, the determination is made assuming that the material of the voxel is "special material".
[0166] In the example shown in FIG. 26, it is assumed that vertex 219 is set for four voxels 215 to 218 in the same manner as the example shown in FIG. 16, and the four voxels 215 to 218 are the above-mentioned "voxels around the vertex". Also, in the example shown in FIG. 26, for voxel 215, it is assumed that the density is 255, the first material is "rock", the material mixing ratio is 0, the material substitution flag is "on", and the post-release flag is "off". For voxel 216, it is assumed that the density is 0, the material substitution flag is "off", and the post-release flag is "off". For voxel 217, it is assumed that the density is 204, the first material is "rock", the second material is "soil", the material mixing ratio is 0.3, the material substitution flag is "on", and the post-release flag is "off". For voxel 218, it is assumed that the density is 153, the first material is "rock", the second material is "soil", the material mixing ratio is 0.4, the material substitution flag is "on", and the post-release flag is "off". Also, similar to FIG. 16, it is assumed that the coordinates indicating the position of vertex 219 are (X, Y) = (0.8, 0.6).
[0167] When determining the material of a vertex, the game system 1 designates the materials of the voxels among the surrounding voxels for which the material replacement flag is set to "on" as special materials, sets the density of the special materials to 1.0, and calculates an evaluation value in the same manner as in the example of FIG. 16 based on the weight value based on the distance from the voxel to the vertex. In the case of the example of FIG. 26, the density of voxel 216 is 0, the materials of voxels 215, 217, and 218 are all special materials, and the voxels surrounding vertex 219 are only voxels of special materials. Therefore, the special material is determined as the material of vertex 219. Then, the game system 1 indicates that the ratio of the material of vertex 219 is 1.0 as a value indicating the ratio of the special material to the whole. Thus, in the present embodiment, for the voxels for which the material replacement flag is on, the material of the vertex is determined assuming that the material of the voxel is a "special material".
[0168] After the material of the vertex is determined, each vertex calculated as described above is simplified in the same manner as the method described in [2-5. Simplification of Vertices]. Then, a display mesh and a determination mesh are generated in the same manner as the method described in [2-6. Generation of Mesh].
[0169] Fig. 27(a) shows an example of a method for determining the material of a polygon that constitutes a display mesh related to a voxel in which the material substitution flag is set to on. In the example of Fig. 27(a), vertices 241 to 243 after simplification for each vertex calculated as described above are illustrated, and these vertices 241 to 243 become the vertices of a triangular polygon that constitutes the display mesh. Specifically, for vertex 241 of the polygon, the first material is "special material", the second material is "rock", and the material ratio is set to 0.5:0.5 for the first material:second material. Also, for vertex 242 of the polygon, only "special material" is set as the first material, and the material ratio is set to 1.0:0 for the first material:second material. Also, for vertex 243 of the polygon, only "special material" is set as the first material, and the material ratio is set to 1.0:0 for the first material:second material. And, as described in [2-6-1. Determination of the Material of the Display Mesh], in order for two types of materials to be set for one polygon, the materials of the polygon of the display mesh shown in Fig. 27(a) are set to special material and rock. In this way, the material of the polygon that constitutes the display mesh related to the voxel in which the material substitution flag is set to on is determined assuming that the voxel has only the special material.
[0170] Figure 27(b) shows an example of a method for determining the material of a polygon that constitutes a determination mesh related to a voxel in which the material replacement flag is set to on. Also in the example of Figure 27(b), the vertices after simplification for each vertex calculated as described above are illustrated, and the same vertices 241 to 243 as in Figure 27(a) are the vertices of the triangular polygon that constitutes the determination mesh. Then, as described in [2-6-2. Determination of the material of the determination mesh], in order for the material set for one polygon to be of one type, the material of the polygon of the determination mesh in Figure 27(b) is set to a special material based on the above determination value. In this way, the material of the polygon that constitutes the determination mesh related to the voxel in which the material replacement flag is set to on is determined as if the voxel has only the special material.
[0171] In the example shown in Figure 25, for region 251, since the material of the polygon of the display mesh in the region 251 is set to a material including the special material, it is drawn using only the texture of the special material, or the texture of the special material and the texture of another material (for example, the material of "rock") are blended based on the material ratio and drawn. As a result, the region 251 is displayed as if its surface is formed by a material including at least the special material. Then, the game system 1 performs a collision determination with other objects (for example, the player character 201) using the determination mesh having a polygon with the special material set in the region 251.
[0172] Figures 28 and 29 are diagrams showing an example of a game image representing a state where the player character 201 is attempting to destroy a part of the area 251 in the terrain object. The game system 1 performs a collision determination between the terrain object and the player character 201 using the determination mesh in the area 251. That is, a collision determination is made as to whether or not the determination mesh of the terrain object and the determination area set for the player character (for example, an area with a predetermined shape set based on the position of the player character) are in contact.
[0173] As shown in FIGS. 28 and 29, in the present embodiment, the user can cause the player character 201 to perform a punch action by a predetermined operation input. The above punch action is one of the actions of the player character that destroys the terrain object or the like, and the game system 1, as an in-game effect caused by the punch action, destroys and erases a part of the terrain object if it is a terrain object not composed of a special material. Note that the terrain object may be destructible by any action performed by the player character.
[0174] For example, when the user performs an operation input that causes the player character 201 to perform the above punch action, the game system 1 causes the player character 201 to perform an action of punching in a predetermined direction and performs a collision determination. However, in the present embodiment, when a collision is determined between the determination mesh in which a special material is set as the polygon material and the player character 201 that performs a punch action or the like, the above-described update range (see [2-2. Update of Voxel Data]) is not generated. Therefore, even if the player character 201 attempts to destroy a part of the area 251 in the terrain object by a punch action or the like, no destruction occurs at that part.
[0175] The special material in this embodiment is set as a material that cannot be destroyed by the player character. For example, as shown in FIG. 29, the material ID of the voxel in region 251 is the material ID of "rock", but since the material replacement flag is set to on, the determination mesh in region 251 is composed of polygons of the special material. Therefore, even if a collision is determined between the determination mesh with the special material set as the polygon material and the player character 201 that performs a punch action or the like, the above update range is not generated, and the voxel data of the terrain object in region 251 is not updated. On the other hand, in region 252, the material ID of the voxel in the region indicates the material of rock, and since the material replacement flag is set to off, the determination mesh is composed of polygons of the "rock" material. Therefore, when a collision is determined between the determination mesh with "rock" set as the polygon material and the player character 201 that performs a punch action or the like, an update range is generated based on the position and orientation of the player character 201, and the density of the voxels corresponding to the update range is decreased.
[0176] FIG. 30 is a diagram showing an example of a game image representing the state of releasing the region of the special material generated on the terrain object. In this embodiment, when the material replacement object 250 provided on the terrain object is destroyed, the material replacement flag of the voxels of the terrain object for which the material replacement flag was set to on by the material replacement object 250 is changed to off. For example, in this embodiment, by performing an action (for example, a punch action) in which the player character 201 targets the material replacement object 250 by a predetermined operation input, the material replacement object 250 can be destroyed. Note that the material replacement object 250 may be destructible by any action performed by the player character.
[0177] When the material replacement flag of the voxels of the terrain object for which the material replacement flag was set to on is changed to off, the materials of the polygons of the determination mesh and the display mesh related to the voxels are changed from the special material to the materials based on the material IDs set for the voxels respectively. Therefore, the material of the polygon of the area 251 of the terrain object in the above replacement range generated based on the installation of the material replacement object 250 is changed to a material different from the special material when the material replacement object 250 is destroyed. For example, in the example of FIG. 30, when the player character 201 destroys the material replacement object 250, the area 251 formed by the polygons of the special material is changed to the area 252 formed by the polygons of the material of "rock". In this way, when the material replacement flag is released from on to off, the area of the special material is changed to an area of a material different from the special material. In this way, when performing material replacement to the special material by rewriting the material ID in the voxel data, since the information of the material before the material replacement is lost, a process for determining what material to change (restore) to when the material replacement is released is required. On the other hand, in the present embodiment, by controlling the material replacement by turning the material replacement flag on / off, it is possible to easily return to the material set by the material ID when the material replacement is released.
[0178] In this embodiment, upon the material replacement flag being released from ON to OFF, a post-release effect is drawn at the position in the game space based on the released voxel (for example, the surface of the polygon of the display mesh related to the voxel). The post-release effect is not drawn in other areas where the release has not been performed, and by drawing the post-release effect, it is possible to identify the area where the material replacement to the special material has been released (for example, the area surrounded by the broken line illustrated in FIG. 30). In this embodiment, the post-release flags in the voxels where the material replacement flag has been changed from ON to OFF are each changed from OFF to ON, and thus the post-release effect is drawn at the position in the game space based on the voxel. In this way, in the drawing example of the post-release effect, for the voxel in which the material replacement flag has been changed from ON to OFF in response to the event of the destruction of the material replacement object 250, the post-release flag is set to ON, and the post-release effect is generated at the position in the game space corresponding to the voxel with the post-release flag being ON.
[0179] The post-cancellation flag may be set to on until a predetermined condition is met. By keeping the post-cancellation flag on until a predetermined condition is met, the post-cancellation effect can be maintained in the area where the special material replacement has been canceled. For example, the post-cancellation flag may be set from on to off when the game space data is reloaded and initialized. In this embodiment, the material replacement flag and the post-cancellation flag in the voxel data are set to off during the initialization. When the voxel data is initialized based on data in a state before an event occurs in which the material replacement object 250 is destroyed, the material replacement flag may be set to on for voxels within a replacement range based on the placement position of the material replacement object 250. The initialization may be performed in any state. For example, the initialization may be performed by loading save data, or by moving to a different level or section in the game space during gameplay. When the initialization is performed based on the loaded data, the material replacement flag and the post-cancellation flag may be changed and initialized. Specifically, in the initialized game space, if a material replacement object 250 is set on a terrain object, or if the game space is reset to a state in which a destroyed material replacement object 250 has been restored on a terrain object, the material replacement flag in the voxel data of voxels within the replacement range corresponding to the material replacement object 250 may be initially set to on. This makes it possible to terminate the drawing of the post-cancellation effect when, for example, the data of the game space is reloaded due to initialization of the game space. Furthermore, after initialization, if a material replacement object 250 is set on a terrain object, the material replacement flag in the voxel data of voxels within the replacement range corresponding to the material replacement object 250 may be set to on.
[0180] As another example, the post-release flag may be changed from on to off when the game space that has been changed to on satisfies a predetermined condition. For example, the post-release flag may be set from on to off when a predetermined time has elapsed since the post-release flag was changed to on, or when the state of the game space has changed to a predetermined environment since the post-release flag was changed to on. By doing so, after generating the post-release effect and then returning the post-release flag to off, the drawing of the post-release effect can be terminated.
[0181] As shown in FIG. 31, in the present embodiment, for the voxels in which the material replacement flag is changed from on to off, the material of the vertex of the mesh is set using the material indicated by the material ID set for each of the voxels. For example, after the vertices of the mesh described in [2-3. Calculation of Vertices] are calculated, the material of the vertex is determined based on the materials of the voxels around the vertex. However, for the voxels in which the material replacement flag is changed from on to off, the determination is made assuming that the material is the material indicated by the material ID and the material mixing ratio of the voxels.
[0182] In the example shown in FIG. 31, similar to the examples shown in FIGS. 16 and 26, it is assumed that the vertex 219 is set for the four voxels 215 to 218, and the four voxels 215 to 218 are the above-mentioned "voxels around the vertex". Also, in the example shown in FIG. 31, for the voxel 215, it is assumed that the density is 255, the first material is "rock", the material mixing ratio is 0, the material substitution flag is "off", and the post-release flag is "on". For the voxel 216, it is assumed that the density is 0, the material substitution flag is "off", and the post-release flag is "off". For the voxel 217, it is assumed that the density is 204, the first material is "rock", the second material is "soil", the material mixing ratio is 0.3, the material substitution flag is "off", and the post-release flag is "on". For the voxel 218, it is assumed that the density is 153, the first material is "rock", the second material is "soil", the material mixing ratio is 0.4, the material substitution flag is "off", and the post-release flag is "on". Also, similar to FIGS. 16 and 26, it is assumed that the coordinates indicating the position of the vertex 219 are (X, Y) = (0.8, 0.6).
[0183] When determining the material of a vertex, for the material of the voxels among the surrounding voxels whose material replacement flag has been changed from "on" to "off", the game system 1 calculates the evaluation value based on the weight value based on the distance from the voxel to the vertex as a material based on the first material, the second material, and the material mixing ratio, in the same manner as the examples in FIGS. 16 and 26. In the case of the example in FIG. 31, the voxel 216 has a density of 0, the materials of the other voxels 215, 217, and 218 are materials of "rock" and / or "soil", and the voxels around the vertex 219 are voxels of materials of "rock" and / or "soil". Therefore, the material of the vertex 219 is determined to be a rock material and a soil material, and the ratio of the two determined materials is calculated based on the above evaluation value. Thus, when the material replacement flag of the voxels around the vertex for which the material is set has been changed from "on" to "off", the material of the voxel is restored to the material based on the first material, the second material, and the material mixing ratio, and the material of the vertex is determined. After the material of the vertex is determined, simplification is performed for each vertex calculated as described above in the same manner as the method described in [2-5. Simplification of Vertices]. Then, in the same manner as the method described in [2-6. Generation of Mesh], a display mesh and a determination mesh are generated. Therefore, the material of the polygon constituting the display mesh and the determination mesh related to the voxel whose material replacement flag has been changed from "on" to "off" is determined based on the material ID set in the voxel and is changed to a material that does not include the above special material and is determined.
[0184] In the example shown in FIG. 30, for region 251, since the material of the polygon of the display mesh in the region 251 is changed from a material including a special material to a "rock" material not including the special material, it is drawn using the texture of the "rock" material, and it is displayed as if it has changed to a terrain object with the same appearance as region 252 (i.e., the appearance of the "rock" material) from the appearance of region 251. Then, in the region where the appearance has changed from region 251 to region 252 (the region within the dashed line in the figure), the above-described effect after cancellation is drawn. And the game system 1, in the region where the appearance has changed from region 251 to region 252, changes from the determination mesh composed of polygons of the special material to a determination mesh composed of polygons of a material (for example, "rock" material) based on the material ID in the polygon in which the setting of the special material is cancelled, and performs a collision determination with other objects (for example, player character 201).
[0185] FIG. 32 is a diagram showing an example of a game image representing a state where a player character 201 is destroying a part of a region (a region changed from region 251 to region 252) where material substitution has been cancelled in a terrain object. The game system 1 uses the determination mesh in the region where the above-described material substitution has been cancelled to perform a collision determination between the terrain object and the player character 201. That is, a collision determination is performed as to whether or not the determination mesh of the terrain object contacts a determination region set for the player character (for example, a region having a predetermined shape set based on the position of the player character).
[0186] As shown in FIG. 32, the user causes the player character 201 to perform a punch action that attempts to destroy the terrain object in the area where the above material replacement has been canceled, by a predetermined operation input. As described above, as an in-game effect caused by the punch action, if it is a terrain object not composed of the above special material, it is possible to destroy and erase a part of the terrain object, and a collision determination is made by the player character 201 performing an action of punching in a predetermined direction. For example, since the area where the above material replacement has been canceled indicates a material based on the material ID of the voxels whose material replacement flag has been changed to off, the determination mesh is composed of polygons of the material (for example, the material of "rock"). Therefore, when a collision is determined between the determination mesh, in which a material different from the special material (for example, the material of "rock") is set as the polygon material, and the player character 201, an update range (see [2-2. Update of Voxel Data]) is generated based on the position and orientation of the player character 201, and the density of the voxels corresponding to the update range is decreased to deform the terrain object. In addition, when a punch action is performed, after the punch action, fragment objects corresponding to the erased terrain object may be arranged around the position where the punch action was performed. Also, fragment objects corresponding to the destruction of the terrain object may not occur. In FIG. 32, for the purpose of making the drawing easy to view and the explanation easy to understand, the generated fragment objects are omitted.
[0187] For example, the above update range is generated based on the position, strength, ability where the player character 201 destroys the terrain object, the strength (e.g., material) of the terrain object, etc. For example, the above update range is generated in a predetermined direction (e.g., forward) with respect to the player character 201. In the example of FIG. 32, a bell-shaped update range with a hemispherical shape at the innermost part is formed underground centering on the collision position determined by the player character 201 performing a punch action. Note that the shape of the above update range may be other shapes, such as spherical, ellipsoidal, cube-shaped, cylindrical, wedge-shaped, shapes generated by 3D software, or shapes with some parts of these shapes missing. Also, the position of the above update range may be set centering on the position where a punch action by the player character 201 occurs in the game space (e.g., the position reached by the fist with which the player character 201 punches), or may be set centering on a predetermined distance in front of the position as seen from the player character 201.
[0188] The game system 1 reduces the density of voxels corresponding to the update range. As a result, the terrain object is deformed such that the portion corresponding to the update range is erased. For example, in the present embodiment, based on the SDF of each voxel in the terrain object, the density of each voxel is rewritten to control the erasure of each voxel. Specifically, by rewriting the density of at least the voxels whose SDF is a negative distance to a low value, at least a part of the portion corresponding to the update range in the terrain object is erased. As a first example, by rewriting the density of the voxels whose SDF is a negative distance to the lower limit value, the terrain object included within the update range is set to a state where it is erased, and by maintaining the density of the voxels whose SDF is a positive distance at the original value, the terrain object outside the update range is set to a state where it is not erased. As a second example, by rewriting the density of the voxels whose SDF is a negative distance to a lower value as the absolute value of the distance is larger, and rewriting the density of the voxels whose absolute value of the distance is larger than a predetermined value to the lower limit value, a state is set where a part of the terrain object included within the update range is erased, and by maintaining the density of the voxels whose SDF is a positive distance at the original value, the terrain object outside the update range is set to a state where it is not erased. As a third example, by rewriting the density of the voxels whose SDF is a negative distance to the lower limit value, the terrain object included within the update range is set to a state where it is erased, and by rewriting the density of the voxels whose SDF is a positive distance to a lower value as the absolute value of the distance is smaller, a state is set where a part of the terrain object outside the update range is erased.
[0189] As described above, in this embodiment, when an event of destroying a terrain object (for example, an event in which the player character 201 attempts to destroy a terrain object by a punch action) occurs, an update range corresponding to the event is generated, and among the voxels corresponding to the update range, the density is decreased for the voxels having a type of material ID set in advance as destructible and having the material replacement flag off. As a result, it is possible to forcibly set the state in which the voxels cannot be destroyed by setting the material replacement flag to on, and it is possible to provide a game in which the voxels can be destroyed by releasing the material replacement flag to off.
[0190] Also, in the above-described game example, when an event (first event) in which the player character destroys the material replacement object 250 by a punch action or the like occurs, the material replacement flag of the voxels related to the destroyed material replacement object 250 is changed from on to off. On the other hand, the terrain object related to the voxels having the material replacement flag set to on cannot be destroyed even if the player character generates an event (second event) of performing a punch action or the like to destroy the terrain object. That is, the first event becomes an event of destroying the material replacement object 250 by the second event. Therefore, in this embodiment, the terrain object that could not be destroyed by generating the second event can destroy the material replacement object 250, which is the key object, by generating the same second event, so that the non-destructible setting within the replacement range in the terrain object can be released all at once, and thus the exhilaration of the game by generating the second event can be obtained.
[0191] In the above-described embodiment, when a collision determination is made with a determination mesh having polygons of a special material due to the occurrence of an event attempting to destroy a terrain object, and an update range based on the collision determination is not generated, an example is used in which a material replacement flag is set to on to forcibly set the voxels in a state where they cannot be destroyed. However, the method of making this setting is arbitrary. In other embodiments, when a collision determination is made with a determination mesh having polygons of a special material due to the occurrence of an event attempting to destroy a terrain object, an update range based on the collision determination is generated, and among the voxels corresponding to the update range, the density of the voxels with the material replacement flag set to off is decreased without changing the density of the voxels with the material replacement flag set to on, thereby setting voxels that cannot be destroyed (erased) and voxels that can be destroyed (erased).
[0192] Alternatively, instead of unconditionally deforming the voxel object corresponding to the above update range, the game system 1 may increase the amount of damage set to the voxels corresponding to the update range according to the punch action, and decrease the density in the voxels when the amount of damage exceeds a predetermined value.
[0193] Also, the event that can destroy a terrain object or the like in the above game may occur due to the above punch action performed by the player character 201, or may occur due to other actions performed by the player character 201. Further, the above event may occur due to an action performed by another character, or may occur based on a user operation input not accompanied by the operation control of the player character 201, or may occur triggered by a phenomenon in the game not directly related to the character's movement.
[0194] Also, when a fragment object corresponding to a deleted part of a terrain object is generated, at least a part of the material of the fragment object may be changed to another material. In this case, the fragment object may be generated to have a shape corresponding to the deleted part of the terrain object, or may have a predetermined shape. The fragment object may be a voxel object or may not be a voxel object.
[0195] [3. Specific Examples of Processing in the Game System] Next, with reference to FIGS. 33 and 34, a specific example of information processing in the game system 1 will be described.
[0196] FIG. 33 is a diagram showing an example of various data used for information processing in the game system 1. Each data shown in FIG. 33 is stored in a memory (for example, flash memory 84, DRAM 85, and / or a memory card mounted on the slot 23, etc.) accessible by the main body device 2. As shown in FIG. 33, the game system 1 stores a game program. The game program is for executing the game processing in the present embodiment (for example, the game processing shown in FIG. 34). Note that the game program includes the above-described material data (see FIG. 12). Further, the above memory stores the above-described voxel data (see FIG. 11), update range data, mesh data, object data, etc. (see FIG. 33).
[0197] The update range data is data indicating the above-described update range. In the present embodiment, the update range is represented by the above-described SDF.
[0198] Mesh data includes various data related to the mesh of the voxel object. As shown in FIG. 33, in the present embodiment, the mesh data includes SVO data, display mesh data, and determination mesh data. The SVO data is data that holds each vertex calculated from the voxel data in the above-described SVO structure. In the present embodiment, the SVO data includes, in addition to the data indicating the position of each vertex, data indicating the material set for each vertex (for example, data indicating the ID of the material or data indicating a special material). The display mesh data includes various data related to the display mesh. Specifically, the display mesh data includes data indicating each vertex of the display mesh and data indicating the material set for each vertex (for example, data indicating the ID of the material or data indicating a special material). The determination mesh data includes various data related to the determination mesh. Specifically, the determination mesh data includes data indicating each vertex of the determination mesh and data indicating the material set for each vertex (for example, data indicating the ID of the material or data indicating a special material).
[0199] Object data includes various data related to objects other than the voxel object (for example, virtual objects such as player characters, material replacement objects 250, etc.). The object data is stored for each object that appears in the game space. The object data includes, for example, data indicating the position, speed, and state of the object, etc.
[0200] FIG. 34 is a flowchart showing an example of the flow of game processing executed by the game system 1. The execution of the game processing is started, for example, in response to the start of the game according to the player's instruction during the execution of the above game program. Note that the processing loop consisting of a series of processes from steps S1 to S17 is executed once per frame cycle.
[0201] In this embodiment, the processor 81 of the main body device 2 executes the above-described game program stored in the game system 1 to execute the processing of each step shown in FIG. 34. However, in other embodiments, some of the processing of each of the above steps may be executed by a processor (for example, a dedicated circuit or the like) different from the processor 81. Further, when the game system 1 is communicable with another information processing device (for example, a server), a part of the processing of each step shown in FIG. 33 may be executed in the other information processing device. Further, the processing of each step shown in FIG. 34 is merely an example, and if the same result can be obtained, the processing order of each step may be changed, or another processing may be executed in addition to (or instead of) the processing of each step.
[0202] Further, the processor 81 executes the processing of each step shown in FIG. 34 using a memory (for example, DRAM 85). That is, the processor 81 stores information (in other words, data) obtained by each processing step in the memory, and when using the information in subsequent processing steps, reads out and uses the information from the memory.
[0203] In FIG. 34, the processor 81 performs initial settings (step S1) and proceeds to the next step. For example, in the above initial settings, the processor 81 initializes parameters for performing the processing described below and updates each data. As an example, the processor 81 generates a game space in an initial state, updates voxel data, mesh data, and object data, and initializes the material replacement flag and the post-release flag in the voxel data to off. Then, when the material replacement object 250 is arranged in the initialized game space, the material replacement flag in the voxel data of the voxels within the replacement range corresponding to the material replacement object 250 is initialized to on.
[0204] Next, the processor 81 acquires the operation data indicating the operation input by the player (step S2), and proceeds to the next step. For example, the processor 81 acquires the operation data output from each controller via the controller communication unit 83 and / or each of the terminals 17 and 21, and the operation data output from the main body device 2 (for example, the touch panel 13).
[0205] Next, the processor 81 designates, as a processing target, any object among the objects in the game space that requires processing and for which the processing has not been completed (including the voxel object defined by the proprietary voxel space), and executes, for the designated object, a process of calculating the speed and a process of reflecting the result of contact between the objects in the previous frame (step S3), and proceeds to the next step. The speed of the object is used to calculate the position of the object in the current frame in the process of step S15 described later. For example, when the designated object is the player character, the speed of the player character is calculated based on the operation data acquired in step S2. Also, when the designated object is an object that is not operated by the user (for example, a fragment object), the speed of the object is calculated based on a rule predetermined in the game program. For example, the speed of the fragment object is set to 0 when it is placed on the terrain object and not moving, is set to the same as the speed of the player character when it is held by the player character, and is set to a speed moving in the direction based on the direction of the player character with a magnitude determined by a predetermined rule when it is released by an action of throwing by the player character. Specifically, the speed of the object is calculated based on virtual physical calculations including the interaction between the objects. For example, interactions such as repulsion due to collision between objects, friction due to contact, falling due to virtual gravity, and deceleration due to virtual air resistance are reflected in the speed determination.
[0206] In addition, the process of reflecting the result of contact between objects in the previous frame includes a process of applying the influence of contact to the object when it is determined in the collision determination (step S14 described later) in the previous frame that the objects are in contact with each other. The above process is, for example, the following process. · When it is determined that the player character has come into contact with the terrain object by a punch action or the like in the previous frame and the terrain object is in a destructible state, a process of generating a fragment object · When it is determined that the player character has come into contact with the material substitution object 250 by a punch action or the like in the previous frame, a process of destroying and eliminating the material substitution object 250 · When it is determined that the player character has come into contact with a predetermined terrain object (for example, lava) in the previous frame, a process of reducing the physical strength of the player character · When it is determined that an object has come into contact with another object in the previous frame, a process of eliminating the object When the state regarding the object is changed in the process of step S3 above, the processor 81 updates the object data stored in the memory regarding the object so as to indicate the changed content.
[0207] Next, the processor 81 determines whether an update event that updates the voxel object has occurred due to the object specified in step S3 above (step S4). For example, the determination in step S4 above is made based on the result of collision determination (step S14 described later) in the previous frame. As an example, if it is determined in the previous frame that the player character has contacted the terrain object by a punch action or the like, and the terrain object is in a state where it can be destroyed (deleted), it is determined that an update event has occurred to delete a part of the terrain object (see FIGS. 13, 14, and 32). Note that when the processor 81 determines that the player character has contacted the terrain object by a punch action or the like in the previous frame, and the terrain object is in a state where it cannot be destroyed (deleted) (for example, a state where the material of the polygon of the determination mesh in the contacted terrain object is the above special material) (see FIGS. 25 to 29), it is determined that no update event has occurred. Then, when an update event has occurred, the processor 81 proceeds to step S5. On the other hand, when no update event has occurred, the processor 81 proceeds to step S7.
[0208] In step S5, the processor 81 sets an update range for updating the voxel object in the game space and proceeds to the next step. For example, the specific content of the update range (for example, position, shape, and size) is associated with each type of update event in the game program. The update range set in step S5 above is set to be associated with the content related to the type of update event determined to have occurred in step S4 above. In step S5 above, the processor 81 stores data indicating the set update range in the memory as update range data.
[0209] Next, for the voxels corresponding to the update range set in step S5 above, the processor 81 makes changes according to the update event (step S6), and proceeds to step S7. For example, when the processor 81 deletes or deforms the voxel object within the update range as if it were reduced, or deforms it as if a voxel object is added within the update range, the processor 81 updates the voxel data stored in the memory so as to change the density of the voxels corresponding to the update range (see the above [2-2. Update of voxel data]). Also, when the processor 81 changes the material of the voxel object within the update range, the processor 81 updates the voxel data stored in the memory so as to update at least one of the first material ID, the second material ID, and the material mixing ratio of the voxels corresponding to the update range.
[0210] In step S7, the processor 81 determines whether or not a flag change event has occurred in which the material replacement flag is changed from on to off by the object specified in step S3 above. For example, in step S3 above, when a process of destroying and eliminating the material replacement object 250 is performed by a punch action or the like of the player character (see FIG. 30), the processor 81 determines that a flag change event has occurred. Then, when a flag change event has occurred, the processor 81 proceeds to step S8. On the other hand, when no flag change event has occurred, the processor 81 proceeds to step S9.
[0211] In step S8, the processor 81 changes the material replacement flag in the voxel data of the voxels within the replacement range corresponding to the disappeared material replacement object 250 to off and the post-replacement flag to on, respectively, and proceeds to step S9. Here, by the initial setting process in step S1 above, the voxel data of the voxels within the replacement range corresponding to the disappeared material replacement object 250 are each initially set with the material replacement flag being on. Therefore, in the process in step S8 above, when a flag change event occurs, for the voxels with the material replacement flag being on within the replacement range corresponding to the flag change event, the material replacement flag is changed to off, and for the voxels whose material replacement flag has been changed from on to off in response to the flag change event, the post-release flag is set to on.
[0212] In step S9, the processor 81 determines whether the processing in steps S3 to S8 above has been completed for all objects (including voxel objects defined by the unique voxel space) for which processing is required. Then, if the processing for all objects has been completed, the processor 81 proceeds to step S10. On the other hand, if the processing for any object has not been completed, the processor 81 returns to step S3 and repeats the processing.
[0213] In step S10, the processor 81 updates the vertices of the voxel object in the game space and proceeds with the processing to the next step. For example, when the voxel data is updated in the processing of step S6 above, the processor 81 calculates new vertices based on the updated voxel data. Note that the positions of the new vertices are calculated according to the method described in [2-3. Calculation of Vertices] above. Also, the materials of the new vertices are calculated according to the method described in [2-4. Determination of Vertex Materials] above. Note that when the material replacement flag in the updated voxel data is set to on, the processor 81 calculates the material of the new vertices according to the method described in [2-7. Processing for Replacement with a Specific Material], assuming that the material of the voxel having the voxel data is a special material.
[0214] Next, the processor 81 simplifies the vertices (step S11) and proceeds with the processing to the next step. For example, the processor 81 simplifies each vertex updated by the processing of step S10 above according to the method described in [2-5. Simplification of Vertices] above. Then, the processor 81 updates the SVO data stored in the memory so as to indicate each vertex obtained by the processing of step S10 and step S11 above. Note that the processing of step S10 and step S11 above does not necessarily need to recalculate the vertices for the entire voxel data, and may be executed only for the portions where the contents of the voxels are changed in the processing of step S6 and step S8 above.
[0215] Next, the processor 81 updates the display mesh of the voxel object based on the SVO data stored in the memory (step S12), and proceeds to the next step. Note that the position of each vertex of the display mesh and the material of each polygon of the display mesh (for example, the material set for each vertex of the polygon) are calculated according to the methods described in the above [2-6. Generation of Mesh], [2-6-1. Determination of the Material of the Display Mesh], and [2-7. Process of Replacing with a Specific Material]. In step S12 above, the processor 81 updates the display mesh data stored in the memory so as to indicate the position and material of each vertex of the updated display mesh. Note that the processor 81 may start the processing after step S13 described below without waiting for the completion of step S12 above and execute them in parallel. In that case, step S12 above needs to be completed before the start of step S16 described below.
[0216] Next, the processor 81 updates the determination mesh of the voxel object based on the SVO data stored in the memory (step S13), and proceeds to the next step. Note that the position of each vertex of the determination mesh and the material of each polygon of the determination mesh (for example, the material set for each vertex of the polygon) are calculated according to the methods described in the above [2-6. Generation of Mesh] and [2-6-2. Determination of the Material of the Determination Mesh], and [2-7. Process of Replacing with a Specific Material]. In step S13 above, the processor 81 updates the determination mesh data stored in the memory so as to indicate the position and material of each vertex of the updated determination mesh.
[0217] In the example shown in FIG. 34, the generation process of the determination mesh in step S13 is executed every frame. However, the generation process of the determination mesh does not necessarily have to be executed every frame. For example, when the collision determination process in step S14 described later is executed only in frames that satisfy a predetermined condition, the processor 81 may execute the generation process of the determination mesh in the frame in which the collision determination is performed. Further, the processor 81 may execute the generation process of the determination mesh for the voxels within the area in the game space where the collision determination in step S14 is performed. For example, in a situation where there are no objects to be collided with other than voxel objects around the player character in the game space (that is, a situation where only the collision determination between the player character and the surrounding voxel objects needs to be performed), the processor 81 may execute the generation process of the determination mesh for the voxels within a predetermined range based on the player character.
[0218] Next, the processor 81 performs a collision determination for each object in the game space based on the determination mesh data and the object data stored in the memory (step S14), and proceeds to the next step. For example, the processor 81 uses the determination mesh for voxel objects and uses a determination area of a predetermined shape set for the object for objects that are not voxel objects to perform the collision determination. In this embodiment, the collision determination in step S14 is performed in consideration of the speed calculated in step S3 above. That is, the processor 81 performs the collision determination using the position when moving at the above speed as the position of each object.
[0219] In this embodiment, the presence or absence of the following contacts, for example, is determined by the collision determination in step S14. · Contact between a player character performing an action such as moving or a punch action and a terrain object · Contact between a player character that performs actions such as movement and punch actions and other objects · Contact between a character that performs an action of lifting an object and the object · Contact between a moving object and a terrain object In addition, when it is determined in the collision determination in step S14 that the objects are in contact with each other, in the process of step S3 in the next frame, a process that reflects the result of the contact between the objects is executed, or in the process of step S4 in the next frame, it is determined that an update event has occurred.
[0220] Next, the processor 81 controls the operations of each object in the game space (step S15) and proceeds to the next step. For example, for the player character, the processor 81 performs control to cause movement and various actions based on the operation data acquired in step S1 above. Then, when a predetermined action occurs, the processor 81 generates an area for collision determination corresponding to the action within the game space. Note that in one execution of the above step S15, for operations that occur over multiple frames (e.g., actions by the player character), each object is controlled so that the operation for one frame progresses. As a result, by repeatedly executing the process of step S15 over multiple frames, each object performs a series of operations related to movement and various actions. Also, the position of the object is basically determined to be the position after moving at the speed calculated in step S3 above. However, when it is determined by the collision determination in step S14 that the object contacts another object and the movement is blocked by the contacted other object, the position of the object may be determined not to change. As an example, when the player character performs a punch action and contacts a terrain object composed of a special material, an operation in which the action is blocked by the terrain object (e.g., the extended punch bounces back from the surface of the terrain object) may be controlled. Then, in step S15 above, the processor 81 updates the object data stored in the memory to be the content indicating the object after the control in step S15.
[0221] Next, the processor 81 generates a game image (step S16) and proceeds to the next step. For example, the processor 81 generates a game image by performing rendering on each polygon of the display mesh of the voxel object and each polygon of the object other than the voxel object based on the virtual camera. Note that each polygon of the display mesh is rendered using rendering settings such as a texture corresponding to the material set for the polygon according to the method described in [2-6-1. Determination of the material of the display mesh]. Further, when there is a voxel in the voxel data for which the post-release flag is set to on, the processor 81 displays and renders a post-release effect at the position in the game space based on the voxel (for example, the surface position of the display mesh related to the voxel) according to the method described in [2-7. Process of replacing with a specific material] (see FIG. 30). The game image generated in step S16 above is output to the display device and displayed once per cycle per frame.
[0222] Next, the processor 81 determines whether to end the game (step S17). For example, the processor 81 makes an affirmative determination in step S17 when a predetermined operation input for ending the game is performed by the user or when the conditions for ending the game are satisfied. Then, when the processor 81 ends the game, it ends the processing according to this flowchart. On the other hand, when the processor 81 does not end the game, it returns to step S1 above and repeats the processing. Thereafter, the series of processes of steps S2 to S17 above are repeatedly executed until it is determined in step S17 that the game is ended.
[0223] As described above, in this embodiment, it is possible to replace the material of the voxel with a predetermined material (for example, a special material) while retaining the information regarding the material (for example, the material ID) in the voxel data. As a result, when canceling the material replacement of the voxel, it becomes easy to change to the material based on the information regarding the retained material.
[0224] In the above description, an example is used in which voxels with the material substitution flag set to on have only the material corresponding to the material substitution flag regardless of the material ID, and both the material of the display mesh and the material of the determination mesh are determined. However, only one of the material of the display mesh and the material of the determination mesh may be determined. In this case, by calculating and managing the vertex material data for generating each mesh respectively, the material of the display mesh and the material of the determination mesh may be determined respectively using the managed vertex material data.
[0225] Also, in the above description, an example is used in which a voxel object is defined by generating a three-dimensional mesh based on the voxel data set in the voxels in the three-dimensional space. However, the voxel object may be defined based on the voxel data set in the two-dimensional voxels.
[0226] Also, the game system 1 may be any device, such as a portable game device, any portable electronic device (such as a PDA (Personal Digital Assistant), mobile phone, smartphone, personal computer, camera, tablet, etc.). In this case, the input device for performing a user operation for operating a player character or the like does not have to be the left controller 3, the right controller 4, or the touch panel 13, etc., and may be another controller, mouse, touch pad, touch panel, trackball, keyboard, cross key, slide pad, etc.
[0227] Also, in the above description, an example in which the information processing is performed by the game system 1 respectively is used, but at least a part of the above processing steps may be performed by other devices. For example, when the game system 1 is further configured to be communicable with other devices (for example, another server, another information processing device, another game device, another mobile terminal, etc.), the above processing steps may be further executed by the cooperation of the other devices. In this way, by performing at least a part of the above processing steps by other devices, the same processing as the above-described processing becomes possible. Further, the above-described information processing can be executed by the cooperation between one processor or a plurality of processors included in an information processing system constituted by at least one information processing device. Further, in the above embodiment, the processor 81 of the game system 1 can perform information processing by executing a predetermined program, but a part or all of the above processing may be performed by a dedicated circuit provided in the game system 1.
[0228] Here, according to the above-described modification example, the present invention can also be realized in a so-called cloud computing system form, a distributed wide area network, and a local network system form. For example, in the system form of a distributed local network, it is also possible to execute the above processing in cooperation between a stationary information processing device (stationary game device) and a portable information processing device (portable game device). Needless to say, in these system forms, there is no particular limitation on which device performs the above-described processing, and the present invention can be realized regardless of any processing sharing.
[0229] Also, the processing order, setting values, conditions used for determination, etc. used in the above-described information processing are merely examples, and it goes without saying that the present embodiment can be realized even with other orders, values, and conditions.
[0230] In addition, the above program may be supplied to the game system 1 not only through an external storage medium such as an external memory but also through a wired or wireless communication line. Further, the above program may be pre-recorded in a non-volatile storage device inside the apparatus. Note that as the information storage medium for storing the above program, in addition to non-volatile memory, a CD-ROM, a DVD, or an optical disk-shaped storage medium similar thereto, a flexible disk, a hard disk, a magneto-optical disk, a magnetic tape, etc. may also be used. Further, as the information storage medium for storing the above program, a volatile memory for storing the above program may also be used. Such a storage medium can be referred to as a recording medium readable by a computer or the like. For example, by causing a computer or the like to read and execute the programs of these recording media, various functions described above can be provided.
[0231] As described above, the present invention has been described in detail, but the foregoing description is merely an exemplification of the present invention in all respects and is not intended to limit its scope. Needless to say, various improvements and modifications can be made without departing from the scope of the present invention. Further, those skilled in the art will understand that an equivalent range can be implemented based on the description of the present invention and common general technical knowledge from the description of specific embodiments of the present invention. Also, it should be understood that the terms used in this specification are used in the meaning commonly used in the art unless otherwise specified. Therefore, unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as commonly understood by those skilled in the art to which the present invention pertains. In case of conflict, this specification (including definitions) shall prevail.
Industrial Applicability
[0232] As described above, the present invention can be used as a game program, a game system, a game apparatus, a game processing method, etc. that can execute a game reflecting a material change while holding material information for an object based on voxel data.
Explanation of Signs
[0233] 1… Information processing system 2… Main body device 3… Left controller 4… Right controller 11… Housing 12… Display 13… Touch panel 32, 52… Analog stick 42, 64… Terminal 81… Processor 82… Network communication unit 83… Controller communication unit 85… DRAM
Claims
1. to a computer of an information processing apparatus, voxel data defined in a virtual space, for each of a plurality of voxels, a density indicating the degree to which the space defined by the voxel is virtually occupied by its content, and a material ID indicating the type of the content, the material ID being settable up to a first plurality, and based on the voxel data in which at least the density and the material ID are set, a display mesh corresponding to the voxel data and drawn based on a virtual camera, wherein vertex coordinates of the display mesh are determined based on at least the density included in the voxel data, and a material of the display mesh is determined based on at least the plurality of material IDs included in the voxel data by setting the plurality of material IDs for each of a plurality of polygons included in the display mesh, to generate the display mesh; to generate a voxel update range in the virtual space based on game processing; in response to the generation of the voxel update range, for each of the voxels in the voxel data corresponding to the voxel update range in the virtual space, to update at least one of the density and the material ID; to update the display mesh corresponding to the updated voxel data; a determination mesh used for collision determination in the virtual space, wherein vertex coordinates of the determination mesh are determined based on at least the density included in the voxel data, and a material of the determination mesh is determined by setting one of the material IDs for each of a plurality of polygons included in the determination mesh based on at least the plurality of material IDs included in the voxel data, and based on a collision determination between the determination mesh and a determination shape corresponding to an object to be determined based on game processing, to generate an in-game effect associated with the material ID set for a polygon in the determination mesh for which a collision has been determined; to perform rendering of the virtual space including the display mesh by causing rendering of each polygon included in the display mesh based on texture mapping by blending one or more textures associated with each of the material IDs set for each polygon included in the display mesh. The voxel data further includes a forced change flag for each voxel, and when the voxel with the forced change flag on has only the material corresponding to the forced change flag regardless of the set material ID, a game program that determines the material of the display mesh and the material of the determination mesh. **Claim 2** The game program according to claim 1, further causing the computer to update the forced change flag to off for the voxels within a predetermined range where the forced change flag is on when a first event in the game occurs based on game processing. **Claim 3** The voxel data further includes a release flag indicating that the forced change flag has changed from on to off for each voxel, and further for the computer, setting the release flag to on for the voxels whose forced change flag has been changed from on to off in response to the first event, and causing a predetermined effect to occur at the position within the virtual space corresponding to the voxel with the release flag on. The game program according to claim 2. **Claim 4** In the initial state, the forced change flag and the release flag are off in the voxel data, and when the computer initializes the voxel data based on the data in the state before the first event occurs, at the time of the initialization, updating the forced change flag to on for the voxels within the predetermined range. The game program according to claim 3. **Claim 5** The game program according to claim 3, further causing the computer to update the release flag of the voxel with the release flag on to off after causing the predetermined effect to occur. **Claim 6** For the computer, when a second event in the game occurs based on game processing, generating a first voxel update range among a plurality of the voxel update ranges, and decreasing the density for the voxels having the material ID of a type set to be destructible in advance and having the forced change flag off among the voxels corresponding to the first voxel update range. The game program according to any one of claims 1 to 5. **Claim 7** Voxel data defined in a virtual space, for each of a plurality of voxels, a density indicating the degree to which the space defined by the voxel is virtually occupied by its content, and a material ID indicating the type of the content, the material ID being settable up to a first number of pluralities, based on the voxel data in which at least the density and the material ID are set, a display mesh corresponding to the voxel data and drawn based on a virtual camera, wherein vertex coordinates of the display mesh are determined based on at least the density included in the voxel data, and the material of the display mesh is determined based on at least a plurality of the material IDs included in the voxel data by setting a plurality of the material IDs for each of a plurality of polygons included in the display mesh, and generating a display mesh; Based on game processing, generating a voxel update range within the virtual space; In response to the generation of the voxel update range, for each of the voxels in the voxel data that correspond to the voxel update range within the virtual space, updating at least one of the density and the material ID; Updating the display mesh corresponding to the updated voxel data; A determination mesh used for collision determination within the virtual space, wherein vertex coordinates of the determination mesh are determined based on at least the density included in the voxel data, and the material of the determination mesh is determined by setting one of the material IDs for each of a plurality of polygons included in the determination mesh based on at least a plurality of the material IDs included in the voxel data, and based on a collision determination between the determination mesh and a determination shape corresponding to an object to be determined based on game processing, generating an in-game effect associated with the material ID set for a polygon within the determination mesh for which a collision has been determined; Performing drawing of the virtual space including the display mesh by causing drawing of each polygon included in the display mesh based on texture mapping by blending one or more textures associated with each of the material IDs set for each polygon included in the display mesh; The voxel data further includes a forced change flag for each voxel. For voxels with the forced change flag on, regardless of the set material ID, the game system determines the material of the display mesh and the material of the determination mesh such that they have only the material corresponding to the forced change flag.
8. The game system according to claim 7, further updating the forced change flag to off for the voxels within a predetermined range with the forced change flag on when a first event in the game occurs based on game processing.
9. The voxel data further includes a release flag indicating that the forced change flag of each voxel has changed from on to off. The game system further sets the release flag to on for the voxels whose forced change flag has been changed from on to off in response to the first event. The game system according to claim 8, generating a predetermined effect at a position within the virtual space corresponding to the voxels with the release flag on.
10. In the initial state, the forced change flag and the release flag are off, and when the voxel data is initialized based on the data in the state before the first event occurs, the game system updates the forced change flag to on for the voxels within the predetermined range at the time of initialization. The game system according to claim 9.
11. The game system according to claim 9, updating the release flag of the voxels with the release flag on to off after generating the predetermined effect.
12. The game system generates a first voxel update range among a plurality of the voxel update ranges when a second event in the game occurs based on game processing. For the voxels corresponding to the first voxel update range, which have a material ID of a type set to be destructible in advance and have the forced change flag off, the density is decreased. The game system according to any one of claims 7 to 11.
13. A game device comprising a processor, wherein the processor Voxel data defined in a virtual space, for each of a plurality of voxels, a density indicating the degree to which the space defined by the voxel is virtually occupied by the content, and a material ID indicating the type of the content, the material ID being settable up to a first number which is plural. Based on the voxel data in which at least the density and the material ID are set, a display mesh corresponding to the voxel data and drawn based on a virtual camera is generated. The vertex coordinates of the display mesh are determined based on at least the density included in the voxel data, and the material of the display mesh is determined based on at least the plurality of material IDs included in the voxel data by setting the plurality of material IDs for each of the plurality of polygons included in the display mesh. Based on game processing, a voxel update range is generated within the virtual space. In response to the generation of the voxel update range, for each of the voxels in the virtual space that correspond to the voxel update range among the voxel data, at least one of the density and the material ID is updated. The display mesh is updated corresponding to the updated voxel data. A determination mesh used for collision determination within the virtual space. The vertex coordinates of the determination mesh are determined based on at least the density included in the voxel data, and the material of the determination mesh is determined by setting one of the material IDs for each of the plurality of polygons included in the determination mesh based on at least the plurality of material IDs included in the voxel data. Based on the collision determination between the determination mesh and a determination shape corresponding to an object to be determined based on game processing, a game action associated with the material ID set for the polygon within the determination mesh for which a collision is determined is generated. The virtual space including the display mesh is drawn by causing the polygon to be drawn based on texture mapping by blending one or more textures associated with each of the material IDs set for each of the polygons included in the display mesh. The voxel data further includes a forced change flag for each voxel. For the voxels with the forced change flag on, regardless of the set material ID, the game device determines the material of the display mesh and the material of the determination mesh such that they have only the material corresponding to the forced change flag.
14. When a first event in the game occurs based on game processing, the processor further updates the forced change flag to off for the voxels within a predetermined range with the forced change flag on, according to the game device described in claim 13.
15. The voxel data further includes a release flag indicating that the forced change flag has changed from on to off for each voxel. The processor further sets the release flag to on for the voxels whose forced change flag has been changed from on to off in response to the first event. The game device described in claim 14 generates a predetermined effect at a position within the virtual space corresponding to the voxels with the release flag on.
16. In the initial state, the forced change flag and the release flag are off in the voxel data. When the voxel data is initialized based on the data in the state before the first event occurs, the processor updates the forced change flag to on for the voxels within the predetermined range during the initialization, according to the game device described in claim 15.
17. After generating the predetermined effect, the processor updates the release flag of the voxels with the release flag on to off, according to the game device described in claim 15.
18. The processor When a second event in the game occurs based on game processing, generates a first voxel update range among a plurality of the voxel update ranges. For the voxels corresponding to the first voxel update range, which have a material ID of a type set to be destructible in advance and have the forced change flag off, the density is decreased, according to any one of claims 13 to 17 of the game device.
19. In an information processing system Voxel data defined in a virtual space, for each of a plurality of voxels, a density indicating the degree to which the space defined by the voxel is virtually occupied by the content, and a material ID indicating the type of the content, wherein at least the material ID that can be set up to a first number, which is plural, is set. Based on the voxel data, a display mesh corresponding to the voxel data and drawn based on a virtual camera is generated. The vertex coordinates of the display mesh are determined based on at least the density included in the voxel data, and the material of the display mesh is determined by setting a plurality of the material IDs for each of a plurality of polygons included in the display mesh based on at least the plurality of material IDs included in the voxel data. Based on game processing, a voxel update range is generated within the virtual space. In response to the generation of the voxel update range, for each of the voxels in the voxel data that correspond to the voxel update range within the virtual space, at least one of the density and the material ID is updated. The display mesh is updated corresponding to the updated voxel data. A determination mesh used for collision determination within the virtual space. The vertex coordinates of the determination mesh are determined based on at least the density included in the voxel data, and the material of the determination mesh is determined by setting one of the material IDs for each of a plurality of polygons included in the determination mesh based on at least the plurality of material IDs included in the voxel data. Based on the collision determination between the determination mesh and a determination shape corresponding to an object to be determined based on game processing, an in-game action associated with the material ID set for the polygon within the determination mesh where a collision is determined is generated. By causing the polygon to be drawn based on texture mapping by blending one or more textures associated with each of the material IDs set for each polygon included in the display mesh, the virtual space including the display mesh is drawn. The voxel data further includes a forced change flag for each voxel. For voxels with the forced change flag on, regardless of the set material ID, the material of the display mesh and the material of the determination mesh are determined such that they have only the material corresponding to the forced change flag, a game processing method.
20. In the information processing system, when a first event in the game occurs based on game processing, for the voxels within a predetermined range with the forced change flag on, the forced change flag is updated to off, the game processing method according to claim 19.
21. The information processing system further includes a release flag indicating that the forced change flag has changed from on to off for each voxel. The information processing system further For voxels whose forced change flag has been changed from on to off in response to the first event, the release flag is set to on. A predetermined effect is generated at the position within the virtual space corresponding to the voxels with the release flag on, the game processing method according to claim 20.
22. In the initial state of the voxel data, the forced change flag and the release flag are off. In the information processing system, when the voxel data is initialized based on the data in the state before the first event occurs, at the time of the initialization, for the voxels within the predetermined range, the forced change flag is updated to on, the game processing method according to claim 21.
23. In the information processing system, after generating the predetermined effect, the release flag of the voxels with the release flag on is updated to off, the game processing method according to claim 21.
24. The information processing system When a second event in the game occurs based on game processing, a first voxel update range is generated among a plurality of the voxel update ranges. Among the voxels corresponding to the first voxel update range, for voxels having a material ID of a type set to be destructible in advance and with the forced change flag off, the density is decreased, the game processing method according to any one of claims 19 to 23.
Citation Information
Patent Citations
Three-dimensional model breaking method and device
CN118071894A
Program, recording medium, game character drawing method and game machine
JP2004062666A
Program and image generation system
JP2017099744A
Game program
JP2017099809A
Program, information processing method and information processing device
JP2021029609A