Game program, game system, game processing method, and game device
The game program and system dynamically switch materials in voxel objects by altering material IDs and densities, addressing the limitations of existing voxel-based material management in virtual spaces, enhancing visual quality and reducing processing load.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- NINTENDO CO LTD
- Filing Date
- 2026-01-14
- Publication Date
- 2026-04-20
AI Technical Summary
Existing game technologies struggle to effectively manage and control the materials of voxel-based objects in virtual spaces, limiting the ability to dynamically change and render materials without updating voxel data or meshes.
A game program and system that updates voxel data to switch materials by altering material IDs and densities, allowing instantaneous material changes without updating voxel data or meshes, and supports rendering and collision determination using separate meshes for display and collision purposes.
Enables dynamic material changes in voxel objects, improving visual quality and reducing processing load by separating material switching from voxel data updates, while maintaining high-quality rendering and collision detection.
Smart Images

Figure 2026067411000001_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a game program, a game system, a game processing method, and a game device that generate an object in a virtual space using voxel data.
Background Art
[0002] Conventionally, 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 games, there are cases where not only control of a mesh based on voxels but also control of materials is required.
[0005] 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 utilize changes in the material of a voxel mesh in a game.
Means for Solving the Problems
[0006] In order to achieve the above object, the present invention can adopt, for example, the following configurations (1) to (8).
[0007] (1) One example of the game program configuration of the present invention involves causing the computer of an information processing device to update voxel data defined in a virtual space, where each of a plurality of voxels has at least a density indicating the degree to which the space defined by the voxel is virtually occupied by its contents, and a material ID indicating the type of contents, based on game processing; generating or updating a first mesh corresponding to the voxel data by determining the vertex coordinates of the mesh based at least the density included in the voxel data, and determining the material IDs of the polygons of the first mesh based at least the material IDs included in the voxel data; and rendering the polygons based on the rendering settings information of the material associated with the material ID of each polygon of the first mesh, based on material data that includes at least rendering setting information including texture information set for each material associated with the material ID, thereby rendering the first mesh. Then, when a first event occurs based on game processing, the computer is instructed to switch the material associated with the first material ID to which the first material is associated from the first material to the second material.
[0008] According to the configuration described in (1) above, when the first event occurs, the mesh of a specific material can be switched to a different material. Furthermore, by simply switching the material associated with the material ID, the material of the entire virtual space can be switched, and since there is no need to update voxel data or meshes, the material can be switched instantly.
[0009] (2) In the configuration described in (1) above, the computer may also be instructed to switch the material associated with the second material ID to which the second material is associated, from the second material to the first material, when the first event occurs.
[0010] According to the configuration in (2) above, the two materials can be swapped with each other.
[0011] (3) In the configuration of (2) above, the computer may further cause, when a second event occurs based on game processing, to generate a first voxel update range in the virtual space, reduce the density of each voxel in the voxel data that corresponds to the first voxel update range in the virtual space, change the material ID of each voxel that corresponds to the second voxel update range, which is the size that encompasses the first voxel update range, to a pre-set target material ID for each type of material ID before the change, and when a first event occurs, switch the material associated with the third material, which is the target material ID of the first material ID, from the third material to the fourth material, and switch the material associated with the fourth material, which is the target material ID of the second material ID, from the fourth material to the third material.
[0012] According to the configuration in (3) above, when the density of voxels is reduced, deformation can be performed that makes it appear as if the interior is exposed, and the material can be switched while maintaining this exposed state.
[0013] (4) In the configuration described in (3) above, if a target material ID is not set for the second material ID, the computer may be instructed to set a fourth material based on the same drawing settings as the second material, and the material associated with the third material ID may be switched to the fourth material.
[0014] According to the configuration in (4) above, even if you switch to a material for which a target material ID has not been set, you can restore to the original material when you switch again.
[0015] (5) In any one of the configurations (1) to (3) above, the computer may also be instructed to render non-voxel objects, which are objects placed in a virtual space and are not based on voxel data, but which have a polygon mesh and a material ID including a first material ID set, by rendering the polygon mesh based on the material data.
[0016] According to the configuration described in (5) above, it is possible to switch the materials of objects other than voxels as well. For example, by switching the material of a detailed-looking object together with a voxel object, the target of the switching effect can be made to look high-quality.
[0017] (6) In any one of the configurations (1) to (5) above, a surface object having a polygon mesh not based on voxel data may be placed on the surface of the first mesh based on the first material ID. The computer may also be instructed to draw the surface object when the first material is associated with the first material ID, and to set the surface object to be excluded from drawing or to be transparent when the second material is associated with the first material ID.
[0018] According to the configuration described in (6) above, the visual quality can be improved by placing additional surface objects on the surface of the mesh. Furthermore, by linking the display or non-display of surface objects when switching materials, the surface objects can be rendered as if they were the surface of the first material.
[0019] (7) In any one of the configurations (1) to (6) above, the material data may further include property information indicating the in-game effects set for each type of material. In this case, the computer may further generate or update a second mesh corresponding to the voxel data and used for collision determination by determining the vertex coordinates of the second mesh based at least on the density included in the voxel data, and determining the material ID of the polygon of the second mesh based at least on the material ID included in the voxel data. Based on the collision determination with the determination shape corresponding to the determination target based on the game processing, an in-game effect corresponding to the material associated with the material ID of the polygon of the second mesh at the collision position may be generated.
[0020] According to the configuration (7) above, since the determination mesh and the display mesh are determined separately, appropriate meshes can be used according to their respective uses.
[0021] (8) In any one of the configurations (1) to (6) above, the material data may further include property information indicating the in-game effects set for each type of material. In this case, based on the collision determination with the determination shape corresponding to the determination target based on the game processing, an in-game effect corresponding to the material associated with the material ID of the polygon of the first mesh at the collision position may be generated.
[0022] According to the configuration (8) above, since drawing and collision determination can be performed using the same mesh, the processing load for setting the mesh can be reduced.
[0023] Further, the present invention may be implemented in the form of a game system, a game processing method, and a game device.
Advantages of the Invention
[0024] According to the present invention, material changes can be reflected in an object based on voxel data while retaining material information (e.g., material ID). [Brief explanation of the drawing]
[0025] [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 where multiple material areas, a player character 201, a toggle switch object CS, and a placement object 202 are set on a terrain object. [Figure 26] This diagram shows an example of a game image illustrating how player character 201 performs an action using a toggle switch object CS based on user input. [Figure 27] This diagram shows an example of a game image illustrating how player character 201 performs an action using the toggle switch object CS again, based on user input. [Figure 28] A diagram showing an example of placement object 202. [Figure 29] This diagram shows an example of a game image illustrating player character 201 performing a punch action on area 254 of a terrain object. [Figure 30] This diagram shows an example of a game image illustrating the placement of a terrain object where a portion of area 254 has been changed to material D1 associated with an internal material ID through a modification process, and a toggle switch object CS. [Figure 31]This diagram shows an example of a game image illustrating how player character 201 performs an action using the toggle switch object CS based on user input. [Figure 32] A diagram showing an example of a surface object. [Figure 33] This diagram shows an example of a game image illustrating player character 201 throwing an ice object into area 256 of a terrain object. [Figure 34] This diagram shows an example of a game image illustrating how player character 201 performs an action using the toggle switch object CS based on user input. [Figure 35] This diagram shows an example of a game image illustrating the player character 201 throwing an ice object again into area 254 of a terrain object. [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. [Modes for carrying out the invention]
[0026] [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.
[0027] 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.
[0028] 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".
[0029] 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.
[0030] 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.
[0031] 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.
[0032] 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).
[0033] 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.
[0034] 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.
[0035] 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.
[0036] 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).
[0037] 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.
[0038] 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.
[0039] 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.
[0040] Furthermore, the left controller 3 is equipped with a terminal 42 for wired communication between the left controller 3 and the main unit 2.
[0041] 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.
[0042] 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.
[0043] Furthermore, the right controller 4 is equipped with a terminal 64 for wired communication between the right controller 4 and the main unit 2.
[0044] 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.
[0045] 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).
[0046] 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.
[0047] 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.
[0048] 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.
[0049] 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.
[0050] 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.
[0051] 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.
[0052] 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.
[0053] 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.
[0054] 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.
[0055] 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.
[0056] 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.
[0057] 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.
[0058] 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.
[0059] 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.
[0060] 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.
[0061] 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.
[0062] 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.
[0063] 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).
[0064] 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.
[0065] 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.
[0066] 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.
[0067] [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, player characters controlled by the player) 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.
[0068] [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.
[0069] 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.
[0070] 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.
[0071] 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.
[0072] 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).
[0073] 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, the game space may have a main voxel space defined throughout the entire game space and a sub-voxel space defined in a part of the game space. In this case, the game system 1 stores voxel data for each voxel space.
[0074] 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.
[0075] 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.
[0076] 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.
[0077] 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.
[0078] 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.
[0079] 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 directly includes data indicating the content of the material (i.e., information such as the name, properties, and drawing settings, which will be described later).
[0080] 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.
[0081] 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 to it. 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.
[0082] 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.
[0083] 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 such as the name, properties, drawing settings, and internal material ID set for that material.
[0084] 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.
[0085] 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.
[0086] 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.
[0087] 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.
[0088] As shown in Figure 12, in the material data of this embodiment, an internal material ID is associated with a material ID. The internal material ID indicates the material of the inner part of an object (hereinafter referred to as the "internal material") when the material ID associated with it indicates the material of the outer part of an object. For example, the material ID representing the bark of a tree may be associated with the material ID representing the inside of the tree as the internal material ID. Also, for example, the material ID representing a grassy ground may be associated with the material ID representing the soil inside when the grass on the ground surface is removed as the internal material ID. In this embodiment, internal materials are set in advance for each type of material. However, depending on the type of material, there may be cases where an internal material is not set, that is, an internal material ID is not associated with a material ID. As will be described in detail later, the internal material is used as the target material when a material change process is performed on a voxel to which the material to which the internal material is associated is set (see [2-7. Process to switch materials] below).
[0089] In this embodiment, the material data is set with the same type of value as the ID set as the material ID. For example, in the example shown in Figure 12, the ID of the soil material (001 in Figure 12), which is the internal material ID associated with the ID of the grass material (003 in Figure 12), is also set as the material ID. Therefore, by referring to the material data, it is possible to identify the name, properties, and rendering settings information associated with the internal material ID. The material data may be any data structure that can identify the information corresponding to the internal material ID. The material data may be a data structure in which the name, properties, and rendering settings information are indirectly associated with the internal material ID as described above, or it may be a data structure in which this information is directly associated with the internal material ID.
[0090] 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.
[0091] 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.
[0092] Furthermore, in this embodiment, when a material switching event occurs, the material associated with the material ID targeted by the event is switched from the first material to the second material. For example, if a material switching event occurs targeting a certain material ID, the material associated with that material ID is switched from the first material to the second material. As another example, if an event occurs that mutually switches materials targeting multiple material IDs, the material associated with the first material ID is switched from the first material to the second material, and the material associated with the second material ID is switched from the second material to the first material. For example, in the above material data, if the first material ID is associated with the first material and the second material ID is associated with the second material, by changing the material ID corresponding to the second material from the second material ID to the first material ID, the material corresponding to the first material ID becomes the second material. In this case, the corresponding materials can be swapped by changing the material ID associated with the first material from the first material ID to the first material ID. Another method of modification is to change the content of the material associated with the material ID targeted by the above event (such as the name, properties, and rendering settings set for the material) to match that of a new, different material or another material. Note that the multiple material IDs targeted by the above event may be three or more material IDs, in which case the materials associated with each material ID may be switched between each other through a cyclical replacement. Furthermore, the material to which the material ID targeted by the above event is switched may be predetermined for the event, or it may be randomly set each time the event occurs.
[0093] As described above, when material data is changed by an event that switches materials, the material associated with the internal material ID may also be changed by that event. For example, the material associated with the internal material ID that is the target material ID of the material ID that was targeted by the above event may be changed to a different material. As an example, consider a case where the material associated with the first material ID is switched from the first material (e.g., grass ground) to the second material (e.g., tree bark), and the material associated with the second material ID is switched from the second material to the first material. In this case, the material associated with the first internal material ID corresponding to the first material ID (e.g., interior soil) is switched to the material associated with the second internal material ID corresponding to the second material ID (e.g., interior of a tree). Also, the material associated with the second internal material ID corresponding to the second material ID is switched to the material associated with the first internal material ID corresponding to the first material ID.
[0094] Note that the switching of materials associated with internal material IDs does not have to be done mutually; they may be switched to any material. For example, the example above uses a mutual switching of the material associated with the first internal material ID corresponding to the first material ID and the material associated with the second internal material ID corresponding to the second material ID. However, the material associated with the first internal material ID may be switched to a material different from the material associated with the second internal material ID.
[0095] Furthermore, if an internal material ID is not set for the material ID targeted by the above event (for example, if the material of the outer part of an object and the material of the inner part of the object are the same), it may be switched to a dummy internal material. For example, if an internal material ID corresponding to the second material ID is not set, an internal material containing the same material content as the second material may be set, and the material associated with the first internal material ID may be switched to that internal material. As an example, consider a case where the material associated with the first material ID is switched from the first material (for example, grass ground) to the second material (for example, iron), and the material associated with the second material ID is switched from the second material to the first material. In this case, the material associated with the first internal material ID corresponding to the first material ID (for example, internal soil) is switched to a dummy internal material corresponding to the second material ID (for example, iron).
[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] In other embodiments, only one of the display mesh and the judgment mesh described above may be set (i.e., the same mesh may be used for both display and judgment). In this case, the display mesh may be used as both the display mesh and the judgment mesh, or the judgment mesh may be used as both the display mesh and the judgment mesh. When the judgment mesh and the display mesh are set separately, appropriate meshes can be used according to their respective purposes, whereas when drawing and collision judgment are shared on the same mesh, the processing load for setting the mesh can be reduced.
[0169] [2-7. Switching materials] Next, referring to Figures 25 to 35, we will explain an example of a process that switches materials when a predetermined event occurs. In the following, we will assume that terrain objects such as the ground and walls are voxel objects, and we will explain an example in which a switch occurs when a player character moves or performs an action, and a collision detection is performed as a result, causing an in-game effect.
[0170] The above-mentioned "in-game actions" refer to any changes that occur in the game, such as changes resulting from "processing that reflects the results of contact between objects." The "in-game actions" are based on collision detection between a detection mesh and a detection shape corresponding to a target for detection based on game processing (for example, a detection area set on an object such as a player character), and the above actions may occur on the object corresponding to the detection mesh or on the object corresponding to the target for detection. The content of the "in-game actions" 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).
[0171] Figure 25 is an example of a game image showing that multiple material regions, a player character 201, a toggle switch object CS, and a placement object 202 are set on a terrain object. In the example shown in Figure 25, the material for the polygons of some region 251 of the terrain object's detection mesh and display mesh is set to Material A, and the material for the polygons of region 252 is set to Material B. Specifically, Material IDa is set for the voxel data of the terrain object's voxels in region 251, and Material A is associated with Material IDa based on this material data. Also, Material IDb is set for the voxel data of the terrain object's voxels in region 252, and Material B is associated with Material IDb based on this material data.
[0172] The toggle switch object CS is a gimmick that generates an event to switch materials in the game space in response to an action by the player character 201. For example, when the player character 201 makes contact with the toggle switch object CS in the game space (for example, by hitting a specific part), an event is generated that switches the target material set on the toggle switch object CS in that game space. In the example shown in Figure 25, a toggle switch object CS that swaps between material A and material B is provided on a terrain object.
[0173] As shown in Figure 26, when the player character 201 performs the above action using the toggle switch object CS based on user input, the voxels of material A in the game space (for example, within the game stage being played) are switched to voxels of material B, and the voxels of material B are switched to voxels of material A. As a result of this process, the material for the polygons in region 251 is changed from material A to material B, and the material for the polygons in region 252 is changed from material B to material A.
[0174] In this embodiment, when the process of switching materials is performed, the material data (see Figure 12) is modified. For example, in the example shown in Figure 26, in the material data, the material ID associated with material A, which is the target of the material switching event, is changed from material ID a to material ID b, and the material ID associated with material B is changed from material ID b to material ID a. As a result, the voxels in region 251 where material ID a is set in the voxel data are switched to voxels of material B while maintaining the voxel data. Then, in response to the changes in the material data, the material of the polygons of the judgment mesh and display mesh associated with the voxels in region 251 is changed from material A to material B. Also, the voxels in region 252 where material ID b is set in the voxel data are switched to voxels of material A while maintaining the voxel data, and in response to the changes in the material data, the material of the polygons of the judgment mesh and display mesh associated with the voxels in region 252 is changed from material B to material A.
[0175] Thus, in this embodiment, when an event occurs that switches materials based on game processing, the material ID associated with the material in the material data is switched to another material ID without changing the material ID. As a result, the material of all voxels and polygons of meshes associated with that material ID in the game space is changed. Therefore, in this embodiment, when the above event occurs, the mesh of a specific material can be switched to a different material. Furthermore, the material of the entire game space can be switched simply by switching the material ID associated with the material, and since updating voxel data or meshes is unnecessary, the material can be switched immediately. Thus, the concept in this embodiment is to switch the material associated with all voxels and polygons in the game space that have the first material ID set from the first material to the second material without changing the material ID, and the method of satisfying this concept is arbitrary. That is, as long as the material associated with all voxels and polygons in the game space is switched without changing the material ID, the above concept may be satisfied by switching the material ID corresponding to the material by a method other than changing the material data. As an example, without changing the material ID, the material associated with all voxels and polygons in the game space where the first material ID is set may be switched to either the first or second material based on the on / off state of flag data contained in data different from the above material data (e.g., voxel data). As another example, multiple sets of the above material data may be prepared, and by changing the material data used for rendering, the material associated with all voxels and polygons in the game space where the first material ID is set may be switched from the first material to the second material.
[0176] Furthermore, the process of switching materials as described above is not limited to embodiments where one type of material is set for a voxel, but can also be applied to embodiments where multiple types of materials are set for a voxel. In that case, among the multiple material IDs in the voxel, the material associated with the material ID that was the target of the material switching event will be switched based on the change in the material data.
[0177] As shown in Figure 27, after the material switching process described above has been performed, if the player character 201 performs the same action using the same switching switch object CS based on user input, the voxels of material A will be switched to voxels of material B, and the voxels of material B will be switched back to voxels of material A. This process will cause the polygons in region 251 that were switched to material B to be returned to material A, and the polygons in region 252 that were switched to material A to be returned to material B.
[0178] In this embodiment, the material data is also modified when the process of switching materials is performed again. For example, in the example shown in Figure 27, in the material data, the material ID associated with material B, which was the target of the material switching event, is changed back from material ID a to material ID b, and the material ID associated with material A is changed back from material ID b to material ID a. As a result, the voxels in region 251, where material ID a is set in the voxel data, are switched to voxels of material B while maintaining the voxel data, and then changed back to material A. Then, in accordance with the changes that are returned in the material data, the material for the polygons of the determination mesh and display mesh associated with the voxels in region 251 is changed back from material B to material A. Also, the voxels in region 252, where material ID b is set in the voxel data, are switched to voxels of material A while maintaining the voxel data, and then changed back to material B. Then, in accordance with the changes to the material data described above, the material for the polygons of the determination mesh and display mesh associated with the voxels in region 252 is changed back from Material A to Material B.
[0179] In this embodiment, the material of non-voxel objects may also be switched by the process of switching materials as described above. For example, the placement object 202 shown in Figures 25 to 27 is generated by combining a voxel object with a part of a non-voxel object, and the material of the non-voxel object part is switched in the same way as the terrain object.
[0180] As shown in Figure 28, the main body of the placement object 202 is generated using voxel objects. Furthermore, the finer details attached to the surface of the placement object 202 (eyebrows, eyes, teeth, etc.) are generated as non-voxel objects. These non-voxel objects are objects not based on the aforementioned voxel data, and are displayed in the game space when a set polygon mesh is rendered. While the placement object 202 is generated by combining voxel and non-voxel objects, it may also be placed in the game space independently as a virtual object composed solely of non-voxel objects.
[0181] In this embodiment, the same material ID as for the voxel object is set on the polygon mesh of the non-voxel object, and the material content (for example, the name, properties, and rendering settings information set for the material) is set based on the material data. Then, by rendering the polygon mesh with the material ID set based on the material data, the non-voxel object is displayed. Therefore, if the material ID set on the non-voxel object is the object whose material is changed by the material switching process described above, the material is switched in the same way as for the voxel object. In this way, in this embodiment, the material can be switched for objects other than voxel objects as well. For example, by switching the material of a non-voxel object, which has a detailed appearance that is difficult to create with voxel objects, together with the voxel object, the object whose material is switched can be made to have a high-quality appearance.
[0182] In other embodiments, the material ID set for the non-voxel object may be set separately from the material ID set for the voxel object. In this case, the material ID set for the non-voxel object is managed separately from the material ID set for the voxel object, so material data for the non-voxel object may be set. By changing the material data for the voxel object and the material data for the non-voxel object through the material switching process, the material may also be switched for objects other than voxel objects.
[0183] In this embodiment, the material may be modified in response to deformation that causes a portion of a voxel object to be destroyed. The object to which the material is modified may be a voxel object defined in the main voxel space described above, or a voxel object defined in the sub-voxel space.
[0184] In the example shown in Figure 29, when player character 201 performs a punch action on area 254 of the terrain object, the terrain object deforms as if part of it has been destroyed. At this time, the deformed part of the terrain object and the surrounding area are changed to look like the interior of the terrain. For example, in the example in Figure 29, the ground surface of the terrain object looks like it has grass growing on it, and the deformed part of the terrain object is changed to look like bare soil without grass.
[0185] Before the modification process, the material D assigned to the voxels in region 254 of the terrain object is assumed to be the grass material, and the material ID representing grass is materialIDd. In the material data, the grass material D is associated with internal materialIDd1, which represents the soil material D1. In the material data, the grass material has the texture ID representing the ground surface where the grass grows set as rendering setting information, and the material D1 representing soil has the texture ID representing the soil underground set as rendering setting information. As a result of the above, each polygon in region 254 of the terrain object before the modification process is assigned the grass material D, and region 254 appears to have grass growing on its ground surface.
[0186] As shown in Figure 29, when the player character 201 performs a punch action on region 254 in the terrain object, the game system 1 sets a density update range, which is the range over which the voxel density is updated, in the same manner as in the examples shown in Figures 13 and 14. For example, the shape of the density update range may be spherical or bell-shaped, extending along the direction of the punch action. Then, the density of voxels within the density update range of the terrain object is updated to decrease. Based on the updated voxel density, a display mesh and a judgment mesh of the terrain object are generated, so that region 254 in the terrain object is deformed as if the portion within the density update range has been erased.
[0187] Furthermore, the game system 1 sets a material update range, which is the range over which the voxel material is updated. In this embodiment, the material update range, like the density update range, is represented by an SDF. In this embodiment, the material update range is set to encompass the density update range. For example, the game system 1 generates the material update range by expanding the density update range. As a result, the terrain object after the modification process has its material changed only for the deformed portion and the surrounding portion, making the terrain object look more natural. In other embodiments, the material update range does not need to be generated based on the density update range and may be included in the game program beforehand, just like the density update range. Also, the material update range may be set at any position that encompasses the density update range. Furthermore, the shape of the material update range is arbitrary. In other embodiments, the material update range and the density update range do not need to be similar in shape.
[0188] Game System 1 changes the material of voxels within the material update range of the terrain object. For example, the material of voxels within the material update range is changed to the material ID indicated by the internal material ID associated with the material before the change in the material data (see Figure 12). In the example shown in Figure 29, the material ID d representing grass is associated with the internal material ID d1 representing soil. Therefore, the material of voxels within the material update range 255 is changed from the grass material D to the soil material D1 by the change process. Specifically, for voxels within the material update range 255, Game System 1 changes the material set for the voxel to the internal material by updating the material ID of the voxel data from the material ID d representing grass to the internal material ID d1 representing soil.
[0189] As mentioned above, in this embodiment, voxel data holds up to two (specifically, multiple) material IDs per voxel. In the example above, it was assumed that one type of material was set for each voxel, but if multiple types of materials are set for each voxel, during the material change process, each material ID set for each voxel within the material update range is changed to its corresponding internal material ID.
[0190] When the above modification process is performed, game system 1 generates a display mesh and a detection mesh for the terrain object according to the method described in [2-4. Determining Vertex Materials] to [2-6. Mesh Generation], based on the density and material of the voxels after the modification process. As a result, the terrain object is deformed as if part of it has been destroyed, and the material of the polygons in the deformed part and the surrounding part is set to the material of soil. When the above terrain object is rendered, the above polygons are rendered using a texture that represents soil. As a result, the terrain object after the above modification process will have the appearance of soil in the deformed part and the surrounding part, and as a whole, it is possible to create an effect that looks like a part of the grassy ground surface has been scraped away and the soil underneath is exposed.
[0191] Figure 30 is an example of a game image showing a terrain object in which a portion of region 254 has been changed to material D1 associated with an internal material ID as a result of the above modification process, and a toggle switch object CS are placed. In the example shown in Figure 30, the material for some polygons in region 253 of the terrain object's detection mesh and display mesh is set to material C, the material for the polygons in region 254 is set to material D, and the material for some polygons in region 255 of region 254 is set to material D1. Specifically, material ID c is set for the voxel data of the terrain object's voxels in region 253, and material C is associated with material ID c based on this material data. Also, material ID d is set for the voxel data of the terrain object's voxels in region 254, and material D is associated with material ID d based on this material data. Furthermore, internal material ID d1 is set for the voxel data of the terrain object's voxels in region 255 of region 254, and material D1 is associated with material ID d1 based on this material data.
[0192] As shown in Figure 31, when the player character 201 performs the above action using the toggle switch object CS based on user input, the material data (see Figure 12) is changed. For example, in the example shown in Figure 31, in the material data, the material associated with material D, which is the target of the event to switch materials, is changed from material IDd to material IDc, and the material associated with material C is changed from material IDc to material IDd. Also, in the material data, the material associated with internal material IDd1 corresponding to material D is changed from material D1 to the internal material corresponding to material C. Note that, as in the example in Figure 31, if no internal material is set for material C, a dummy internal material C1 containing the same material content as material C is set in the material data, and material D1 is changed to the said internal material C1.
[0193] This material data modification process switches the voxels in region 255, where material IDc is set in the voxel data, to voxels of material D while maintaining the voxel data. Then, in accordance with the above material data modification, the material of the polygons of the judgment mesh and display mesh associated with the voxels in region 255 is changed from material C to material D. Also, the voxels in region 254, where material IDd is set in the voxel data, are switched to voxels of material C while maintaining the voxel data. Then, in accordance with the above material data modification, the material of the polygons of the judgment mesh and display mesh associated with the voxels in region 254 is changed from material D to material C. Furthermore, some voxels in region 255 within region 254, where internal material IDd1 is set in the voxel data, are switched to voxels of internal material C1. Then, in accordance with the above material data modification, the material of the polygons of the judgment mesh and display mesh associated with the voxels in region 255 is changed from material D1 to material C1. Therefore, although the voxels in region 254 and region 255 have different material IDs, region 254 and region 255 are displayed as the same-looking ground surface.
[0194] As described above, if the process of switching materials is performed again after the material switching process has been performed, the above material data will also be modified. For example, in the above material data, the material ID associated with material C, which was the target of the material switching event, will be changed back from material IDd to material IDc, and the material ID associated with material D will be changed back from material IDc to material IDd. Also, in the above material data, the material associated with internal material IDd1 will be changed back from dummy internal material C1 to material D1. As a result, as illustrated in Figure 30, the voxels in region 253 where material IDc is set in the voxel data will be switched to voxels of material D while maintaining the voxel data, and then changed back to material C. Then, in accordance with the changes that are returned to the above material data, the material for the polygons of the judgment mesh and display mesh associated with the voxels in region 253 will be changed back from material D to material C. Furthermore, the voxels in region 254, where material IDd is set in the voxel data, are switched to voxels of material C while maintaining the voxel data, and then switched back to material D. Then, in accordance with the changes in the material data, the material for the polygons of the judgment mesh and display mesh associated with the voxels in region 254 is switched back from material C to material D. In addition, the voxels in region 255, where internal material IDd1 is set in the voxel data, are switched to voxels of dummy internal material C1, and then switched back to material D1. Then, in accordance with the changes in the material data, the material for the polygons of the judgment mesh and display mesh associated with the voxels in region 255 is switched back from material C1 to material D1.
[0195] Thus, even if the material D of a terrain object where the underground material D1 portion is exposed is switched to material C, which does not have a target material ID, the material of that portion can be temporarily switched to a dummy internal material C1, and then the original material state can be restored when the material is switched again. Furthermore, even if material C, which does not have a target material ID, is a material that cannot be deformed by player character 201, as described above, by switching to the deformable material D, it can be deformed by player character 201's actions, and by switching the material back to the original, the object with the non-deformable material can be restored to its deformed state.
[0196] In this embodiment, the display mode of objects attached to the voxel object whose material is to be switched may also be changed by the process of switching the material described above. For example, in the terrain object shown in Figures 29 and 30, region 254 has multiple surface objects representing grass growing from the ground placed on the surface of a mesh (e.g., a display mesh). These surface objects are generated by non-voxel objects placed on the surface of the mesh (e.g., a display mesh) set for the voxel objects that constitute region 254 in the terrain object.
[0197] As shown in Figure 32, the surface object is placed and drawn on the surface of the mesh based on the material IDd, thereby more realistically representing the ground surface of material D, such as one with grass growing on it. On the other hand, if the material to which material D is switched is a material with a flat ground surface without grass, etc. (for example, material C shown in Figure 32), it becomes inappropriate to draw the surface object on the surface of the mesh after switching to that material. In this embodiment, the surface object is drawn when material IDd is associated with material D in the material data (see area 254 in the left diagram of Figures 29, 30, and 32). Then, in the material data resulting from the material switching process, if material IDd is associated with material C, the surface object is set to be excluded from drawing (see area 254 in the right diagram of Figures 31 and 32). The game system 1 may exclude the surface object from drawing in any way so that the surface object appears invisible, while maintaining information about the surface object in memory within the game space. For example, the rendering process for the surface object may be skipped, or the surface object may be made transparent. Furthermore, the object represented by the surface object is arbitrary and may be a virtual object representing thorns, hairs, needle-like protrusions, wires, rising gases or bubbles, etc., in addition to the grass mentioned above.
[0198] Furthermore, if the material is switched back to material D after the surface object has been excluded from rendering, the surface object will be included in the rendering target and drawn again on the mesh surface of material D. In this way, by excluding the surface object from rendering while retaining its information through the material switch, the appearance of the surface object can be easily restored when the material is switched again. In addition, by placing more surface objects on the surface of the display mesh, the appearance can be made more realistic, and by linking whether or not the surface object is rendered during the material switch process, the surface object can be rendered as if it were the ground surface of material D.
[0199] Furthermore, in the above material data, if material D is associated with material IDc (for example, region 253 shown in Figure 31), the surface object may or may not be drawn. In the former case, in the above material data, if material C is associated with material IDc (for example, region 253 shown in Figures 29 and 30), the surface object may be placed in advance before the material switching process is performed so that it appears invisible while retaining the mesh surface information.
[0200] In this embodiment, the material may be changed in response to contact between objects. Figure 33 is an example of a game image showing a player character 201 throwing an ice object into area 256 of a terrain object. In this embodiment, the user can cause the player character 201 to perform an action of grabbing, lifting, and throwing an ice object placed in the game space by a predetermined input. As a result, the ice object moves in the game space based on the direction in which the player character 201 performed the throwing action.
[0201] The example in Figure 33 assumes that the voxel relating to region 256 of the terrain object has a material IDx associated with the lava material set as the first material ID, and the material mixing ratio is set to 0 (i.e., the material set for the voxel is of one type, "lava"). Furthermore, the property information included in the above material data is assumed to be set in material IDx as a property that increases the temperature of the object it comes into contact with (for example, the property that the temperature is above a predetermined value). The game system 1 generates an in-game action (in the above example, an increase in the object's temperature) based on the property information corresponding to the material set for the polygon in the collision detection mesh where collision detection was performed.
[0202] An ice object may or may not be a voxel object. If the ice object is a voxel object, a unique voxel space is defined for the ice object, independent of the voxel space of the voxels corresponding to terrain objects, etc. Unique voxel data corresponding to the ice object 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 ice object, and the position and orientation (orientation) of the unique voxel space within the game space are controlled. In the following explanation, an example in which the ice object is composed of voxel objects will be used.
[0203] The polygons in the ice object have a first material ID of "ice". Furthermore, the material mixing ratio is set to 0 (i.e., the material set for the voxel is one type, "ice"). And, as property information included in the material data mentioned above, the ice material is set to have the property of lowering the temperature of the object it comes into contact with (for example, the property that the temperature is below a predetermined value (e.g., below freezing point)). Then, using the method for determining the materials of the display mesh and the detection mesh mentioned above, the materials of the ice object's unique display mesh and unique detection mesh are determined based on the material of the voxel.
[0204] In this embodiment, when an ice object released by a throwing action is determined to have come into contact with a voxel object as a result of collision detection, the game system 1 modifies the voxel object as an in-game action. In the example shown in Figure 33, the region 257 of the terrain object is modified so that the material of the region 257 of the terrain object changes as if it has been cooled by the ice object near the point of contact with region 256 of the terrain object. In addition, the ice object is deformed so that the area near the point of contact with region 256 of the terrain object appears to have melted due to the contact. Specifically, the game system 1 generates an update range that includes the point of contact and modifies a part of region 256 of the terrain object by changing the material of the voxels of the terrain object within the update range. The game system 1 also deforms a part of the ice object to achieve the above shape by decreasing the density of the voxels of the ice object within the update range.
[0205] For example, the update range is set to a shape corresponding to the shape where the ice object comes into contact with the terrain object, and the material of the lava in the voxels of the terrain object within the update range is set to obsidian. Specifically, the voxels within the update range corresponding to region 256 of the terrain object have their first material ID changed to material IDe associated with the obsidian material, and the material mixing ratio remains set to 0 (i.e., the material set for the voxel is one type, "obsidian"). Then, the materials of the display mesh and the detection mesh of the terrain object are determined based on the material of the changed voxels. In Figure 30, the portion of region 257 that has been changed to one type, "obsidian," is set within region 256.
[0206] The game image illustrated in Figure 33 shows a game space where a terrain object, in which a portion of area 256 has been changed to material E associated with material IDe (for example, lava material) as a result of the above modification process, and a toggle switch object CS are placed. Here, the toggle switch object CS is assumed to be a mechanism that switches between material E (for example, obsidian material) and material F (for example, rubber material).
[0207] As shown in Figure 34, when the player character 201 performs the above action using the toggle switch object CS based on user input, the above material data (see Figure 12) is changed. For example, in the example shown in Figure 34, in the above material data, the material associated with the material IDe that was the target of the event to switch the material is changed from material E to material F.
[0208] As a result of the above material data modification process, the voxels in region 257, where material IDe is set in the voxel data, are switched to voxels of material F while maintaining the voxel data. Then, in accordance with the above material data modification, the material of the polygons of the judgment mesh and display mesh associated with the voxels in region 257 is changed from material E to material F.
[0209] Referring to Figure 35, consider the case where, after the material switching process described above has been performed, the player character 201 throws the ice object into area 254 of the terrain object again. Figure 35 shows an example of the player character 201 throwing the ice object into area 254 of the terrain object after the material switching process from material E to material F has been performed. In this case, similar to the in-game action explained using Figure 33, the ice object released by the throwing action modifies the voxel objects in area 254 as an in-game action. In the example shown in Figure 35, area 258 of the terrain object is modified as if the material of the area 256 of the terrain object had changed due to being cooled by the ice object near the point where the ice object made contact with the area 258 of the terrain object. Specifically, the game system 1 generates an update range similar to the in-game action explained using Figure 33, and generates area 258 of the terrain object by changing the material of the voxels of the terrain object within that update range.
[0210] At this time, before the process of switching materials described above was performed, region 257 of the terrain object, which was material E (for example, obsidian material), has already been switched to material F (for example, rubber material). However, despite the material switching described above, game system 1 sets the material of the voxels of the terrain object within the update range so that the lava material of those voxels becomes obsidian material. For example, because the process of switching materials described above has changed the material ID associated with material E (for example, obsidian material) in the material data to material ID f, the voxels within the update range corresponding to region 254 of the terrain object are changed to material ID f. Then, based on the material of the changed voxels, the material of the display mesh and the detection mesh of the terrain object is determined, and the part of region 258 that was changed to material E (for example, obsidian material) is set within region 254. In this case, if the material switching is performed again, region 257 will become material E and region 258 will become material F.
[0211] Thus, in this embodiment, even if the target material to be changed by the material change process (here, Material E) has been switched to another material (here, Material F) by the material switching process, the voxels within the update range are changed by the change process to the material ID (here, Material ID f) associated with the material set as the target material. Therefore, regardless of the material switching state by the material switching process, the in-game effect of always changing to the same material (here, Material E) can be obtained by the action to change the material (here, the action of player character 201 throwing an ice object into a terrain object made of lava material), thus preventing results that may cause the user to feel uneasy. Also, in the above example, since Material E was an obsidian material and Material F was a rubber material, for example, it is possible to throw ice into inaccessible lava to change it into obsidian, and then change it further into rubber by switching, thereby providing a game in which a jumpable platform can be created in inaccessible terrain.
[0212] Note that the material ID set for a polygon mesh and the material ID set for voxel data (and / or the material ID set for vertices included in a polygon) may be different even if they are associated with the same material. In this embodiment, when an event occurs to switch the material set for at least the polygon mesh of a display mesh, the material ID associated with that material is changed (replaced) in the material data, thereby changing (replaced) the material of the polygon mesh, and thus the material change can be reflected in the game space while retaining the material information (e.g., material ID) of the voxel data in the voxel object.
[0213] [3. Specific examples of processing in game systems] Next, with reference to Figures 36 and 37, a specific example of information processing in game system 1 will be described.
[0214] 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 a 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 Figure 37). 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, etc. (see Figure 36).
[0215] 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.
[0216] Mesh data includes various data related to the mesh of a voxel object. As shown in Figure 36, 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).
[0217] Object data includes various data related to objects other than voxel objects (for example, virtual objects such as player characters and toggle switch objects). Object data is stored for each object that appears in the game space. Object data includes, for example, data indicating the position, velocity, and state of the object.
[0218] Figure 37 is a flowchart illustrating an example of the game processing flow executed by game system 1. Game processing is initiated, for example, when the game is started in response to player instructions during the execution of the game program described above. The processing loop, consisting of the series of processes from steps S1 to S17, is executed once per frame.
[0219] In this embodiment, the processor 81 of the main unit 2 executes the game program stored in the game system 1, thereby executing the processing of each step shown in Figure 37. However, in other embodiments, some of the processing of each step 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 processing of each step shown in Figure 37 may be executed by the other information processing device. Furthermore, the processing of each step shown in Figure 37 is merely an example, and the processing order of each step may be changed, or other processing may be performed in addition to (or instead of) the processing of each step, as long as similar results can be obtained.
[0220] Furthermore, the processor 81 executes the processing of each step shown in Figure 37 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.
[0221] In Figure 37, the processor 81 performs initial setup (step S1) and then proceeds to the next step. For example, in the initial setup described above, the processor 81 initializes the parameters for the processing described below and updates each data. As an example, the processor 81 generates an initial game space and updates the voxel data, mesh data, and object data.
[0222] Next, the processor 81 acquires the operation data indicating the player's input (step S2) 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).
[0223] 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 S3), and then proceeds to the next step. The velocity of the object is used in the process of step S15, 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 S2. Also, if the designated object is an object that is not operated by the user (for example, an ice object (see Figures 33 and 35)), the velocity of the object is calculated based on rules predetermined in the game program. For example, the velocity of an ice object is set to 0 if it is placed on a terrain object and 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 predetermined rules if it is released by a throwing action by a 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.
[0224] 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 S14 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 made contact with a terrain object in the previous frame due to a punch action, etc., and the terrain object is in a destructible state, then process to generate fragment objects, etc. - If it is determined that the player character came into contact with a specific terrain object (e.g., lava) in the previous frame, the player character's health will be reduced. • If it is determined that an object came into contact with another object in the previous frame, the process of deleting that object will be executed. If the state of an object is changed during the processing of step S3 described above, the processor 81 updates the object data stored in memory for that object to reflect the changed state.
[0225] Next, the processor 81 determines whether an update event has occurred that updates the voxel object due to the object specified in step S3 (step S4). For example, the determination in step S4 is made based on the result of the collision determination in the previous frame (step S14, described later). For example, if it is determined that the player character has come into contact with a terrain object by a punch action or the like in the previous frame, and the terrain object is in a state where it can be destroyed (deleted), then it is determined that an update event has occurred that deletes a part of the terrain object (see Figures 13 and 14). Such an update event includes an event that deforms the terrain object so that a part of it appears to have been deleted, and also changes the material of the deformed part and the surrounding area (see Figure 29). As another example, if it is determined that an ice object has come into contact with a terrain object made of lava material in the previous frame, then it is determined that an update event has occurred that changes the material of the terrain object and shrinks the ice object (see Figures 33 and 35). If an update event has occurred, the processor 81 proceeds to step S5. On the other hand, if no update event has occurred, the processor 81 proceeds to step S7.
[0226] In step S5, 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 S5 is set to be associated with the type of update event that was determined to occur in step S4. In step S5, the processor 81 stores data indicating the set update range in memory as update range data.
[0227] Next, the processor 81 makes changes to the voxels corresponding to the update range set in step S5 (including the density update range and material update range described above) in accordance with the update event (step S6), and proceeds to step S7. For example, if the processor 81 deforms a voxel object within the update range so that it appears to be deleted or shrunk, or deforms it so that a voxel object appears to be added to the update range, it updates the voxel data stored in memory to change the density of the voxels corresponding to the update range (see [2-2. Updating Voxel Data] above). Also, if the processor 81 changes the material of a voxel object within the update range, it updates the voxel data stored in memory to update at least one of the first material ID, second material ID, and material mixing ratio of the voxel corresponding to the update range (see the processing in Figures 29, 33, and 35).
[0228] In step S7, the processor 81 determines whether a material switching event has occurred or is currently running due to the object specified in step S3. For example, if in step S3 the player character makes contact with the switch object CS (see Figures 26, 27, 31, and 34), or if a material switching event is currently running, the processor 81 makes a positive determination in step S7. If a material switching event has occurred or is currently running, the processor 81 proceeds to step S8. On the other hand, if no material switching event has occurred, the processor 81 proceeds to step S9.
[0229] In step S8, the processor 81 performs the process of switching the material targeted by the action performed and proceeds to step S9. For example, the processor 81 modifies the material data of the material targeted by the above action according to the method described in [2-7. Process of switching materials] above. The processor 81 also performs the effect of switching materials in the game space and, if necessary, sets the rendering settings for the surface object. In one execution of step S8, the processor 81 controls each object so that actions that take place over multiple frames (for example, the effect of switching materials) proceed for one frame. As a result, the process of step S8 is repeatedly executed over multiple frames until the material switching event is completed, so that each object performs a series of actions related to various effects.
[0230] In step S9, the processor 81 determines whether the processing in steps S3 to S8 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 completed, the processor 81 proceeds to step S10. On the other hand, if the processing of any object is not completed, the processor 81 returns to step S3 and repeats the process.
[0231] In step S10, the processor 81 updates the vertices of the voxel object in the game space and proceeds to the next step. For example, if the voxel data was updated in step S6, the processor 81 calculates new vertices based on the updated voxel data. The positions of the new vertices are 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.
[0232] Next, the processor 81 simplifies the vertices (step S11) and proceeds to the next step. For example, the processor 81 simplifies each updated vertex in step S10 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 in steps S10 and S11. Note that the processes in steps S10 and S11 do not require recalculating the vertices for the entire voxel data, and may be performed only on the parts of the voxels whose contents have been changed in steps S6 and S8.
[0233] Next, the processor 81 updates the display mesh of the voxel object based on the SVO data stored in memory (step S12), 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], [2-6-1. Determination of Display Mesh Material], and [2-7. Material Switching Process] above. In step S12, 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 S13 onwards, described later, without waiting for the completion of step S12, and execute it in parallel. In that case, step S12 must be completed before the start of step S16, described later.
[0234] Next, the processor 81 updates the determination mesh of the voxel object based on the SVO data stored in memory (step S13), 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], [2-6-2. Determination of the Determination Mesh Material], and [2-7. Switching Materials] above. In step S13, 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.
[0235] In the example shown in Figure 37, the process of generating the judgment mesh in step S13 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 S14, which will be 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 S14 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.
[0236] 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 S14), 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 S14 is performed taking into account the speed calculated in step S3. In other words, the processor 81 performs collision detection using the position of each object when it moves at the above speed.
[0237] In this embodiment, the collision determination in step S14 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. - Contact between the player character performing actions such as movement and punching, and other objects. • Contact between the character performing the action of lifting an object and the object in question. • Contact between moving objects and terrain objects Furthermore, if the collision detection in step S14 determines that objects have come into contact with each other, the process in step S3 of the next frame will either reflect the result of the object contact, or the process in step S4 of the next frame will determine that an update event has occurred.
[0238] Next, the processor 81 controls the movement of each object in the game space (step S15) 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 S15, 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, by repeatedly executing the process of step S15 over multiple frames, each object performs a series of actions related to movement and various actions. The position of an object is basically determined to be the position after moving at the speed calculated in step S3. However, if the collision detection in step S14 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 S15, the processor 81 updates the object data stored in memory to reflect the object after the control in step S15.
[0239] Next, the processor 81 generates a game image (step S16) and proceeds to the next step. For example, the processor 81 generates a game image by drawing each polygon of the display mesh for the voxel object and each polygon of objects other than the voxel object 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 game image generated in step S16 is output to the display device and displayed in a cycle of once per frame.
[0240] Next, the processor 81 determines whether or not to terminate the game (step S17). 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 S17. 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 S2 to S17 are repeatedly executed until it is determined in step S17 that the game should be terminated.
[0241] Thus, in this embodiment, since the material can be switched by changing the material data, it is possible to reflect material changes in an object based on voxel data while retaining the material information in the voxel data.
[0242] 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.
[0243] 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.
[0244] 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.
[0245] As described above, the invention can be realized in so-called cloud computing system configurations, distributed wide-area networks, and local network system configurations. For example, in a distributed local network system configuration, the above processing can be performed collaboratively between a stationary information processing device (stationary game device) and a portable information processing device (portable game device). It goes without saying that in these system configurations, there are no particular limitations on which device performs the above processing, and the invention can be realized regardless of how the processing is divided.
[0246] Furthermore, the processing order, set values, and conditions used in the information processing described above are merely examples, and it goes without saying that this embodiment can be realized even with other orders, values, and conditions.
[0247] Furthermore, the above program may be supplied to the game system 1 not only through an external storage medium such as external memory, but also to the device via a wired or wireless communication line. The program may also be pre-recorded in a non-volatile storage device inside the device. The information storage medium for storing the program may be a CD-ROM, DVD, or similar optical disc-type storage medium, a flexible disk, a hard disk, a magneto-optical disk, a magnetic tape, etc. Alternatively, the information storage medium for storing the program may be a volatile memory for storing the program. Such storage media can be described as recording media that can be read by a computer or the like. For example, by having a computer or the like read and execute the program on these recording media, the various functions described above can be provided.
[0248] As described above, the present invention has been described in detail. However, the above description is merely an exemplification of the present invention in every aspect and is not intended to limit its scope. Needless to say, various improvements and modifications can be made without departing from the scope of the present invention. Also, those skilled in the art will understand that based on the description of the present invention and common technical knowledge, an equivalent scope can be implemented from the description of the specific embodiments of the present invention. Further, it should be understood that the terms used in this specification are used in the meaning commonly used in the art unless otherwise specified. Therefore, unless otherwise defined, all technical terms and specialized terms used in this specification have the same meaning as commonly understood by those skilled in the art to which the present invention pertains. In case of contradiction, this specification (including the definitions) shall prevail.
Industrial Applicability
[0249] As described above, the present invention can be used as a game program, a game system, a game processing method, a game device, etc. that can execute a game that reflects material changes and the like while retaining material information for an object based on voxel data.
Explanation of Signs
[0250] 1... Information processing system 2... Main body device 3... Left controller 4... Right controller 11... Housing 12... Display 13... Touch panel 32, 52... Analog stick 42, 64... Terminal 81... Processor 82... Network communication unit 83... Controller communication unit 85... DRAM
Claims
1. In the computer of the information processing device, Voxel data defined in a virtual space, wherein for each of multiple voxels, at least a density indicating the degree to which the space defined by the voxel is virtually occupied by its contents, and a material ID indicating the type of contents are set, are 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 IDs of the polygons of the first mesh based on at least the material IDs contained in the voxel data. For each type of material associated with the material ID, the first mesh is rendered by rendering the polygon based on the rendering settings information of the material associated with the material ID of each polygon of the first mesh, based on the material data which includes at least rendering settings information which includes at least the texture information set for that material, and by rendering the polygon based on the rendering settings information of the material associated with the material ID of each polygon of the first mesh. A game program that, when a first event occurs based on the aforementioned game processing, switches the material associated with the first material ID to which the first material is associated from the first material to the second material.
2. The game program according to claim 1, further comprising the computer being instructed, when the first event occurs, to switch the material associated with the second material ID to which the second material is associated from the second material to the first material.
3. The aforementioned computer further, When a second event occurs based on the aforementioned game processing, a first voxel update range is generated in the virtual space, the density of each voxel in the voxel data corresponding to the first voxel update range in the virtual space is reduced, and the material ID of each voxel corresponding to the second voxel update range, which is of a size that encompasses the first voxel update range, is changed to a pre-set target material ID for each type of material ID before the change. When the first event described above occurs, A third material is associated with the material associated with the third material ID, which is the target material ID for the change of the first material ID, and the material is switched from the third material to the fourth material. The game program according to claim 2, which causes the fourth material associated with the fourth material, and which is associated with the fourth material ID that is the target material ID for changing the second material ID, to switch from the fourth material to the third material.
4. The game program according to claim 3, wherein, if the target material ID is not set for the second material ID, the computer is instructed to set a fourth material based on the same drawing setting information as the second material, and the material associated with the third material ID is switched to the fourth material.
5. The game program according to claim 1, further comprising causing the computer to render non-voxel objects, which are placed in the virtual space and are not based on voxel data, but which have a polygon mesh and a material ID including the first material ID set, by rendering the polygon mesh based on the material data.
6. On the surface of the first mesh based on the first material ID, a surface object having a polygon mesh not based on the voxel data is further placed. The aforementioned computer further, When the first material is associated with the first material ID, the surface object is rendered. The game program according to claim 1, which, when the second material is associated with the first material ID, causes the surface object to be excluded from rendering or to be set to transparent.
7. The aforementioned material data further includes, for each type of material, property information indicating the in-game effects set for that material. The aforementioned computer further, A second mesh, corresponding to the voxel data and used for collision detection, is generated or updated by determining the vertex coordinates of the second mesh based on at least the density included in the voxel data, and determining the material IDs of the polygons of the second mesh based on at least the material IDs included in the voxel data. A game program according to any one of claims 1 to 6, which generates an in-game action according to the material associated with the material ID of the polygon of the second mesh at the collision position, based on collision detection with a determination shape corresponding to a determination target based on game processing.
8. The aforementioned material data further includes, for each type of material, property information indicating the in-game effects set for that material. The game program according to any one of claims 1 to 6, further comprising the computer generating an in-game action corresponding to the material associated with the material ID of the polygon of the first mesh at the collision position, based on collision determination with a determination shape corresponding to a determination target based on game processing.
9. Voxel data defined in a virtual space, wherein for each of multiple voxels, at least a density indicating the degree to which the space defined by the voxel is virtually occupied by its contents, and a material ID indicating the type of contents are set, are 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 IDs of the polygons of the first mesh based on the material IDs included in at least the voxel data. For each type of material associated with the material ID, the first mesh is rendered by rendering the polygon based on the rendering settings information of the material associated with the material ID of each polygon of the first mesh, based on the material data which includes at least rendering settings information which includes at least the texture information set for that material, and by rendering the polygon based on the rendering settings information of the material associated with the material ID of each polygon of the first mesh. A game system that, when a first event occurs based on the aforementioned game processing, switches the material associated with the first material ID to which the first material is associated from the first material to the second material.
10. Furthermore, the game system according to claim 9, wherein when the first event occurs, the material associated with the second material ID to which the second material is associated is switched from the second material to the first material.
11. Furthermore, when a second event occurs based on the game processing, a first voxel update range is generated in the virtual space, the density of each voxel corresponding to the first voxel update range in the virtual space is reduced, and the material ID of each voxel corresponding to the second voxel update range, which is the size of the first voxel update range, is changed to a pre-set target material ID for each type of material ID before the change. When the first event described above occurs, A third material is associated with the material associated with the third material ID, which is the target material ID for the change of the first material ID, and the material is switched from the third material to the fourth material. The game system according to claim 10, wherein the fourth material is associated with the fourth material, and the material associated with the fourth material ID, which is the target material ID for the second material ID, is switched from the fourth material to the third material.
12. The game system according to claim 11, wherein, if the target material ID is not set for the second material ID, the system sets a fourth material based on the same drawing settings information as the second material, and switches the material associated with the third material ID to the fourth material.
13. Furthermore, the game system according to claim 9, wherein for non-voxel objects that are placed in the virtual space and are not based on voxel data, and for which a polygon mesh and the material ID including the first material ID are set, the non-voxel objects are rendered by rendering the polygon mesh based on the material data.
14. On the surface of the first mesh based on the first material ID, a surface object having a polygon mesh not based on the voxel data is further placed. Furthermore, when the first material is associated with the first material ID, the surface object is drawn. The game system according to claim 9, wherein when the second material is associated with the first material ID, the surface object is set to be excluded from rendering or set to be transparent.
15. The aforementioned material data further includes, for each type of material, property information indicating the in-game effects set for that material. Furthermore, a second mesh corresponding to the voxel data and used for collision detection is generated or updated by determining the vertex coordinates of the second mesh based on at least the density included in the voxel data, and determining the material IDs of the polygons of the second mesh based on at least the material IDs included in the voxel data. A game system according to any one of claims 9 to 14, which generates an in-game action according to the material associated with the material ID of the polygon of the second mesh at the collision position, based on collision determination with a determination shape corresponding to a determination target based on game processing.
16. The aforementioned material data further includes, for each type of material, property information indicating the in-game effects set for that material. Furthermore, the game system according to any one of claims 9 to 14 generates an in-game action corresponding to the material associated with the material ID of the polygon of the first mesh at the collision position, based on collision determination with a determination shape corresponding to a determination target based on game processing.
17. In the information processing system, Voxel data defined in a virtual space, wherein for each of multiple voxels, at least a density indicating the degree to which the space defined by the voxel is virtually occupied by its contents, and a material ID indicating the type of contents are set, are 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 IDs of the polygons of the first mesh based on at least the material IDs contained in the voxel data. For each type of material associated with the material ID, the first mesh is rendered by rendering the polygon based on the rendering settings information of the material associated with the material ID of each polygon of the first mesh, based on the material data which includes at least rendering settings information which includes at least the texture information set for that material, and by rendering the polygon based on the rendering settings information of the material associated with the material ID of each polygon of the first mesh. A game processing method that, when a first event occurs based on the aforementioned game processing, switches the material associated with the first material ID to which the first material is associated from the first material to the second material.
18. The game processing method according to claim 17, further comprising the information processing system being instructed, when the first event occurs, to switch the material associated with the second material ID to which the second material is associated from the second material to the first material.
19. The aforementioned information processing system further includes, When a second event occurs based on the aforementioned game processing, a first voxel update range is generated in the virtual space, the density of each voxel in the voxel data corresponding to the first voxel update range in the virtual space is reduced, and the material ID of each voxel corresponding to the second voxel update range, which is of a size that encompasses the first voxel update range, is changed to a pre-set target material ID for each type of material ID before the change. When the first event described above occurs, A third material is associated with the material associated with the third material ID, which is the target material ID for the change of the first material ID, and the material is switched from the third material to the fourth material. The game processing method according to claim 18, which involves switching the material associated with the fourth material, which is the target material ID for changing the second material ID, from the fourth material to the third material.
20. The game processing method according to claim 19, wherein, if the target material ID is not set for the second material ID, the information processing system is instructed to set a fourth material based on the same drawing setting information as the second material, and the material associated with the third material ID is switched to the fourth material.
21. The game processing method according to claim 17, further comprising causing the information processing system to render non-voxel objects, which are placed in the virtual space and are not based on voxel data, but which have a polygon mesh and a material ID including the first material ID set, by rendering the polygon mesh based on the material data.
22. On the surface of the first mesh based on the first material ID, a surface object having a polygon mesh not based on the voxel data is further placed. The aforementioned information processing system further includes, When the first material is associated with the first material ID, the surface object is rendered. The game processing method according to claim 17, wherein when the second material is associated with the first material ID, the surface object is set to be excluded from rendering or set to be transparent.
23. The aforementioned material data further includes, for each type of material, property information indicating the in-game effects set for that material. The aforementioned information processing system further includes, A second mesh, corresponding to the voxel data and used for collision detection, is generated or updated by determining the vertex coordinates of the second mesh based on at least the density included in the voxel data, and determining the material IDs of the polygons of the second mesh based on at least the material IDs included in the voxel data. A game processing method according to any one of claims 17 to 22, wherein, based on collision determination with a determination shape corresponding to a determination target based on game processing, an in-game action is generated according to the material associated with the material ID of the polygon of the second mesh at the collision position.
24. The aforementioned material data further includes, for each type of material, property information indicating the in-game effects set for that material. The game processing method according to any one of claims 17 to 22, further comprising the information processing system generating an in-game action corresponding to the material associated with the material ID of the polygon of the first mesh at the collision position, based on collision determination with a determination shape corresponding to a determination target based on game processing.
25. A game device equipped with a processor, The aforementioned processor, Voxel data defined in a virtual space, wherein for each of multiple voxels, at least a density indicating the degree to which the space defined by the voxel is virtually occupied by its contents, and a material ID indicating the type of contents are set, are 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 IDs of the polygons of the first mesh based on the material IDs included in at least the voxel data. For each type of material associated with the material ID, the first mesh is rendered by rendering the polygon based on the rendering settings information of the material associated with the material ID of each polygon of the first mesh, based on the material data which includes at least rendering settings information which includes at least the texture information set for that material, and by rendering the polygon based on the rendering settings information of the material associated with the material ID of each polygon of the first mesh. A game device that, when a first event occurs based on the aforementioned game processing, switches the material associated with the first material ID to which the first material is associated from the first material to the second material.
26. The game device according to claim 25, wherein the processor further switches the material associated with the second material ID to which the second material is associated, from the second material to the first material, when the first event occurs.