Game program, game system, game processing method, and game device

The game system efficiently manages voxel material changes using in-game determinations and algorithms, improving gameplay realism by dynamically updating voxel materials.

JP2026068739APending Publication Date: 2026-04-22NINTENDO CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
NINTENDO CO LTD
Filing Date
2025-12-26
Publication Date
2026-04-22

Smart Images

  • Figure 2026068739000001_ABST
    Figure 2026068739000001_ABST
Patent Text Reader

Abstract

This invention provides a game program, a game system, a game processing method, and a game device that can realize a game using material changes of voxels in a predetermined voxel space based on judgments made during the game. [Solution] For each of the multiple voxels contained in the voxel space, the voxel data, which has at least density and material set, is updated based on game processing, the vertex coordinates of the mesh are determined based on the density, the material of the mesh is determined based on at least the material contained in the voxel data, and the mesh is drawn based on material data which includes at least drawing setting information. Then, for at least one of the voxel spaces, the first material is updated to the second material among the materials contained in the voxel data of the voxel space that is determined to be located within the range that satisfies the first condition, where the first determination shape set in the virtual space is located.
Need to check novelty before this filing date? Find Prior Art

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, objects have been managed using voxel data, and a mesh of an object has been generated in a virtual space based on the voxel data (see, for example, Non-Patent Document 1).

Prior Art Documents

Non-Patent Documents

[0003]

Non-Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0004] In a game that uses a mesh generated based on voxel updates, not only mesh control but also material control may be required.

[0005] Therefore, an object of the present invention is to provide a game program, a game system, a game processing method, and a game device that can realize a game using a material change of voxels in a predetermined voxel space based on a determination during the game.

Means for Solving the Problems

[0006] To achieve the above objectives, the present invention may employ configurations such as those described in (1) to (11) below.

[0007] (1) One example of the configuration of the game program of the present invention is to update the computer of the information processing device based on game processing, which has a plurality of voxel data defined for each of a plurality of voxel spaces in a virtual space, wherein for each of the plurality of voxels contained in the voxel space, the density indicating the degree to which the space defined by the voxel is virtually occupied by the contents and the material indicating the type of contents set, a first mesh corresponding to the voxel data, the vertex coordinates of the mesh determined based on the density contained in at least the voxel data, and the material of the first mesh determined based on the material contained in at least the voxel data Based on the algorithm, the first mesh is generated or updated, and for each type of material, the first mesh is rendered based on the rendering settings information of the first mesh's material, based on material data that includes at least rendering setting information that includes at least texture information set for the material, and based on a first determination of whether a first determination shape set in the virtual space for at least one voxel space is located within a range that satisfies a first condition based on game processing, the first material is updated to the second material among the materials included in the voxel data of the voxel space that is determined to satisfy the first condition.

[0008] According to the configuration described in (1) above, when the first determination shape set for the voxel space satisfies the first condition, the material included in the voxel data of the voxel space is changed. This makes it possible to realize a game that uses material changes of voxels in a predetermined voxel space based on in-game determinations.

[0009] (2) In the configuration described in (1) above, the first condition may also be that the object is not in the shadow of the first light source.

[0010] According to the configuration in (2) above, the material included in the voxel data in voxel space can be changed because the first determination shape is not in the shadow of the first light source.

[0011] (3) In the configuration of (1) or (2) above, the computer may be instructed to make the first determination based on a shadow buffer based on the first light source.

[0012] According to the configuration described in (3) above, the processing load required for the first determination can be reduced by using a shadow buffer.

[0013] (4) In any one of the configurations (1) to (3) above, the computer may be made to perform the first determination based on the contact between a plurality of rays based on the first light source and the first determination shape.

[0014] According to the configuration described in (4) above, the first determination can be made more accurately by using lay check.

[0015] (5) In any one of the configurations described in (2) to (4) above, the first light source may be ambient light.

[0016] According to the configuration described in (5) above, the material included in the voxel data in voxel space can be changed depending on whether the object is located in an area illuminated by ambient light or in shadow.

[0017] (6) In the configuration of (1) above, the first condition may also be in contact with or included in the second determination shape defined in the virtual space.

[0018] According to the configuration described in (6) above, if the first determination shape is in contact with or contains the second determination shape defined in the virtual space, the material contained in the voxel data in the voxel space can be changed.

[0019] (7) In the configuration of the above (6), the second determination shape may be set at a position corresponding to the position of the second light source arranged based on the game process.

[0020] According to the configuration of the above (7), the material included in the voxel data of the voxel space can be changed based on the second determination shape set at the position corresponding to the position of the second light source.

[0021] (8) In the configuration of the above (6) or (7), the second determination shape may be at least one spherical shape centered on the position of the second light source.

[0022] According to the configuration of the above (8), the material included in the voxel data of the voxel space can be changed based on the spherical shape centered on the position of the second light source.

[0023] (9) In any one of the configurations of the above (1) to (8), in the voxel space where the first determination shape is set in the computer, among the materials included in the voxel data of the voxel space determined not to satisfy the first condition, the second material may be updated to the first material.

[0024] According to the configuration of the above (9), when the first determination shape set for the voxel space changes from a state where it satisfies the first condition to a state where it does not satisfy the first condition, a change can be made to restore the material included in the voxel data of the voxel space to its original state.

[0025] (10) In any one of the configurations of the above (1) to (9), the computer may be made to perform the first determination based on whether a predetermined number or more of the feature points among the plurality of feature points set in the first determination shape satisfy the first condition.

[0026] According to the configuration described in (10) above, the first determination can be easily made by using multiple feature points.

[0027] (11) In the configuration of (10) above, the first determination shape may be a rectangular parallelepiped. In this case, the feature points may include at least eight points, which are the corners of the rectangular parallelepiped.

[0028] According to the configuration described in (11) above, the first determination can be efficiently made by using the eight feature points of the corners.

[0029] Furthermore, the present invention may be implemented in the form of a game system, a game processing method, and a game device. [Effects of the Invention]

[0030] According to the present invention, it is possible to realize a game that uses material changes of voxels in a predetermined voxel space based on decisions made during the game. [Brief explanation of the drawing]

[0031] [Figure 1] This diagram shows an example of the main unit with the left and right controllers attached. [Figure 2] This diagram shows an example of the left and right controllers being removed from the main unit. [Figure 3] A six-view drawing showing an example of the main unit. [Figure 4] A six-view drawing showing an example of a left controller. [Figure 5] A six-view drawing showing an example of a right controller. [Figure 6] Block diagram showing an example of the internal configuration of the main unit. [Figure 7] Block diagram showing an example of the internal configuration of the main unit, left controller, and right controller. [Figure 8] This diagram shows an example of a terrain object that is a voxel object. [Figure 9]Figure 8 shows an example of what the terrain object looks like before and after a portion of it is deleted. [Figure 10] Figure 8 shows an example of what the terrain object looks like before and after a portion of it is deleted. [Figure 11] A diagram showing an example of voxel data. [Figure 12] A diagram showing an example of material data. [Figure 13] A diagram showing an example of the game space when an update event occurs. [Figure 14] A diagram showing an example of the update scope. [Figure 15] A diagram showing an example of how to set vertices. [Figure 16] A diagram illustrating an example of how to determine the material of a vertex. [Figure 17] A diagram showing an example of vertex simplification. [Figure 18] A diagram showing an example of material-related conditions. [Figure 19] This diagram shows an example of a mesh generated based on vertices. [Figure 20] This diagram shows an example where the quadrilaterals that make up the mesh are divided into two triangles. [Figure 21] This diagram shows an example of a method for determining the material of the polygons that make up the display mesh. [Figure 22] This diagram shows an example of a material applied to each vertex of two adjacent polygons. [Figure 23] This diagram shows an example of applying a texture to a polygon. [Figure 24] This diagram shows an example of a method for determining the material of the polygons that make up the mesh used for judgment. [Figure 25] This diagram shows an example of a game image depicting a player character 201 attacking an enemy object 251a located within the shadow area of ​​the game space. [Figure 26] This diagram shows an example of a game image illustrating the appearance of an enemy object 251 after it has been modified by being located in the light-emitting area 281 within the game space. [Figure 27]This diagram shows an example of a game image depicting a player character 201 attacking an enemy object 251b located in the light-emitting area 281 within the game space. [Figure 28] A diagram showing an example of a determination shape. [Figure 29] This diagram illustrates an example of determining whether or not a feature point (FP) is located within the area illuminated by light using ray checking. [Figure 30] This diagram shows an example of a game image illustrating the interaction between a player character 201 grasping a light object 202 and an enemy object 251a in the game space. [Figure 31] This diagram shows an example of a game image illustrating the appearance of an enemy object 251 after it has been modified by being positioned within the range 282 of light emitted from light object 202. [Figure 32] This diagram shows an example of a game image depicting player character 201 standing on a voxel block located within the shadow area of ​​an obstacle in the game space. [Figure 33] This diagram shows an example of a game image illustrating how the position of obstacle shadows changes in the game space. [Figure 34] This diagram shows an example of the positional relationship between a light source, an obstacle, and the surface onto which the obstacle casts its shadow. [Figure 35] This diagram illustrates an example of the range of light and shadow detection performed using a shadow buffer and the range of light and shadow detection performed using ray checking in a game space. [Figure 36] This diagram shows an example of various types of data used in information processing within a game system. [Figure 37] A flowchart illustrating an example of the game processing flow executed by the game system. [Figure 38] Figure 37 shows an example of a subroutine for the material change process in step S7. [Modes for carrying out the invention]

[0032] [1. Game System Configuration] The following describes a game system according to an example of this embodiment. An example of the game system 1 in this embodiment includes a main unit (information processing device; functioning as the game device main unit in this embodiment) 2, a left controller 3, and a right controller 4. The left controller 3 and the right controller 4 are detachable from the main unit 2. In other words, the game system 1 can be used as an integrated device by attaching the left controller 3 and the right controller 4 to the main unit 2. Alternatively, the game system 1 can be used with the main unit 2 and the left controller 3 and right controller 4 as separate components (see Figure 2). The hardware configuration of the game system 1 in this embodiment will be described below, followed by a description of the control of the game system 1 in this embodiment.

[0033] Figure 1 shows an example of the main unit 2 with the left controller 3 and right controller 4 attached. As shown in Figure 1, the left controller 3 and right controller 4 are attached to the main unit 2 and integrated together. The main unit 2 is a device that performs various processes (e.g., game processing) in the game system 1. The main unit 2 is equipped with a display 12. The left controller 3 and right controller 4 are devices equipped with operation parts for user input.

[0034] Figure 2 shows an example of the left controller 3 and right controller 4 being removed from the main unit 2. As shown in Figures 1 and 2, the left controller 3 and right controller 4 are detachable from the main unit 2. In the following, the left controller 3 and right controller 4 will be collectively referred to as "controllers".

[0035] Figure 3 is a six-view drawing showing an example of the main unit 2. As shown in Figure 3, the main unit 2 includes a roughly plate-shaped housing 11. In this embodiment, the main surface of the housing 11 (in other words, the front surface, i.e., the surface on which the display 12 is provided) is roughly rectangular in shape.

[0036] The shape and size of the housing 11 are arbitrary. For example, the housing 11 may be portable. The main unit 2 alone, or the integrated unit in which the left controller 3 and right controller 4 are attached to the main unit 2, may be a portable device. The main unit 2 or the integrated unit may be a handheld device. The main unit 2 or the integrated unit may also be a portable device.

[0037] As shown in Figure 3, the main unit 2 includes a display 12 provided on the main surface of the housing 11. The display 12 displays images generated by the main unit 2. In this embodiment, the display 12 is a liquid crystal display (LCD). However, the display 12 may be any type of display device.

[0038] Furthermore, the main unit 2 is equipped with a touch panel 13 on the screen of the display 12. In this embodiment, the touch panel 13 is of a type that allows multi-touch input (for example, a capacitive touch panel). However, the touch panel 13 may be of any type, for example, a type that allows single-touch input (for example, a resistive touch panel).

[0039] The main unit 2 is equipped with a speaker (i.e., speaker 88 shown in Figure 6) inside the housing 11. As shown in Figure 3, speaker holes 11a and 11b are formed on the main surface of the housing 11. The sound output from speaker 88 is emitted from these speaker holes 11a and 11b, respectively.

[0040] Furthermore, the main unit 2 is equipped with a left terminal 17, which is a terminal for the main unit 2 to communicate with the left controller 3 via wired connection, and a right terminal 21, which is for the main unit 2 to communicate with the right controller 4 via wired connection.

[0041] As shown in Figure 3, the main unit 2 is equipped with a slot 23. The slot 23 is located on the upper side of the housing 11. The slot 23 has a shape that allows a predetermined type of storage medium to be inserted. The predetermined type of storage medium is, for example, a storage medium (e.g., a dedicated memory card) specifically for the game system 1 and similar information processing devices. The predetermined type of storage medium is used, for example, to store data used by the main unit 2 (e.g., application save data, etc.) and / or programs executed by the main unit 2 (e.g., application programs, etc.). The main unit 2 is also equipped with a power button 28.

[0042] The main unit 2 is equipped with a lower terminal 27. The lower terminal 27 is a terminal for the main unit 2 to communicate with the cradle. In this embodiment, the lower terminal 27 is a USB connector (more specifically, a female connector). When the integrated device or the main unit 2 alone is placed on the cradle, the game system 1 can display the images generated and output by the main unit 2 on a stationary monitor. In this embodiment, the cradle also has the function of charging the integrated device or the main unit 2 alone that is placed on it. The cradle also has the function of a hub device (specifically, a USB hub).

[0043] Figure 4 is a six-view drawing showing an example of the left controller 3. As shown in Figure 4, the left controller 3 includes a housing 31. In this embodiment, the housing 31 has a vertically elongated shape, that is, it is long in the vertical direction (i.e., in the y-axis direction as shown in Figures 1 and 4). The left controller 3 can also be held in a vertically elongated orientation when detached from the main device 2. The housing 31 is shaped and sized to be held with one hand, especially the left hand, when held in a vertically elongated orientation. The left controller 3 can also be held in a horizontally elongated orientation. When the left controller 3 is held in a horizontally elongated orientation, it may be held with both hands.

[0044] The left controller 3 is equipped with an analog stick 32. As shown in Figure 4, the analog stick 32 is provided on the main surface of the housing 31. The analog stick 32 can be used as a directional input unit that can input direction. The user can input direction (and magnitude according to the angle of tilt) by tilting the analog stick 32. In addition, the left controller 3 may be equipped with a directional pad or a slide stick that allows slide input instead of the analog stick as the directional input unit. Furthermore, in this embodiment, input by pressing the analog stick 32 is also possible.

[0045] The left controller 3 is equipped with various operation buttons. The left controller 3 has four operation buttons 33-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. In addition, the left controller 3 is equipped with a record button 37 and a minus button 47. The left controller 3 has a first L button 38 and a ZL button 39 on the upper left side of the side of the housing 31. Furthermore, the left controller 3 has a second L button 43 and a second R button 44 on the side of the housing 31 that is attached when mounted to the main unit 2. These operation buttons are used to give instructions according to various programs (e.g., OS programs and application programs) executed on the main unit 2.

[0046] Furthermore, the left controller 3 is equipped with a terminal 42 for wired communication between the left controller 3 and the main unit 2.

[0047] Figure 5 is a six-view drawing showing an example of the right controller 4. As shown in Figure 5, the right controller 4 includes a housing 51. In this embodiment, the housing 51 has a vertically elongated shape, that is, a shape that is long in the vertical direction. When the right controller 4 is detached from the main unit 2, it can also be held in a vertically elongated orientation. The housing 51 is shaped and sized to be held with one hand, especially the right hand, when held in a vertically elongated orientation. The right controller 4 can also be held in a horizontally elongated orientation. When the right controller 4 is held in a horizontally elongated orientation, it may be held with both hands.

[0048] The right controller 4, like the left controller 3, is equipped with an analog stick 52 as a directional input unit. In this embodiment, the analog stick 52 has the same configuration as the analog stick 32 of the left controller 3. Alternatively, the right controller 4 may be equipped with a directional pad or a slide stick capable of slide input instead of the analog stick. The right controller 4, like the left controller 3, is equipped with four operation buttons 53-56 (specifically, A button 53, B button 54, X button 55, and Y button 56) on the main surface of the housing 51. Furthermore, the right controller 4 is equipped with a + (plus) button 57 and a home button 58. The right controller 4 is also equipped with a first R button 60 and a ZR button 61 on the upper right side of the housing 51. The right controller 4, like the left controller 3, is also equipped with a second L button 65 and a second R button 66.

[0049] Furthermore, the right controller 4 is equipped with a terminal 64 for wired communication between the right controller 4 and the main unit 2.

[0050] Figure 6 is a block diagram showing an example of the internal configuration of the main unit 2. In addition to the configuration shown in Figure 3, the main unit 2 includes the components 81-91, 97, and 98 shown in Figure 6. Some of these components 81-91, 97, and 98 may be mounted on an electronic circuit board as electronic components and housed within the housing 11.

[0051] The main unit 2 includes a processor 81. The processor 81 is an information processing unit that performs various information processing operations performed in the main unit 2, and may consist of, for example, only a CPU (Central Processing Unit), or it may consist of an SoC (System-on-a-chip) that includes multiple functions such as CPU function and GPU (Graphics Processing Unit) function. The processor 81 performs various information processing operations by executing information processing programs (for example, game programs) stored in a storage unit (specifically, an internal storage medium such as flash memory 84, or an external storage medium installed in slot 23).

