US-12616900-B2 - Storage medium, game system, and game processing method
Abstract
At least one of material IDs is changed to a different material ID for each of voxels corresponding to a voxel update range, and a display mesh is updated in association with updated voxel data. In addition, generating an in-game behavior based on collision determination between a determination mesh in which a material is determined based on at least a plurality of materials ID included in voxel data, and a determination shape corresponding to a determination target, and a virtual space including a display mesh is rendered based on vertex coordinates of the display mesh and a texture corresponding to a material for the display mesh.
Inventors
- Tatsuya Kurihara
- Yusuke KITAZONO
Assignees
- NINTENDO CO., LTD.
Dates
- Publication Date
- 20260505
- Application Date
- 20250703
- Priority Date
- 20240719
Claims (20)
- 1 . A non-transitory computer-readable storage medium having stored therein a game program that when executed, causes one or more processors of an information processing apparatus to execute operations comprising: generating, based on voxel data defined in a virtual space, a display mesh rendered based on a virtual camera, wherein each of a plurality of voxels in the voxel data includes a density indicating a degree of virtual occupation of a content in a space defined by the voxel, and a plurality of material IDs that each indicate a type of the content in the space defined by the voxel, and wherein vertex coordinates of the display mesh are determined based on at least the density included in the voxel data, and wherein a material for the display mesh is determined based on multiple material IDs included in the voxel data; generating a voxel update range in the virtual space based on game processing; in response to the generation of the voxel update range, changing, for each corresponding voxel of multiple voxels in the voxel data that is within the voxel update range in the virtual space, at least one of the material IDs of the corresponding voxel to a different one of the material IDs; updating the display mesh in association with the voxel data that has been changed to the different one of the material IDs; generating an in-game behavior based on collision determination between 1) a determination mesh used in collision determination in the virtual space, and 2) a determination shape corresponding to a determination target based on game processing, wherein vertex coordinates of the determination mesh are determined based on at least the density included in the voxel data, wherein a material for the determination mesh is determined based on multiple material IDs included in the voxel data, and wherein the in-game behavior corresponds to a material for the determination mesh at a collision position; and rendering the virtual space including the display mesh based on the vertex coordinates of the display mesh and a texture corresponding to the material for the display mesh.
- 2 . The non-transitory computer-readable storage medium according to claim 1 , wherein the operations further comprise: when a first event occurs in a game, generating a first voxel update range of a plurality of voxel update ranges, and for each voxel having a first material ID of voxels corresponding to the first voxel update range, changing the first material ID to a second material ID.
- 3 . The non-transitory computer-readable storage medium according to claim 2 , wherein the operations further comprise: generating the first voxel update range at a collision position based on collision determination between a first object having a third material ID and the determination mesh.
- 4 . The non-transitory computer-readable storage medium according to claim 3 , wherein the first object is associated with specific voxel data independent of the voxel data, a position in the virtual space of a specific voxel space defined by the specific voxel data, and a specific display mesh and specific determination mesh based on the specific voxel data, and the operations further comprise: reducing the density in the specific voxel data of the first object based on collision determination between the first object and the determination mesh.
- 5 . The non-transitory computer-readable storage medium according to claim 4 , wherein the operations further comprise: controlling a player character in the virtual space based on an operation input; and moving the first object in a direction based on a first action of the player character corresponding to an operation input.
- 6 . The non-transitory computer-readable storage medium according to claim 2 , wherein the operations further comprise: controlling a player character in the virtual space based on an operation input; and reducing a physical strength set for the player character based on a collision between the player character and the determination mesh, when a material for the determination mesh at a collision position has the first material ID.
- 7 . The non-transitory computer-readable storage medium according to claim 1 , wherein in the voxel data, for each voxel, an in-voxel ratio indicating a material ratio of the plurality of material IDs in the voxel is further set.
- 8 . The non-transitory computer-readable storage medium according to claim 7 , wherein the operations further comprise: when a second event occurs in a game, generating a second voxel update range of a plurality of the voxel update ranges; and changing one of the material IDs of voxels that do not have a fourth material ID of voxels corresponding to the second voxel update range, the one having a smallest ratio, to the fourth material ID, based on the material ratio.
- 9 . The non-transitory computer-readable storage medium according to claim 7 , wherein the operations further comprise: controlling a player character based on an operation input; causing the player character to perform a second action based on an operation input; when the second action is performed, generating a third voxel update range and a fourth voxel update range greater than the third voxel update range of a plurality of the voxel update ranges, in a direction from the player character; reducing the density of at least a portion of voxels corresponding to the third voxel update range; and changing the material IDs of all voxels corresponding to the fourth voxel update range to a fifth material ID, or changing a material ID of one of the voxels to the fifth material ID and setting the material ratio to such a ratio that an entirety of the one voxel is a material indicated by the fifth material ID.
- 10 . The non-transitory computer-readable storage medium according to claim 9 , wherein the operations further comprise: when the second action is performed, generating a fifth voxel update range greater than the fourth voxel update range; and changing one of the material IDs of voxels that do not have the fifth material ID of voxels corresponding to the fifth voxel update range, the one having a smallest ratio, to the fifth material ID, based on the material ratio.
- 11 . A game system comprising: one or more processors; and one or more memories storing a program that when executed, causes the game system to perform operations including: generating based on voxel data defined in a virtual space, a display mesh rendered based on a virtual camera, wherein each of a plurality of voxels in the voxel data includes a density indicating a degree of virtual occupation of a content in a space defined by the voxel, and a plurality of material IDs that each indicate a type of the content in the space defined by the voxel, wherein vertex coordinates of the display mesh are determined based on at least the density included in the voxel data, and wherein a material for the display mesh is determined based on multiple material IDs included in the voxel data; generating a voxel update range in the virtual space based on game processing; in response to the generation of the voxel update range, changing, for each corresponding voxel of multiple voxels in the voxel data that is within the voxel update range in the virtual space, at least one of the material IDs of the corresponding voxel to a different one of the material IDs; updating the display mesh in association with the voxel data that has been changed to the different one of the material IDs; generating an in-game behavior based on collision determination between 1) a determination mesh used in collision determination in the virtual space, and 2) a determination shape corresponding to a determination target based on game processing, wherein vertex coordinates of the determination mesh are determined based on at least the density included in the voxel data, wherein a material for the determination mesh is determined based on the multiple material IDs included in the voxel data, and wherein the in-game behavior corresponds to a material for the determination mesh at a collision position; and rendering the virtual space including the display mesh based on the vertex coordinates of the display mesh and a texture corresponding to the material for the display mesh.
- 12 . The game system according to claim 11 , wherein the operations further comprise: when a first event occurs in a game, generating a first voxel update range of a plurality of the voxel update ranges, and for each voxel having a first material ID of voxels corresponding to the first voxel update range, changing the first material ID to a second material ID.
- 13 . The game system according to claim 12 , wherein the operations further comprise: generating the first voxel update range at a collision position based on collision determination between a first object having a third material ID and the determination mesh.
- 14 . The game system according to claim 13 , wherein the first object is associated with specific voxel data independent of the voxel data, a position in the virtual space of a specific voxel space defined by the specific voxel data, and a specific display mesh and specific determination mesh based on the specific voxel data, and the operations further comprise: reducing the density in the specific voxel data of the first object based on collision determination between the first object and the determination mesh.
- 15 . The game system according to claim 14 , wherein the operations further comprise: controlling a player character in the virtual space based on an operation input; and moving the first object in a direction based on a first action of the player character corresponding to an operation input.
- 16 . The game system according to claim 12 , wherein controlling a player character in the virtual space based on an operation input; and reducing a physical strength set for the player character based on a collision between the player character and the determination mesh, when a material for the determination mesh at a collision position has the first material ID.
- 17 . The game system according to claim 11 , wherein in the voxel data, for each voxel, an in-voxel ratio indicating a ratio of a material indicated by the material ID in the voxel is further set.
- 18 . The game system according to claim 17 , wherein the operations further comprise: when a second event occurs in a game, generating a second voxel update range of a plurality of the voxel update ranges; and changing one of the material IDs of voxels that do not have a fourth material ID of voxels corresponding to the second voxel update range, the one having a smallest ratio, to the fourth material ID, based on the in-voxel ratio.
- 19 . The game system according to claim 17 , wherein the operations further comprise: controlling a player character based on an operation input; causing the player character to perform a second action based on an operation input; when the second action is performed, generating a third voxel update range and a fourth voxel update range greater than the third voxel update range of a plurality of the voxel update ranges, in a direction from the player character; reducing the density of at least a portion of voxels corresponding to the third voxel update range; and changing the material IDs of all voxels corresponding to the fourth voxel update range to a fifth material ID, or changing the material ID of one of the voxels to the fifth material ID and setting the in-voxel ratio to such a ratio that an entirety of the one voxel is a material indicated by the fifth material ID.
- 20 . The game system according to claim 19 , wherein the operations further comprise: when the second action is performed, generating a fifth voxel update range greater than the fourth voxel update range; and changing one of the material IDs of voxels that do not have the fifth material ID of voxels corresponding to the fifth voxel update range, the one having a smallest ratio, to the fifth material ID, based on the in-voxel ratio.
Description
CROSS REFERENCE TO RELATED APPLICATION This application claims priority to Japanese Patent Application No. 2024-115678, filed on Jul. 19, 2024, the entire contents of which are incorporated herein by reference. FIELD The technology disclosed herein relates to storage media, game systems, and game processing methods that generate an object in a virtual space using voxel data. BACKGROUND AND SUMMARY The technology of generating a mesh based on voxels has conventionally been proposed. It is desirable that in games, a material be incorporated into (e.g., reflected on) the appearance of objects or behaviors occurring in the game. The present example discloses a storage medium, game system, and game processing method capable of executing a game in which a material is incorporated into (e.g., reflected on) the appearance of voxel data-based objects or behaviors occurring on the objects in the game. The present example may have the following features (1) to (10), for example. (1) An example configuration of a non-transitory computer-readable storage medium according to the present example is a non-transitory computer-readable storage medium having stored therein a game program that when executed, causes one or more processors of an information processing apparatus to execute operations comprising: generating a display mesh rendered based on a virtual camera, based on and corresponding to voxel data defined in a virtual space, wherein, for each of a plurality of voxels in the voxel data, at least a density indicating the degree of virtual occupation of a content in a space defined by the voxel, and a material ID indicating the type of the content, are set, up to a first number of material IDs are allowed to be set, and the first number is plural, and wherein vertex coordinates of the display mesh are determined based on at least the density included in the voxel data, and a material for the display mesh is determined based on at least a plurality of the material IDs included in the voxel data; generating a voxel update range in the virtual space based on game processing; changing at least one of the material IDs to a different one of the material IDs in response to the generation of the voxel update range, for each voxel of the voxel data corresponding to the voxel update range in the virtual space; updating the display mesh in association with the updated voxel data; generating an in-game behavior based on collision determination between a determination mesh used in collision determination in the virtual space, and a determination shape corresponding to a determination target based on game processing, wherein vertex coordinates of the determination mesh are determined based on at least the density included in the voxel data, a material for the determination mesh is determined based on at least a plurality of the materials ID included in the voxel data, and the in-game behavior corresponds to a material for the determination mesh at a collision position; and rendering the virtual space including the display mesh based on the vertex coordinates of the display mesh and a texture corresponding to the material for the display mesh. With the configuration of (1), while a material(s) for voxels is updated during a game, the game can be executed with the updating incorporated into (e.g., reflected on) appearance or behavior. (2) In the configuration of (1), the operations may further comprise: when a first event occurs in a game, generating a first voxel update range of a plurality of the voxel update ranges, and for each voxel having a first material ID of voxels corresponding to the first voxel update range, changing the first material ID to a second material ID. With the configuration of (2), when the first event occurs, a game can be executed with the appearance based on the first material ID changed into the appearance based on the second material ID, and the behavior based on the first material ID changed into the behavior based on the second material ID. (3) In the configuration of (2), the operations may further comprise: generating the first voxel update range at a collision position based on collision determination between a first object having a third material ID and the determination mesh. With the configuration of (3), when collision with the first object having the third material ID occurs, the material for the voxel can be updated, and the updating can be incorporated into (e.g., reflected on) appearance or behavior. (4) In the configuration of (3), the first object may be associated with specific voxel data independent of the voxel data, a position in the virtual space of a specific voxel space defined by the specific voxel data, and a specific display mesh and specific determination mesh based on the specific voxel data. The operations may further comprise: reducing the density in the specific voxel data of the first object based on collision determination between the first object and the determination mes