Search

CN-122006232-A - Rendering method, device, equipment and storage medium of virtual article occupied area

CN122006232ACN 122006232 ACN122006232 ACN 122006232ACN-122006232-A

Abstract

The application discloses a rendering method, a rendering device, rendering equipment and a storage medium of an occupied area of a virtual article, and relates to the technical field of computers, wherein the method comprises the steps of obtaining the occupied area of the virtual article in an article placement area in a game scene; mapping the occupied area to a preset texture coordinate system of a screen space to obtain a first texture coordinate area corresponding to the occupied area, mapping and sampling a preset mask picture based on the first texture coordinate area to obtain a sampling result, wherein the edge of the preset mask picture has a target edge visual characteristic, and synthesizing the sampling result and an original rendering image of the occupied area to obtain a rendered occupied area, and the edge of the rendered occupied area has the target edge visual characteristic. By implementing the technical scheme of the application, the occupied area of the virtual article can be displayed in a clear and visual edge identification effect in a high-efficiency and flexible mode.

Inventors

  • WANG XIANGKUN

Assignees

  • 网易(杭州)网络有限公司

Dates

Publication Date
20260512
Application Date
20260106

Claims (10)

  1. 1. The rendering method of the occupied area of the virtual article is characterized by comprising the following steps: acquiring an occupied area of a virtual object in an object placement area in a game scene; mapping the occupied area into a preset texture coordinate system of a screen space to obtain a first texture coordinate area corresponding to the occupied area; mapping and sampling a preset mask picture based on the first texture coordinate area to obtain a sampling result, wherein the edge of the preset mask picture has a target edge visual characteristic; and synthesizing the sampling result and the original rendering image of the occupied area to obtain the rendered occupied area, wherein the edge of the rendered occupied area has the target edge visual characteristic.
  2. 2. The method of claim 1, wherein the acquiring the occupied area of the virtual item in the item placement area in the game scene comprises: displaying an item placement area in a game scene; Acquiring bounding box information and placement position information of the virtual article; and determining the occupied area of the virtual object in the object placement area based on the bounding box information and the placement position information.
  3. 3. The method according to claim 2, wherein the article placement area is an article grid placement area, the article grid placement area is composed of a plurality of first grid cells, and the placement position information is a second grid cell in which a preset vertex of the virtual article is located in the article grid placement area; The determining, based on the bounding box information and the placement location information, an occupied area of the virtual article in an article placement area includes: determining at least one third grid cell covered by the virtual article in the article grid placement zone based on the bounding box information and the second grid cell; at least one of the third grid cells is determined as the occupied area.
  4. 4. The method according to claim 1 or 2, wherein mapping the occupied area to a preset texture coordinate system of a screen space, to obtain a first texture coordinate area corresponding to the occupied area, includes: acquiring first position information of the article placement area in the screen space and size information of the screen space; determining a second texture coordinate area corresponding to the object placement area under the preset texture coordinate system based on the first position information and the size information; determining a relative position proportion of the occupied area in the article placement area based on second position information of the occupied area in the article placement area; and determining a first texture coordinate area corresponding to the occupied area under the preset texture coordinate system based on the relative position proportion and the second texture coordinate area.
  5. 5. The method according to claim 1, wherein mapping and sampling the preset mask picture based on the first texture coordinate area to obtain a sampling result, includes: normalizing the texture coordinate values corresponding to the first texture coordinate region to obtain normalized target coordinate values; And sampling the preset mask picture based on the target coordinate value to obtain the sampling result.
  6. 6. The method according to claim 1 or 5, wherein the preset mask picture is used for rendering a highlight effect at an edge of the occupied area; the step of synthesizing the sampling result and the original rendering image of the occupied area to obtain the rendered occupied area comprises the following steps: And carrying out pixel mixing on the sampling result and the original rendering image to obtain an occupied area with an edge highlighting effect.
  7. 7. The method of claim 6, wherein the method further comprises: And stopping highlighting the edge of the occupied area in response to the operation that the virtual article is placed in the article placement area.
  8. 8. A rendering device for a virtual article footprint, the device comprising: The acquisition module is used for acquiring the occupied area of the virtual article in the article placement area in the game scene; the mapping module is used for mapping the occupied area into a preset texture coordinate system of a screen space to obtain a first texture coordinate area corresponding to the occupied area; The sampling module is used for carrying out mapping sampling on a preset mask picture based on the first texture coordinate area to obtain a sampling result, and the edge of the preset mask picture is provided with a target edge visual characteristic; and the synthesis module is used for synthesizing the sampling result and the original rendering image of the occupied area to obtain the rendered occupied area, and the edge of the rendered occupied area is provided with a target edge visual characteristic.
  9. 9. An electronic device, comprising: A memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the method of rendering a virtual article footprint of any one of claims 1 to 7.
  10. 10. A computer-readable storage medium having stored thereon computer instructions for causing a computer to perform the method of rendering a virtual article footprint of any of claims 1 to 7.