[0052] The main unit 2 includes, as an example of an internal storage medium built into itself, a flash memory 84 and a DRAM (Dynamic Random Access Memory) 85. The flash memory 84 and DRAM 85 are connected to the processor 81. The flash memory 84 is a memory mainly used to store various types of data (which may be programs) stored in the main unit 2. The DRAM 85 is a memory used to temporarily store various types of data used in information processing.

[0053] The main unit 2 is equipped with 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 slot 23 and reads and writes data to a predetermined type of storage medium (for example, a dedicated memory card) installed in slot 23, according to instructions from the processor 81.

[0054] The processor 81 performs the above-mentioned information processing by appropriately reading and writing data to the flash memory 84 and DRAM 85, as well as to each of the above-mentioned storage media.

[0055] The main unit 2 includes a network communication unit 82. The network communication unit 82 is connected to the processor 81. The network communication unit 82 communicates with external devices via a network (specifically, wirelessly). In this embodiment, the network communication unit 82 communicates with external devices by connecting to a wireless LAN using a method compliant with the Wi-Fi® standard as a first communication mode. The network communication unit 82 also communicates wirelessly with other main unit 2 of the same type using a predetermined communication method (for example, communication using a proprietary protocol or infrared communication) as a second communication mode. The wireless communication using the second communication mode is possible with other main unit 2 located within a closed local network area, and realizes a function that enables so-called "local communication" in which data is transmitted and received by communicating directly between multiple main unit 2.

[0056] The main unit 2 includes a controller communication unit 83. The controller communication unit 83 is connected to the processor 81. The controller communication unit 83 communicates wirelessly with the left controller 3 and / or the right controller 4. The communication method between the main unit 2 and the left controller 3 and the right controller 4 is arbitrary, but in this embodiment, the controller communication unit 83 communicates with the left controller 3 and with the right controller 4 in accordance with the Bluetooth® standard.

[0057] The processor 81 is connected to the left terminal 17, right terminal 21, and lower terminal 27 described above. When the processor 81 communicates with the left controller 3 via a wired connection, 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. When the processor 81 communicates with the right controller 4 via a wired connection, 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. When the processor 81 communicates with the cradle, it transmits data to the cradle via the lower terminal 27. Thus, in this embodiment, the main unit 2 can perform both wired and wireless communication with the left controller 3 and the right controller 4, respectively. Furthermore, when the left controller 3 and the right controller 4 are mounted on the main unit 2 as an integrated unit, or when the main unit 2 alone is mounted on the cradle, the main unit 2 can output data (e.g., image data and audio data) to a stationary monitor or the like via the cradle.

[0058] Here, the main unit 2 can communicate simultaneously (in other words, in parallel) with multiple left controllers 3. Furthermore, the main unit 2 can communicate simultaneously (in other words, in parallel) with multiple right controllers 4. Therefore, multiple users can simultaneously input to the main unit 2 using their respective sets of left controllers 3 and right controllers 4. For example, while the first user inputs to the main unit 2 using the first set of left controllers 3 and right controllers 4, the second user can input to the main unit 2 using the second set of left controllers 3 and right controllers 4.

[0059] The display 12 is also connected to the processor 81. The processor 81 displays images generated (for example, by performing the above information processing) and / or images acquired from an external source on the display 12.

[0060] The main unit 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 terminals 25, as well as to the processor 81. The codec circuit 87 is a circuit that controls the input and output of audio data to the speakers 88 and the audio input / output terminals 25.

[0061] The main unit 2 comprises 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 in the figures, the power control unit 97 is also connected to various parts of the main unit 2 (specifically, the parts that receive power from the battery 98, the left terminal 17, and the right terminal 21). Based on commands from the processor 81, the power control unit 97 controls the power supply from the battery 98 to the aforementioned parts.

[0062] The battery 98 is also 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 unit 2 via the lower terminal 27, the supplied power charges the battery 98.

[0063] Figure 7 is a block diagram showing an example of the internal configuration of the main unit 2, the left controller 3, and the right controller 4. Note that the details of the internal configuration of the main unit 2 are shown in Figure 6 and are therefore omitted in Figure 7.

[0064] The left controller 3 includes a communication control unit 101 that communicates with the main unit 2. As shown in Figure 7, the communication control unit 101 is connected to each component, including the terminal 42. In this embodiment, the communication control unit 101 can communicate with the main unit 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 method of communication that the left controller 3 performs with the main unit 2. That is, when the left controller 3 is attached to the main unit 2, the communication control unit 101 communicates with the main unit 2 via the terminal 42. When the left controller 3 is detached from the main unit 2, the communication control unit 101 performs wireless communication with the main unit 2 (specifically, the controller communication unit 83). Wireless communication between the controller communication unit 83 and the communication control unit 101 is performed according to, for example, the Bluetooth® standard.

[0065] The left controller 3 also includes a memory 102, such as flash memory. The communication control unit 101 is composed of, for example, a microcontroller (also called a microprocessor) and performs various processes by executing firmware stored in the memory 102.

[0066] The left controller 3 is equipped with buttons 103 (specifically, buttons 33-39, 43, 44, and 47). The left controller 3 is also equipped with an analog stick (referred to as "stick" in Figure 7) 32. Each button 103 and the analog stick 32 repeatedly output information about the operations performed on them to the communication control unit 101 at appropriate intervals.

[0067] The communication control unit 101 acquires information about the input (specifically, information about the operation or detection results from the sensor) 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 that has been processed in a predetermined manner), to the main unit 2. The operation data is transmitted repeatedly at a rate of once at predetermined intervals. The interval at which information about the input is transmitted to the main unit 2 may or may not be the same for each input unit.

[0068] When the above operation data is transmitted to the main unit 2, the main unit 2 can obtain the input made to the left controller 3. In other words, the main unit 2 can determine the operation of each button 103 and the analog stick 32 based on the operation data.

[0069] The left controller 3 includes a power supply unit 108. In this embodiment, the power supply unit 108 includes a battery and a power control circuit. Although not shown, the power control circuit is connected to the battery and to each part of the left controller 3 (specifically, each part that receives power from the battery).

[0070] As shown in Figure 7, the right controller 4 includes a communication control unit 111 that communicates with the main unit 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 memory 102 of the left controller 3. Therefore, the communication control unit 111 can communicate with the main unit 2 both by wired communication via the terminal 64 and by wireless communication without the terminal 64 (specifically, communication according to the Bluetooth® standard), and controls the method of communication that the right controller 4 performs with the main unit 2.

[0071] The right controller 4 is equipped with the same inputs as the left controller 3. Specifically, it is equipped with buttons 113 and an analog stick 52. These inputs have the same functions and operate in the same way as the inputs of the left controller 3.

[0072] The right controller 4 is equipped with a power supply unit 118. The power supply unit 118 has the same functions and operates in the same manner as the power supply unit 108 of the left controller 3.

[0073] [2. Overview of processing in the game system] Next, an overview of the processes performed in the game system 1 will be described with reference to Figures 8 to 24. In this embodiment, the game system 1 generates a game image in which terrain objects and characters (for example, a player character controlled by the user) are placed in a game space, which is a three-dimensional virtual space, and displays it on a display device. In this embodiment, the display device on which the game image is displayed may be the display 12 described above, or it may be a stationary monitor.

[0074] [2-1. Voxel] In this embodiment, the shape of some objects in the game space is defined by voxel data. Here, a voxel is a rectangular (more specifically, cubic) region arranged in a grid in the game space, and voxel data is data that indicates information about each voxel. Hereafter, objects whose shape is defined by voxel data will be called "voxel objects". In this embodiment, the game system 1 stores voxel data for a plurality of voxels set in the game space as data for generating voxel objects in the game space.

[0075] Figure 8 shows an example of a terrain object that is a voxel object. As shown in Figure 8, in this embodiment, terrain objects representing the ground and other terrain are defined by voxel data (i.e., they are voxel objects). Each cube shown in Figure 8 represents a terrain object. Note that in Figure 8, the edges of the terrain objects are shown with thick lines, but these thick lines are added for the purpose of making the drawing easier to read, and in reality, the edges of the terrain objects do not need to be displayed with thick lines.

[0076] The terrain object shown in Figure 8 was generated using a rule such as, "If the parameter included in the voxel data set for a voxel is greater than a predetermined value, a cube is placed at the voxel's position; if it is less than or equal to the predetermined value, nothing is placed at the voxel's position." The terrain object shown in Figure 8 is shown to illustrate the relationship between voxels and voxel objects in an easy-to-understand manner. In this embodiment, voxel objects are actually generated using rules (based on voxel data) that result in complex shapes, such as the terrain object shown in Figure 13, which will be described later. The rules for determining the shape of the voxel object based on the voxel data are arbitrary. In other embodiments, the game system 1 may generate voxel objects as shown in Figure 8 or as shown in Figure 13 based on object data.

[0077] For voxel objects, the shape can be changed by modifying the voxel data of each voxel. Figures 9 and 10 show examples of what the terrain object shown in Figure 8 looks like before and after a portion of it is deleted. That is, when the shaded portion of the terrain object shown in Figure 9 is destroyed, the terrain object changes to the shape shown in Figure 10. At this time, the game system 1 can easily delete the terrain object by rewriting the voxel data of the shaded portion voxel to indicate that the terrain object does not exist. Furthermore, when adding a terrain object, the game system 1 can easily change the shape of the terrain object by modifying the voxel data of each voxel, just as when deleting a terrain object.

[0078] In this way, Game System 1 can freely change the shape of voxel objects by rewriting the voxel data. For example, if a terrain object is destroyed in a game for some reason (for example, when a player character hits the terrain object) and the shape of that terrain object changes as a result, Game System 1 can freely change the shape of the terrain object by changing the voxel data used to generate the terrain object, rather than directly changing the data that represents the external shape of the terrain object (i.e., the mesh described later).

[0079] In this embodiment, voxels are defined throughout the entire game space (i.e., the voxel space in which voxels are defined corresponds to the entire game space). However, the voxel space does not need to be defined throughout the entire game space; it may be defined in a part of the game space. When the voxel space is defined in a part of the game space, the shape of the voxel object is defined by the voxel data relating to the voxels in that voxel space, and the position of the voxel object in the game space is defined by the position of that voxel space in the game space. Furthermore, multiple voxel spaces may be defined in the game space, such as a main voxel space defined throughout the entire game space and sub-voxel spaces defined in a part of the game space. In this case, the game system 1 stores voxel data for each voxel space.

[0080] Figure 11 shows an example of voxel data. For each voxel defined in the game space, the voxel data includes density data, a first material ID, a second material ID, material mixing ratio data, and state data. In this embodiment, this data is set for each individual voxel.

[0081] The density data indicates the density, which is an index used to define the shape of the voxel object based on the voxel in question (specifically, the shape defined by the mesh described later). As will be explained in detail later, the position and shape of the surface of the voxel object (i.e., the mesh described later) are determined based on the density described above.

[0082] In this embodiment, density can take the range of an integer value from a lower limit (e.g., 0) to an upper limit (e.g., 255). In this embodiment, the game system 1 determines the surface shape of a voxel object based on density, such that a higher density value for a voxel tends to result in a larger proportion of the volume occupied by the area within the voxel object within that voxel, and a lower density value tends to result in a smaller proportion. Thus, density is an indicator that affects the proportion of the volume occupied by the area within the voxel object within that voxel. Density can also be said to be an indicator that shows the degree to which the space of the voxel is virtually occupied by its contents (i.e., the virtual contents of the voxel object). For example, if the density is 0, the inside of the voxel is empty; if the density is 255, the entire inside of the voxel is the contents of the voxel object; and if the density is a value between 0 and 255, the contents of the voxel object can occupy the inside of the voxel in proportion to the value. Based on the above density, the shape of the mesh, i.e., the surface shape of the voxel object, can be determined. A mesh can be described as the surface of the portion of a voxel that contains content, or as the boundary between the portion of a voxel that contains content and the portion that does not. Furthermore, the volume occupied by a region within a voxel object generated based on the above density does not need to be exactly equal to the volume indicated by the density. For example, the volume of a voxel object generated using a method like that shown in Figure 8 may differ from that generated using a method like that shown in Figure 13, even if both methods are based on the same density.

[0083] In other embodiments, density may represent either a state where the entire region within the voxel is occupied by the volume of the region within the voxel object, or a state where the region within the voxel does not include the volume occupied by the region within the voxel object. For example, density data may only take the values ​​of 0 or 1.

[0084] The first material ID and the second material ID are information indicating the material (in other words, substance) of the voxel. In this embodiment, a voxel may be assigned a material such as sand, rock, or soil. In the game system 1, multiple types of materials are available that can be assigned to a voxel (see the material data shown in Figure 12). In this embodiment, up to two materials from the multiple types of materials available can be assigned to a single voxel. The first material ID is an ID indicating the first material assigned to the voxel, and the second material ID is an ID indicating the second material assigned to the voxel. As will be described in detail later, the material of a voxel object (i.e., the material assigned to the polygon of a voxel object) is determined based on the material assigned to the voxel.

[0085] As described above, in this embodiment, the voxel data includes an ID indicating the material, but in other embodiments, the voxel data may be a data structure that includes data that directly indicates the content of the material (i.e., information such as the name, properties, and rendering settings, which will be described later).

[0086] The material mixing ratio data is an example of data that shows the ratio of each material in a given voxel. In this embodiment, since up to two material IDs can be set for one voxel, the material mixing ratio data that shows the ratio of one of the materials, the material indicated by the first material ID and the material indicated by the second material ID, can also represent the ratio of the other material. In this embodiment, the material mixing ratio is a value between 0 and 1 that indicates the proportion of the second material to the whole consisting of the first and second materials. For example, if the material mixing ratio set for a voxel is 0.4, it means that in that voxel, the first material and the second material are composed in a ratio of 0.6:0.4. As will be described in detail later, the appearance and properties of a voxel object are determined based on the material. The material mixing ratio is used to determine the appearance and properties of a voxel object. In other embodiments, the material mixing ratio may be a value that indicates the proportion of the first material. Also, the ratio of materials within a voxel may be represented by separate values ​​that indicate the proportion of each material. In particular, in other embodiments where it is possible to set not just two types of materials but three or more, the ratio within the material voxels will be represented as multiple values ​​that indicate the proportion of each material.

[0087] In this embodiment, it is not necessary for a voxel to have two types of materials assigned to it; it may have only one type of material assigned. For example, if a voxel has only one type of material assigned to it, the first material ID will indicate that material, and the material mixing ratio will be set to 0.

[0088] The status data indicates the state set for the voxel. The specific content and number of types of status data are arbitrary. In this embodiment, the status data includes data indicating the amount of damage set for the voxel. In other embodiments, the status data may include, for example, data indicating whether (and to what extent) the voxel is wet.

[0089] As described above, in this embodiment, the voxel data includes a material ID, so the game system 1 stores material data that defines the content of the material indicated by the material ID. Figure 12 is a diagram showing an example of material data. As shown in Figure 12, in the material data of this embodiment, each material is associated with a material ID and information on the name, properties, and rendering settings set for that material.

[0090] The names included in the material data are the names assigned to the material in question (e.g., soil, sand, grass, etc.). During gameplay, the material names of voxel objects may be displayed. To enable this display, the material data includes information about the material's name.

[0091] The properties included in material data are the properties set for that material. Material properties are the properties that the voxel object to which the material is applied possesses in the game. The specific content and number of types of material properties are arbitrary. For example, at least one of the following pieces of information may be set as material properties. Hardness • weight • Slippery • Damage settings when the player character makes contact ·temperature • Can other objects be attached to a voxel object? • The amount of health restored to the player character when the player character destroys or acquires a voxel object. • The amount of in-game currency a player character acquires when they destroy or acquire a voxel object. In other embodiments, information different from that described above may be set as information indicating the properties of the material.

[0092] In this embodiment, the material data includes an ID indicating the properties of the material as information that identifies those properties (see Figure 12). Although not shown, the game system 1 stores property information for each available property, where the content of that property (for example, the weight and slipperiness values ​​mentioned above) is associated with the property ID. By referring to the above property information, the game system 1 can identify the specific content of the properties set for the material.

[0093] The rendering settings included in the material data are information indicating rendering-related settings, such as the texture used to render the voxel object to which the material is set. In this embodiment, the material data includes the ID of the texture used to render the voxel object to which the material is set as rendering setting information (see Figure 12). Although not shown, the game system 1 stores texture information for each prepared texture, associating the texture ID with the texture indicated by that texture ID. By referring to the above texture information, the game system 1 can identify the specific content of the texture set for the material. In other embodiments, in addition to texture information, arbitrary information related to shading settings may be set as rendering setting information. For example, reflectivity and information related to normals may be set.

[0094] Furthermore, the material data may include other data besides the data shown in Figure 12. For example, the material data may include data related to sound settings. For example, the data related to sound settings may be data that defines the footsteps that are output when the player character walks on the voxel object based on the voxel.

[0095] The material data may be in any format that can identify the properties and / or rendering settings of the material. For example, in other embodiments, the material data may have a data structure that directly indicates the properties and / or rendering settings of the material, instead of a data structure that includes a material ID and a texture ID.

