Game program, game system, game processing method and game device
The game program updates voxel densities to prevent player entry into voxel-based meshes and optimizes processing by using separate display and collision meshes, effectively addressing the issue of character penetration.
Patent Information
- Application Number
- JP2025031170
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-02-28
AI Technical Summary
Preventing a player character from entering inside a mesh generated based on voxel data in a virtual space.
A game program that updates voxel data by increasing or decreasing voxel densities based on player character operations, using collision meshes determined by voxel densities to prevent the character from entering, and employing separate display and collision meshes to reduce processing load.
Effectively prevents the player character from entering the collision mesh while optimizing processing efficiency by using separate meshes for display and collision determination.
Smart Images

Figure 2025113240000001_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a game program, a game system, a game processing method, and a game device that generate an object in a virtual space using voxel data.
Background Art
[0002] Conventionally, generation of an object mesh in a virtual space based on voxel data has been performed (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] It is desired to prevent a player character from entering inside a mesh generated based on voxel data.
[0005] The present invention provides a game program, a game system, a game processing method, and a game device that can suppress a situation where a player character enters inside a mesh generated based on voxel data.
Means for Solving the Problems
[0006] The present invention can employ, for example, the following configurations (1) to (8).
[0007] (1) One configuration example of the game program of the present invention causes a computer to update, based on game processing, voxel data defined in a virtual space, the voxel data having at least a density set for each of a plurality of voxels, the density indicating the degree to which the space defined by the voxel is virtually occupied by the content, and to update a collision mesh corresponding to the voxel data, the vertex coordinates of the collision mesh being determined based on at least the density included in the voxel data and the collision mesh being used at least for collision determination with a player character. In the game processing, based on an operation input, the player character is controlled in the virtual space. When a first event occurs, a first voxel update range is generated in the virtual space, and the density of the voxels corresponding to the first voxel update range is increased or decreased. It is determined whether the player character is in a first state indicating that the player character can be inside the collision mesh. When it is determined that the player character is in the first state, a second voxel update range including the position of the player character is generated, and the density of the voxels corresponding to the second voxel update range is decreased.
[0008] According to the configuration of (1) above, when the player character is in a state indicating that the player character can be inside the collision mesh, the density of the voxels corresponding to the second voxel update range including the position of the player character is decreased, so that the situation where the player character enters inside the collision mesh generated based on the voxel data can be suppressed.
[0009] (2) In the configuration of (1) above, the computer may increase the density of the voxels corresponding to the first voxel update range and decrease the density of the voxels corresponding to the second voxel update range before the collision mesh is updated based on the increase in density by the first voxel update range when it is determined that the player character is in the first state.
[0010] According to the configuration of (2) above, it is possible to prevent the player character from entering inside the collision mesh updated by the increase in density.
[0011] (3) In the configuration of the above (2), when it is determined that the first voxel update range is located within a predetermined range around the player character in the computer, the computer may be made to determine the first state.
[0012] According to the configuration of the above (3), when the updated voxel is located within a predetermined range around the player character, it is possible to suppress the player character from entering the inside of the collision mesh based on the update.
[0013] (4) In any one of the configurations of the above (1) to (3), when there is a determination point within the first voxel update range among a plurality of determination points around the player character in the computer, the computer may be made to determine the first state.
[0014] According to the configuration of the above (4), it is possible to easily determine whether it is in the first state by using the determination points around the player character.
[0015] (5) In the configuration of the above (1), when the density of the voxel corresponding to the position of the player character among the voxel data exceeds a predetermined value in the computer for a predetermined period, the computer may be made to determine the first state.
[0016] According to the configuration of the above (5), when the player character enters a voxel having a density exceeding a predetermined value for a predetermined period, it is possible to prevent the player character from entering the inside of the collision mesh.
[0017] (6) In any one of the configurations (1) to (5) above, for a portion where a voxel having a density in a higher first range of values that can be set for density and a voxel having a density in a lower second range are adjacent, based on a method of setting vertices at coordinates based on the positions and densities of a plurality of surrounding voxels, the vertices of the collision mesh may be generated and updated.
[0018] According to the configuration (6) above, vertices of the collision mesh can be set based on the density of the voxels.
[0019] (7) In any one of the configurations (1) to (6) above, for the voxel data, for each of the plurality of voxels, a material indicating the type of the content may be further set. The computer may further generate or update a display mesh corresponding to the voxel data and drawn based on a virtual camera by determining the vertex coordinates of the display mesh based on at least the density included in the voxel data and determining the material of the display mesh based on at least the material included in the voxel data, and cause the virtual space including the display mesh to be drawn based on a texture corresponding to the vertex coordinates of the display mesh and the material of the display mesh.
[0020] According to the configuration (7) above, since the determination mesh and the display mesh are determined separately, appropriate meshes can be used according to each use.
[0021] (8) In any one of the configurations (1) to (6) above, for each of the plurality of voxels, a material indicating the type of content may be further set for the voxel data. The computer may further be caused to determine the material of the collision mesh based at least on the material included in the voxel data, and cause the virtual space including the display mesh to be drawn based on the vertex coordinates of the display mesh and the texture corresponding to the material of the display mesh, with the collision mesh as the display mesh.
[0022] According to the configuration (8) above, since drawing and collision determination can be performed using the same mesh, the processing load for setting the mesh can be reduced.
[0023] Further, the present invention may be implemented in the form of a game system, a game processing method, and a game device.
Advantages of the Invention
[0024] According to the present invention, it is possible to suppress the situation where the player character enters inside the collision mesh generated based on the voxel data.
Brief Description of the Drawings
[0025]
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
Figure 35
Figure 36
Embodiments for Carrying Out the Invention
[0026] [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; which functions as the 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 also be used with the main body device 2, the left controller 3, and the right controller 4 separated from each other (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.
[0027] 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 processes) 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.
[0028] FIG. 2 is a diagram showing an example of a state in which the left controller 3 and the right controller 4 are each 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 a "controller".
[0029] FIG. 3 is an orthographic 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.
[0030] Incidentally, 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 with the left controller 3 and the right controller 4 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.
[0031] 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.
[0032] 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).
[0033] The main body device 2 includes a speaker (that is, the speaker 88 shown in FIG. 6) inside the housing 11. As shown in FIG. 3, speaker holes 11a and 11b are formed on 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.
[0034] Also, the main body device 2 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.
[0035] 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 capable of mounting a storage medium of a predetermined type. The storage medium of the predetermined type is, for example, a storage medium dedicated to the game system 1 and information processing devices of the same type (for example, a dedicated memory card). The storage medium of the predetermined type is used to store, for example, data used in the main body device 2 (for example, save data of an application, etc.) and / or a program executed by the main body device 2 (for example, a program of an application, etc.). Also, the main body device 2 includes a power button 28.
[0036] 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 the present 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 an image generated and output by the main body device 2 on a stationary monitor. Also, in the present 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).
[0037] 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 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 separated 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.
[0038] The left controller 3 is provided with 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 corresponding to the tilting direction (and an input of a magnitude corresponding to the tilted angle) by tilting the analog stick 32. Note that the left controller 3 may be provided with a cross key or a slide stick capable of slide input, etc., instead of the analog stick, as the direction input unit. Further, in the present embodiment, it is possible to input by pressing the analog stick 32.
[0039] The left controller 3 is provided with various operation buttons. The left controller 3 is provided with four operation buttons 33 to 36 (specifically, a right direction button 33, a down direction button 34, an up direction button 35, and a left direction 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 is provided with 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 is provided with 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 mounted when the left controller 3 is mounted on 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.
[0040] Further, 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.
[0041] 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 gripped in a vertically long orientation when removed from the main body device 2. The housing 51 has a shape and size that can be gripped with one hand, particularly the right hand, when gripped in a vertically long orientation. Also, the right controller 4 can be gripped in a horizontally long orientation. When the right controller 4 is gripped in a horizontally long orientation, it may be gripped with both hands.
[0042] Similar to the left controller 3, the right controller 4 includes an analog stick 52 as a direction input unit. In the present 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. Also, 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. Further, the right controller 4 includes a + (plus) button 57 and a home button 58. Also, the right controller 4 includes a first R button 60 and a ZR button 61 on the upper right side 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.
[0043] Also, the right controller 4 includes a terminal 64 for the right controller 4 to perform wired communication with the main body device 2.
[0044] FIG. 6 is a block diagram showing an example of the internal configuration of the main body device 2. The main body device 2 includes each of the components 81 to 91, 97, and 98 shown in FIG. 6 in addition to the configuration shown in FIG. 3. 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.
[0045] The main body device 2 includes a processor 81. The processor 81 is an information processing unit that executes various information processes 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).
[0046] As an example of an internal storage medium built in 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.
[0047] 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.
[0048] The processor 81 appropriately reads and writes data between the flash memory 84 and the DRAM 85 and the above-mentioned respective storage media to execute the above-mentioned information processes.
[0049] 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 (registered trademark) 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 enabling so-called "local communication" in which data is transmitted and received by direct communication between a plurality of main body devices 2.
[0050] 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. However, 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.
[0051] 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 (for example, image data and audio data) to a stationary monitor or the like via the cradle.
[0052] 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 respective sets of the left controller 3 and the right controller 4. As an example, while a first user inputs to the main body device 2 using a first set of the left controller 3 and the right controller 4, it is possible for a second user to input to the main body device 2 using a second set of the left controller 3 and the right controller 4.
[0053] Also, the display 12 is connected to the processor 81. The processor 81 displays an image generated (for example, by executing the above-described information processing) and / or an image acquired from the outside on the display 12.
[0054] 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.
[0055] 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. Although not shown, the power control unit 97 is also 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.
[0056] 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 used to charge the battery 98.
[0057] 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 of the main body device 2 are shown in FIG. 6, so they are omitted in FIG. 7.
[0058] 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 both by wired communication via the terminal 42 and by 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. Further, 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.
[0059] Further, 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.
[0060] The left controller 3 includes each button 103 (specifically, buttons 33 to 39, 43, 44, and 47). Further, the left controller 3 includes an analog stick (described as "stick" in FIG. 7) 32. Each button 103 and the analog stick 32 repeatedly output information regarding an operation performed on themselves to the communication control unit 101 at an appropriate timing.
[0061] The communication control unit 101 acquires information related to input (specifically, information related to 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 related to the input is transmitted to the main body device 2 may be the same or different for each input unit.
[0062] 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.
[0063] 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 to each part of the left controller 3 (specifically, each part that receives power supply from the battery).
[0064] 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.
[0065] The right controller 4 includes the same input parts as each input part of the left controller 3. Specifically, it includes each button 113 and the analog stick 52. These input parts have the same functions as the input parts of the left controller 3 and operate in the same manner.
[0066] 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.
[0067] [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 causes the display device to display it. Note that, 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.
[0068] [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 cube)-shaped 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.
[0069] 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 in thick lines, but this thick line is 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.
[0070] The terrain object shown in FIG. 8 is generated, for example, according to the rule that "if 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 if 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 clearly exemplifying 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.
[0071] 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 also 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.
[0072] 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.
[0073] In this 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 may be set in a partial region of the game space. When the voxel space is set in a partial region 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. Also, in the game space, a main voxel space set throughout the game space and a sub-voxel space set in a partial region of the game space may be set. At this time, the game system 1 stores voxel data for each voxel space.
[0074] 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, and state data for each voxel defined in the game space. In the voxel data in this embodiment, these data are set for each voxel.
[0075] 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.
[0076] In this embodiment, the density can take integer values in the range from a lower limit value (e.g., 0) to an upper limit value (e.g., 255). In this embodiment, in the game system 1, 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 in the voxel tends to be large, and when the value of the density is low, the ratio tends to be small. Based on the density, the surface shape of the voxel object is determined. In this way, the density is an index that affects the ratio of the volume occupied by the region within the voxel object in 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 also be said to be the surface of the part where the content exists in the voxel, or 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 volume corresponding to the ratio indicated by 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 when based on the same density, the volume of the voxel object may be different.
[0077] In other embodiments, the density may indicate either a state where the volume occupied by the region within the voxel object occupies the entire region within the voxel or a state where 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 values of 0 or 1.
[0078] 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.
[0079] 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).
[0080] 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 ratios 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 it is possible to set not up to two but three or more types of materials, the ratio of the materials in the voxel is represented as a plurality of values respectively indicating the ratio of each material.
[0081] 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.
[0082] 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 data indicating, for example, whether the voxel is in a wet state (and the degree thereof).
[0083] As described above, in this embodiment, since the voxel data includes the material ID, the game system 1 stores 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, a material ID, a name, properties, and drawing setting information set for the material are associated with each other.
[0084] 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 display, the material data includes information on the name of the material.
[0085] 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 to which the material is set 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 of the following information may be set as the properties 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 · Amount of the player character's physical strength recovered when the player character destroys or acquires the voxel object · Amount of in-game currency acquired by the player character 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.
[0086] In this embodiment, the material data includes, as information specifying the properties of the material, an ID indicating the property (see FIG. 12). Although not shown, the game system 1 stores property information in which, for each property prepared, the content of the property (for example, values indicating the above-described weight and slipperiness) is associated with the property ID. By referring to the above property information, the game system 1 can specify the specific content of the property set for the material.
[0087] The rendering settings included in the material data are information indicating settings related to rendering, such as the texture used for rendering the voxel object to which the material is set. In this embodiment, the material data includes, as information on the rendering settings, the ID of the texture used for rendering the voxel object to which the material is set (see FIG. 12). Although not shown, the game system 1 stores texture information in which, for each texture prepared, the texture ID and the texture indicated by the texture ID are associated with each other. By referring to the above texture information, the game system 1 can specify the specific content of the texture set for the material. In other embodiments, as information on the rendering 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.
[0088] Also, the material data may include other data 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 footstep sound output when the player character walks on the voxel object based on the voxel.
[0089] 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 including a material ID and a texture ID.
[0090] [2-2. Update of Voxel Data] During the game, when the above-described voxel data is updated, the voxel object is deformed. In the present embodiment, when a game event (hereinafter referred to as an "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 a character contacts the voxel object, or a bomb explodes).
[0091] 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 hit by the punch action of the player character 201 is erased. As a result, the state where the terrain object 202 is destroyed by the punch action of the player character 201 is expressed.
[0092] 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 the object related to the generated update event (e.g., the 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 set as 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 (e.g., the strength of the punch or the size of the explosion).
[0093] The game system 1 changes the density for 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, and thus the shape of the voxel object (the visible shape and the shape used for collision detection) is changed. Note that in other embodiments, in addition to changing the density for the voxels included in the update range, the game system 1 may change the material (i.e., the first material, the second material, and the material mixing ratio) in the voxels or change the state of the voxels.
[0094] In this embodiment, the game system 1 determines whether a voxel is included in the update range 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 is negative for the positions inside the shape represented by the SDF, and the SDF value is 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 processes such as correction and interpolation can be performed.
[0095] 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.
[0096] [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.
[0097] 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 easy to view and the explanations easy to understand, voxels, vertices, meshes, etc. are represented two-dimensionally, but in reality, 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 set density indicating its existence (i.e., a density equal to or higher than a reference value described later) and a voxel having a set 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.
[0098] As described above, in the present embodiment, the density set for the voxels 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 the inside is completely filled. Densities between 0 and 255 are treated interpolatively and used for vertex determination. And in the present embodiment, voxels with a density equal to or higher than the reference value are virtually treated as inside the object, and voxels with a density lower than the reference value are treated as outside the object. It can also be said that voxels with a density equal to or higher than the reference value are virtually treated as voxels indicating existence, and voxels with a density lower 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 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, let the density be 0 in voxel 211 and other outer voxels, 100 in voxel 212 where the density is lower than the reference value, and 150 and 210 in voxels 213 and 214 where the density is equal to or higher than the reference value. In the present embodiment, the game system 1 generates vertices between voxels with a density equal to or higher than the reference value and voxels with a density lower 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, a vertex is generated in a region spanning both voxels with a density equal to or higher than the reference value and voxels with a density lower than the reference value. The coordinates of the vertex 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. By setting the normal information that defines the position and orientation of the straight line connecting the vertices, the coordinates of the vertices can be further calculated based on the normal information. Note that the normal information may be held in advance for at least some of the voxels, or if it is not held, the normal information may also be calculated based on the densities of adjacent voxels. In FIG. 15, since the density of voxel 212 is lower than the reference value, voxel 212 is treated as outside the object in the determination of the presence or absence of vertices, but the density value of voxel 212 itself is used for the coordinate calculation 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 be added to the upper right and upper left sides of voxel 212 in FIG. 15.
[0099] By setting the vertices as described above, when generating a mesh that connects each of the set vertices (or each vertex after performing the simplification process described later on each of the set vertices), a shape having a volume that reflects the density for each voxel to some extent can be generated. However, depending on the relationship with adjacent voxels, it is possible that a voxel with a density of 0 includes a region within the object, or a voxel with a density of 255 includes a region outside the object. Also, in this embodiment, since voxels with a value less than the reference value are processed as outside the object, the volume is also smaller because the number of vertices is less compared to the case of processing them as inside the object. Thus, it is not necessary to calculate the polygon mesh so as to have a volume that strictly corresponds to the density value.
[0100] [2-4. Determination of Vertex Material] The game system 1 determines the material for each of the vertices set as described above. The material of a vertex is determined based on the materials of the voxels around the vertex. The voxels around the vertex are, for example, the voxels used for determining whether to generate the vertex (that is, the voxels overlapping with the "region spanning across voxels" described above). Note that in other embodiments, the voxels used for determining the material of the vertex do not have to be the same as the voxels used for determining the generation of the vertex, and they may be different.
[0101] 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 an 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, the coordinates indicating the position of vertex 219 are assumed to be (X, Y) = (0.8, 0.6). Note that the coordinate system of these coordinates is a coordinate system in which the left-right direction in FIG. 16 is the X coordinate, the up-down direction is 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) is (0, 0).
[0102] When determining the material of a vertex, the game system 1 calculates an evaluation value based on the density of each material in the surrounding voxels 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 as to be 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
[0103] 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 above-described values from 0 to 255 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 any 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.
[0104] 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.
[0105] 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 represented 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.
[0106] 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.
[0107] As described above, in this embodiment, for each vertex, with respect to the material IDs included in the voxel data of a plurality of surrounding voxels, a priority parameter (for example, an evaluation value) for each material ID is calculated based on the voxel data. Then, based on the priority parameter, up to a predetermined number (here, two) of material IDs with high priority are selected and determined 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.
[0108] In this embodiment, an evaluation value, which is an example of the priority parameter, 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.
[0109] Also, in this embodiment, an evaluation value, which is an example of the priority parameter, 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.
[0110] Also, in this embodiment, it can be said that an evaluation value, which is an example of the priority parameter, 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.
[0111] [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 polygons constituting the mesh of the voxel object can be reduced, and the amount of memory used for processing and the processing load can be reduced.
[0112] 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. Further, in FIG. 17, the vertex division region in which the letter "v" is shown inside indicates the vertex division region in which vertices are set.
[0113] In this embodiment, the game system 1 determines whether or not it is possible to simplify 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.
[0114] As shown in Fig. 17, (a) shows 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.
[0115] In this embodiment, the game system 1 performs simplification in multiple stages. The number of stages is arbitrary, but in Fig. 17, up to the second stage is 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 region within the range surrounded by the dotted line in (b) shown in Fig. 17 is simplifiable, the vertices of the vertex division region 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.
[0116] 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.
[0117] 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 greatly changed. For example, whether the shape formed by each vertex is not greatly changed before and after simplification can be determined by calculating an index indicating the error between the mesh before simplification and the mesh after simplification, and checking whether 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, but the shape formed by each vertex after simplification is not a hollow shape (that is, information indicating hollowness is lost due to simplification), it is also determined that the condition regarding the shape is not satisfied. Whether 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 only be represented 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.
[0118] Also, as a condition regarding the material, 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 the material. (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 the material 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 the material is that it is 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 the material 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 the material 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.
[0119] In the game system 1, even if materials that are strictly classified into different types have the same set properties, a plurality of types of materials with 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 cases 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 of conditions related to the materials.
[0120] 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, no simplification is performed. That is, when the total number of types of materials exceeds the number of materials that can be set for one vertex, no simplification is 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.
[0121] 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-described 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 an evaluation value for each material. Then, the ratio of the materials is calculated based on the calculated evaluation value of each material.
[0122] [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 area, or a vertex division area in which a plurality of vertex division areas 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 area. Each polygon constituting the mesh is a triangle or a quadrilateral.
[0123] 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 displaying and collision determination of voxel objects, respectively.
[0124] 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 simplify the vertices and may generate the display mesh and / or the determination mesh based on the non-simplified vertices.
[0125] 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 reduces the number of vertices of the determination mesh compared to 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-described 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 equal to or less than a predetermined threshold (this threshold is set to be larger than the above allowable 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.
[0126] Note that in other embodiments, the display mesh and the determination mesh may be generated based on the same data or may be generated based on 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.
[0127] [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 types of textures corresponding to up to two types of materials. Therefore, the game system 1 sets the material for each polygon constituting the mesh so that ultimately, the number of materials set for one polygon is two or less. In other embodiments, three or more types of materials may be set. For example, in embodiments where there are three or more types of voxel materials and vertex materials, the same number of materials may be set for the polygon.
[0128] 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.
[0129] 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 and grass, and grass, respectively.
[0130] 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.
[0131] 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.
[0132] By performing the division as described above, the game system 1 can generate two triangles such that 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 information on the materials set at each vertex.
[0133] 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.
[0134] 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 selects two types of materials to determine the material of the polygon. 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 be set to 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 be set to 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 be set to 0.7:0.3.
[0135] 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 total value of 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).
[0136] The specific method of 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 specified materials for each vertex may be selected as the material of the polygon.
[0137] In this embodiment, the material of the polygon selected as described above is indicated by the materials set at the respective vertices of the polygon. That is, when the material of the polygon is selected, the game system 1 changes the materials set at the respective vertices 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 is deleted.
[0138] Further, 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.
[0139] According to the above, since the materials set at each vertex of one polygon are only the materials corresponding to the texture used for the drawing described later, it is possible to facilitate the execution of the drawing process using the texture.
[0140] Note that due to the above change, it is possible 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, a case where 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, if 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. Further, 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).
[0141] As described above, in the present embodiment, for each polygon, the game system 1 selects up to a predetermined number (here, 2) 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.
[0142] 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), it selects a predetermined number of materials with high priority and determines them as the material of the polygon. As a result, even when materials exceeding the predetermined number in total are set for each vertex, the material of the polygon can be set to a predetermined number or less of materials considering the priority.
[0143] 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 is a possibility that a discrepancy may occur in the first and second materials set for the vertices shared by two adjacent polygons.
[0144] 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 material of the first polygon formed by vertices 231, 233, and 234 is 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 material of the second polygon formed by vertices 231, 232, and 234 is 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.
[0145] Therefore, in the present embodiment, when there is a conflict in the materials to be set for the vertices shared by 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 material 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 material of the second polygon. In this way, by formally setting two vertices as the vertices shared by two polygons (that is, generating two vertex data with the same position but different materials), it is possible to suppress the occurrence of a conflict in the materials set for the vertices.
[0146] The game system 1 generates a display mesh composed of polygons whose vertices and materials are determined as described above. Also, the game system 1 performs the drawing of the voxel object by performing the drawing of the polygon based on the material information (i.e., the first material and the second material) set for each vertex.
[0147] FIG. 23 is a diagram showing an example of applying a texture to a polygon. FIG. 23 shows 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 (b) shown in FIG. 21.
[0148] Regarding the position of the vertex of the polygon, the drawing is performed by 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 vertex data in the above-described material data (see FIG. 12). In the example shown in FIG. 23, regarding the position of 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 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 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.
[0149] 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 them 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 (i.e., 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.
[0150] [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 according to the material of the voxel object for which collision is detected may be executed. Therefore, in this embodiment, the material is also determined for the mesh for judgment.
[0151] In this embodiment, for each polygon constituting the determination mesh, the game system 1 ensures that only one type of material is 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 (i.e., the first and second materials and the information on the ratio of the materials) set for the vertices of the polygon.
[0152] FIG. 24 is a diagram showing an example of a method for determining the material of a polygon constituting the 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.
[0153] When determining the material of the 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.
[0154] In the example shown in FIG. 24, the determination value for each material is the same as the case shown in FIG. 21 described above, where the determination value for the grass material is 1.3, the determination value for the sand material is 1.2, and the determination value for the soil material is 0.5. Therefore, the grass material is selected as the material of the polygon shown in FIG. 24.
[0155] As described above, in this 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 a predetermined number or less. As a result, it is possible to suppress the complication 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 of 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.
[0156] Also, in this 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 complication 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.
[0157] 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.
[0158] In another embodiment, 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. 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. When setting one type of material for the vertices used to generate the 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 the present 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 complication of the processing performed according to the result of the collision determination using the determination mesh.
[0159] 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 the range where collision determination is performed in the game space, and may not be generated in the 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 not generate a determination mesh for voxel objects outside the predetermined range, but only generate a display mesh.
[0160] Also, for the display mesh, the game system 1 may store the data related to the generated mesh in the memory, and in the 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. Also, for the determination mesh, the data related to the generated mesh may not be stored in the 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.
[0161] In the above, the method of generating each mesh (that is, the display mesh and the determination mesh) based on the changed voxel data 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.
[0162] In other embodiments, only one of the above-described display mesh and determination mesh may be set (that is, the display and determination are shared using the same mesh). In this case, the above-described display mesh may be shared by also using it as the determination mesh, or the above-described determination mesh may be shared by also using it as the display mesh. When the determination mesh and the display mesh are set separately, an appropriate mesh can be used according to each use. On the other hand, when drawing and collision determination are shared using the same mesh, the processing load for setting the mesh can be reduced.
[0163] [2-7. Processing for preventing the player character from entering the inside of the determination mesh] Next, with reference to FIGS. 25 to 32, an example of processing for preventing the player character from entering the inside of the determination mesh will be described. In the following, it is assumed that terrain objects such as the ground and walls are voxel objects. And in this embodiment, as a result of collision determination being performed on the voxel object when the player character performs an action, an in-game effect occurs.
[0164] Note that the above “in-game effect” is any change that occurs in the game, for example, a change that occurs by “processing that reflects the result of contact between objects”. The “in-game effect” may be based on a collision determination between the 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 effect may occur on an object corresponding to the determination mesh, or the above effect may occur on an object corresponding to the determination target. The content of the “in-game effect” may be associated with the material set for the polygon on which the collision was determined in the collision determination that is the cause of the occurrence of the effect (that is, the content of the effect may be determined by the material).
[0165] In addition, for the above "in-game effect", according to the material of the voxel object, an in-game effect corresponding to the material is generated for the voxel object. For example, the voxel object may be a fragment object generated by being pulled out from the terrain object by the action of the player character. In this case, an in-game effect associated with the material of the fragment object is generated.
[0166] FIGS. 25 and 26 are diagrams showing an example of a series of game images representing a state where the player character 201 throws the fragment object 252 onto the terrain object 251. In the example shown in the upper figure of FIG. 25, the material for the polygon of the determination mesh of the terrain object 251 which is the ground is set to "rock". The game system 1 performs a collision determination between the terrain object 251 and the player character 201 using the determination mesh. That is, a collision determination is made as to whether or not the determination mesh of the terrain object 251 and a determination area set for the player character 201 (for example, an area having a predetermined shape set based on the position of the player character 201) are in contact. When a collision between the polygon whose material is rock and the player character 201 is determined, the player character 201 is controlled so as not to be able to enter the inside of the polygon. Therefore, the player character 201 can stand on or walk on the polygon. In the present embodiment, by setting the material for each polygon, the game system 1 can execute different processes according to which material part of the voxel object another object has come into contact with. In addition, the content of the process to be executed can be made according to the type of the material.
[0167] Also, the content of the process executed when a collision between a voxel object and another object is determined is arbitrary. For example, when the other object is a moving object such as a player character or an enemy character, the process may be a process of outputting the footsteps of the object or displaying an effect (for example, an effect representing dust or splashes of water) at the contact location. At this time, the game system 1 can vary the footsteps or the effects according to the type of material set for the polygon of the contacted part among the voxel objects.
[0168] In the present embodiment, the user can cause the player character 201 to perform an action (referred to as a "pull-out action") of grasping a part of the terrain object by a predetermined operation input, pulling it out as a fragment object, and holding it. The game system 1, as an action in the game caused by the pull-out action, erases a part of the terrain object and generates a fragment object.
[0169] For example, when the pull-out action is performed, the game system 1 executes the following process. For example, when an operation input for causing the player character 201 to perform the pull-out action is performed by the user, the game system 1 causes the player character 201 to perform an action of digging forward and grasping, and performs a collision determination. Then, when a collision between the player character 201 performing the pull-out action and the terrain object is determined, an update range is generated based on the position and orientation of the player character 201. Then, the game system 1 decreases the density of the voxels corresponding to the update range, and by updating the mesh according to the decrease in the density of the voxels, the terrain object is deformed so that the part within the update range is erased.
[0170] In addition, the game system 1 generates a fragment object that represents a portion of the terrain object that has been erased. For example, the game system 1 generates the fragment object while causing the player character 201 to hold it based on a pulling action. The fragment object may be a voxel object and may be generated to have a shape corresponding to the portion of the terrain object that has been erased, or may have a predetermined shape. A unique voxel space different from the voxel space of the voxels corresponding to the terrain object or the like is defined for the fragment object. For example, the game system 1 determines the material of the fragment object based on the material set for the polygon within the determination mesh that contacts the update range among the determination meshes of the pulled-out terrain object. As an example, the material of the fragment object is determined to be the same as any one of the materials set for the polygons within the determination mesh that contacts the update range. As another example, the material of the fragment object may be determined based on the material set for the voxel data in the voxel that contacts the update range. Note that, as another example, in the present embodiment, the user may erase and destroy a part of the terrain object and generate a fragment object by causing the player character 201 to perform a punch action by a predetermined operation input, in the same manner as in the case of the pulling action. Further, the fragment object may be pre-arranged within the game space (for example, on the terrain object).
[0171] In this embodiment, the user can perform various actions using the fragment object generated by being taken out from the terrain object as described above. For example, in this embodiment, by causing the fragment object to collide with the terrain object, in-game effects corresponding to the material of the fragment object can be generated for the fragment object and the terrain object. Hereinafter, as an example of the process of preventing the player character 201 from entering inside the determination mesh, an example that occurs due to such in-game effects will be described as the first example.
[0172] (First example) As shown in the upper figure of FIG. 25, the player character 201 is placed on the terrain object 251 while holding up the fragment object 252 obtained by the above-described action. Here, the material for the polygon of the determination mesh of the terrain object 251 is set to "rock", and the material for the polygon of the determination mesh of the fragment object 252 is set to "sand".
[0173] For example, by the action of the player character 201 having the fragment object 252 generated by the above-described extraction action or the above-described punch action, the player character 201 is in a state of holding the fragment object 252. Then, the user can cause the player character 201 to perform an action of throwing the held fragment object 252 by a predetermined operation input. As a result, the fragment object 252 moves within the game space based on the direction in which the player character 201 performs the throwing action.
[0174] As described above, a unique voxel space independent of the voxel space of voxels corresponding to the terrain object 251 or the like is defined for the fragment object 252. The above-mentioned unique voxel space can move / rotate within the game space for each defined fragment object 252, and the position and direction (posture) etc. of the unique voxel space within the game space are controlled. And, as the property information included in the above-mentioned material data, it is assumed that for materials such as soil and sand, a property of solidifying on the object that has come into contact and collided is set. In this case, by increasing the density of the voxels of the voxel data corresponding to the update range (referred to as the first update range) set based on the above-mentioned collision position, and setting the material of the voxel to a predetermined material, a game effect occurs in which voxel objects of the predetermined material are piled up in a predetermined range based on the collision position.
[0175] As shown in the lower figure of FIG. 25, when the fragment object 252 released by the throwing action of the player character 201 is determined to have contacted the terrain object 251 as a result of the collision determination, the game system 1 causes a game effect in which voxel objects of the material of sand are piled up in a predetermined range based on the collision position based on the collision determination. Here, the voxel object composed of the material of sand has properties of relatively low viscosity, being easy to sink, and being easy to flow down. Therefore, as shown in the upper and lower figures of FIG. 25, when the player character 201 performs an action of throwing the fragment object 252 toward the wall surface of the terrain object 251, a state occurs in which the fragment object 252 that has contacted the wall surface of the terrain object 251 flows down toward the player character 201 side, and is piled up on the terrain object 251 in the state of flowing down.
[0176] As shown in FIG. 26, when the voxel object of the sand material flowing to the player character 201 side is piled up on the terrain object 251, a phenomenon may occur in which the feet of the player character 201 are buried inside the determination mesh in the piled voxel object. When the lower part of the player character 201 thus enters the inside of the determination mesh of the voxel object, based on virtual physical calculations such as gravity set in the game space, the player character 201 may also fall so as to pass through the voxel object.
[0177] In the present embodiment, when it is determined that the player character 201 is in a state indicating that it can be inside the determination mesh of the voxel object, the player character 201 is suppressed from entering the inside of the determination mesh. For example, in the first example, when it is determined that the first update range by the fragment object 252 set by the throwing action of the player character 201 is located within a predetermined range around the player character 201, a process is performed to suppress the player character 201 from entering the inside of the determination mesh.
[0178] Figures 27 and 28 are a series of explanatory diagrams showing an example of a first example of processing for suppressing the player character 201 from entering inside the determination mesh. As shown in the upper diagram of Figure 27, the game system 1 determines whether the player character 201 is in a state where it can be inside the determination mesh. For example, when the game system 1 determines that the first update range set by the fragment object 252 colliding with the terrain object 251 is located within a predetermined range around the player character 201, the game system 1 determines that the player character 201 can be in a state where it is inside the determination mesh generated based on the first update range. Here, the "state indicating that the player character can be inside the determination mesh" includes a state indicating that the player character may be inside the determination mesh and a state indicating that the player character may already be inside the determination mesh, including a state indicating that the player character will be inside the determination mesh in the future and a state indicating that the player character is currently inside the determination mesh, regardless of whether the player character is actually inside the determination mesh.
[0179] Figure 29 is a diagram for explaining an example of processing using determination points set around the player character 201. As shown in the upper diagram of Figure 27 and Figure 29, the game system 1 sets a plurality of determination points around the player character 201. For example, the above determination points are set at the vertices of a polyhedron surrounding the player character 201 and points inside the polyhedron. As an example, the determination points shown in Figure 29 are set at each vertex of an octahedron surrounding the player character 201 and points inside the octahedron including the center of the octahedron. Note that the solid surrounding the player character 201 may be any solid, and may be the bounding box set for the player character 201. Also, in addition to the above polyhedron, the solid surrounding the player character 201 may be a sphere, ellipsoid, cylinder, cone, etc., or a solid combined with these, and determination points may be set on the surface of the solid.
[0180] When there is at least one determination point within the first update range among a plurality of determination points set around the player character 201, the game system 1 determines that the player character 201 can be inside the determination mesh generated based on the first update range. For example, the game system 1 determines whether each determination point is included in the first update range based on the SDF value described above. As an example, in the example shown in FIG. 29, it shows that the determination point indicated by the white circle is determined to be located within the first update range, and the determination point indicated by the black circle is determined to be located outside the first update range. Thus, when there is a determination point located within the first update range, it is determined that the player character 201 to which the determination point is set can be inside the determination mesh. Note that the threshold value of the number of determination points determined to be located within the update range for being determined as the above state may be a number of 2 or more.
[0181] As shown in the lower figure of FIG. 27, when the game system 1 determines that the player character 201 can be inside the determination mesh generated based on the first update range, the game system 1 generates a second update range including the position of the player character 201 and decreases the density of the voxels corresponding to the second update range. For example, the second update range is set as a spherical shape centered on the center point (for example, the centroid) of the player character 201 and including all parts of the player character 201 inside. Note that the second update range may be any three-dimensional shape including the position of the player character, and in addition to a sphere, it may be an ellipsoid, a cylinder, a cone, a polyhedron, or a three-dimensional shape combining these.
[0182] Before updating the determination mesh based on the increase in the density of voxels in the first update range, the game system 1 decreases the density of voxels corresponding to the second update range. For example, in a series of processes in the same frame in which the first update range and the second update range are set, such as the series of processes in steps S4 to S6 and step S12 described later, after performing a process of increasing the density of voxels corresponding to the first update range, a process of decreasing the density of voxels corresponding to the second update range is performed, and the determination mesh corresponding to the voxels after the change in the density is updated. As an example, the game system 1 increases the density of voxels within the first update range so that a voxel object is newly loaded within the first update range based on the SDF set corresponding to the first update range, and then, based on the SDF set corresponding to the second update range, decreases the density of voxels within the second update range so that the voxel object within the second update range is deformed as if it is erased, and updates the determination mesh.
[0183] As shown in FIG. 28, by performing a process of decreasing the density of voxels within the second update range, the updated determination mesh is formed on a part of the boundary surface of the second update range, so that it is possible to prevent the player character 201 arranged within the second update range from entering the inside of the determination mesh.
[0184] FIG. 30 is a diagram showing an example of a state where, when the determination mesh is updated by the above-described process in a situation where the feet of the player character 201 are filled inside the determination mesh in the filled voxel object. As shown in FIGS. 28 and 30, even when the voxel object of the material of the sand flowing to the player character 201 side (the fragment object 252 shown in FIGS. 28 and 30) is filled up to the feet of the player character 201 on the terrain object 251, by performing the process of reducing the density of the voxels within the second update range, the voxel object around the feet of the player character 201 is erased, so that the feet are prevented from being filled with the voxel object. Further, the determination mesh updated by the fragment object 252 being filled on the terrain object 251 is formed at the boundary surface of the second update range, so that the player character 201 arranged within the second update range does not enter inside the determination mesh. Thus, in the first example, even when the first update range by the fragment object 252 set by the throwing action of the player character 201 is set within a predetermined range around the player character 201, it is possible to suppress the player character 201 from entering inside the determination mesh.
[0185] In the above-described first example, an example is used in which the player character 201 throws the fragment object 252 and it is placed on the terrain object 251 at the feet of the player character 201. However, the example in which the first update range is set within a predetermined range around the player character 201 is not limited to this. For example, even when it is placed on the terrain object 251 formed in the front, rear, left, right, or upward direction of the player character 201, it is possible to suppress the player character 201 from entering the inside of the determination mesh formed on the placed voxel object by the same processing. Further, for example, when the player character 201 is on the fragment object placed on the terrain object 251 and the fragment object is composed of a relatively soft material and is placed on the terrain object 251, there is a possibility that the player character 201 enters the inside of the determination mesh updated by the placement of the fragment object. However, even in such a situation, it is possible to suppress the player character 201 from entering the inside of the determination mesh.
[0186] Also, in the above-described first example, among the plurality of determination points set around the player character 201, when there is at least one determination point at a position within the first update range, it is determined that the player character 201 may be inside the determination mesh generated based on the first update range. As an example, based on the value of the SDF, it is determined whether each determination point is included in the first update range or not. However, other determination methods may be used to determine that the state is such. For example, when the density of the voxel corresponding to at least one position among the positions of the plurality of determination points set around the player character 201 increases and is updated corresponding to the first update range, it may be determined that the player character 201 may be inside the determination mesh generated based on the first update range.
[0187] Also, as another example of the player character 201 entering inside the determination mesh, it may be caused by the generation of a V-shaped determination mesh, which forms a space that becomes narrower towards the back (acute collision). Here, as shown in the upper diagram of FIG. 31, the V-shaped space is a space where the distance between the ceiling and the floor and / or the distance between the left and right walls becomes narrower as the player character 201 moves deeper. This kind of situation is likely to occur at a location where a voxel object (e.g., terrain object 253) composed of a relatively strong material is adjacent to a voxel object (e.g., terrain object 254) composed of another material (e.g., ice material).
[0188] In such a V-shaped space, when the player character 201 enters in the direction where the space becomes narrower and contacts the determination mesh, it is conceivable that a force will be generated to push the player character 201 in the exit direction of the space. However, in reality, a phenomenon may occur where the player character 201 sinks inside the determination mesh it is in contact with. This is a phenomenon that occurs more prominently as the moving speed towards the back of the space is faster. When the lower part of the player character 201 sinks inside the determination mesh, based on virtual physical calculations such as gravity set in the game space, a phenomenon may also occur where the player character 201 falls so as to pass through the lower voxel object. Hereinafter, as an example of the process for preventing the player character 201 from entering inside the determination mesh, an example caused by the movement of the player character 201 in such a V-shaped space will be described as the second example.
[0189] (Second example) Figures 31 and 32 are a series of explanatory diagrams showing an example of a second example of processing for suppressing the player character 201 from entering inside the determination mesh. As shown in the upper diagram of Figure 31, the player character 201 is moving on the terrain object 253 toward the back of the V-shaped space formed at the boundary between the terrain object 253 and the terrain object 254. For example, the terrain object 253 is a voxel object composed of a strong material. The terrain object 254 is a voxel object composed of an ice material.
[0190] As shown in the lower diagram of Figure 31, as the player character 201 moves in the direction in which the V-shaped space narrows and contacts the determination mesh, a phenomenon occurs where the player character 201 sinks into the inside of the determination mesh of the terrain object 254 with which the player character 201 is in contact. Note that the phenomenon of the player character 201 sinking into the inside of the determination mesh may also occur below the player character 201, that is, in the determination mesh of the terrain object 253. However, in this example, since the terrain object 253 is composed of a strong material, it is assumed that the sinking occurs in the determination mesh on the side of the terrain object 254 composed of a relatively weak material.
[0191] For example, also in the second example, the game system 1 determines whether or not the player character 201 is in a state indicating that it can be inside the determination mesh. For example, when the density of the voxels corresponding to the position of the player character 201 exceeds a predetermined value for a predetermined period, the game system 1 determines that the player character 201 is in a state where it can be inside the determination mesh forming the V-shaped space.
[0192] In the example shown in the lower figure of FIG. 31, the upper body including the center point of the player character 201 is recessed inside the determination mesh of the terrain object 254 (the recessed state is shown by a broken line in the upper figure of FIG. 31). For example, when the density of the voxel corresponding to the center point (e.g., the center of gravity position) of the player character 201 exceeds a predetermined value continuously for a predetermined number of frames, the game system 1 determines that the player character 201 can be in a state inside the determination mesh. As an example, when the density of the voxel corresponding to the above center point of the player character 201 exceeds, for 8 consecutive frames, a value at which the content of the voxel object occupies a predetermined ratio inside the voxel (e.g., the upper limit value of the density range of the voxel that is considered to be a part where there is no content), the game system 1 determines that the player character 201 can be in a state inside the determination mesh.
[0193] In addition, the above-mentioned predetermined period (for example, the number of frames in which the density of the voxel corresponding to the above-mentioned center point continuously exceeds a predetermined value) used to determine that the player character 201 can be inside the determination mesh may be an arbitrary period (for example, an arbitrary number of frames). For example, when the density of the voxel corresponding to the center point of the player character 201 exceeds a predetermined value for more than one frame, it may be determined that the player character 201 can be in a state inside the determination mesh, and the above-mentioned predetermined period may include an instant with no substantial period. Also, the value adopted as the above-mentioned predetermined value, where the content of the voxel object occupies a predetermined ratio inside the voxel, may be set to the density value that is the threshold between a voxel where the content is considered to exist (a voxel having a density in the higher first range of values that can be set for density) and a voxel where the content is considered not to exist (a voxel having a density in the lower second range of values that can be set for density). As an example, the predetermined value may be set to a density of 128. In this case, based on whether the above-mentioned center point has entered inside the position where the vertex of the determination mesh is generated by the determination using the above-mentioned predetermined value, the above-mentioned determination can be made. Also, the position of the player character 201 to be the target of the above-mentioned determination process may be an arbitrary position in the player character 201, or may be a plurality of positions. For example, in addition to the above-mentioned center point, the density of the voxel corresponding to the position at the feet of the player character 201 (for example, the grounding position of the player character 201 in the vertical direction of the center of gravity position), the center of the head of the player character 201, or the position of the top of the head may be used for determination, or the density of the voxel corresponding to at least two of these points may be used for determination.
[0194] As shown in FIG. 32, when the density of the voxels corresponding to the position of the player character 201 exceeds a predetermined value for a predetermined period, the game system 1 generates a second update range including the position of the player character 201 and decreases the density of the voxels corresponding to the second update range. For example, similar to the first example, the second update range is set to a spherical shape centered on the center point (e.g., the centroid) of the player character 201 and including all parts of the player character 201 inside. Note that, similar to the first example, the second update range may be any three-dimensional shape including the position of the player character, and in addition to a sphere, it may be an ellipsoid, a cylinder, a cone, a polyhedron, or a three-dimensional shape combining these.
[0195] For example, the game system 1 decreases the density of the voxels in the second update range so that the voxel objects in the second update range are deformed as if they are erased based on the SDF set corresponding to the second update range, and updates the determination mesh. In this way, by performing the process of decreasing the density of the voxels in the second update range, since the updated determination mesh is formed on at least a part of the boundary surface of the second update range, it is possible to suppress the player character 201 arranged in the second update range from entering inside the determination mesh.
[0196] In the above-described second example, when the upper body of the player character 201 enters the inside of the determination mesh, the second update range is set and the density of the voxels corresponding to the second update range is decreased. Needless to say, the same processing is performed even when other parts such as the lower body, left body, and right body of the player character 201 enter the inside of the determination mesh. Also, in the above-described second example, during a predetermined period until it is determined that the player character 201 can be inside the determination mesh that forms a V-shaped space, the state where the player character 201 is inside the determination mesh continues. However, since this state is finally resolved, it is possible to prevent a phenomenon that occurs because the player character 201 enters the inside of the determination mesh. For example, even if the player character 201 falls so as to pass under the terrain object during the above-described predetermined period, the falling state can be resolved by setting the second update range after the elapse of the predetermined period. If it is desired to suppress the state where the player character 201 is inside the determination mesh during these predetermined periods, the predetermined period may be set shorter. Also, if it is desired to suppress the player character 201 from falling so as to pass under the terrain object, a process may be performed to limit the direction in which the player character 201 sinks into the inside of the determination mesh in the above-described V-shaped space to the upward direction (for example, cancel the force that sinks downward).
[0197] [3. Specific Examples of Processing in the Game System] Next, with reference to FIGS. 33 to 36, specific examples of information processing in the game system 1 will be described.
[0198] FIG. 33 is a diagram showing an example of various data used in information processing in the game system 1. Each data shown in FIG. 33 is stored in a memory accessible by the main body device 2 (for example, flash memory 84, DRAM 85, and / or a memory card mounted on the slot 23, etc.). 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 FIGS. 34 to 36). Note that the game program includes the above-described material data (see FIG. 13). Further, the above memory stores the above-described voxel data (see FIG. 12), first update range data, second update range data, mesh data, object data, etc. (see FIG. 33).
[0199] The first update range data is data indicating the above-described first update range. In the present embodiment, the first update range is represented by the above-described SDF. The second update range data is data indicating the above-described second update range. In the present embodiment, the second update range is represented by the above-described SDF.
[0200] Mesh data includes various data related to the mesh of the voxel object. As shown in FIG. 33, in this 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 this 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). 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). 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).
[0201] Object data includes various data related to objects other than the voxel object (for example, player characters, virtual objects, 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. The object data includes determination point data, center point data, and count data. The determination point data is data indicating the position of the above-described determination points set for the player character and the determination results for each determination point. The center point data is data indicating the position of the above-described center point set for the player character. The count data is data indicating the count value C that is continuously determined when the density of the voxel corresponding to the center point of the player character exceeds a predetermined value.
[0202] FIG. 34 is a flowchart showing an example of the flow of game processing executed by the game system 1. FIG. 35 is a subroutine showing an example of the first shaving process executed in step S5 in FIG. 34. FIG. 36 is a subroutine showing an example of the second shaving process executed in step S8 in FIG. 34. The execution of the game processing is started, for example, in response to a user instruction during the execution of the game program, in response to the start of the game. Note that the processing loop consisting of a series of processes from steps S1 to S16 is executed once per frame in one cycle.
[0203] In the present embodiment, the processor 81 of the main body device 2 executes the processing of each step shown in FIGS. 34 to 36 by executing the game program stored in the game system 1. However, in other embodiments, some of the processing of each step 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 can communicate with another information processing device (for example, a server), some of the processing of each step shown in FIGS. 34 to 36 may be executed in the other information processing device. Also, the processing of each step shown in FIGS. 34 to 36 is merely an example, and if the same result can be obtained, the processing order of each step may be changed, or another process may be executed in addition to (or instead of) the processing of each step.
[0204] Further, the processor 81 executes the processing of each step shown in FIGS. 34 to 36 using a memory (for example, DRAM 85). That is, the processor 81 stores the information (in other words, data) obtained by each processing step in the memory, and when using the information in subsequent processing steps, reads out the information from the memory and uses it.
[0205] In FIG. 34, the processor 81 acquires the operation data indicating the operation input by the user (step S1), and proceeds to the next step. For example, the processor 81 acquires the operation data output from the controller operated by the user 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).
[0206] Next, the processor 81 designates, as a processing target, any one of the objects in the game space that require processing and for which the processing has not been completed (including the voxel objects 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 the contact between the objects in the previous frame (step S2), 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 S12 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 S1. Also, when the designated object is an object 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 posture of the player character with a magnitude determined by the above 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.
[0207] In addition, for the process of reflecting the results of contact between objects in the previous frame, when it is determined in the collision determination (step S11 described later) in the previous frame that the objects are in contact with each other, the process includes applying the influence of contact to the object. For example, when it is determined that the player character has contacted the terrain object by a pulling action, a punching action, etc. in the previous frame, the process is to generate a fragment object. When the state regarding the object is changed in the process of step S2 above, the processor 81 updates the object data stored in the memory regarding the object so as to indicate the content after the change.
[0208] Next, the processor 81 determines whether an update event for updating the voxel object has occurred due to the object specified in step S2 above (step S3). For example, the determination in step S3 above is made based on the result of the collision determination (step S11 described later) in the previous frame. As an example, when it is determined that the player character has contacted the terrain object by a pulling action, a punching action, etc. in the previous frame, it is determined that an update event for deleting a part of the terrain object has occurred. As another example, when the fragment object contacts and is filled in the terrain object by an action of throwing the fragment object, etc., it is determined that an update event for filling the fragment object in a part of the terrain object has occurred. Then, when the update event occurs, the processor 81 proceeds to the process in step S4. On the other hand, when the update event has not occurred, the processor 81 proceeds to the process in step S7.
[0209] In step S4, the processor 81 sets a first update range for updating the voxel object in the game space and proceeds with the process to the next step. For example, the specific content of the first update range (e.g., position, shape, and size) is associated with each type of update event in the game program. The first update range set in step S4 is set to be associated with the content related to the type of update event determined to occur in step S3. In step S4, the processor 81 stores the data indicating the set first update range in the memory as the first update range data.
[0210] Next, the processor 81 performs a first deletion process (step S5) and proceeds with the process to step S6. Hereinafter, with reference to FIG. 35, the first deletion process performed in step S5 will be described.
[0211] In FIG. 35, the processor 81 sets a determination point for the player character 201 (step S41) and proceeds with the process to the next step. For example, the processor 81 sets a plurality of determination points around the player character based on the position and posture of the player character in the game space and updates the determination point data stored in the memory (see the first example in the above [2-7. Process for preventing the player character from entering inside the determination mesh]).
[0212] Next, the processor 81 determines whether or not at least one of the determination points is within the first update range set in step S4 (step S42). Then, when there is a determination point within the first update range, the processor 81 proceeds with the process to step S43. On the other hand, when there is no determination point within the first update range, the processor 81 ends the process by this subroutine.
[0213] In step S43, the processor 81 sets a second update range for updating the voxel object in the game space and ends the processing by this subroutine. For example, the second update range is set to a sphere centered on the center point of the player character and including all parts of the player character inside (see the first example in the above [2-7. Processing for preventing the player character from entering inside the determination mesh]). In step S43, the processor 81 stores data indicating the set second update range in the memory as second update range data.
[0214] Returning to FIG. 34, after the first cutting process in step S5 above, the processor 81 makes changes according to the update event for the voxels corresponding to the first update range set in step S4 above and / or the second update range set in step S43 above (step S6), and proceeds to step S7. For example, when the processor 81 deletes or deforms the voxel object within the first update range as if it were reduced, or deforms it as if a voxel object were added within the first 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 first update range (see the first example in the above [2-2. Update of voxel data] and [2-7. Process for preventing the player character from entering inside the determination mesh]). Also, when the processor 81 changes the material of the voxel object within the first update range, the processor 81 updates at least one of the first material ID, the second material ID, and the material mixing ratio of the voxels corresponding to the first update range so as to update the voxel data stored in the memory. Then, when the second update range is set in step S43 above, after the density and material of the corresponding voxels within the first update range are changed, the processor 81 reduces the density of the voxels corresponding to the second update range so as to deform the voxel object within the second update range as if it were deleted, and updates the voxel data stored in the memory (see the first example in the above [2-2. Update of voxel data] and [2-7. Process for preventing the player character from entering inside the determination mesh]).
[0215] In step S7, the processor 81 determines whether the processing in steps S2 to S6 above has been completed for all objects (including voxel objects defined by the unique voxel space) for which processing is required. Then, when the processing for all objects is completed, the processor 81 proceeds to step S8. On the other hand, when the processing for any object has not been completed, the processor 81 returns to step S2 above and repeats the processing.
[0216] In step S8, the processor 81 performs a second shaving process and proceeds to step S9. Hereinafter, with reference to FIG. 36, the second shaving process performed in step S8 will be described.
[0217] In FIG. 36, the processor 81 sets a center point for the player character 201 (step S51) and proceeds to the next step. For example, the processor 81 sets the center point of the player character based on the position of the player character in the game space and updates the center point data stored in the memory (see the second example in the above [2-7. Process for preventing the player character from entering the inside of the determination mesh]).
[0218] Next, the processor 81 determines whether the density of the voxel corresponding to the center point of the player character set in step S51 exceeds a predetermined value (step S52). The determination of whether the density of the voxel corresponding to the center point exceeds the predetermined value is performed according to the method described in the second example in the above [2-7. Process for preventing the player character from entering the inside of the determination mesh]. Then, when the density of the voxel corresponding to the center point exceeds the predetermined value, the processor 81 proceeds to step S53. On the other hand, when the density of the voxel corresponding to the center point does not exceed the predetermined value, the processor 81 proceeds to step S57.
[0219] In step S53, the processor 81 adds 1 to the count value C, which is a temporary variable, and proceeds to the next step. In step S53, the processor 81 stores the data indicating the added count value C in the memory as count data.
[0220] Next, the processor 81 determines whether the count value C is equal to a threshold value Ct (e.g., 8) (step S54). If the count value C is equal to the threshold value Ct, the processor 81 proceeds to step S55. On the other hand, if the count value C is less than the threshold value Ct, the processor 81 ends the processing by this subroutine.
[0221] In step S55, the processor 81 sets a second update range for updating the voxel object in the game space and proceeds to the next step. For example, the second update range is set as a sphere centered on the center point of the player character and including all parts of the player character inside (see the second example in the above [2-7. Process for preventing the player character from entering inside the determination mesh]). In step S55, the processor 81 stores the data indicating the set second update range in the memory as second update range data.
[0222] Next, the processor 81 makes a change to erase the voxels corresponding to the second update range set in step S55 (step S56) and proceeds to step S57. For example, the processor 81 decreases the density of the voxels corresponding to the second update range so as to deform the voxel object within the second update range as if it were erased, and updates the voxel data stored in the memory (see the second example in the above [2-2. Update of voxel data] and [2-7. Process for preventing the player character from entering inside the determination mesh]).
[0223] In step S57, the processor 81 sets the count value C, which is a temporary variable, to 0 and ends the processing by this subroutine. In step S57, the processor 81 stores the data indicating that the count value C has been set to 0 in the memory as count data.
[0224] Returning to FIG. 34, after the second cutting process in step S8 above, the processor 81 updates the vertices of the voxel object in the game space (step S9) and proceeds to the next step. For example, when the voxel data is updated in the processes of step S6 and step S8 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.
[0225] Next, the processor 81 simplifies the vertices (step S10) and proceeds to the next step. For example, the processor 81 simplifies each vertex updated by the process of step S9 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 processes of step S9 and step S10 above. Note that the processes of step S9 and step S10 do not necessarily recalculate the vertices for the entire voxel data, and may be executed only for the parts where the contents of the voxels are changed in the processes of step S6 and step S8 above.
[0226] Next, the processor 81 updates the display mesh of the voxel object based on the SVO data stored in the memory (step S11), and proceeds to the next step. Note that the positions of the vertices of the display mesh and the materials of the polygons of the display mesh (for example, the materials set for the vertices of the polygon) are calculated according to the methods described in the above [2-6. Generation of Mesh] and [2-6-1. Determination of Materials for Display Mesh]. In step S11 above, the processor 81 updates the display mesh data stored in the memory so as to indicate the positions and materials of the vertices of the updated display mesh. Note that the processor 81 may start the processing after step S12 described later without waiting for the completion of step S11 and execute them in parallel. In that case, step S11 above needs to be completed before the start of step S15 described later.
[0227] Next, the processor 81 updates the determination 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 positions of the vertices of the determination mesh and the materials of the polygons of the determination mesh (for example, the materials set for the vertices of the polygon) are calculated according to the methods described in the above [2-6. Generation of Mesh] and [2-6-2. Determination of Materials for Determination Mesh]. In step S12 above, the processor 81 updates the determination mesh data stored in the memory so as to indicate the positions and materials of the vertices of the updated determination mesh.
[0228] In the example shown in FIG. 34, the generation process of the determination mesh in step S12 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 S13 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 S13 is performed. For example, in a situation where there are no objects subject to collision determination 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.
[0229] 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 S13), 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 S13 is performed in consideration of the speed calculated in step S2 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.
[0230] In this embodiment, the presence or absence of the following contacts, for example, is determined by the collision determination in step S13. · Contact between a player character performing an action such as movement or a punch action and a terrain object · Contact between the player character that performs the action of lifting the fragment object and the fragment object · Contact between the fragment object released by the action of throwing by the fragment player character and the terrain object · Contact between the terrain object and other moving objects In addition, when it is determined in the collision determination in step S13 that the objects are in contact with each other, in the process of step S2 in the next frame, a process that reflects the result of the contact between the objects is executed, or in the process of step S3 in the next frame, it is determined that an update event has occurred.
[0231] Next, the processor 81 controls the operations of the respective objects in the game space (step S14), and proceeds to the next step. For example, for the player character, based on the operation data acquired in step S1 above, the processor 81 performs control to cause the character to move and perform various actions. And when a predetermined action occurs, the processor 81 generates an area for collision determination corresponding to the action in the game space. Note that in one execution of the process of step S14, for an operation performed over a plurality of frames (for example, an action by the player character), each object is controlled so as to perform the progress of the operation for one frame. As a result, by repeatedly executing the process of step S14 over a plurality of 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 S2 above. However, when it is determined by the collision determination in step S13 that the object is in contact with another object and the movement is obstructed by the contacted other object, the position of the object may be determined not to change. Then, in step S14, the processor 81 updates the object data stored in the memory to be the content indicating the object after the control in step S14.
[0232] Next, the processor 81 generates a game image (step S15) 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]. The game image generated in step S15 above is output to the display device and displayed at a cycle of once per frame.
[0233] Next, the processor 81 determines whether to end the game (step S16). For example, the processor 81 makes an affirmative determination in step S16 when a predetermined operation input for ending the game is performed by the user or when the condition for ending the game is satisfied. Then, when the processor 81 ends the game, it ends the processing according to the 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 S1 to S16 above are repeatedly executed until it is determined in step S16 that the game is ended.
[0234] In this way, in the present embodiment, when it is a state indicating that the player character can be inside the determination mesh, in order to reduce the density of the voxels corresponding to the second update range including the position of the player character, it is possible to suppress the situation where the player character enters the inside of the determination mesh generated based on the voxel data.
[0235] In the above description, an example was used in which a voxel object is defined by generating a three-dimensional mesh based on voxel data set in voxels in a three-dimensional space. However, a voxel object may be defined based on voxel data set in two-dimensional voxels.
[0236] 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.
[0237] In the above description, an example in which information processing is performed by the game system 1 was used. However, at least a part of the above processing steps may be performed by another device. For example, when the game system 1 is configured to be communicable with another device (for example, another server, another information processing device, another game device, another mobile terminal, etc.), the above processing steps may be executed by the cooperation of the other device. Thus, by performing at least a part of the above processing steps by another device, processing similar to the above-described processing becomes possible. Also, 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, it is possible to perform information processing by the processor 81 of the game system 1 executing a predetermined program. However, part or all of the above processing may be performed by a dedicated circuit provided in the game system 1.
[0238] 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, or 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). Note that in these system forms, there is no particular limitation on which device performs the above-described processing, and it goes without saying that the present invention can be realized regardless of any processing sharing.
[0239] In addition, 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.
[0240] 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 device. Note that as the information storage medium for storing the above program, in addition to a 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 computer-readable recording medium. For example, by causing a computer or the like to read and execute the program of these recording media, various functions described above can be provided.
[0241] The present invention has been described in detail above. However, the above description is merely an exemplification of the present invention in every aspect 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. Also, those skilled in the art will understand that they can implement an equivalent scope based on the description of the present invention and common general technical knowledge from the description of specific embodiments of the present invention. Further, it should be understood that the terms used in this specification are used in the meaning commonly used in the relevant field 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 contradiction, this specification (including definitions) shall prevail.
Industrial Applicability
[0242] As described above, the present invention can be used as a game program, a game system, a game processing method, a game device, etc. that can suppress a situation where a player character enters inside a collision mesh generated based on voxel data.
Explanation of Signs
[0243] 1... Game 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. Cause a computer to update, based on game processing, voxel data defined in a virtual space, the voxel data having at least a density indicating the degree to which the space defined by each of a plurality of voxels is virtually occupied by content; update a collision mesh that is a mesh corresponding to the voxel data, the vertex coordinates of which are determined based on at least the density included in the voxel data and which is used for at least collision determination with a player character; In the game processing, control the player character in the virtual space based on an operation input; generate a first voxel update range in the virtual space when a first event occurs, and increase or decrease the density of voxels corresponding to the first voxel update range; determine whether the player character is in a first state indicating that the player character can be inside the collision mesh; generate a second voxel update range including the position of the player character when it is determined that the player character is in the first state, and decrease the density of voxels corresponding to the second voxel update range, a game program.
2. Cause the computer to increase the density of voxels corresponding to the first voxel update range; decrease the density of voxels corresponding to the second voxel update range before the collision mesh is updated based on the increase in the density by the first voxel update range when it is determined that the player character is in the first state, the game program according to claim 1.
3. Cause the computer to determine that the player character is in the first state when it is determined that the first voxel update range is located within a predetermined range around the player character, the game program according to claim 2.
4. Cause the computer to determine that the player character is in the first state when there is a determination point within the first voxel update range among a plurality of determination points around the player character, the game program according to claim 3.
5. Cause the computer to determine that the player character is in the first state when, for a predetermined period, the density of the voxel corresponding to the position of the player character among the voxel data exceeds a predetermined value, the game program according to claim 1.
6. The game program according to any one of claims 1 to 5, wherein the computer is caused to generate and update the vertices of the collision mesh based on a method of setting vertices at coordinates based on the positions and the density of a plurality of surrounding voxels for a portion where a voxel having the density in the higher first range and a voxel having the density in the lower second range are adjacent to each other among the values that can be set for the density.
7. For each of the plurality of voxels in the voxel data, a material indicating the type of the content is further set, The computer further, Based on the voxel data, causes a display mesh drawn based on a virtual camera to be generated or updated by determining vertex coordinates of the display mesh based on at least the density included in the voxel data and determining a material of the display mesh based on at least the material included in the voxel data, The game program according to any one of claims 1 to 5, wherein the computer is caused to draw the virtual space including the display mesh based on a texture corresponding to the vertex coordinates of the display mesh and the material of the display mesh.
8. For each of the plurality of voxels in the voxel data, a material indicating the type of the content is further set, The computer further, Causes the material of the collision mesh to be determined based on at least the material included in the voxel data, The game program according to any one of claims 1 to 5, wherein the collision mesh is used as a display mesh, and the computer is caused to draw the virtual space including the display mesh based on a texture corresponding to the vertex coordinates of the display mesh and the material of the display mesh.
9. A game system including a processor, The processor, Updates voxel data defined in a virtual space, the voxel data including, for each of a plurality of voxels, at least a density indicating the degree to which the space defined by the voxel is virtually occupied by the content, based on game processing, Updates a collision mesh that is a mesh corresponding to the voxel data, the vertex coordinates of which are determined based on at least the density included in the voxel data and which is used for at least collision determination with a player character, In the game processing, Based on the operation input, control the player character in the virtual space, When a first event occurs, generate a first voxel update range in the virtual space, and increase or decrease the density of the voxels corresponding to the first voxel update range, Determine whether the player character is in a first state indicating that it can be inside the collision mesh, When it is determined that the player character is in the first state, generate a second voxel update range including the position of the player character, and decrease the density of the voxels corresponding to the second voxel update range, a game system.
10. The processor, Increase the density of the voxels corresponding to the first voxel update range, When it is determined that the player character is in the first state, before updating the collision mesh based on the increase in the density by the first voxel update range, decrease the density of the voxels corresponding to the second voxel update range, the game system according to claim 9.
11. The processor determines the first state when it is determined that the first voxel update range is located within a predetermined range around the player character, the game system according to claim 10.
12. The processor determines the first state when there is a determination point within the first voxel update range among a plurality of determination points around the player character, the game system according to claim 11.
13. The processor determines the first state when, for a predetermined period, the density of the voxels corresponding to the position of the player character among the voxel data exceeds a predetermined value, the game system according to claim 9.
14. The processor generates and updates the vertices of the collision mesh based on 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 in a higher first range and a voxel having a density in a lower second range are adjacent among the values that can be set for the density, the game system according to any one of claims 9 to 13.
15. For each of the plurality of voxels in the voxel data, a material indicating the type of the content is further set, The processor further, Generate or update a display mesh corresponding to the voxel data and drawn based on a virtual camera by determining vertex coordinates of the display mesh based on at least the density included in the voxel data and determining a material of the display mesh based on at least the material included in the voxel data. The game system according to any one of claims 9 to 13, wherein drawing of the virtual space including the display mesh is performed based on a texture corresponding to vertex coordinates of the display mesh and a material of the display mesh.
16. For each of the plurality of voxels in the voxel data, a material indicating the type of the content is further set. The processor further: Determine a material of the collision mesh based on at least the material included in the voxel data. The game system according to any one of claims 9 to 13, wherein the collision mesh is used as a display mesh, and drawing of the virtual space including the display mesh is performed based on a texture corresponding to vertex coordinates of the display mesh and a material of the display mesh.
17. In an information processing system, Update voxel data defined in a virtual space, the voxel data having at least a density set for each of a plurality of voxels, the density indicating a degree to which a space defined by the voxel is virtually occupied by content, based on game processing. Update a collision mesh that is a mesh corresponding to the voxel data, wherein vertex coordinates are determined based on at least the density included in the voxel data, and the collision mesh is used at least for collision determination with a player character. In the game processing, Control the player character in the virtual space based on an operation input. When a first event occurs, generate a first voxel update range in the virtual space and increase or decrease the density of voxels corresponding to the first voxel update range. Determine whether the player character is in a first state indicating that the player character can be inside the collision mesh. When it is determined that the player character is in the first state, generate a second voxel update range including the position of the player character and decrease the density of voxels corresponding to the second voxel update range. A game processing method.
18. In the information processing system, when the density of the voxels corresponding to the first voxel update range is increased, when it is determined that the state is the first state, before the collision mesh is updated based on the increase in the density by the first voxel update range, the density of the voxels corresponding to the second voxel update range is decreased. The game processing method according to claim 17.
19. In the information processing system, when it is determined that the first voxel update range is located within a predetermined range around the player character, the state is determined to be the first state. The game processing method according to claim 18.
20. In the information processing system, when there is a determination point located within the first voxel update range among a plurality of determination points around the player character, the state is determined to be the first state. The game processing method according to claim 19.
21. In the information processing system, when, for a predetermined period, the density of the voxels corresponding to the position of the player character among the voxel data exceeds a predetermined value, the state is determined to be the first state. The game processing method according to claim 17.
22. For a portion where a voxel having the density in the higher first range and a voxel having the density in the lower second range are adjacent among the values that can be set for the density in the information processing system, based on a method of setting vertices at coordinates based on the positions and the density of a plurality of surrounding voxels, the vertices of the collision mesh are generated and updated. The game processing method according to any one of claims 17 to 21.
23. For each of the plurality of voxels in the voxel data, a material indicating the type of the content is further set, In the information processing system, further, a display mesh corresponding to the voxel data and drawn based on a virtual camera is generated or updated by determining the vertex coordinates of the display mesh based on at least the density included in the voxel data and determining the material of the display mesh based on at least the material included in the voxel data, Based on the vertex coordinates of the display mesh and a texture corresponding to the material of the display mesh, the virtual space including the display mesh is drawn. The game processing method according to any one of claims 17 to 21.
24. For each of the plurality of voxels in the voxel data, a material indicating the type of the content is further set, The information processing system further, causes the material of the collision mesh to be determined based at least on the material included in the voxel data, and causes the virtual space including the display mesh to be drawn based on vertex coordinates of the display mesh and a texture corresponding to the material of the display mesh, with the collision mesh as the display mesh. The game processing method according to any one of claims 17 to 21.
25. A game device including a processor, wherein the processor, updates voxel data defined in a virtual space, the voxel data having at least a density set for each of a plurality of voxels, the density indicating the degree to which the space defined by the voxel is virtually occupied by the content, based on game processing, updates a collision mesh that is a mesh corresponding to the voxel data, the vertex coordinates of which are determined based at least on the density included in the voxel data, and which is used at least for collision determination with a player character, in the game processing, controls the player character in the virtual space based on an operation input, generates a first voxel update range in the virtual space when a first event occurs, and increases or decreases the density of the voxels corresponding to the first voxel update range, determines whether the player character is in a first state indicating that the player character can be inside the collision mesh, and when it is determined that the player character is in the first state, generates a second voxel update range including the position of the player character, and decreases the density of the voxels corresponding to the second voxel update range. A game device.
Citation Information
Patent Citations
Image generation system, program, and information storage medium
JP2003044878A
Program, recording medium, game character drawing method and game machine
JP2004062666A
Program and image generation system
JP2017099744A
Systems, methods, and devices for 3D voxel-based modeling
JP2018514885A
Generating surface meshes from voxel models of 3D environments.
JP2024521128A