Description

Rendering method, device, equipment and storage medium of virtual article occupied area Technical Field The application relates to the technical field of computers, in particular to a rendering method, a rendering device, rendering equipment and a storage medium of an occupied area of a virtual article. Background With the vigorous development of the game industry and the increasing demand for user experience, the design of interactive systems in modern electronic games is increasingly focused on detailed and intuitive visual feedback to enhance the immersion and operational perceptions of players. Wherein, the show, the accomodate and the management of article become the important component of recreation experience. In order to improve the definition and the aesthetic property of interaction, the occupation range of the objects in the placement area (such as a knapsack grid, a showcase, a built grid and the like) is often required to be visually rendered, and the space positions occupied by the objects are clarified through highlighting, edge drawing or other identification means, so that the operations of object placement, layout adjustment and the like are assisted by a player. However, the currently common item footprint rendering schemes often face some common technical limitations. For example, to achieve the edge marking or highlighting effect of the occupied area, some methods rely on normal processing or geometric expansion of the object model itself, which not only increases complexity of manufacturing the art resource, but also may cause performance overhead due to the introduction of additional rendering channels or post-processing links. In addition, if the uniform mapping or material is adopted to perform grid rendering, it is difficult to flexibly and efficiently generate the marking effect with clear visual boundaries according to the irregular shape actually occupied by the object, so that the prompting effect is single and the distinguishing degree is insufficient. Disclosure of Invention The application provides a rendering method, device and equipment of a virtual article occupied area and a storage medium, so as to improve the flexibility and effect expression of virtual article occupied area rendering. The application provides a rendering method of an occupied area of a virtual object, which comprises the steps of obtaining the occupied area of the virtual object in an object placement area in a game scene, mapping the occupied area to a preset texture coordinate system of a screen space to obtain a first texture coordinate area corresponding to the occupied area, carrying out mapping sampling on a preset mask picture based on the first texture coordinate area to obtain a sampling result, synthesizing the sampling result and an original rendering image of the occupied area, and obtaining the rendered occupied area, wherein the edge of the rendered occupied area has a target edge visual characteristic. In an alternative embodiment, acquiring the occupied area of the virtual object in the object placement area in the game scene comprises displaying the object placement area in the game scene, acquiring bounding box information and placement position information of the virtual object, and determining the occupied area of the virtual object in the object placement area based on the bounding box information and the placement position information. In an alternative embodiment, the article placing area is an article grid placing area, the article grid placing area is composed of a plurality of first grid cells, the placing position information is a second grid cell where a preset vertex of the virtual article is located in the article grid placing area, the occupation area of the virtual article in the article placing area is determined based on bounding box information and the placing position information, the method comprises the steps of determining at least one third grid cell covered by the virtual article in the article grid placing area based on the bounding box information and the second grid cell, and determining the at least one third grid cell as the occupation area. In an alternative implementation mode, the occupied area is mapped to a preset texture coordinate system of a screen space to obtain a first texture coordinate area corresponding to the occupied area, the method comprises the steps of obtaining first position information of an article placement area in the screen space and size information of the screen space, determining a second texture coordinate area corresponding to the article placement area under the preset texture coordinate system based on the first position information and the size information, determining relative position proportion of the occupied area in the article placement area based on the second position information of the occupied area in the article placement area, and determining the first texture coordinate area corresponding to the occupied area