[0096] [2-2. Updating Voxel Data] During gameplay, voxel objects are deformed when the aforementioned voxel data is updated. In this embodiment, when a game event that updates a voxel object (hereinafter referred to as an "update event") occurs, the game system 1 updates the voxel data. The specific content of the update event is arbitrary. An update event may be, for example, a character appearing in the game performing an action that deforms a voxel object (for example, a player character punching a voxel object), or an event that deforms a voxel object may occur (for example, an object thrown by a character making contact with a voxel object, or a bomb exploding).

[0097] Figure 13 shows an example of the game space when an update event occurs. The situation shown in Figure 13 is when a player character 201 performs a punch action on a terrain object 202, which is a voxel object. As will be explained in detail later, in the example shown in Figure 13, the voxel data is updated so that the terrain object 202 around the location where the player character 201's punch action hits is erased. This represents the destruction of the terrain object 202 by the player character 201's punch action.

[0098] In this embodiment, when an update event occurs, the game system 1 sets an update range (update range 203 in the example shown in Figure 13) in the game space for updating the voxel object. The position, shape, and size of the update range are arbitrary. The position of the update range may be determined, for example, based on the position where the object related to the update event that occurred (e.g., the player character that made the punch) and the voxel object came into contact. In the example shown in Figure 13, the position of the update range 203 may be determined based on the position where the punch by the player character 201 hit. For example, the center position of the update range 203 may be the position where it hit, or a predetermined distance forward from the position where it hit. The shape and size of the update range may be predetermined to be a shape corresponding to the type of update event. For example, when an update event occurs due to a punch by the player character 201, the shape and size of the update range may be determined as a sphere of a predetermined size, as shown in Figure 13. The size of the update range may also be determined according to a value indicating the degree of influence of the update event that occurred (e.g., the strength of the punch or the size of the explosion).

[0099] Game system 1 changes the density of voxels corresponding to the set update range. Voxels corresponding to the update range are, for example, voxels within the update range or voxels that overlap with the update range. As a result of the density change, the mesh of the voxel object is changed by the process described later, thereby changing the shape of the voxel object (visual shape and shape used for contact detection). In other embodiments, in addition to changing the density of voxels included in the update range, game system 1 may also change the material of the voxel (i.e., the first material, the second material, and the material mixing ratio) or change the state of the voxel.

[0100] 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 that indicates the update range set in the game space and makes the above determination based on the value of the SDF. The SDF represents the distance from a defined shape to any given position with a sign. Figure 14 shows an example of an update range. In the example shown in Figure 14, a spherical update range is set in the game space. For example, in the example shown in Figure 14, the SDF is set such that for positions inside the shape represented by the SDF in the game space, the SDF value is negative, and for positions outside the shape represented by the SDF, the SDF value is positive. In this example, it is possible to determine whether or not a voxel is included in the update range based on whether the SDF value is positive or negative. Furthermore, by using the signed distance value, it is possible to perform not only simple inside / outside determination but also processing such as correction and interpolation.

[0101] The above example describes a change applied to a voxel object where the voxel object within the update range is deformed to appear as if it were deleted. However, the changes that can be applied to a voxel object using the update range are not limited to this. For example, a change may be applied to a voxel object where a new voxel object is added within the update range (i.e., the volume occupied by the area within the voxel object increases by the amount of the update range). Alternatively, a change may be applied to a voxel object where only the material of the voxels within the update range changes, without changing the voxel density. Furthermore, a combination of changes to voxel density and material may be applied.

[0102] [2-3. Calculation of Vertices] When the voxel density is updated as described above, the game system 1 sets vertices based on the updated voxel data. These vertices are those that can become the vertices of the mesh of the voxel object. As will be described in detail later, in this embodiment, the above vertices are simplified, and the simplified vertices become the vertices of the mesh of the voxel object.

[0103] Figure 15 shows an example of how vertices are set. In Figures 15 to 24 described below, voxels, vertices, meshes, etc. are represented in 2D for the purpose of making the diagrams easier to see and the explanations easier to understand. However, in reality, vertices and meshes are set in 3D space based on voxels in 3D space. In this embodiment, the game system 1 uses a method to set vertices at coordinates based on the positions and densities of multiple surrounding voxels in areas where voxels with a set density indicating existence (i.e., a density greater than or equal to the reference value described later) and voxels with a set density indicating non-existence (i.e., a density less than the reference value described later) are adjacent. The details of this method will be described below.

[0104] As described above, in this embodiment, the density set for a voxel is set in the range of 0 to 255. A voxel with a density of 0 represents being completely in the air, and a voxel with a density of 255 represents being completely filled. Densities between 0 and 255 are treated interpolatively and used to determine vertices. In this embodiment, voxels with a density greater than or equal to a reference value are virtually treated as being inside the object, and voxels with a density less than the reference value are virtually treated as being outside the object. Alternatively, voxels with a density greater than or equal to a reference value are virtually treated as existing voxels, and voxels with a density less than the reference value are virtually treated as non-existent voxels. It is not necessary to define only voxels with a density of 0 as being outside the object (i.e., the reference value = 1); the reference value can be, for example, 128. In the example shown in Figure 15, the density of voxel 211 and the other outer voxels is set to 0, the density of voxel 212 is set to 100 (below the reference value), and the densities of voxels 213 and 214 are set to 150 and 210 (above the reference value). In this embodiment, the game system 1 generates vertices between voxels with a density above the reference value and voxels with a density below the reference value. Specifically, for each region spanning eight adjacent voxels (four in the diagram) (the region enclosed by dotted lines in the diagram), a decision is made as to whether or not to generate a vertex. In other words, vertices are generated in regions that span both voxels with a density above the reference value and voxels with a density below the reference value. The coordinates of the vertices are determined by comparing the densities of adjacent voxels along the XYZ axes and interpolating based on the density difference. Furthermore, by setting normal information that defines the position and orientation of the straight line connecting the vertices, the coordinates of the vertices can be calculated based on the normal information. Furthermore, normal information may be stored in advance for at least some of the voxels, or if it is not stored, the normal information may be calculated based on the density of adjacent voxels. In Figure 15, since the density of voxel 212 is below the standard value, voxel 212 is treated as outside the object when determining the presence or absence of a vertex, but the density value of voxel 212 itself is used in calculating the coordinates of the generated vertices.If the baseline value is set lower than the density of voxel 212, the result will be an increase in the number of vertices on the upper right and upper left sides of voxel 212 in Figure 15.

[0105] By setting vertices as described above, when generating a mesh connecting each set vertex (or each vertex after the simplification process described later has been applied to each set vertex), it is possible to generate a shape with a volume that reflects the density of each voxel to some extent. However, depending on the relationship with adjacent voxels, it is possible that voxels with a density of 0 may include some areas within the object, or voxels with a density of 255 may include some areas outside the object. Also, in this embodiment, voxels below a certain threshold are treated as being outside the object, so the volume is smaller because there are fewer vertices compared to when they are treated as being inside the object. Thus, it is not necessary to calculate the polygon mesh so that the volume strictly corresponds to the density value.

[0106] [2-4. Determining the material of the vertices] Game system 1 determines the material for each vertex set as described above. The material of a vertex is determined based on the material of the voxels surrounding that vertex. The voxels surrounding a vertex are, for example, the voxels used to determine whether or not to generate that vertex (i.e., voxels that overlap with the "region spanning voxels" described above). In other embodiments, the voxels used to determine the material of a vertex and the voxels used to determine whether or not to generate a vertex do not need to be the same and may be different.

