Method and apparatus for rendering weather in virtual environment, device, medium and program
AssigneeTencent Technology (Shenzhen) Company Limited
InventorsXiaofei Ma, Jiawei Zhang
Life of this patent
Estimating the term…
Abstract
This application discloses a method and apparatus for rendering weather in a virtual environment, a device, a medium and a program, belonging to the art of image processing. The method includes the following steps: acquiring at least one weather map of a weather scene in a virtual environment (201); removing a first weather map from the at least one weather map to obtain a remaining second weather map (202); and rendering the weather scene in the virtual environment according to the second weather map (203). This method reduces the frequency of map sampling by reducing the number of weather maps, and improves the performance of a terminal when running an application program supporting the virtual environment.
Claims17
A method for rendering weather in a virtual environment, applied to a computer device, the method comprising:
- acquiring at least two weather maps of a weather scene in the virtual environment, the at least two weather maps representing the weather scene in multiple dimensions;
- removing, in response to a first weather map from the at least two weather maps comprising a weather map outside a field of view of a current virtual character in the virtual environment, the first weather map from the at least two weather maps so that a second weather map of the same weather scene remains, wherein removing the first weather map is configured to reduce a frequency of map sampling, and wherein the weather map outside the field of view of the current virtual character comprises:
- a first raindrop map in front of the field of view of the current virtual character but beyond a preset distance of the current virtual character when the weather scene comprises a raindrop effect;
- or
- a first scattering map at a sky height higher than a specified height, and the first scattering map being an image representing a light scattering effect in a sky in the virtual environment, when the weather scene comprises a sky light and shadow effect;
- and
- rendering the weather scene according to the second weather map.
An apparatus for rendering weather in a virtual environment, the apparatus comprising:
- a memory storing a plurality of instructions;
- and
- a processor configured to execute the plurality of instructions, and upon execution of the plurality of instructions, is configured to:
- acquire at least two weather maps of a weather scene in the virtual environment, the at least two weather maps representing the weather scene in multiple dimensions;
- remove, in response to a first weather map from the at least two weather maps comprising a weather map outside a field of view of a current virtual character in the virtual environment, the first weather map from the at least two weather maps so that a second weather map of the same weather scene remains, wherein removing a first weather map is configured to reduce a frequency of map sampling, and wherein the weather map outside the field of view of the current virtual character comprises:
- a first raindrop map in front of the field of view of the current virtual character but beyond a preset distance of the current virtual character when the weather scene comprises a raindrop effect;
- or
- a first scattering map at a sky height higher than a specified height, and the first scattering map being an image representing a light scattering effect in a sky in the virtual environment, when the weather scene comprises a sky light and shadow effect;
- and
- render the weather scene according to the second weather map.
A non-transitory computer readable storage medium storing a plurality of instructions executable by a processor, wherein the plurality of instructions, upon execution by the processor, is configured to cause the processor to:
- acquire at least two weather maps of a weather scene in a virtual environment, the at least two weather maps representing the weather scene in multiple dimensions, the at least two weather maps representing the weather scene in multiple dimensions;
- remove, in response to a first weather map from the at least two weather maps comprising a weather map outside a field of view of a current virtual character in the virtual environment, the first weather map from the at least two weather maps so that a second weather map of the same weather scene remains, wherein removing a first weather map is configured to reduce a frequency of map sampling, and wherein the weather map outside the field of view of the current virtual character comprises:
- a first raindrop map in front of the field of view of the current virtual character but beyond a preset distance of the current virtual character when the weather scene comprises a raindrop effect;
- or
- a first scattering map at a sky height higher than a specified height, and the first scattering map being an image representing a light scattering effect in a sky in the virtual environment, when the weather scene comprises a sky light and shadow effect;
- and
- render the weather scene according to the second weather map.
Dependencies are inferred from the claim text.