[0107] Figure 16 shows an example of a method for determining the material of a vertex. In the example shown in Figure 16, vertex 219 is set with respect to four voxels 215-218, and these four voxels 215-218 are the "voxels surrounding the vertex" mentioned above. In actual 3D space, the number of voxels surrounding a vertex is eight. Also, in the example shown in Figure 16, voxel 215 is set to have a density of 255, a first material of "sand", and a material mixing ratio of 0 (i.e., first material:second material = 1:0, or the second material does not need to be set). Voxel 216 is set to have a density of 0 (the first and second materials do not need to 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 (i.e., first material: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 (i.e., first material:second material = 0.6:0.4). The coordinates indicating the position of vertex 219 are set to (X,Y)=(0.8,0.6). The coordinate system for these coordinates is one in which the left-right direction in Figure 16 is the X-coordinate and the up-down direction is the Y-coordinate, with the center position of voxel 217, the bottom left of the center positions of voxels 215-218 (positions of the white circles shown in Figure 13), being (0,0).

[0108] When determining the material of a vertex, the game system 1 calculates an evaluation value for each material in the surrounding voxels based on the density of that material and a weight value based on the distance from the voxel to the vertex. First, the weight value is calculated for each voxel, and is calculated so that it becomes larger the closer the distance from the center position of the voxel to the vertex. In this 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 given voxel is calculated according to the following equation (1). (Weight value) = |(1-x1)-x2|·|(1-y1)-y2|…(1) In the example shown in Figure 16, the weight values ​​for each voxel 215 to 218 calculated according to equation (1) above 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

[0109] Furthermore, game system 1 calculates the material density for each voxel. Here, material density is the value obtained by multiplying the density of the voxel by the proportion of the material set for that voxel that is occupied by that material. In this embodiment, the voxel density is the value normalized from the above values ​​of 0 to 255 to a value of 0 to 1. In the example shown in Figure 16, for voxel 215, the only material set is sand, so the proportion of sand material is 1, and the density of that voxel is 1, so the density of sand material is 1. For voxel 216, the density is 0 and no material is set, so the material density is not calculated. Alternatively, if any material is set, the density of that material is 0. For voxel 217, the set ratios of sand material and grass material are 0.7 and 0.3, respectively, and the density of the voxel is 204 / 255=0.8. Therefore, 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 set ratios of soil material and grass material are 0.6 and 0.4, respectively, and the density of the voxel is 153 / 255=0.6. Therefore, 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.

[0110] The game system 1 then calculates the above evaluation value for each material based on the weight value and the density of the material. In this embodiment, the evaluation value of a material is the sum of the density of the material calculated for each voxel, weighted according to the weight value for each voxel, for all surrounding voxels. In the example shown in Figure 16, the evaluation value of the sand material is 1·0.12+0.56·0.08=0.1648, since the material density for voxel 215 is 1 and the weight value is 0.12, and the material density for voxel 217 is 0.56 and the weight value is 0.08. Similarly, the evaluation value of the grass material is 0.24·0.08+0.24·0.32=0.096, since the material density for voxel 217 is 0.24 and the weight value is 0.08, and the material density for voxel 218 is 0.24 and the weight value is 0.32. Furthermore, the evaluation value of the soil material is calculated as follows: for 218 voxels, the material density is 0.36 and the weight value is 0.32, so 0.36 * 0.32 = 0.1152.

[0111] Game System 1 determines the vertex material based on the evaluation value of each material. Specifically, a predetermined number of materials are selected as vertex materials in order from those with the highest evaluation values. In this embodiment, the two materials with the highest evaluation values ​​are selected as vertex materials. In the example shown in Figure 16, the evaluation values ​​of the sand, grass, and soil materials are 0.1648, 0.096, and 0.1152, respectively, so the vertex materials are determined to be the sand material and the soil material. Game System 1 also calculates the ratio of the two selected materials based on the evaluation values. In this embodiment, the ratio of the two materials may be expressed as a second material ratio, which is the proportion of the second material to the whole, similar to the material mixing ratio described above. In the example shown in Figure 16, for example, if the first material is soil and the second material is sand, the second material ratio is shown as 0.1648 / (0.1648+0.1152)≈0.59. In other embodiments, the value representing the ratio of the two materials may be a value indicating the proportion of the first material. Alternatively, separate values ​​representing the proportion of each material may be used.

[0112] In this embodiment, the game system 1 generates and stores vertex data indicating the position of a vertex, the material IDs of the first and second materials set on the vertex, and the ratio of the materials. However, the method for managing the materials set on the vertices is arbitrary. In other embodiments, the vertex data may be a data structure that includes data that directly indicates the contents of the first and second materials.

[0113] As described above, in this embodiment, for each vertex, the game system 1 calculates a priority parameter (e.g., an evaluation value) for each material ID contained in the voxel data of the surrounding voxels, based on the voxel data. Then, based on the priority parameter, it selects up to a predetermined number (in this case, 2) of the highest priority material IDs and determines them as the material IDs for the vertex. Note that the specific parameters used as priority parameters are not limited to the evaluation value described above. For example, in other embodiments, an evaluation value calculated using the density of the material may be used as the priority parameter instead of using the weight value described above.

[0114] In this embodiment, the evaluation value, which is an example of a priority parameter, is calculated based on the density of multiple voxels surrounding the vertex, so that the priority of the material set on the denser voxels is increased (i.e., the evaluation value of the material increases, making it more likely to be selected). This allows the material of a vertex to be determined in accordance with the density set on the voxels.

[0115] Furthermore, in this embodiment, the evaluation value, which is an example of a priority parameter, is calculated based on the distance from the reference position (specifically, the center position) of multiple voxels surrounding the vertex to the vertex in question, so that the priority of the material set on the voxel closest to the vertex is increased. This makes it possible to determine the material of a vertex by reflecting the distance between the voxel and the vertex.

[0116] Furthermore, in this embodiment, the evaluation value, which is an example of a priority parameter, can be said to be calculated based on the material mixing ratio of multiple voxels surrounding the vertex, so that materials with a higher material mixing ratio have a higher priority. According to this, when multiple materials are set for a single voxel, the material of the vertex can be determined by reflecting the ratio of each material.

[0117] [2-5. Simplification of Vertices] In this embodiment, the game system 1 simplifies each vertex calculated as described above. Specifically, the game system 1 reduces the number of vertices by replacing some of the vertices calculated as described above with a single vertex. As will be described in detail later, the coordinates (i.e., position) and material of the replaced vertices are set based on the multiple vertices before replacement. This simplification reduces the number of vertices and polygons that make up the mesh of the voxel object, thereby reducing the amount of memory used for processing and reducing the processing load.

[0118] In this embodiment, the game system 1 simplifies by representing each vertex using SVO (Sparse Voxel Octree). Figure 17 shows an example of vertex simplification. In Figure 17, one square shown by the solid line in Figure 17(a) represents one vertex partition region. Here, a vertex partition region is a square region with the center position of the voxel as its vertex (in actual 3D space, a vertex partition region is a cube or a cuboid), and is the region with the dotted lines as its edges in Figures 15 and 16 described above. Also, in Figure 17, a vertex partition region with the letter "v" inside indicates a vertex partition region where a vertex is set.

[0119] In this embodiment, the game system 1 determines whether simplification is possible for vertices within a predetermined number of adjacent vertex division regions (four in Figure 17, eight in actual 3D space). If it is determined that simplification is possible, simplification is performed for the vertices within that predetermined number of vertex division regions.

[0120] Figure 17(a) shows the state before simplification. In the example shown in Figure 17, it is assumed that the vertex division regions within the area enclosed by the dotted line are determined to be simplifiable. At this time, the game system 1 performs simplification so that the vertices in each of the predetermined number of vertex division regions determined to be simplifiable are replaced with a single vertex (see Figure 17(b)). As a result, the vertices in the predetermined number of vertex division regions are simplified to a single vertex.

[0121] In this embodiment, the game system 1 performs simplification in multiple stages. The number of stages is arbitrary, but Figure 17 illustrates and explains up to the second stage. Figure 17(b) shows the state after the first stage of simplification, and Figure 17(c) shows the state after the second stage of simplification. In the second stage of simplification, it is determined whether or not simplification is possible for the vertices that were created by the first stage of simplification. In the example shown in Figure 17, it is determined that simplification is possible for the vertex division region enclosed by the dotted line in Figure 17(b), and as a result, the vertices in that vertex division region are simplified, resulting in the state shown in Figure 17(c). Note that the criteria for determining whether or not simplification is possible in the first stage and the criteria for determining whether or not simplification is possible in the second stage may be the same or different.

[0122] The specific method for determining whether simplification is possible is arbitrary. In this embodiment, the conditions used for the above determination are a condition relating to the shape of the voxel object and a condition relating to the material. In this embodiment, if both the condition relating to the shape of the voxel object and the condition relating to the material are satisfied, it is determined that simplification is possible, and if at least one of the conditions relating to the shape of the voxel object and the condition relating to the material is not satisfied, it is determined that simplification is not possible.

[0123] The shape-related condition is, for example, that the shape of each vertex before simplification does not change significantly from the shape of each vertex after simplification. For example, whether or not the shape of each vertex changes significantly before and after simplification can be determined by calculating an index that shows the error between the mesh before simplification and the mesh after simplification, and determining whether or not this index is below a predetermined tolerance value. Also, for example, if the shape of each vertex before simplification is hollow, but the shape of each vertex after simplification is not hollow (i.e., the information that it is hollow is lost due to simplification), the shape-related condition is determined not to be met. Whether or not the above case occurs can be determined, for example, based on the density of each voxel corresponding to the vertex division region to be judged. Also, for example, if the shape of each vertex before simplification is a shape that can only be represented by two or more vertices and cannot be represented by one vertex, the shape-related condition is determined not to be met. The same conditions as in conventional methods using SVO may be used for the shape-related conditions of the voxel object.

[0124] Furthermore, as a condition regarding materials, in this embodiment, a condition is used regarding the number of material types set for each vertex within the predetermined number of vertex division areas that are subject to simplification. Figure 18 is a diagram showing an example of a material condition. Figure 18(a) shows the case where the materials of vertices 221 to 224 are (grass), (grass), (grass and soil), and (grass and soil), respectively, and Figure 18(b) shows the case where the materials of vertices 221 to 224 are (grass and sand), (grass), (grass and soil), and (grass and soil), respectively. In this embodiment, the material condition is that the total number of material types set for each of the above vertices subject to simplification is less than or equal to a predetermined number. For example, the material condition is that it is less than or equal to the number of materials that can be set for one vertex. In this embodiment, the predetermined number is 2. For example, in the case of Figure 18(a), the total number of material types set for each of the vertices 221 to 224 subject to simplification is 2 types, grass and soil, so the material condition is satisfied. In this case, provided that the above-mentioned conditions regarding the shape of the object are met, each vertex 221-224 is determined to be simplifiable. On the other hand, in the case shown in Figure 18 (b), the total number of material types that can be set for each vertex 221-224 that is subject to simplification is three types: grass, soil, and sand, so the material conditions are not met. In this case, regardless of whether the above-mentioned conditions regarding the shape of the object are met or not, each vertex 221-224 is determined to be unsimplifiable.

[0125] In addition, in Game System 1, even if materials are strictly classified as different types, multiple types of materials may be provided that have the same set properties but different appearances. Some of these multiple types of materials may be treated as the same type when determining the conditions related to materials. For example, regarding soil materials, there may be multiple types of soil materials that have the same properties but similar appearances (e.g., texture color and pattern). In such cases, Game System 1 may treat these multiple types of soil materials as the same type when determining the conditions related to materials.

[0126] In this embodiment, similar to voxels, up to two types of materials can be set for vertices. However, in this embodiment, if the total number of material types set for each vertex subject to simplification is three or more, simplification will not be performed. That is, if the total number of material types exceeds the number of materials that can be set for a single vertex, simplification will not be performed. Therefore, even if the number of vertices is reduced through simplification, the material information set for the vertices will not be lost due to the simplification, and the material information can be maintained.

[0127] 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 vertex before simplification as the first material and second material of the simplified vertex. This allows the material information to be maintained. The ratio of the simplified materials is determined based on the ratio of the materials of each vertex before simplification. In this embodiment, the ratio of the simplified materials is calculated in the same way as the method for calculating the ratio of each vertex's material using the evaluation value described above. That is, the game system 1 calculates a weight value based on the distance between the simplified vertex and the vertex before simplification, and calculates an evaluation value for each material based on this weight value and the density of the material at the vertex before simplification (the evaluation value of the material described in [2-4. Determination of Vertex Materials] above can be used as the density of the material here). Then, the ratio of the materials is calculated based on the calculated evaluation value of each material.

[0128] [2-6. Mesh Generation] In this embodiment, a mesh of a voxel object is generated based on each vertex that has been simplified as described above. Figure 19 shows an example of a mesh generated based on each vertex. The squares shown in Figure 19 represent the vertex division regions described above, or vertex division regions that have been combined into one through simplification. As shown in Figure 19, the game system 1 generates a mesh in which the vertex division regions are polygons whose sides are straight lines connecting adjacent vertices. Each polygon that makes up the mesh is either a triangle or a quadrilateral.

[0129] In this embodiment, the game system 1 generates two types of meshes: a display mesh and a collision detection mesh. The display mesh is used for displaying voxel objects. The collision detection mesh is used for collision detection of voxel objects. As will be described in detail later, by using the above two types of meshes, the game system 1 can process using meshes suitable for displaying voxel objects and collision detection, respectively.

[0130] In this embodiment, the game system 1 generates the display mesh and the judgment mesh based on the SVO data described above (i.e., based on each simplified vertex). This allows for improved processing efficiency by sharing the vertex data used to generate the two types of meshes. In other embodiments, the game system 1 may not need to simplify the vertices and may generate the display mesh and / or judgment mesh based on the unsimplified vertices.

[0131] In this embodiment, the game system 1 generates a judgment mesh with a simpler shape than the display mesh. Specifically, the game system 1 ensures that the number of vertices in the judgment mesh is less than the number of vertices in the display mesh. 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, but also includes data used to determine whether simplification is possible or not. This data includes, for example, data of vertices calculated as candidates for the simplified vertices (referred to as provisional vertices), and the above-mentioned index data that indicates the error between the vertices before simplification and the provisional vertices. For example, the game system 1 may use vertices from the provisional vertices whose index is less than or equal to a predetermined threshold (this threshold shall be greater than the above-mentioned tolerance value) for generating the judgment mesh. This makes it possible to reduce the number of vertices in the judgment mesh to less than the number of vertices in the display mesh. By reducing the number of vertices in the judgment mesh to less than the number of vertices in the display mesh, the processing load due to collision detection can be reduced. Furthermore, since the number of vertices in the display mesh is not excessively reduced, the appearance of voxel objects can be represented in detail.

[0132] In other embodiments, the display mesh and the judgment mesh may be generated based on the same data or on different data. Furthermore, the display mesh and the judgment mesh may have the same shape (however, even in this case, the materials set for them may be different). Also, the number of vertices in the judgment mesh may be the same as the number of vertices in the display mesh, or it may be greater than the number of vertices in the display mesh.

[0133] [2-6-1. Determining the material for the display mesh] Next, an example of a method for determining the material and appearance of the display mesh will be described. In this embodiment, the game system 1 determines a material for each polygon that makes up the display mesh. As will be described in detail later, in this embodiment, the polygons corresponding to the above polygons are drawn using up to two types of textures corresponding to up to two types of materials. Therefore, the game system 1 ensures that, for each polygon that makes up the mesh, the number of materials set for one polygon is ultimately 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 materials for voxels and three or more types of materials for vertices, the same number of materials may be set for each polygon.

[0134] In this embodiment, quadrilaterals may be formed as polygons constituting the display mesh (see Figure 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. The process of dividing a quadrilateral into two triangles will be described below with reference to Figure 20.

[0135] Figure 20 shows an example of a quadrilateral that makes up a mesh being divided into two triangles. Figure 20(a) shows the quadrilateral before division, which is formed by vertices 231-234, which are part of the mesh vertices, and Figure 20(b) shows the two triangles obtained by dividing the quadrilateral. In the example shown in Figure 20, the materials set for vertices 231-234 are grass, soil, sand and grass, and grass, respectively.

[0136] In this embodiment, the game system 1 determines whether the division condition is met if the total number of material types set at each vertex of the quadrilateral is three or more. In this embodiment, the division condition is that by dividing the quadrilateral into two triangles, the total number of material types set at each vertex of the triangles can be reduced to two or less. If the division condition is met, the game system 1 divides the quadrilateral into two triangles, where the total number of material types set at each vertex is two or less. In the example shown in Figure 20, the materials set at each vertex 231-234 forming the quadrilateral are three types: grass, soil, and sand. Furthermore, if the quadrilateral is divided into a triangle formed by vertices 231, 232, and 234, and a triangle formed by vertices 231, 233, and 234, the materials set at each vertex of the former triangle will be two types: sand and grass, and the materials set at each vertex of the latter triangle will be two types: grass and soil (see Figure 20(b)). Therefore, since the division condition is met for the above quadrilateral, game system 1 divides the quadrilateral into two triangles.

[0137] Since there are two ways to divide a quadrilateral into two triangles, Game System 1 performs the above division using the method that satisfies the division condition if the division condition is satisfied for any triangle divided using at least one of the two methods. On the other hand, if the division condition is not satisfied for any triangle divided using either of the two methods, the division is performed using either method.

[0138] By performing the division as described above, game system 1 can generate two triangles, each with two or fewer materials assigned to each vertex, while minimizing the loss of information from the three or more materials assigned to each vertex of the quadrilateral. Here, as described above, each polygon constituting the mesh is rendered using up to two textures. Therefore, by performing the division described above, game system 1 can render polygons using two textures while minimizing the loss of information from the materials assigned to each vertex.

[0139] In this embodiment, the game system 1 sets polygons corresponding to the polygons after the above division has been performed. That is, the vertices of the polygons after the above division have been performed become the vertices of the polygons of the display mesh.

[0140] In this embodiment, the game system 1 determines the material of each polygon constituting the display mesh by selecting two materials if there are a total of three or more materials that can be set for each vertex of a single polygon. Figure 21 is a diagram showing an example of a method for determining the material of polygons constituting the display mesh. In the example shown in Figure 21, for vertex 241 of the triangular polygon constituting the display mesh, the first material is set to "grass", the second material to "soil", and the material ratio of the first material to the second material is set to 0.8:0.2. For vertex 242 of the same polygon, the first material is set to "grass", the second material to "sand", and the material ratio of the first material to the second material is set to 0.5:0.5. For vertex 243 of the same polygon, the first material is set to "sand", the second material to "soil", and the material ratio of the first material to the second material is set to 0.7:0.3.

[0141] If there are three or more different materials assigned to each vertex of a polygon, Game System 1 calculates a judgment value for each material. The judgment value is calculated as the sum of the ratios of each vertex to which that material is assigned. Then, Game System 1 selects the two materials with the largest judgment values ​​as the materials for that polygon. In the example shown in Figure 21, the judgment value for the grass material is 0.8 + 0.5 = 1.3, the judgment value for the sand material is 0.5 + 0.7 = 1.2, and the judgment value for the soil material is 0.2 + 0.3 = 0.5. Therefore, the materials selected for the polygon shown in Figure 21 are the grass and sand materials (see (a) in Figure 21).

[0142] The specific method for selecting the material of the polygons in the display mesh is arbitrary. In other embodiments, the material of the polygons in the display mesh may be selected by any method based on the information set at the vertices of the polygons. For example, the material of a polygon in the display mesh may be selected by identifying the material with the largest ratio at each vertex, and then selecting the material with the largest number of identified materials for each vertex as the material of that polygon.

[0143] In this embodiment, the material of the selected polygon is indicated by the material set on each vertex of the polygon. That is, when a polygon material is selected, the game system 1 changes the material set on each vertex of the polygon (i.e., the material ID included in the vertex data) to the selected material. In the example shown in Figure 21, vertices 241 and 243 are set to grass and soil and sand and soil materials, respectively, before the polygon material is selected (see Figure 21(a)). When the grass and sand material is selected as the polygon material as described above, the materials set on each vertex 241 and 243 are changed to grass and sand (see Figure 21(b)). Note that for vertex 242, the material set before selection is the same as the material of the selected polygon, so the material is not changed. As described above, when two types of materials are selected as the polygon material, the information of the third and subsequent types of materials set on each vertex of the polygon is deleted.

[0144] Furthermore, Game System 1 changes the ratio of materials set on a vertex in response to changes in the materials set on that vertex. For example, for vertex 241, the content changes from having a first material of grass and a second material of soil to having a first material of grass and a second material of sand. Here, since the proportion of sand material is 0, the material ratio of first material:second material = 1:0. In this way, the above changes formally modify the material of each vertex in order to represent the material of the polygon by the material of each vertex of that polygon.

[0145] As described above, the only material assigned to each vertex of a single polygon will be the material corresponding to the texture used for rendering, as described later. This makes it easier to perform rendering processes using textures.

[0146] It should be noted that the above changes may result in all materials being changed for a given vertex (i.e., no materials before and after the change match). For example, this might occur if the material set for a vertex before the change was soil, and the materials selected for the polygon are grass and sand. In such cases, the material ratio for that vertex may be set based on the material ratios for the other vertices of the polygon. For example, in the above example, if the first material set for one of the other vertices of the triangle polygon is grass with a material ratio of grass:sand = 1:0, and the material set for the other vertex is sand with a material ratio of sand:grass = 1:0, then the material ratio for that vertex may be set to grass:sand = 0.5:0.5. Game system 1 may also determine the material ratio for that vertex by considering the distance between that vertex and the other vertices (for example, based on a weight value that increases as the distance decreases).

[0147] As described above, in this embodiment, the game system 1 selects up to a predetermined number (in this case, 2) of material IDs set on the vertices included in each polygon (i.e., material IDs set on the vertices of the polygon corresponding to the polygon) and determines them as the material IDs for that polygon. This allows the game system 1 to reflect the materials set on the vertices in the appearance of the polygon while reducing the number of textures used during rendering.

[0148] In this embodiment, the game system 1 determines the polygon's material if the number of materials for all vertices constituting the polygon is less than or equal to the predetermined number, and if the number of materials exceeds the predetermined number, it selects a predetermined number of materials with high priority based on the priority parameter of each vertex (specifically, based on the determination value calculated based on the evaluation value described above) and determines them to be the polygon's material. This ensures that even if the total number of materials set for each vertex exceeds the predetermined number, the polygon's material can be set to a predetermined number or less, taking priority into consideration.

[0149] As described above, in this embodiment, the first and second materials set for each vertex of a polygon are changed so that there are two types of materials set for that polygon. However, when such a change is made, there is a possibility that inconsistencies may occur in the first and second materials set for vertices shared by two adjacent polygons.

[0150] Figure 22 shows an example of the materials that can be set for each vertex of two adjacent polygons. Figure 22 shows the state in which two polygons are formed by the vertices 231-234 shown in Figure 20 (Figure 20(b)). In the example shown in Figure 22, the material of the first polygon formed by vertices 231, 233, and 234 is determined to be grass and sand, so the first and second materials of these vertices should be set to grass and sand, respectively. On the other hand, the material of the second polygon formed by vertices 231, 232, and 234 is determined to be grass and soil, so the first and second materials of these vertices should be set to grass and soil, respectively. Therefore, in the example shown in Figure 22, there is a discrepancy in the materials that should be set for vertices 231 and 234, which are shared by the two polygons.

[0151] Therefore, in this embodiment, if there is a discrepancy in the materials to be set for vertices shared by two polygons, the game system 1 adds another vertex at the same position with respect to that vertex. Figure 22(b) shows an example where vertex 231' is added for vertex 231 and vertex 234' is added for vertex 234. In the example in Figure 22, the game system 1 sets the first and second materials for vertices 231 and 234 as grass and sand, respectively, according to the material of the first polygon. Also, for vertices 231' and 234', the first and second materials are set as grass and soil, respectively, according to the material of the second polygon. In this way, by formally setting two vertices as vertices shared by two polygons (i.e., generating two vertex data with the same position but different materials), it is possible to suppress discrepancies in the materials set for vertices.

[0152] Game System 1 generates a display mesh consisting of polygons whose vertices and materials have been determined as described above. Game System 1 also renders voxel objects by drawing polygons based on the material information set for each vertex (i.e., the first material and the second material).

[0153] Figure 23 shows an example of applying a texture to a polygon. Figure 23 shows a triangular polygon formed by vertices 241-243, as shown in Figure 21. The material applied to vertices 241-243 is the same as shown in Figure 21(b).

[0154] The positions of polygon vertices are rendered by mapping, which blends the textures of the first and second materials set for each vertex using the ratio of the materials set for that vertex (i.e., this ratio as the blending ratio). The textures of the first and second materials used for rendering are the textures indicated by the rendering settings information associated with each material ID associated with the data of the vertex in the material data described above (see Figure 12). In the example shown in Figure 23, the position of vertex 241 has a material ratio of grass:sand = 1:0, so rendering is performed using only the grass texture. Similarly, the position of vertex 243 has a material ratio of sand:grass = 1:0 for the first material, so rendering is performed using only the sand texture. Furthermore, the position of vertex 242 has a material ratio of grass:sand = 0.5:0.5 for the first material and sand for the second material, so rendering is performed by blending the grass texture and the sand texture with a blending ratio of 0.5:0.5.

[0155] Furthermore, for positions other than polygon vertices, Game System 1 determines the blend ratio by interpolating the blend ratio at each vertex. Then, rendering is performed by mapping, which blends the textures of the two materials set for each vertex based on the interpolated blend ratio. Note that the specific interpolation method is arbitrary. As an example, the blend ratio between vertices is linearly interpolated. In Figure 23, positions where the grass material texture is applied at a high ratio are shown in white, and positions where the sand material texture is applied at a high ratio are shown in black. In the example shown in Figure 23, the grass texture is applied at vertex 241, the blend ratio of the sand texture increases as you move towards vertex 243, the blend ratio of grass and sand becomes 1:1 at vertex 242, and only the sand texture is applied at vertex 243. In this way, by blending the two textures set for a polygon (i.e., set for each vertex of the polygon) at a blend ratio corresponding to the ratio of materials and rendering them, the appearance at the boundary between different materials in the display mesh can be made natural. This makes the appearance of a display mesh with multiple types of materials set to it look natural.

[0156] [2-6-2. Determining the material of the mesh used for judgment] Next, an example of a method for determining the material of the detection mesh will be described. As will be explained in detail later, in this embodiment, collision detection of voxel objects is performed using the detection mesh, and processing may be performed according to the material of the voxel object that has been detected as having a collision. Therefore, in this embodiment, the material of the detection mesh is also determined.

[0157] In this embodiment, the game system 1 ensures that for each polygon constituting the judgment mesh, only one type of material is assigned to each polygon. Specifically, the game system 1 determines the material assigned to a polygon of the judgment mesh based on the material information assigned to the vertices of that polygon (i.e., the first and second materials and the material ratio information).

[0158] Figure 24 shows an example of a method for determining the material of the polygons that make up the judgment mesh. Figure 24 shows an example of determining the material for the triangular polygon formed by each vertex 241-243 shown in Figure 21. The material set for each vertex 241-243 is as shown in (a) of Figure 21.

[0159] When determining the material of a polygon, the game system 1 calculates a determination value for each material set for each vertex of the polygon. In this embodiment, the method for calculating the determination value is the same as the method for calculating the determination value used to select the material set for the polygons of the display mesh. 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 polygons of the determination mesh.

[0160] In the example shown in Figure 24, the judgment values ​​for each material are the same as in Figure 21 above: the judgment value for grass material is 1.3, the judgment value for sand material is 1.2, and the judgment value for soil material is 0.5. Therefore, the grass material is selected as the material for the polygon shown in Figure 24.

[0161] As described above, in this embodiment, the game system 1, for each polygon, selects up to a predetermined number (here, 1) of material IDs from the material IDs set at the vertices included in the polygon (i.e., material IDs set at the vertices of the polygon corresponding to the polygon) and determines them as the material IDs for that polygon. This allows the game system 1 to keep the number of materials set on the judgment mesh below a predetermined number. This makes it possible to suppress the complexity of processing according to the type of material, which is performed according to the result of collision judgment using the judgment mesh. Note that the method for determining the material of the polygons of the judgment mesh is arbitrary and is not limited to the above. In other embodiments, the material of the polygons of the judgment mesh may be determined by any method based on the information set at the vertices of the polygon.

[0162] Furthermore, in this embodiment, up to two types of materials can be set for the polygons of the display mesh, while only one type of material can be set for the polygons of the detection mesh. This allows for a natural appearance using two types of textures for the polygons of the display mesh, and reduces the complexity of the processing performed on the detection mesh in response to the collision detection results. In other embodiments, the types of materials that can be set for the polygons of the display mesh and the detection mesh are 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 detection mesh may both be multiple, the same, or different.

[0163] In this embodiment, the number of material types set for a single voxel is limited to two, and the number of material types set for a single polygon in the display mesh is also limited to two. This allows the material information set in the voxel data to be reflected in the material of the display mesh while keeping the amount of data in the voxel data down. Furthermore, in this embodiment, the number of material types set for vertices that are set based on the voxel data is also limited to two (see Figure 16). This allows two types of materials to be set for vertices generated during the process of obtaining the display mesh from the voxel data, so that the material information set in the voxel data is reflected in the display mesh without any loss of material information during the process.

[0164] In other embodiments, the game system 1 may set different materials for vertices used to generate the display mesh and vertices used to generate the judgment mesh, with respect to the vertices set based on the voxel data. For example, the game system 1 may set up to two types of materials for vertices used to generate the display mesh, as described above, and set one type of material for vertices used to generate the judgment mesh. Then, for the polygons of the display mesh, two types of materials may be set in the same way as described above, and for the polygons of the judgment mesh, one type of material may be set based on one type of material set for each vertex of the polygon. When one type of material is set for vertices used to generate the judgment mesh, the material with the largest judgment value calculated for each material may be set as the material for that vertex. In the above, as in this embodiment, the number of types of materials set for one polygon in the display mesh can be limited to two, and the number of types of materials set for one polygon in the judgment mesh can be limited to one. Therefore, the material information set in the voxel data can be reflected in the display mesh, and the complexity of the processing performed according to the result of collision judgment using the judgment mesh can be suppressed.

[0165] As described above, in this embodiment, a display mesh and a detection mesh may be set for a single voxel object. However, depending on the game situation, it is not necessary for both a display mesh and a detection mesh to be set for a single voxel object simultaneously (for example, it is not necessary for both to be set in the processing of one frame). For example, the detection mesh may be generated in the range where collision detection is performed within the game space, and not generated in the range where collision detection is not performed. As an example, the game system 1 may generate a detection mesh for voxel objects within a predetermined range centered on the player character, and not generate a detection mesh for voxel objects outside that predetermined range, but only generate a display mesh.

[0166] Furthermore, the game system 1 may store data related to the generated mesh in memory for display meshes, and in frames after the mesh has been generated, use this data without re-executing the mesh generation process, except for the updated range. This reduces the processing load required to generate display meshes. Also, for collision detection meshes, the data related to the generated mesh may not be stored in memory, and meshes may be generated sequentially as needed (for example, whenever collision detection is required). This saves memory space used for mesh generation.

[0167] The above describes a method for generating each mesh (i.e., the display mesh and the judgment mesh) based on the modified voxel data when the voxel data is changed from its initial state. This method can also be used, for example, at the start of a game when generating each mesh based on the initial voxel data. However, the meshes based on the initial voxel data do not necessarily need to be generated based on the initial voxel data at the start of the game; they may be prepared in advance before the game starts.

[0168] [2-7. Process to change materials] Next, with reference to Figures 25 to 35, we will describe an example of the process of changing the material of a voxel object. In this embodiment, the material of a voxel object in the voxel space is changed by changing the material ID of the voxel data set in the voxel space. The material change process will be described below using the first to third examples. In the following, we will assume that terrain objects such as the ground and walls, and virtual objects that appear in the game space (for example, enemy objects), are voxel objects, and we will describe an example in which an in-game effect occurs as a result of a collision detection when a player character performs an action.

[0169] The above-mentioned "in-game action" refers to any change that occurs in the game, such as a change caused by "processing that reflects the results of contact between objects." The "in-game action" only needs to be based on collision detection between a detection mesh and a detection shape corresponding to the object to be detected based on game processing (for example, a detection area set on an object such as a player character), and the above action may occur on the object corresponding to the detection mesh, or on the object corresponding to the object to be detected. The content of the "in-game action" may be associated with the material set on the polygon that was detected as a collision in the collision detection that causes the action to occur (i.e., the content of the action may be determined by the material).

[0170] (Example 1) As a first example, we will describe an example of changing the material that makes up an enemy object 251 when the enemy object 251 is located in an area illuminated by light such as a directional light in the game space. Figure 25 is an example of a game image showing a player character 201 attacking an enemy object 251a located in the shadow area of ​​the game space.

[0171] Enemy object 251 is a voxel object, and a unique voxel space is defined for enemy object 251, independent of the voxel space of the voxels corresponding to terrain objects, etc. Unique voxel data corresponding to enemy object 251 is defined in this unique voxel space, and a unique display mesh and a unique detection mesh are set based on this unique voxel data. The unique voxel space can be moved / rotated within the game space along with the defined enemy object 251, and the position and orientation (orientation) of the unique voxel space within the game space are controlled. Note that the voxels defined in the unique voxel space may be of a different size than the voxels that make up the terrain objects, and the size of the voxels may be relatively smaller.

[0172] The polygon material of enemy object 251 has its first material ID set to "Material A". Furthermore, the material mixing ratio is set to 0 (i.e., the material set for the voxel is only one type, "Material A"). In the first example, enemy object 251 composed of Material A is referred to as enemy object 251a. The property information included in the material data described above for Material A is assumed to be that it possesses strong attack resistance. Then, using the method for determining the materials of the display mesh and the detection mesh described above, the materials for the unique display mesh and unique detection mesh of enemy object 251a, based on the voxel material, are determined.

[0173] In the example shown in Figure 25, the game system 1 performs collision detection between the enemy object 251 and the player character 201 using a detection mesh. That is, it performs collision detection to determine whether the detection mesh of the enemy object 251 and the detection area set for the player character (for example, an area of ​​a predetermined shape set based on the position of the player character) come into contact. If a collision is detected between the polygon whose material is Material A and the player character 201, the system performs a process to trigger an action in the game, such as destroying the enemy object 251 by attacking it, or reducing the player character 201's health due to a counterattack from the enemy object 251. In addition, in the above case, the system performs a process to make the player character 201 perform a predetermined reaction. For example, in the example shown in Figure 25, when the user inputs an operation to make the player character 201 perform the punch action, the player character 201 performs an action of punching forward, and a collision detection is performed. Then, if a collision is detected between the player character 201 performing a punch action and the enemy object 251a, it is determined whether the attack from the punch action effectively affected the enemy object 251a. Here, since the enemy object 251a is made of material A which has been set to have a strong attack resistance, it is not destroyed by the attack from the punch action, and a process is performed to cause the player character 201 to react as if the attack had been deflected. At this time, the game system 1 may generate an in-game effect (for example, a decrease in the player character's health due to the attack being deflected) based on the property information corresponding to the material set on the polygon in the collision detection mesh where the collision was detected by the collision detection.

[0174] In the first example, when it is determined that the enemy object 251a is located in the light-emitting area 281 in the game space, the game system 1 modifies the enemy object 251a, which is a voxel object, as an action within the game. In the first example, whether or not the enemy object 251a is located in the light-emitting area 281 is determined using ray checking, and this determination method will be described later. Figure 26 is an example of a game image showing the appearance after the enemy object 251 has been modified due to being located in the light-emitting area 281 in the game space.

[0175] In the example shown in Figure 26, the material of the entire enemy object 251 (i.e., the entire voxel in the unique voxel space defined for enemy object 251) is changed as if the material had changed due to exposure to light in the game space. For example, enemy object 251a, which was composed of material A, changes to enemy object 251b, which is composed of material B, by moving to the area 281 where light shines from shadow in the game space. Furthermore, it is assumed that material B has a property of having fragile attack resistance as part of the property information included in the material data described above. In this embodiment, among the material IDs included in the voxel data of the unique voxel space defined for enemy object 251, the material ID corresponding to material A is updated to the material ID corresponding to material B. Then, using the method for determining the materials of the display mesh and the judgment mesh described above, the materials of the unique display mesh and the unique judgment mesh of enemy object 251b are determined based on the material of the updated voxels. Specifically, in the unique voxel space defined for enemy object 251, if a voxel has only a material ID corresponding to material A set, the first material ID "Material A" will be changed to "Material B," and the material mixing ratio will remain at 0 (i.e., the material set in the voxel is only "Material B"). Also, if a voxel in the unique voxel space defined for enemy object 251 has both material A and another material set, the material ID corresponding to "Material A" will be changed to the material ID corresponding to "Material B," while the material ID corresponding to the other material will remain that of the other material, and the material mixing ratio will also remain at the same value. Furthermore, if a voxel in the unique voxel space defined for enemy object 251 does not have a material ID corresponding to "Material A," the material ID and material mixing ratio will remain unchanged.According to this, the parts of enemy object 251a that were made of "Material A" will appear to have been changed to the material of "Material B," making it easier to give the user the impression that the "Material A" material of enemy object 251a has been transformed into "Material B" by shining light on it.

[0176] The shapes of enemy objects 251a and 251b may be the same or different. In the latter case, the shape of enemy object 251 may be changed by increasing or decreasing the density of any of the voxels in the voxel space defined for enemy objects 251a and 251b in accordance with the material change described above.

[0177] Furthermore, enemy object 251 may be generated by combining parts of a voxel object with parts of a non-voxel object. For example, fine details on the surface of enemy object 251 (eyebrows, eyes, teeth, etc.) may be generated using non-voxel objects. Here, the non-voxel object is an object that is not based on the voxel data described above, and is displayed in the game space by drawing the set polygon mesh. The same material ID as the voxel object is set on the polygon mesh of the non-voxel object, and the non-voxel object is displayed by drawing the polygon mesh. In this case, the material ID of the non-voxel object may be updated in accordance with the update of the material ID of the part of the voxel object.

[0178] In the example shown in Figure 27, the user inputs an operation to cause the player character 201 to perform the punch action described above. This action causes the player character 201 to punch towards the enemy object 251b located in front of it, and a collision detection is performed. If a collision is detected between the player character 201 performing the punch action and the enemy object 251a, it is determined whether the attack by the punch action has had a significant effect on the enemy object 251a. Here, the enemy object 251b is made of material B, which has a property of having weak attack resistance, and is therefore destroyed by the attack by the punch action. Specifically, if a collision is detected between the player character 201 performing the punch action and the enemy object 251b, it is determined that the attack by the punch action has had a significant effect on the enemy object 251b, and the update range described above is generated based on the position and orientation of the player character 201. The game system 1 then deforms (destroys) the enemy object 251b by reducing the density of voxels of the enemy object 251b within the update range.

[0179] The above update range indicates the destruction range of enemy object 251b that is destroyed by the punch action of player character 201. The above update range is generated based on the position, strength, and ability of the player character 201 when attacking enemy object 251b, as well as the strength of enemy object 251b (for example, the properties of material B). For example, the above update range is generated in a predetermined direction (for example, forward) relative to player character 201, in a shape corresponding to the action. For example, the above update range is formed in a bell shape with the innermost part being hemispherical, centered on the collision position determined by the punch action of player character 201. Note that the shape of the above update range may be other shapes, including spherical, ellipsoidal, cube-shaped, cylindrical, wedge-shaped, shapes generated by 3D software, or shapes in which parts of these shapes are missing. Furthermore, the location of the update range may be set centered on the position where the punch action by the player character 201 occurs in the game space (for example, the position where the fist of the player character 201 reaches when punching), or it may be set centered on a predetermined distance forward from that position as seen from the player character 201.

[0180] Game system 1 reduces the density of voxels corresponding to the update range. As a result, the enemy object 251b is deformed so that the portion corresponding to the update range is erased. For example, in this embodiment, the erasure of each voxel is controlled by rewriting the density of each voxel based on the SDF of each voxel in the enemy object 251b. Alternatively, instead of unconditionally deforming the voxel object corresponding to the update range, game system 1 may increase the amount of damage set for the voxel corresponding to the update range in accordance with the punch action, and reduce the density of the voxel when the amount of damage exceeds a predetermined value.

[0181] Furthermore, fragment objects corresponding to the erased portion of the enemy object 251b may be generated, and the fragment objects may be shown scattering in response to the deformation of the enemy object 251b. In this case, the fragment objects may be generated to have a shape corresponding to the erased portion of the enemy object 251b, or they may have a predetermined shape. The fragment objects may or may not be voxel objects.

[0182] Thus, in the first example, as the enemy object 251 changes from being in the shadow of a light source in the game space to not being in the shadow of the light source, the material constituting the enemy object 251 changes from material A to material B. Therefore, it is possible to realize a game that uses material changes based on in-game judgments in the voxel space defined for the enemy object 251.

[0183] In the first example, the light source that generates the illuminated area 281 is a directional light set in the game space, such as ambient light that only has information about the direction of light (for example, a parallel light source that emits sunlight). As another example, it may be composed of a point light source. In determining whether or not an enemy object 251 is located in such an illuminated area 281, the determination shapes set for enemy objects 251a and 251b are used.

[0184] As shown in Figure 28, the judgment shape is a shape that encloses enemy objects 251a and 251b in the game space. For example, the judgment shape may be a bounding box in the shape of a cuboid for each of the enemy objects 251a and 251b. The bounding box may be an axis-aligned bounding box (AABB) parallel to the coordinate axes of the game space, or a directed bounding box for each of the enemy objects 251a and 251b. If a change in shape occurs between enemy object 251a and enemy object 251b, the size of the bounding box may be changed based on that shape. Furthermore, the judgment shape may be any shape that encloses at least a part of each of the enemy objects 251a and 251b. As an example, the judgment shape may be a cuboid of the unique voxel space defined for each of the enemy objects 251a and 251b. As another example, the determination shape described above may be any shape that encloses at least a portion of each of the enemy objects 251a and 251b, such as a sphere, an ellipsoid, or other polyhedron.

[0185] As shown in Figure 28, multiple feature points FP are set in the determination shape. The feature points FP include at least eight points, which are the corners of the bounding boxes set for each of the enemy objects 251a and 251b. Alternatively, the feature points FP may include nine points, including one point set at the center of the bounding box or at a predetermined location on each of the enemy objects 251a and 251b. In another embodiment, the feature points FP may consist of only one point, which may be set at the center of the bounding box or at a predetermined location on each of the enemy objects 251a and 251b. If there is only one feature point FP, the determination shape does not have to be a shape that encloses at least a part of each of the enemy objects 251a and 251b, and the determination shape may be a point (i.e., a single feature point FP).

[0186] As shown in Figure 29, in the first example, ray checking is used to determine whether or not the enemy object 251 is located within the range illuminated by light. In Figure 29, bounding boxes, feature points, and obstacles are represented in two dimensions for the purpose of making the diagram easier to see and the explanation easier to understand, but in reality, a three-dimensional bounding box and obstacles are set in three-dimensional space, and eight feature points FP are set (four in the diagram). Also, in Figure 29, a point light source is used for the purpose of making the direction of the light source easier to see, but as mentioned above, a parallel light source may also be used.

[0187] In the first example, whether or not the enemy object 251 is located within the range illuminated by the light is determined by a judgment based on the contact between multiple rays based on the light source and the bounding box. For example, a ray check is performed from each feature point FP toward the light source, and if no object (obstacle) is hit between the feature point FP and the light source, it is determined that the feature point FP is not located in the shadow of the light source (i.e., it is located within the range illuminated by the light source) (for example, the state of feature point FP1 in Figure 29). On the other hand, if any object (obstacle) is hit between the feature point FP and the light source during a ray check from the feature point FP toward the light source, it is determined that the feature point FP is located in the shadow of the light source (for example, the state of feature points FP2-4 in Figure 29).

[0188] Then, if it is determined that a predetermined number or more of the feature points FP set in the bounding box are not located in the shadow of the light source, it is determined that the enemy object 251 to which the bounding box is set is not located in the shadow of the light source (i.e., it is located within the range illuminated by the light source). The predetermined number used as a threshold in the above determination is arbitrary. As a first example, if it is determined that at least one of the feature points FP is not located in the shadow of the light source, it is determined that the enemy object 251 is not located in the shadow of the light source. In this case, it is determined that the enemy object 251 is not located in the shadow of the light source because a part of it is located within the range illuminated by the light source, and it is determined that the entire enemy object 251 is located in the shadow of the light source, and the material of the enemy object 251 is changed based on this determination result. As a second example, if it is determined that all of the feature points FP are not located in the shadow of the light source, it is determined that the enemy object 251 is not located in the shadow of the light source. In this case, the entire enemy object 251 is determined to be not in the shadow of the light source because it is located within the range of light from the light source, and a portion of the enemy object 251 is determined to be in the shadow of the light source because it is located within the shadow of the light source. Based on these determinations, the material of the enemy object 251 is changed.

[0189] (Example 2) As a second example, we will describe an example of changing the material that makes up the enemy object 251 when the enemy object 251 is located in the area illuminated by a light placed in the game space. Figure 30 is a diagram showing an example of a game image representing the appearance of the player character 201 holding the light object 202 and the enemy object 251a in the game space.

[0190] In Figure 30, the light object 202 is an example of a placement light placed in the game space, and is a point light that is placed in the game space and emits light radially from its surface. The light object 202 has a range 282 to which light from the light object 202 reaches, and the determination shape is set based on this range 282. In the example shown in Figure 30, the determination shape is set as a spherical range with a size based on the shape of the range 282, centered on the position of the light object 202 in the game space. The determination shape is a shape used to determine the range to which light from the placement light hits, and may be set to any shape such as a sphere, ellipsoid, cone, or cylinder based on the type and properties of the light source. Furthermore, the determination shape may be the same size and shape as the range to which light from the light source actually reaches, or it may be a size and shape that is at least partially smaller than the range to which light reaches, or it may be a size and shape that partially deviates from the range to which light reaches.

[0191] The light object 202 may be an item object possessed by the player character 201, may be pre-placed in the game space, or may be obtained from a terrain object based on an action by the player character 201 to pull out a part of that terrain object. If the light object 202 is obtained by the above action, the light object 202 may be generated to have a shape corresponding to the part of the terrain object that was erased by the action, or it may have a predetermined shape. The light object 202 may or may not be a voxel object. If the light object 202 is a voxel object, a voxel space different from the voxel space of the voxels corresponding to terrain objects, enemy objects 251, etc. may be defined for the light object 202.

[0192] In the second example, the enemy object 251a placed in the game space is the same voxel object as the enemy object 251a used in the first example. That is, the enemy object 251a used in the second example is located in the shadow in the game space and is therefore composed of material A.

[0193] In the second example, when it is determined that the enemy object 251a is located within the range 282 reached by light from the light object 202, the game system 1 changes the material of the enemy object 251a, which is a voxel object, as an in-game action. Figure 31 is an example of a game image showing the appearance after the enemy object 251 has been modified by being located within the range 282 reached by light from the light object 202.

[0194] In the example shown in Figure 31, when the enemy object 251 moves in the game space and / or the light object 202 moves, if at least a portion of the enemy object 251 enters the range 282 where light from the light object 202 can reach, the material of the entire enemy object 251 (i.e., all voxels in the unique voxel space defined for the enemy object 251) is changed. For example, enemy object 251a, which was composed of material A, changes to enemy object 251b, which is composed of material B, by moving from the range where light from the light object 202 cannot reach to the range 282 where light can reach. In the second example as well, the material is changed by updating the material ID corresponding to material A in the voxel data of the unique voxel space defined for the enemy object 251 to the material ID corresponding to material B, but this is the same as in the first example described above, so a detailed explanation is omitted here.

[0195] In the second example, whether or not the enemy object 251a is located within the range 282 reached by light from the light object 202 is determined using collision detection. For example, in the second example, if the enemy object 251 touches or is included in the determination shape set based on the range 282 reached by light from the light object 202, it is determined that the enemy object 251 is located within the range 282 reached by light from the light object 202. Specifically, whether or not the enemy object 251 is located within the range 282 reached by light from the light object 202 is determined based on collision detection between the determination mesh of the voxel object which is the enemy object 251 and the determination shape. As an example, it may also be determined that the enemy object 251 is located within the range 282 if the determination mesh of the enemy object 251 comes into contact with the determination shape. In this case, a portion of the enemy object 251 is located within the range 282 to which light from the light object 202 reaches, and it is determined that the enemy object 251 is not in the shadow cast by the light from the light object 202. At the same time, the entire enemy object 251 is located in the area not illuminated by the light, and it is determined that the enemy object 251 is in the shadow cast by the light. Based on this determination, the material of the enemy object 251 is changed. As another example, if the detection mesh of the enemy object 251 is contained within the above-mentioned detection shape, it may be determined that the enemy object 251 is located within the range 282. In this case, the entire enemy object 251 is located within the range 282 to which light from the light object 202 reaches, and it is determined that the enemy object 251 is not in the shadow cast by the light from the light object 202. At the same time, a portion of the enemy object 251 is located in the area not illuminated by the light, and it is determined that the enemy object 251 is in the shadow cast by the light. Based on this determination, the material of the enemy object 251 is changed.

[0196] In the above explanation, an example was used in which an enemy object is determined to be located within the range of light if it touches or is included in the above-mentioned determination shape. However, other determination conditions may also be used. For example, an enemy object may be determined to be located within the range of light if it overlaps with the above-mentioned determination shape by a predetermined percentage or more, or if a predetermined part or position of the enemy object is included in the above-mentioned determination shape.

[0197] In the descriptions of the first and second examples above, examples were used in which the material change occurs when the enemy object 251 is located in the range where light shines from the shadow. However, in this embodiment, the opposite material change may occur when the enemy object 251 moves from the range where light shines into the shadow. For example, an enemy object 251b composed of material B may be changed to an enemy object 251a composed of material A when it moves from the range where light shines 281 or the range where light reaches 282 in the game space into the shadow of these light sources. Specifically, when the enemy object 251 moves from the range where light shines into the shadow, the material ID corresponding to material B in the voxel data of the unique voxel space defined for the enemy object 251 may be updated to the material ID corresponding to material A.

[0198] (Example 3) As a third example, we will describe an example of changing the material that constitutes a voxel object when the voxel block is located in an area that is shaded by light such as directional light (for example, sunlight) in the game space. Figure 32 is an example of a game image showing player character 201 standing on a voxel block that is located in the shadow area of ​​an obstacle in the game space. The dashed lines in Figure 32 indicate the direction of light.

[0199] In the third example, the terrain, such as the ground in the game space, is formed by multiple voxel blocks arranged in a grid. These voxel blocks are voxel objects, and one voxel block is formed by combining multiple voxels in a rectangular parallelepiped shape (more specifically, a cubic shape). Each cube shown in Figure 32 represents a voxel block that constitutes the ground in the game space. Each voxel block has its own unique voxel space defined. That is, unique voxel data corresponding to one voxel block is defined in the unique voxel space, and a unique display mesh and a unique detection mesh are set based on that unique voxel data. Furthermore, it is possible to set a material for each defined voxel block in the unique voxel space. Note that the voxels that constitute the voxel blocks defined in the unique voxel space may be of a different size than the voxels that constitute the terrain object, and the size of the voxels may be relatively smaller.

[0200] For voxel blocks not in shadow due to light in the game space, the polygon material has its first material ID set to "Material C". The material mixing ratio is set to 0 (i.e., the voxel has only one material, "Material C"). Furthermore, the property information included in the material data described above for Material C is set to have a soft, fluid nature (e.g., a non-solid substance). Then, using the method for determining the materials of the display mesh and detection mesh described above, the material for the voxel block's unique display mesh and unique detection mesh (e.g., a material representing a floating object like a cloud) is determined based on the voxel's material.

[0201] On the other hand, the material of the polygons in voxel blocks that are in shadow due to light in the game space has its first material ID set to "Material D". Also, the material mixing ratio is set to 0 (i.e., the material set for the voxel is one type, "Material D"). Furthermore, it is assumed that the property information included in the material data described above for Material D is set to have a property of having robust strength (for example, a solid material). Then, using the method for determining the materials of the display mesh and the detection mesh described above, the material of the voxel block's unique display mesh and unique detection mesh (for example, a material indicating a structure such as metal or stone) is determined based on the voxel's material. In the third example, whether or not a voxel block is in shadow is determined using a shadow buffer, but this determination method will be described later.

[0202] As shown in Figure 32, since Material D has the property of having rigid strength, when a collision is detected between the detection mesh for a voxel block made of Material D and the player character 201, the player character is controlled to prevent entry into the inside of the polygon block. Therefore, the player character 201 can stand on or walk on polygon blocks made of Material D. On the other hand, since Material C has the property of having soft fluidity, when a collision is detected between the detection mesh for a voxel block made of Material C and the player character 201, the player character is controlled to enter the inside of the polygon block. Therefore, the player character 201 cannot stand on or walk on polygon blocks made of Material C.

[0203] When the position of a shadow in the game space changes, the material of the polygon block is also changed based on the movement of the shadow. For example, if the direction of the light changes from the direction shown in Figure 32 to the direction shown in Figure 33, the direction of the shadow cast by the obstacle also changes. When the direction of the shadow changes in this way, the material of the entire voxel block that has changed from being in the shadow to not being in the shadow (i.e., the entire voxel in the unique voxel space defined for the voxel block) is changed from material D to material C, and the material of the entire voxel block that has changed from not being in the shadow to being in the shadow is changed from material C to material D. Specifically, as a result of the change in the direction of the shadow, the material IDs in the voxel data of the unique voxel space defined for the voxel block that has moved from the shadow to the area where light shines are updated from the material ID corresponding to material D to the material ID corresponding to material C. Also, as a result of the change in the direction of the shadow, the material IDs in the voxel data of the unique voxel space defined for the voxel block that has moved from the area where light shines to the shadow are updated from the material ID corresponding to material C to the material ID corresponding to material D. Then, using the method for determining the materials of the display mesh and the determination mesh described above, the materials of the unique display mesh and the unique determination mesh of the voxel block are determined based on the material of the updated voxel.

[0204] As shown in Figure 33, the change in the direction of the shadow causes the voxel block on which player character 201 was standing to change from material D to material C. This material change alters the material of the voxel block on which player character 201 was standing from material D, which has a rigid strength, to material C, which has a soft, fluid nature. As a result, the collision between the collision detection mesh of the voxel block (material C) and player character 201 is detected, causing player character 201 to sink inside the polygon block, making it difficult for player character 201 to move forward, backward, left, or right within the game space. Thus, in order for player character 201 to continue moving within the game space, it is necessary to stand on a voxel block that is in the shadow created by the light, and the position of the shadow is important in the progression of the game.

[0205] In the third example, the game space is set up with ambient light, such as a directional light (e.g., a parallel light source emitting sunlight) that only has information about the direction of light. As another example, other light sources such as point light sources may be set up. A shadow buffer is used to determine whether or not each voxel block is in shadow. For example, the result of the shadow map calculation is copied to texture memory (linear texture) and stored as a shadow buffer, and whether or not it is in shadow is determined by depth comparison.

[0206] The shadow map above shows the depth (in other words, the depth of field) of each position as viewed from the direction of the light ray. The depth is calculated as the distance in the direction of the light ray from a predetermined reference position (i.e., the position of the light source) to the position in question. The reference position can be any position.

[0207] In the shadow map described above, for locations where an obstacle such as an object exists when viewed from the direction of the light ray, the depth is calculated as the distance in the direction of the light ray from a predetermined reference position to the location of the obstacle. Furthermore, in the shadow map described above, for locations where no obstacle exists when viewed from the direction of the light ray, the depth is set to its maximum value.

[0208] Figure 34 shows an example of the positional relationship between a light source, an obstacle, and the surface onto which the obstacle casts its shadow (for example, the ground in the game space, which is the top surface of the display mesh in the grid-like arrangement of voxel blocks).

[0209] In Figure 34, length t is the depth of the position corresponding to the pixel (for example, position A shown in Figure 34), and is the depth relative to the light source (i.e., the depth from the position of the light source to the position corresponding to the pixel). Length t is obtained by converting the depth d relative to the virtual camera to a depth relative to the light source. The depth d relative to the virtual camera is stored in the depth buffer. The depth value stored in the depth buffer may be calculated by conventional methods.

[0210] The length x is the depth at the position corresponding to the pixel, which is stored in the shadow buffer. In other words, the length x is the depth relative to the light source, and if there is an obstacle between the position of the light source and the position corresponding to the pixel (for example, position A shown in Figure 34), then the length x is the distance from the position of the light source to the position of the obstacle (for example, position B shown in Figure 34). The shadow buffer may also store the value obtained by applying a predetermined smoothing filter to the depth x, or the average value of the depth of pixels within a predetermined range including the pixel in question.

[0211] Here, if an obstacle exists on the straight line from the light source to the pixel, the length t becomes greater than the length x. In this case, the pixel becomes one on which the shadow of the obstacle is drawn. On the other hand, if there is no obstacle on the straight line from the light source to the pixel, the length t is the same as (or less than) the length x. In this case, the pixel becomes one on which the shadow of the obstacle is not drawn.

[0212] Game system 1 generates a shadowed game image by performing lighting processing on the game image drawn to the frame buffer using a shadow map of the entire drawing area.

[0213] In the third example, the depth stored in the shadow buffer is applied to each feature point of the bounding box of each voxel block to determine whether or not each voxel block is in shadow. For example, if the depth of the position of each feature point FP (e.g., length t shown in Figure 34) obtained by converting the coordinates of each feature point FP to coordinates in the shadow buffer by referring to the shadow buffer is greater than the depth stored in the shadow buffer (e.g., length x shown in Figure 34), then it is determined that the feature point FP is in shadow (i.e., it is located in an area not illuminated by the light source). On the other hand, if the depth of the position of each feature point FP obtained by converting the coordinates of each feature point FP to coordinates in the shadow buffer is less than the depth stored in the shadow buffer, then it is determined that the feature point FP is not in shadow (i.e., it is located in an area illuminated by the light source).

[0214] Then, if it is determined that a predetermined number or more of the multiple feature points (FPs) set in the bounding box of each voxel block are not in shadow, the voxel block to which the bounding box is set is determined to be not in shadow (i.e., located in the area where light hits). The predetermined number used as the threshold in the above determination is arbitrary. As a first example, if it is determined that at least one of the multiple feature points (FPs) is not in shadow, the voxel block to which the bounding box is set is determined to be in shadow. In this case, the voxel block is determined to be not in shadow because a part of it is located in the area where light hits, and the voxel block is determined to be in shadow because the entire upper surface of the voxel block exposed on the ground is in shadow, and the material of the voxel block is changed based on this determination. As a second example, if it is determined that all (for example, four) of the multiple feature points (FPs) exposed on the ground in the game space are not in shadow, the voxel block to which the bounding box is set is determined to be not in shadow. In this case, if the entire upper surface of the voxel block exposed on the ground is located within the range where light hits it, the voxel block is determined not to be in shadow. If a portion of the upper surface of the voxel block exposed on the ground is in shadow, the voxel block is determined to be in shadow, and the material of the voxel block is changed based on these determinations.

[0215] In this way, by using the shadow buffer generated for rendering shadows to determine whether or not a voxel object is in shadow, the increase in processing load can be suppressed. In particular, in the third example, since the game stage is one in which a large number of voxel blocks are placed across the entire surface that makes up the ground of the game space, using a shadow buffer for light and shadow determination is suitable when performing light and shadow determination by ray checking on all of these voxel blocks would increase the processing load. On the other hand, in the first example above, only the enemy object 251 is subject to light and shadow determination, so the processing load for performing this light and shadow determination is relatively light, and more accurate light and shadow determination can be performed by using ray checking.

[0216] However, since shadow detection using a shadow buffer targets only the drawing area, it is impossible or inaccurate to detect shadows in voxel objects in the game space that are outside of this drawing area, at least partially. Therefore, if the drawing area moves, it is possible that shadow detection for voxel objects that newly enter the drawing area will lag behind the timing of displaying those voxel objects.

[0217] In this embodiment, in order to prevent the delay in light and shadow determination described above, light and shadow determination for the entire game space may be performed by combining the light and shadow determination using the shadow buffer described above with the light and shadow determination by ray checking described above. Figure 35 is a diagram showing an example of the range in the game space where light and shadow determination is performed using the shadow buffer and the range where light and shadow determination is performed by ray checking.

[0218] Figure 35 shows the game space in which the game image exemplified in Figure 33 is generated. This game space is divided into an area that is within the drawing range displayed on the display 12 and an area that is outside the drawing range.

[0219] As described above, voxel blocks BCa and BCb, which are placed in the game space within the rendering range, are subjected to light and shadow determination based on the shadow buffer. Voxel block BCa is determined to be in shadow based on the light and shadow determination based on the shadow buffer and is composed of material D. Voxel block BCb is determined to not be in shadow based on the light and shadow determination based on the shadow buffer and is composed of material C.

[0220] On the other hand, voxel blocks BCc and BCd, which are located in the game space outside the above-mentioned rendering range, are subjected to light and shadow determination by ray checking. Voxel block BCc is determined to be in the shadow by the light and shadow determination by ray checking and is composed of material D. Voxel block BCd is determined to be located in the area where light hits it by the light and shadow determination by ray checking and is composed of material C.

[0221] Furthermore, for voxel blocks located between the drawing range and the area outside the drawing range, as an example, all feature points FP may be subjected to light and shadow determination by ray checking. As another example, for the voxel block, feature points FP within the drawing range may be determined by light and shadow determination based on the shadow buffer, and feature points FP outside the drawing range may be determined by light and shadow determination by ray checking, and these determination results may be combined to perform light and shadow determination on the voxel block.

[0222] Furthermore, while the above example used different methods for determining light and shadow between the drawing area and outside the drawing area, ray checking may also be used for light and shadow determination even within the drawing area. For example, for voxel blocks or feature points that are placed in an area invisible to the virtual camera due to obstacles such as virtual objects in the game space, ray checking may be used for light and shadow determination even within the drawing area.

[0223] Furthermore, for voxel blocks located in the game space outside the above-mentioned drawing range, the range for light and shadow detection by ray checking may be limited to voxel blocks that are within a predetermined number or distance from the above-mentioned drawing range. For example, the above range may be limited to voxel blocks located between the above-mentioned drawing range and the area outside the drawing range, and voxel blocks adjacent to said voxel blocks.

[0224] Furthermore, in the first to third examples described above, when a voxel object is positioned within the range of light, the material constituting the voxel object changes from Material A, which has strong attack resistance, or Material D, which has robust strength, to Material B, which has weak attack resistance, or Material C, which has soft fluidity. Thus, in the first to third examples described above, the voxel object becomes weaker when positioned within the range of light compared to when it is in shadow, but in other embodiments, the voxel object may become weaker when it is in shadow. That is, when a voxel object is in shadow, the material constituting the voxel object may change from Material A or Material D to Material B or Material C. In this way, the material that is changed when a voxel object is positioned within the range of light is arbitrary, and the original material and the changed material may each have arbitrary properties.

[0225] [3. Specific examples of processing in game systems] Next, we will explain specific examples of information processing in game system 1 with reference to Figures 36 to 38.

[0226] Figure 36 shows an example of various data used for information processing in the game system 1. Each piece of data shown in Figure 36 is stored in memory accessible by the main unit 2 (for example, flash memory 84, DRAM 85, and / or a memory card installed in slot 23). As shown in Figure 36, the game system 1 stores a game program. The game program is for executing the game processing in this embodiment (for example, the game processing shown in Figures 37 and 38). The game program includes the material data mentioned above (see Figure 12). The memory also stores the voxel data mentioned above (see Figure 11), update range data, mesh data, object data, judgment shape data, ray check processing data, and drawing processing data (see Figure 36).

[0227] The update range data is data indicating the update range described above. In this embodiment, the update range is represented by the SDF described above.

[0228] Mesh data includes various data related to the mesh of a voxel object. As shown in Figure 32, in this embodiment, mesh data includes SVO data, display mesh data, and determination mesh data. SVO data is data that holds each vertex calculated from the voxel data in the SVO structure described above. In this embodiment, in addition to data indicating the position of each vertex, SVO data includes data indicating the material set for each vertex (for example, data indicating the material ID). Display mesh data includes various data related to the display mesh. Specifically, 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 material ID). Determination mesh data includes various data related to the determination mesh. Specifically, 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 material ID).

[0229] Object data includes various data related to objects other than voxel objects (e.g., player characters, virtual objects, etc.). Object data is stored for each object that appears in the game space. Object data includes, for example, data indicating the object's position, velocity, and state.

[0230] The determination shape data includes various data related to the determination shape set for a voxel object (e.g., bounding box and its feature points) and various data related to the determination shape based on the range of light from the placed light.

[0231] The ray check processing data includes various data related to light and shadow determination by ray checking, as described in [2-7. Processing to change materials] (for example, data indicating whether or not an object hits between each feature point and the light source).

[0232] The rendering processing data includes various data related to light and shadow determination based on the shadow buffer described in [2-7. Processing to change materials] (for example, frame buffer, depth buffer, shadow buffer, and light and shadow determination results for each feature point).

[0233] Figure 37 is a flowchart illustrating an example of the game processing flow executed by game system 1. Figure 38 is a subroutine showing an example of the material change processing in step S7 of Figure 37. The execution of game processing begins, for example, when the game is started in response to user instructions while the above game program is running. The processing loop consisting of the series of processes from steps S1 to S15 is executed in a cycle of once per frame.

[0234] In this embodiment, the processor 81 of the main unit 2 executes the game program stored in the game system 1, thereby executing the processes shown in Figures 37 and 38. However, in other embodiments, some of the processes in each of the above steps may be executed by a processor other than the processor 81 (for example, a dedicated circuit). Also, if the game system 1 can communicate with other information processing devices (for example, a server), some of the processes in each of the steps shown in Figures 37 and 38 may be executed by the other information processing device. Furthermore, the processes in each of the steps shown in Figures 37 and 38 are merely examples, and the order of the processes may be changed, or other processes may be executed in addition to (or instead of) the processes in each step, as long as similar results can be obtained.

[0235] Furthermore, the processor 81 executes the processing of each step shown in Figures 37 and 38 using memory (for example, DRAM 85). That is, the processor 81 stores the information (in other words, data) obtained by each processing step in memory, and when it is necessary to use that information in subsequent processing steps, it reads the information from memory and uses it.

[0236] In Figure 37, the processor 81 acquires operation data indicating user input (step S1) and proceeds to the next step. For example, the processor 81 acquires operation data output from each controller via the controller communication unit 83 and / or terminals 17 and 21, as well as operation data output from the main unit 2 (e.g., touch panel 13).

[0237] Next, the processor 81 designates one of the game space objects that needs processing but has not yet been processed (including voxel objects defined by the unique voxel space) as the object to be processed, and for the designated object, it performs a process to calculate its velocity and a process to reflect the results of contact between objects in the previous frame (step S2), and then proceeds to the next step. The velocity of the object is used in the process of step S13, described later, to calculate the position of the object in the current frame. For example, if the designated object is a player character, the velocity of the player character is calculated based on the operation data obtained in step S1. Also, if the designated object is an object that is not operated by the user (for example, an enemy object), the velocity of the object is calculated based on rules predetermined in the game program. For example, the velocity of an enemy object is set to 0 if it is placed on a terrain object and is not moving, set to the same velocity as the player character if it is being held by a player character, and set to a velocity that moves in a direction based on the direction of the player character with a size determined by the above rules if it is released by a throwing action by the player character. Specifically, the velocity of an object is calculated based on virtual physics calculations that include interactions between objects. For example, interactions such as repulsion from collisions between objects, friction from contact, falling due to virtual gravity, and deceleration due to virtual air resistance are all reflected in the velocity determination.

[0238] Furthermore, the process that reflects the results of object contact in the previous frame includes processing that affects the objects if it is determined in the collision detection (step S12 described later) in the previous frame that objects have come into contact with each other. The above processing is, for example, as follows. - If it is determined that the player character came into contact with a lava terrain object in the previous frame, the player character's health will be reduced. • If it is determined that the player character made contact with a terrain object in the previous frame through a pull-out action or punch action, a process is performed to generate a fragment object (e.g., light object 202; see Figure 30). - If the player character was standing on a voxel block made of a material with a robust strength in the previous frame, a process is implemented to maintain the player character in that position on the voxel block (see Figure 32). - If the player character was standing on a voxel block made of a material with soft, fluid properties in the previous frame, the process will cause the player character to sink into the inside of the voxel block (see Figure 33). If the state of an object is changed during the processing of step S2 described above, the processor 81 updates the object data stored in memory for that object to reflect the changed state.

[0239] Next, the processor 81 determines whether an update event has occurred that updates the voxel object due to the object specified in step S2 (step S3). For example, the determination in step S3 is made based on the result of the collision determination in the previous frame (step S12, described later). For example, if it is determined that the player character has come into contact with a terrain object due to a punch action or the like in the previous frame, it is determined that an update event has occurred that erases a part of the terrain object. If an update event has occurred, the processor 81 proceeds to step S4. On the other hand, if no update event has occurred, the processor 81 proceeds to step S6.

[0240] In step S4, the processor 81 sets an update range in the game space for updating voxel objects and proceeds to the next step. For example, the specific details of the update range (e.g., position, shape, and size) are associated with each type of update event in the game program. The update range set in step S4 is set to be associated with the type of update event that was determined to occur in step S3. In step S4, the processor 81 stores data indicating the set update range in memory as update range data.

[0241] Next, the processor 81 makes changes to the voxels corresponding to the update range set in step S4 in accordance with the update event (step S5), and proceeds to step S6. For example, if the processor 81 deforms voxel objects within the update range to appear as if they have been deleted or shrunk, or deforms them to appear as if voxel objects have been added to the update range, it updates the voxel data stored in memory to change the density of voxels corresponding to that update range (see [2-2. Updating Voxel Data] above).

[0242] In step S6, the processor 81 determines whether the processing in steps S2 to S5 has been completed for all objects that require processing (including voxel objects defined by the unique voxel space). If the processing of all objects is complete, the processor 81 proceeds to step S7. On the other hand, if the processing of any object is not complete, the processor 81 returns to step S2 and repeats the process.

[0243] Next, the processor 81 performs a material change process (step S7) and proceeds to step S8. The material change process in step S7 will be explained below with reference to Figure 38.

[0244] In Figure 38, the processor 81 determines whether the processing described in steps S23 to S32 has been completed for all voxel spaces (including intrinsic voxel spaces) that require processing (step S21). If the processing of all voxel spaces is completed, the processor 81 terminates the processing by the subroutine. On the other hand, if the processing of any game space is not completed, the processor 81 proceeds to step S22.

[0245] In step S22, the processor 81 selects one of the voxel spaces that needs processing but has not yet been processed, and proceeds to the next step.

[0246] Next, the processor 81 determines whether the voxel object defined by the voxel space selected in step S22 is subject to material modification by light and shadow detection (step S23). If the voxel object is subject to material modification by light and shadow detection, the processor 81 proceeds to step S24. On the other hand, if the voxel object is not subject to material modification by light and shadow detection, the processor 81 returns to step S21 and repeats the process.

[0247] In step S24, the processor 81 determines whether a change has occurred in the voxel object defined by the voxel space selected in step S22, such that it enters or leaves the area illuminated by the placement light. For example, based on the collision determination result of the previous frame in step S12 described later, the processor 81 makes a positive determination in step S24 if the determination mesh of the voxel object changes from a state where it is not in contact with the determination shape set based on the range of light from the placement light to a state where it is in contact, or from a state where it is in contact with the determination shape to a state where it is not in contact (for example, if the enemy object 251a shown in Figure 30 comes into contact with range 282, or if the entire enemy object 251b comes out of range 282 as shown in Figure 31; see the second example in [2-7. Processing to change the material] above). As another example, the processor 81, based on the collision determination result of the previous frame in step S12 described later, makes a positive determination in step S24 if the determination mesh of the voxel object changes from a state where a part of the determination mesh is outside the determination shape to a state where the entire determination mesh is inside the determination shape, or if the determination mesh changes from a state where the entire determination mesh is inside the determination shape to a state where a part of the determination mesh is outside the determination shape. If the above change in state has occurred in the voxel object, the processor 81 proceeds to step S31. On the other hand, if the above change has not occurred in the voxel object, the processor 81 proceeds to step S25. The processor 81 may perform the processing in step S24 only if the voxel object defined by the voxel space selected in step S22 is an object whose material changes due to the light of the placement light. That is, if the voxel object is not an object whose material changes due to the light of the placement light, the processor 81 may cancel the processing in step S24 and proceed directly to step S25.

[0248] In step S25, the processor 81 determines whether the processing described in steps S26 to S30 has been completed for all feature points (see Figures 28 and 29) that require processing and are set in the voxel object defined by the voxel space selected in step S22. If the processing of any feature point is not yet complete, the processor 81 proceeds to step S26. On the other hand, if the processing of all feature points is complete, the processor 81 proceeds to step S31.

[0249] In step S26, the processor 81 selects one of the feature points that needs processing but has not yet been processed, and proceeds to the next step.

[0250] Next, the processor 81 determines whether or not to perform a light / shadow determination on the feature point selected in step S26 based on the shadow buffer (step S27). For example, if the processor 81 determined that rendering using a shadow buffer was performed in the previous frame's game image generation process (drawing process) in step S14 (described later), and the feature point is located within the drawing range in the game space, it made a positive determination in step S27. If the processor 81 then performs a light / shadow determination on the feature point based on the shadow buffer, it proceeded to step S28. On the other hand, if the processor 81 does not perform a light / shadow determination on the feature point based on the shadow buffer, it proceeded to step S30.

[0251] In step S28, the processor 81 performs a light and shadow determination of the feature point that is currently the processing target based on the shadow buffer, and proceeds to step S29 for processing. For example, the processor 81 uses the shadow buffer used in the game image generation process (rendering process) of the previous frame in step S14 described later, and according to the determination method based on the shadow buffer described in the third example in the above [2-7. Process for changing materials], determines whether the feature point of the processing target is in the shadow or located in the range where light hits, and updates the rendering process data stored in the memory based on the determination result.

[0252] In step S29, the processor 81 determines whether to perform a light and shadow determination of the feature point selected in step S26 using ray checking. For example, when the rendering process using the shadow buffer is not performed in the game image generation process (rendering process) of the previous frame in step S14 described later, when the above feature point is arranged outside the rendering range in the game space, when a negative determination is made in step S27, or when it is desired to perform both the light and shadow determination using the shadow buffer and the light and shadow determination using ray checking, an affirmative determination is made in step S29. Then, when the processor 81 performs a light and shadow determination of the above feature point using ray checking, it proceeds to step S30 for processing. On the other hand, when the processor 81 does not perform a light and shadow determination of the above feature point using ray checking, it returns to step S25 to repeat the processing.

[0253] In step S30, the processor 81 performs a light and shadow determination of the feature point that is currently the processing target by ray checking, and returns to step S25 to repeat the processing. For example, the processor 81 determines whether the feature point of the processing target is in the shadow or located in the range where light hits according to the determination method by ray checking described in the first example and the third example in the above [2-7. Process for changing materials], and updates the ray check process data stored in the memory based on the determination result.

[0254] On the one hand, in step S31, the processor 81 determines whether to change the material of the voxels in the voxel space selected in step S22. As a first example, when step S31 is executed because an affirmative determination is made in step S24, the determination in step S31 is made based on the light and shadow determination method described in the second example in [2-7. Process for changing material]. As a second example, when an affirmative determination is made in step S25 and all feature points have been subjected to light and shadow determination by ray check, the determination in step S31 is made by referring to the ray check process data stored in the memory in accordance with the light and shadow determination method described in the first example in [2-7. Process for changing material]. As a third example, when an affirmative determination is made in step S25 and at least some of the feature points have been subjected to light and shadow determination based on the shadow buffer, the determination in step S31 is made by referring to the rendering process data (and ray check process data as necessary) stored in the memory in accordance with the light and shadow determination method described in the third example in [2-7. Process for changing material]. Then, when the processor 81 changes the material, the process proceeds to step S32. On the other hand, when the processor 81 does not change the material, it returns to step S21 and repeats the process.

[0255] In step S32, the processor 81 changes the material of the voxels in the voxel space selected in step S22, and returns to step S21 to repeat the process. As a first example, if step S32 is executed because a positive determination is made in step S24, the material is changed for all voxels in the voxel space to be processed according to the material change method described in the second example of [2-7. Process to change material], and the voxel data stored in memory is updated. As a second example, if a positive determination is made in step S25, the material is changed for all voxels in the voxel space to be processed according to the material change method described in the first or third example of [2-7. Process to change material], and the voxel data stored in memory is updated.

[0256] Returning to Figure 37, after the material change process in step S7, the processor 81 updates the vertices of the voxel object in the game space (step S8) and proceeds to the next step. For example, if the voxel data was updated in the process of step S5, the processor 81 calculates new vertices based on the updated voxel data. The position of the new vertices is calculated according to the method described in [2-3. Vertex Calculation] above. The material of the new vertices is calculated according to the method described in [2-4. Vertex Material Determination] above.

[0257] Next, the processor 81 simplifies the vertices (step S9) and proceeds to the next step. For example, the processor 81 simplifies each vertex after the update in step S8 according to the method described in [2-5. Simplification of Vertices] above. Then, the processor 81 updates the SVO data stored in memory to show each vertex obtained by the processes in steps S8 and S9. Note that the processes in steps S8 and S9 do not need to recalculate the vertices for the entire voxel data, and may be performed only on the parts of the voxels whose contents were changed in the process in step S5.

[0258] Next, the processor 81 updates the display mesh of the voxel object based on the SVO data stored in memory (step S10), and proceeds to the next step. The position of each vertex of the display mesh and the material of each polygon of the display mesh (for example, the material set for each vertex of the polygon) are calculated according to the methods described in [2-6. Mesh Generation] and [2-6-1. Determination of Display Mesh Material] above. In step S10, the processor 81 updates the display mesh data stored in memory to show the updated position and material of each vertex of the display mesh. The processor 81 may start the processing from step S11 onwards, described later, without waiting for the completion of step S10, and execute it in parallel. In that case, step S10 must be completed before the start of step S14, described later.

[0259] Next, the processor 81 updates the determination mesh of the voxel object based on the SVO data stored in memory (step S11), and proceeds to the next step. The position of each vertex of the determination mesh and the material of each polygon of the determination mesh (for example, the material set for each vertex of the polygon) are calculated according to the methods described in [2-6. Mesh Generation] and [2-6-2. Determination of the Material of the Determination Mesh] above. In step S11, the processor 81 updates the determination mesh data stored in memory to show the updated position and material of each vertex of the determination mesh.

[0260] In the example shown in Figure 37, the process of generating the judgment mesh in step S11 is performed every frame, but the process of generating the judgment mesh does not have to be performed every frame. For example, if the collision judgment process in step S12, described later, is performed only on frames that satisfy predetermined conditions, the processor 81 may perform the process of generating the judgment mesh on the frame in which the collision judgment is performed. The processor 81 may also perform the process of generating the judgment mesh for voxels within the area in the game space in which the collision judgment in step S12 is performed. For example, in a situation where there are no objects other than voxel objects that are subject to collision judgment around the player character in the game space (i.e., a situation where only collision judgment between the player character and the surrounding voxel objects needs to be performed), the processor 81 may perform the process of generating the judgment mesh for voxels within a predetermined range relative to the player character.

[0261] Next, the processor 81 performs collision detection for each object in the game space based on the detection mesh data and object data stored in memory (step S12), and proceeds to the next step. For example, the processor 81 uses the detection mesh for voxel objects and a predetermined shape detection area set for non-voxel objects to perform collision detection. In this embodiment, the collision detection in step S12 is performed taking into account the speed calculated in step S2. In other words, the processor 81 performs collision detection using the position of each object when it moves at the above speed.

[0262] In this embodiment, the collision determination in step S12 determines, for example, whether or not the following contact occurs. - Contact between the player character performing actions such as movement and punching, and terrain objects and enemy objects. • Contact between the character performing the action of lifting (the light object) and the light object. • Contact between the object subject to light and shadow detection (e.g., enemy object 251 shown in Figures 30 and 31) and the detection shape based on the range of light from the placed light (e.g., range 282 shown in Figures 30 and 31). Furthermore, if the collision detection in step S12 determines that objects have come into contact with each other, the process in step S2 of the next frame will be to reflect the result of the object contact, or the process in step S3 of the next frame will be to determine that an update event has occurred, or the process in steps S26 and S32 of the same frame, as described later, will be to perform a light and shadow detection.

[0263] Next, the processor 81 controls the movement of each object in the game space (step S13) and proceeds to the next step. For example, the processor 81 controls the player character to move and perform various actions based on the operation data acquired in step S1. When a predetermined action occurs, the processor 81 generates a collision detection area in the game space corresponding to that action. In one execution of step S13, the processor 81 controls each object to perform actions that span multiple frames (for example, actions by the player character) for the duration of one frame. As a result, the processing of step S13 is repeatedly executed over multiple frames, causing each object to perform a series of actions related to movement and various other actions. The position of an object is basically determined to be the position after moving at the speed calculated in step S2. However, if the collision detection in step S12 determines that an object is in contact with another object and its movement is hindered by the other object it is in contact with, the position of that object may be determined not to change. Then, in step S13, the processor 81 updates the object data stored in memory to reflect the object after the control in step S13.

[0264] Next, the processor 81 generates a game image (step S14) and proceeds to the next step. For example, the processor 81 generates a game image by drawing each polygon of the display mesh for voxel objects and each polygon of objects other than voxel objects based on a virtual camera. Each polygon of the display mesh is drawn using drawing settings such as textures 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] above. The processor 81 also sets light sources such as directional lights and placement lights in the game space and performs rendering processing, including the process of adding shadows to the game space by performing lighting processing based on these light sources. For example, if a light object (see Figures 30 and 31) is placed in the game space, the processor 81 sets a point light that emits light radially from the surface of the light object as the placement light, and sets the range to which the light of the placement light reaches (for example, the range 282 shown in Figures 30 and 31). The game image generated in step S14 is output to the display device and displayed in a cycle of once per frame.

[0265] In step S14 above, if a game image with shadows added using the shadow buffer is generated, the processor 81 updates the shadow buffer and performs rendering processing that includes generating shadows based on the shadow map stored in the shadow buffer and writing them to the frame buffer. For example, the processor 81 updates the shadow buffer according to the method of generating and storing the shadow map in the shadow buffer as described in [2-7. Processing to change materials] above, performs drawing processing using the shadow buffer, and updates the drawing processing data stored in memory based on the drawing processing.

[0266] Returning to Figure 37, in step S15, the processor 81 determines whether or not to terminate the game. For example, if the user performs a predetermined operation input to terminate the game or if the conditions for terminating the game are met, the processor 81 makes an affirmative determination in step S15. If the game is to be terminated, the processor 81 terminates the process according to the flowchart. On the other hand, if the game is not to be terminated, the processor 81 returns to step S1 and repeats the process. Thereafter, the series of processes from steps S1 to S15 are repeatedly executed until it is determined in step S15 that the game should be terminated.

[0267] Thus, in this embodiment, the material of all voxels in the voxel space in which a voxel object is defined is changed depending on whether the voxel object is in shadow or located in a light-exposed area. This makes it possible to realize a game that uses material changes of voxels in a predetermined voxel space based on in-game judgments.

[0268] Furthermore, the combination of the voxel object to be judged and the method for determining whether or not the object is located within the range illuminated by light does not have to be a fixed combination, and various variations are possible. For example, the combination of the object to be judged and the method for determining light can be replaced with any example. As an example, the enemy object 251 used as the object to be judged in the second example in [2-7. Process to change the material] above may be judged based on the bounding box that encloses the enemy object 251, and whether or not the enemy object 251 is located within the range illuminated by light may be determined. In this case, as the first example, whether or not the enemy object 251 is located within the range illuminated by light 282 may be determined based on the number of feature points (see Figure 28) set based on the bounding box that are located within the judgment shape set based on the range illuminated by light 282. As a second example, using the light object 202 as a light source, it may be determined whether or not the enemy object 251 is located within the illuminated area 282 by performing a light and shadow determination using ray checking for each feature point set based on the bounding box, or by performing a light and shadow determination using a shadow buffer. In this case, in the subroutine illustrated in Figure 38, the enemy object 251, which is the target of determination used in the second example, may be determined by the processing in steps S25 to S30, and the processing in step S24 may be skipped.

[0269] Furthermore, the above explanation uses a processing procedure in which both light and shadow detection using a shadow buffer and light and shadow detection using ray checking may be performed for one of the above feature points. However, a processing procedure in which only one of the light and shadow detections is performed may also be used. In this case, in the subroutine illustrated in Figure 38, after the processing in step S28 is performed, the processing in step S29 may be omitted, and the process may return to step S25 and be repeated.

[0270] In the explanation above, we used an example where a voxel object is defined by generating a 3D mesh based on voxel data set in a 3D space. However, a voxel object can also be defined based on voxel data set in a 2D space.

[0271] Furthermore, the game system 1 may be any device, including a portable game device, any portable electronic device (PDA (Personal Digital Assistant), mobile phone, smartphone, personal computer, camera, tablet, etc.). In this case, the input device for user operation to control the player character, etc., does not have to be the left controller 3, right controller 4, or touch panel 13, etc., but may be another controller, mouse, touchpad, touch panel, trackball, keyboard, directional pad, slide pad, etc.

[0272] Furthermore, although the above description uses an example in which each information processing is performed by the game system 1, at least a part of the above processing steps may be performed by other devices. For example, if the game system 1 is configured to communicate with other devices (e.g., another server, another information processing device, another game device, another mobile terminal, etc.), the above processing steps may be performed by the cooperation of those other devices. In this way, by performing at least a part of the above processing steps by other devices, it becomes possible to perform processing similar to the processing described above. In addition, the above information processing can be performed by the cooperation of one processor or multiple processors included in an information processing system composed of at least one information processing device. Furthermore, in the above embodiment, the processor 81 of the game system 1 can perform information processing by executing a predetermined program, but some or all of the above processing may be performed by a dedicated circuit provided in the game system 1.

[0273] Here, according to the above-described modification example, it is also possible to implement the present invention in a so-called cloud computing system form, a distributed wide-area network, or a local network system form. For example, in a distributed local network system form, it is also possible to execute the above-described processing in cooperation between a stationary information processing device (stationary game device) and a portable information processing device (portable game device). Needless to say, in these system forms, there is no particular limitation on which device performs the above-described processing, and the present invention can be realized regardless of any processing distribution.

[0274] 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.

[0275] Further, 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 recorded in advance in a non-volatile storage device inside the device. The information storage medium for storing the above program may be, 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. The information storage medium for storing the above program may also be a volatile memory that stores the above program. Such a storage medium can be called a computer-readable recording medium. For example, by causing a computer or the like to read and execute the programs of these recording media, various functions described above can be provided.

[0276] Although the present invention has been described in detail above, the above description is merely illustrative in all respects and is not intended to limit its scope. Needless to say, various improvements and modifications can be made without departing from the scope of the present invention. Furthermore, those skilled in the art will understand from the description of specific embodiments of the present invention that an equivalent scope can be implemented based on the description of the present invention and common technical knowledge. In addition, it should be understood that the terms used herein are used in the sense commonly used in the art unless otherwise specified. Accordingly, unless otherwise defined, all technical terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention pertains. In case of any conflict, this specification (including definitions) shall prevail. [Industrial applicability]

[0277] As described above, the present invention can be used as a game program, game system, game device, and game processing method that can realize a game that uses material changes of voxels in a predetermined voxel space based on decisions made during the game. [Explanation of Symbols]

[0278] 1… Information processing system 2…Main unit 3…Left controller 4…Right controller 11… Housing 12…Display 13…Touch panel 32, 52... Analog stick 42, 64… terminals 81… Processor 82…Network Communications Department 83... Controller Communication Unit 85…DRAM

Claims

1. In the computer of the information processing device, Multiple voxel data defined for each of the multiple voxel spaces within a virtual space, wherein for each of the multiple voxels contained in the voxel space, at least a density indicating the degree to which the space defined by the voxel is virtually occupied by its contents, and a material indicating the type of contents are set, and the voxel data is updated based on game processing. A first mesh corresponding to the voxel data is generated or updated by determining the vertex coordinates of the mesh based on at least the density contained in the voxel data, and determining the material of the first mesh based on at least the material contained in the voxel data. For each type of material, the first mesh is rendered based on material data which includes at least rendering setting information which includes at least texture information set for that material, and based on the rendering setting information of the material of the first mesh. A game program that, based on a first determination of whether a first determination shape set in the virtual space for at least one of the voxel spaces is located within a range that satisfies a first condition based on the game processing, updates a first material among the materials included in the voxel data of the voxel space that is determined to satisfy the first condition to a second material.

2. The game program according to claim 1, wherein the first condition is that the device is not in the shadow of the first light source.

3. The game program according to claim 2, wherein the computer is instructed to make the first determination based on a shadow buffer based on the first light source.

4. The game program according to claim 2, wherein the computer is instructed to perform the first determination based on the contact between a plurality of rays based on the first light source and the first determination shape.

5. The game program according to any one of claims 2 to 4, wherein the first light source is ambient light.

6. The game program according to claim 1, wherein the first condition is contact with or included in a second determination shape defined in a virtual space.

7. The game program according to claim 6, wherein the second determination shape is set to a position corresponding to the position of a second light source arranged based on the game processing.

8. The game program according to claim 7, wherein the second determination shape is at least one spherical shape centered on the position of the second light source.

9. The game program according to any one of claims 1 to 4 and 6 to 8, further comprising causing the computer to update the second material among the materials included in the voxel data of the voxel space that is determined not to satisfy the first condition in the voxel space where the first determination shape is set, to the first material.

10. The game program according to claims 1 to 4 and 6 to 8, wherein the computer is instructed to perform the first determination based on whether a predetermined number or more of the feature points set in the first determination shape satisfy the first condition.

11. The first determination shape is a rectangular parallelepiped shape, The game program according to claim 10, wherein the aforementioned feature points include at least eight points at the corners of the rectangular parallelepiped.

12. Multiple voxel data defined for each of the multiple voxel spaces within a virtual space, wherein for each of the multiple voxels contained in the voxel space, at least a density indicating the degree to which the space defined by the voxel is virtually occupied by its contents, and a material indicating the type of contents are set, and the voxel data is updated based on game processing. A first mesh corresponding to the voxel data is generated or updated by determining the vertex coordinates of the mesh based on the density included in at least the voxel data, and determining the material of the first mesh based on the material included in at least the voxel data. For each type of material, the first mesh is rendered based on the rendering settings information of the material of the first mesh, based on the material data which includes at least rendering setting information which includes at least the texture information set for the material. A game system that, based on a first determination of whether a first determination shape set in the virtual space for at least one of the voxel spaces is located within a range that satisfies a first condition based on the game processing, updates a first material among the materials included in the voxel data of the voxel space that is determined to satisfy the first condition to a second material.

13. The game system according to claim 12, wherein the first condition is that the player is not in the shadow of the first light source.

14. The game system according to claim 13, wherein the first determination is made based on a shadow buffer based on the first light source.

15. The game system according to claim 13, wherein the first determination is made based on the contact between a plurality of rays based on the first light source and the first determination shape.

16. The game system according to any one of claims 13 to 15, wherein the first light source is ambient light.

17. The game system according to claim 12, wherein the first condition is contact with or included in a second determination shape defined in a virtual space.

18. The game system according to claim 17, wherein the second determination shape is set to a position corresponding to the position of a second light source arranged based on the game processing.

19. The game system according to claim 18, wherein the second determination shape is at least one spherical shape centered on the position of the second light source.

20. Furthermore, in the voxel space where the first determination shape is set, the game system according to any one of claims 12 to 15 and 17 to 19, wherein the second material among the materials included in the voxel data of the voxel space that is determined not to satisfy the first condition is updated to the first material.

21. The game system according to claims 12 to 15 and 17 to 19, wherein the first determination is made based on whether a predetermined number or more of the feature points set in the first determination shape satisfy the first condition.

22. The first determination shape is a rectangular parallelepiped shape, The game system according to claim 21, wherein the aforementioned feature points include at least eight points at the corners of the rectangular parallelepiped.

23. In the information processing system, Multiple voxel data defined for each of the multiple voxel spaces within a virtual space, wherein for each of the multiple voxels contained in the voxel space, at least a density indicating the degree to which the space defined by the voxel is virtually occupied by its contents, and a material indicating the type of contents are set, and the voxel data is updated based on game processing. A first mesh corresponding to the voxel data is generated or updated by determining the vertex coordinates of the mesh based on at least the density contained in the voxel data, and determining the material of the first mesh based on at least the material contained in the voxel data. For each type of material, the first mesh is rendered based on material data which includes at least rendering setting information which includes at least texture information set for that material, and based on the rendering setting information of the material of the first mesh. A game processing method that, based on a first determination of whether a first determination shape set in the virtual space for at least one of the voxel spaces is located within a range that satisfies a first condition based on the game processing, updates a first material among the materials included in the voxel data of the voxel space that is determined to satisfy the first condition to a second material.

24. The game processing method according to claim 23, wherein the first condition is that the object is not in the shadow of the first light source.

25. The game processing method according to claim 24, wherein the information processing system is instructed to perform the first determination based on a shadow buffer based on the first light source.

26. The game processing method according to claim 24, wherein the information processing system is made to perform the first determination based on the contact between a plurality of rays based on the first light source and the first determination shape.

27. The game processing method according to any one of claims 24 to 26, wherein the first light source is ambient light.

28. The game processing method according to claim 23, wherein the first condition is contact with or included in a second determination shape defined in the virtual space.

29. The game processing method according to claim 28, wherein the second determination shape is set to a position corresponding to the position of the second light source arranged based on the game processing.

30. The game processing method according to claim 29, wherein the second determination shape is at least one spherical shape centered on the position of the second light source.

31. The game processing method according to any one of claims 23 to 26 and 28 to 30, further comprising the information processing system updating the second material among the materials included in the voxel data of the voxel space that is determined not to satisfy the first condition in the voxel space where the first determination shape is set, to the first material.

32. The game processing method according to claims 23 to 26 and 28 to 30, wherein the information processing system is instructed to perform the first determination based on whether a predetermined number or more of the feature points set in the first determination shape satisfy the first condition.

33. The first determination shape is a rectangular parallelepiped shape, The game processing method according to claim 32, wherein the aforementioned feature points include at least eight points at the corners of the rectangular parallelepiped.

34. A game device equipped with a processor, The aforementioned processor, Multiple voxel data defined for each of the multiple voxel spaces within a virtual space, wherein for each of the multiple voxels contained in the voxel space, at least a density indicating the degree to which the space defined by the voxel is virtually occupied by its contents, and a material indicating the type of contents are set, and the voxel data is updated based on game processing. A first mesh corresponding to the voxel data is generated or updated by determining the vertex coordinates of the mesh based on the density included in at least the voxel data, and determining the material of the first mesh based on the material included in at least the voxel data. For each type of material, the first mesh is rendered based on the rendering settings information of the material of the first mesh, based on the material data which includes at least rendering setting information which includes at least the texture information set for the material. A game device that, based on a first determination of whether a first determination shape set in the virtual space for at least one of the voxel spaces is located within a range that satisfies a first condition based on the game processing, updates a first material among the materials included in the voxel data of the voxel space that is determined to satisfy the first condition to a second material.