CN113827960A - Game visual field generation method and device, electronic equipment and storage medium - Google Patents

Game visual field generation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113827960A
CN113827960A CN202111022864.XA CN202111022864A CN113827960A CN 113827960 A CN113827960 A CN 113827960A CN 202111022864 A CN202111022864 A CN 202111022864A CN 113827960 A CN113827960 A CN 113827960A
Authority
CN
China
Prior art keywords
generating
light source
position information
point light
screen
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111022864.XA
Other languages
Chinese (zh)
Other versions
CN113827960B (en
Inventor
龙辉
陈曦行
徐志坚
谢睿
陈光尧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Quwan Network Technology Co Ltd
Original Assignee
Guangzhou Quwan Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Quwan Network Technology Co Ltd filed Critical Guangzhou Quwan Network Technology Co Ltd
Priority to CN202111022864.XA priority Critical patent/CN113827960B/en
Publication of CN113827960A publication Critical patent/CN113827960A/en
Application granted granted Critical
Publication of CN113827960B publication Critical patent/CN113827960B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/53Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game
    • A63F13/537Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game using indicators, e.g. showing the condition of a game character on screen
    • A63F13/5372Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game using indicators, e.g. showing the condition of a game character on screen for tagging characters, objects or locations in the game scene, e.g. displaying a circle under the character controlled by the player

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • Optics & Photonics (AREA)
  • Image Generation (AREA)

Abstract

The invention discloses a game visual field generation method, a game visual field generation device, electronic equipment and a storage medium, which are used for solving the technical problem that the visual field change has unsmooth and discontinuous visual effects. The invention comprises the following steps: generating an object map in a preset screen; acquiring role position information, and generating a point light source object in the role position information; acquiring vertex position information of each vertex of all object graphs in the screen; generating a first effective side information set of the object according to the position information of the point light source object and the vertex position information of all object graphs; acquiring a screen sideline of the screen; generating a second effective side information set according to the first effective side information set of the object and the screen edge; generating a first visual field map according to the position information of the point light source object, the first effective side information set of the object and the second effective side information set; and generating a second visual field map according to the point light source object and the first visual field map.

Description

Game visual field generation method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of view generation technologies, and in particular, to a method and an apparatus for generating a game view, an electronic device, and a storage medium.
Background
In MOBA (Multiplayer Online Battle Arena), the game view is an important component of the rules of confrontation and playability. In the technical implementation of the generation of the view area, a large number of game objects such as characters, buildings, objects and the like of the view layer and the scene map are required to be mixed and judged so as to render the size, shape and color of the view area. The rendering process typically includes operations for gathering, filtering, polygon computation, rendering, etc. performance of game objects within the scope of the screen device.
Most of existing visual field implementation modes are based on implementation of the fog pattern, namely the visual property of each fog pattern is in the visual field if being visible and out of the visual field if not visible within the range of visual field equipment determined according to the position of the main corner and the radius of the visual field.
However, the above solution has some drawbacks. First, when the grid is large, the field of view changes with an uneven and discontinuous visual experience when switching from one grid to the next. Secondly, since a plurality of lattice shapes constituting the visual field are fixed, the visual field area effect of an arbitrary shape cannot be achieved. Finally, the field of view generated based on the ray trajectories is not possible.
Furthermore, another existing implementation is a pure polygon rendering based scheme. A significant disadvantage of this approach is that the shape can only be limited to a combination of polygons, and a smoother shape and a field of view containing regions of different color or transparency cannot be achieved.
Disclosure of Invention
The invention provides a game visual field generation method, a game visual field generation device, electronic equipment and a storage medium, which are used for solving the technical problem that the visual field change has unsmooth and discontinuous visual effects.
The invention provides a game visual field generation method, which comprises the following steps:
generating an object map in a preset screen;
acquiring role position information, and generating a point light source object in the role position information;
acquiring vertex position information of each vertex of all object graphs in the screen;
generating a first effective side information set of the object according to the position information of the point light source object and the vertex position information of all object graphs;
acquiring a screen sideline of the screen;
generating a second effective side information set according to the first effective side information set of the object and the screen edge;
generating a first visual field map according to the position information of the point light source object, the first effective side information set of the object and the second effective side information set;
and generating a second visual field map according to the point light source object and the first visual field map.
Optionally, the step of generating an object map in a preset screen includes:
obtaining polygon vertex data;
and generating an object graph in a preset screen by adopting the polygon vertex data.
Optionally, each object graph has a plurality of edges; the step of generating a first effective side information set of the object according to the position information of the point light source object and the vertex position information of the object map includes:
connecting the point light source object with each vertex of each object graph respectively to obtain a plurality of light rays;
calculating an included angle between any two light rays according to the position information of the point light source object and the vertex position information of each vertex of the object graph;
taking two vertexes corresponding to the two rays with the largest included angle as target vertexes;
connecting the target vertexes of the object graphs to obtain a target connecting line;
acquiring a side line between the target connecting line and the point light source object as a first effective side of the object graph;
and integrating the first effective edges of all the object graphs to obtain a first effective edge information set of the object.
Optionally, the step of generating a second effective side information set according to the first effective side information set of the object and the screen edge includes:
determining an unshielded area according to the first effective side information set of the object and the position information of the point light source object;
and taking a line segment which is intersected with the non-occlusion area in the screen edge line as a second effective edge, and generating a second effective edge information set.
Optionally, the step of generating a first view map according to the position information of the point light source object, the first effective side information set of the object, and the second effective side information set includes:
generating a plurality of dark regions using the first set of valid side information, the second set of valid side information, and the light;
a first view map is generated based on the dark region.
Optionally, the step of generating a second field of view map from the point light source object and the first field of view map comprises:
acquiring the radius of the point light source object;
generating a visual area according to the radius and the first visual field diagram; the visual area comprises a complete visual area and a color gradient area;
and setting the area outside the visual area in the screen as a shadow area, and generating a second visual field map.
Optionally, the method further comprises:
receiving highlight object data;
generating a highlighted item display area in the second view map based on the highlighted item data.
The present invention also provides a game visual field generating device, including:
the object map generating module is used for generating an object map in a preset screen;
the point light source object generating module is used for acquiring role position information and generating a point light source object in the role position information;
the vertex position information acquisition module is used for acquiring vertex position information of each vertex of all object graphs in the screen;
the object first effective side information set generating module is used for generating an object first effective side information set according to the position information of the point light source object and the vertex position information of all the object graphs;
the screen sideline acquisition module is used for acquiring a screen sideline of the screen;
the second effective side information set generating module is used for generating a second effective side information set according to the first effective side information set of the object and the screen side line;
the first visual field map generating module is used for generating a first visual field map according to the position information of the point light source object, the first effective side information set of the object and the second effective side information set;
and the second view map generation module is used for generating a second view map according to the point light source object and the first view map.
The invention also provides an electronic device comprising a processor and a memory:
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is configured to execute the game view generation method according to any one of the above instructions in the program code.
The present invention also provides a computer-readable storage medium characterized in that the computer-readable storage medium stores program code for executing the game field generation method as described in any one of the above.
According to the technical scheme, the invention has the following advantages: the invention discloses a game visual field generation method, which comprises the following steps: generating an object map in a preset screen; acquiring role position information, and generating a point light source object in the role position information; acquiring vertex position information of each vertex of all object graphs in a screen; generating a first effective side information set of the object according to the position information of the point light source object and the vertex position information of all object graphs; acquiring a screen sideline of a screen; generating a second effective side information set according to the first effective side information set of the object and the screen edge; generating a first view map according to the position information of the point light source object, the first effective side information set and the second effective side information set of the object; a second field of view map is generated from the point source object and the first field of view map. The invention combines the point light source object, the first effective side information set and the second effective side information set of the object to generate the first visual field image and the second visual field image, and adjusts the brightness change in the screen according to the scattering and shielding conditions of the light source, so that the brightness change in the screen has more smoothness and continuity.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flowchart illustrating steps of a method for generating a game field of view according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating steps of a method for generating a game field of view according to another embodiment of the present invention;
fig. 3 is a schematic diagram of determining a first valid edge according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an object according to an embodiment of the present invention;
FIG. 5 is a schematic view of a first field of view provided by an embodiment of the present invention;
FIG. 6 is a second field of view illustration provided by an embodiment of the present invention;
fig. 7 is a block diagram of a game view field generation device according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a game visual field generation method and device, electronic equipment and a storage medium, which are used for solving the technical problem that the visual field change has unsmooth and discontinuous visual effects.
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating steps of a game view generation method according to an embodiment of the present invention.
The game visual field generation method provided by the invention specifically comprises the following steps:
step 101, generating an object map in a preset screen;
in the embodiment of the present invention, the object refers to a general term of all objects such as buildings in the screen range.
102, acquiring role position information, and generating a point light source object in the role position information;
in the embodiment of the invention, the point light source object is a light source structure body capable of emitting analog light, and the irradiation range of the point light source object can be a circle, a sector or other self-defined shapes.
In the embodiment of the invention, a point light source object can be arranged at the position where the character is located, and the illumination range of the point light source object represents the visual field range of the character.
103, acquiring vertex position information of each vertex of all object graphs in a screen;
in the embodiment of the invention, based on the preset first device, all object graphs in the screen range are searched, the polygon shape and the position of each object graph are determined, and the vertex position information of each vertex of each object graph is further determined.
104, generating a first effective side information set of the object according to the position information of the point light source object and the vertex position information of all object graphs;
the first effective edge information set of the object is a set of edges of each object actually irradiated by the point light source object.
The light emitted by the point light source object can be shielded by the object graph, and the shielding range is positioned between two vertexes corresponding to two connecting lines with the largest included angle in the connecting lines of the point light source and each vertex of the object graph. Therefore, in the embodiment of the present invention, the first valid side information set of the object may be generated according to the position information of the point light source object and the vertex position information of all object graphs.
105, acquiring a screen sideline of a screen;
step 106, generating a second effective side information set according to the first effective side information set of the object and the screen edge;
the second effective side information set is a set of partial screen side lines irradiated by the light of the point light source object.
According to the position of the point light source object, the first effective side information set of the object and the actual position of the edge line of the screen, the correlation between the light rays scattered out of the point light source object and the edge line can be calculated, and therefore the second effective side information set is determined.
Step 107, generating a first view map according to the position information of the point light source object, the first effective side information set and the second effective side information set of the object;
after the position information of the point light source object, the first effective side information set of the object and the second effective side information set are obtained, the first view map can be generated by combining the second effective side information set according to the shielding condition of the first effective side information set of the object on the point light source object.
And step 108, generating a second view map according to the point light source object and the first view map.
In the embodiment of the present invention, after the first view map is acquired, the brightness change of the first view map may be adjusted according to the view range of the point light source object, so as to obtain the second view map.
The invention combines the point light source object, the first effective side information set and the second effective side information set of the object to generate the first visual field image and the second visual field image, and adjusts the light and shade change in the screen according to the scattering and shielding conditions of the light source, so that the light and shade change in the screen has smoothness and continuity.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for generating a game field of view according to another embodiment of the present invention. The method specifically comprises the following steps:
step 201, obtaining polygon vertex data;
step 202, generating an object graph in a preset screen by adopting polygon vertex data;
in the embodiment of the invention, polygon vertex data of an object graph input from the outside can be received to generate the object graph in a preset screen. The generated object map may be as shown in fig. 3.
Step 203, acquiring role position information, and generating a point light source object in the role position information;
in the embodiment of the invention, the point light source object is a light source structure body capable of emitting analog light, and the irradiation range of the point light source object can be a circle, a sector or other self-defined shapes.
In the embodiment of the invention, a point light source object can be arranged at the position where the character is located, and the illumination range of the point light source object represents the visual field range of the character.
Step 204, acquiring vertex position information of each vertex of all object graphs in a screen;
in the embodiment of the invention, based on the preset first device, all object graphs in the screen range are searched, the polygon shape and the position of each object graph are determined, and the vertex position information of each vertex of each object graph is further determined.
Step 205, generating a first effective side information set of the object according to the position information of the point light source object and the vertex position information of all object graphs;
the light emitted by the point light source object can be shielded by the object graph, and the shielding range is positioned between two vertexes corresponding to two connecting lines with the largest included angle in the connecting lines of the point light source and each vertex of the object graph. Therefore, in the embodiment of the present invention, the first valid side information set of the object may be generated according to the position information of the point light source object and the vertex position information of all object graphs.
In one example, step 205 may include the following sub-steps:
s51, connecting the point light source object with each vertex of each object graph respectively to obtain a plurality of light rays;
s52, calculating the included angle between any two light rays according to the position information of the point light source object and the vertex position information of each vertex of the object graph;
s53, taking two vertexes corresponding to the two light rays with the largest included angle as target vertexes;
s54, connecting the target vertex of the object graph to obtain a target connecting line;
s55, obtaining a side line between the target connecting line and the point light source object as a first effective side of the object graph;
s56, the first effective edges of all the object graphs are integrated to obtain a first effective edge information set of the objects.
As shown in FIG. 3, the point light source object can emit a plurality of light rays, each light ray passing through a vertex of the object map. And calculating the included angle of the light rays corresponding to any two vertexes of the same object graph. Two vertexes with the largest included angle are taken as target vertexes, such as A, B in fig. 3. Connecting A, B to obtain a target connection line AB, and taking the edge of the object graph of the target connection line AB close to the point light source object as the first effective edge, then obtaining all the first effective edges of the object graph.
And integrating the first effective edges of all the object graphs to obtain a first effective edge information set of the objects in the screen.
Step 206, acquiring a screen edge of a screen;
step 207, generating a second effective side information set according to the first effective side information set of the object and the screen edge;
in the embodiment of the invention, according to the position of the point light source object, the first effective side information set of the object and the actual position of the screen side line, the correlation between the light rays scattered out of the point light source object and the screen side line can be calculated, so that the second effective side information set is determined.
In one example, step 207 may include the following sub-steps:
s71, determining a non-blocking area according to the first effective side information set of the object and the position information of the point light source object;
and S72, taking the line segment which is intersected with the non-occlusion area in the screen edge as a second effective edge, and generating a second effective edge information set.
In the embodiment of the invention, the intersection calculation can be carried out on the light rays of the point light source object which are not shielded by the first effective side information set and the edge line of the screen to obtain the second effective side, and all the second effective sides are collected to obtain the second effective side information set.
Step 208, generating a first view map according to the position information of the point light source object, the first effective side information set and the second effective side information set of the object;
in the embodiment of the invention, after the position information of the point light source object, the first effective side information set of the object and the second effective side information set are obtained, the first view map can be generated by combining the second effective side information set according to the shielding condition of the first effective side information set of the object on the point light source object.
In one example, step 208 may include the following sub-steps:
s81, generating a plurality of dark areas by using the first effective side information set, the second effective side information set and the light rays of the object;
s82, a first view map is generated based on the dark regions.
In a specific implementation, the regions surrounded by the first effective edge, the ray, and the screen edge other than the second effective edge in the screen edge that intersect may be used as dark regions, so as to obtain a plurality of polygonal regions. And respectively transmitting the data of the polygonal area into a preset first device, calculating a first view map by the first device, and outputting the calculated first view map to a first storage area for later use. The resulting first view is shown in fig. 5.
The first device is a device for executing a script. A script is a set of program code for implementing program logic, executed by a rendering device.
Step 209 generates a second field of view map from the point source object and the first field of view map.
In the embodiment of the present invention, the second view rendering script may be executed according to a preset second device, so as to obtain a second view map.
In one example, step 209 may include the following sub-steps:
s91, acquiring the radius of the point light source object;
s92, generating a visual area according to the radius and the first visual field diagram; the visible area comprises a complete visible area and a color gradient area;
s93, a second view field map is generated by setting the region outside the visible region in the screen as a shadow region.
In a specific implementation, whether each pixel position in the first view field image is visible in the second view field image or not can be calculated according to the irradiation radius of the point light source object and a dark color area in the first view field image.
It should be noted that whether the object map is finally visible is a result of integration, for the pixel C located within the radius of the light source on the object; first visibility in the first view field diagram can be acquired, and then second visibility based on the light source radius (visible within the light source radius and invisible outside the light source radius) can be acquired. And performing logic AND operation on the first visibility and the second visibility to obtain the final visibility.
Then, the visible area is determined according to the radius of the light source and the visibility of each object map in the screen. Wherein the visible area comprises a complete visible area and a color gradient area. The complete visual area is an area which takes the point light source object as the center of a circle and has no object picture in the visual area; the color gradient area is the complete visual area in the visual area and the area outside the object picture.
In addition, the region outside the visible region, including the object map itself, may be set as a shadow region. By adjusting the pixels in the first view map, the second view map can be obtained.
In an implementation, the second coordinate of the point light source object in the view map can be calculated according to the first position coordinate of the light source in the game scene. And transmitting the first view map into a second view rendering script, and calculating the color of each pixel in the second view map by combining second coordinates of the point light source object in the view map to generate the second view map. The resulting second field of view may be as shown in fig. 6.
In the embodiment of the present invention, the method may further include: receiving highlight object data; a highlighted item display area is generated in the second view map based on the highlighted item data.
The highlight object is an object which is not displayed as shadow dark color but is illuminated with light color in the shadow area. It may set the pixel color inside the highlight object to the illumination color by inputting the polygon data of the highlight object into the third rendering script.
The invention combines the point light source object, the first effective side information set and the second effective side information set of the object to generate the first visual field image and the second visual field image, and adjusts the light and shade change in the screen according to the scattering and shielding conditions of the light source, so that the light and shade change in the screen has smoothness and continuity.
Referring to fig. 7, fig. 7 is a block diagram of a game view field generating device according to an embodiment of the present invention.
The embodiment of the invention provides a game visual field generating device, which is characterized by comprising the following components:
an object diagram generating module 701, configured to generate an object diagram in a preset screen;
a point light source object generating module 702, configured to obtain role position information and generate a point light source object in the role position information;
a vertex position information obtaining module 703, configured to obtain vertex position information of each vertex of all object graphs in the screen;
an object first effective side information set generating module 704, configured to generate an object first effective side information set according to the position information of the point light source object and the vertex position information of all object graphs;
a screen edge obtaining module 705, configured to obtain a screen edge of a screen;
a second effective side information set generating module 706, configured to generate a second effective side information set according to the first effective side information set of the object and the screen edge;
a first view map generating module 707, configured to generate a first view map according to the position information of the point light source object, the first effective side information set of the object, and the second effective side information set;
and a second view map generating module 708 for generating a second view map according to the point light source object and the first view map.
In an embodiment of the present invention, the object diagram generating module 701 includes:
the polygon vertex data acquisition submodule is used for acquiring polygon vertex data;
and the object map generation submodule is used for generating the object map in a preset screen by adopting the polygon vertex data.
In the embodiment of the invention, each object graph is provided with a plurality of edges; the object first valid side information set generating module 704 includes:
the light ray acquisition submodule is used for connecting the point light source object with each vertex of each object graph respectively to obtain a plurality of light rays;
the included angle calculation submodule is used for calculating the included angle between any two light rays according to the position information of the point light source object and the vertex position information of each vertex of the object graph;
the target vertex acquisition submodule is used for taking two vertexes corresponding to the two rays with the largest included angle as target vertexes;
the target connecting line generation submodule is used for connecting the target vertex of the object graph to obtain a target connecting line;
the first effective edge determining submodule is used for acquiring an edge line between a target connecting line and a point light source object as a first effective edge of the object graph;
and the object first effective side information set generation submodule is used for integrating the first effective sides of all the object graphs to obtain an object first effective side information set.
In this embodiment of the present invention, the second valid side information set generating module 706 includes:
the non-shielding area determining submodule is used for determining a non-shielding area according to the first effective side information set of the object and the position information of the point light source object;
and the second effective side information set generating submodule is used for taking a line segment which is intersected with the non-shielding area in the screen edge line as a second effective side to generate a second effective side information set.
In this embodiment of the present invention, the first visual field map generating module 707 includes:
the dark area generation submodule is used for generating a plurality of dark areas by adopting a first effective side information set, a second effective side information set and light rays of an object;
and the first visual field map generation submodule is used for generating a first visual field map based on the dark-colored area.
In an embodiment of the present invention, the second view map generating module 708 includes:
the radius acquisition submodule is used for acquiring the radius of the point light source object;
the visible area generation submodule is used for generating a visible area according to the radius and the first view map; the visible area comprises a complete visible area and a color gradient area;
and the second view map generation submodule is used for setting the area outside the visible area in the screen as a shadow area and generating a second view map.
In the embodiment of the present invention, the method further includes:
the highlight object data receiving module is used for receiving highlight object data;
and the highlighted object display area generating module is used for generating a highlighted object display area in the second visual field image based on the highlighted object data.
An embodiment of the present invention further provides an electronic device, where the device includes a processor and a memory:
the memory is used for storing the program codes and transmitting the program codes to the processor;
the processor is configured to execute a game viewing method according to an embodiment of the present invention according to instructions in the program code.
The embodiment of the invention also provides a computer-readable storage medium, which is used for storing program codes, and the program codes are used for executing the game visual field generating method of the embodiment of the invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A game visual field generation method, comprising:
generating an object map in a preset screen;
acquiring role position information, and generating a point light source object in the role position information;
acquiring vertex position information of each vertex of all object graphs in the screen;
generating a first effective side information set of the object according to the position information of the point light source object and the vertex position information of all object graphs;
acquiring a screen sideline of the screen;
generating a second effective side information set according to the first effective side information set of the object and the screen edge;
generating a first visual field map according to the position information of the point light source object, the first effective side information set of the object and the second effective side information set;
and generating a second visual field map according to the point light source object and the first visual field map.
2. The method of claim 1, wherein the step of generating the object map in the preset screen comprises:
obtaining polygon vertex data;
and generating an object graph in a preset screen by adopting the polygon vertex data.
3. The method of claim 1, wherein each object graph has a plurality of edges; the step of generating a first effective side information set of the object according to the position information of the point light source object and the vertex position information of the object map includes:
connecting the point light source object with each vertex of each object graph respectively to obtain a plurality of light rays;
calculating an included angle between any two light rays according to the position information of the point light source object and the vertex position information of each vertex of the object graph;
taking two vertexes corresponding to the two rays with the largest included angle as target vertexes;
connecting the target vertexes of the object graphs to obtain a target connecting line;
acquiring a side line between the target connecting line and the point light source object as a first effective side of the object graph;
and integrating the first effective edges of all the object graphs to obtain a first effective edge information set of the object.
4. The method of claim 1, wherein the step of generating a second set of valid side information based on the first set of valid side information for the object and the screen edge comprises:
determining an unshielded area according to the first effective side information set of the object and the position information of the point light source object;
and taking a line segment which is intersected with the non-occlusion area in the screen edge line as a second effective edge, and generating a second effective edge information set.
5. The method of claim 3, wherein the step of generating a first view map based on the position information of the point source object, the first set of valid side information of the object, and the second set of valid side information comprises:
generating a plurality of dark regions by using the first effective side information set, the second effective side information set and the light;
a first view map is generated based on the dark region.
6. The method of claim 5, wherein the step of generating a second field of view map from the point source object and the first field of view map comprises:
acquiring the radius of the point light source object;
generating a visual area according to the radius and the first visual field diagram; the visible area comprises a complete visible area and a color gradient area;
and setting the area outside the visual area in the screen as a shadow area, and generating a second visual field map.
7. The method of claim 1, further comprising:
receiving highlight object data;
generating a highlighted item display area in the second view map based on the highlighted item data.
8. A game visual field generating apparatus, comprising:
the object map generating module is used for generating an object map in a preset screen;
the point light source object generating module is used for acquiring role position information and generating a point light source object in the role position information;
the vertex position information acquisition module is used for acquiring vertex position information of each vertex of all object graphs in the screen;
the object first effective side information set generating module is used for generating an object first effective side information set according to the position information of the point light source object and the vertex position information of all the object graphs;
the screen sideline acquisition module is used for acquiring a screen sideline of the screen;
the second effective side information set generating module is used for generating a second effective side information set according to the first effective side information set of the object and the screen side line;
the first visual field map generating module is used for generating a first visual field map according to the position information of the point light source object, the first effective side information set of the object and the second effective side information set;
and the second view map generation module is used for generating a second view map according to the point light source object and the first view map.
9. An electronic device, comprising a processor and a memory:
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is configured to execute the game view generation method of any one of claims 1 to 7 according to instructions in the program code.
10. A computer-readable storage medium characterized in that the computer-readable storage medium stores program code for executing the game view generation method of any one of claims 1 to 7.
CN202111022864.XA 2021-09-01 2021-09-01 Game view generation method and device, electronic equipment and storage medium Active CN113827960B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111022864.XA CN113827960B (en) 2021-09-01 2021-09-01 Game view generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111022864.XA CN113827960B (en) 2021-09-01 2021-09-01 Game view generation method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113827960A true CN113827960A (en) 2021-12-24
CN113827960B CN113827960B (en) 2023-06-02

Family

ID=78961836

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111022864.XA Active CN113827960B (en) 2021-09-01 2021-09-01 Game view generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113827960B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030112237A1 (en) * 2001-12-13 2003-06-19 Marco Corbetta Method, computer program product and system for rendering soft shadows in a frame representing a 3D-scene
CN102396003A (en) * 2009-04-17 2012-03-28 设计代码公司 Method for adding shadows to objects in computer graphics
CN105335996A (en) * 2014-06-30 2016-02-17 北京畅游天下网络技术有限公司 Light irradiation effect calculation method and device
CN106296786A (en) * 2016-08-09 2017-01-04 网易(杭州)网络有限公司 The determination method and device of scene of game visibility region
CN111476877A (en) * 2020-04-16 2020-07-31 网易(杭州)网络有限公司 Shadow rendering method and device, electronic equipment and storage medium
CN111773685A (en) * 2020-06-16 2020-10-16 网易(杭州)网络有限公司 Method and device for dynamically generating game role visual field
CN111803942A (en) * 2020-07-20 2020-10-23 网易(杭州)网络有限公司 Soft shadow generation method and device, electronic equipment and storage medium
CN112087618A (en) * 2019-06-12 2020-12-15 上海麦界信息技术有限公司 Method, device and computer readable medium for generating two-dimensional light field image

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030112237A1 (en) * 2001-12-13 2003-06-19 Marco Corbetta Method, computer program product and system for rendering soft shadows in a frame representing a 3D-scene
CN102396003A (en) * 2009-04-17 2012-03-28 设计代码公司 Method for adding shadows to objects in computer graphics
CN105335996A (en) * 2014-06-30 2016-02-17 北京畅游天下网络技术有限公司 Light irradiation effect calculation method and device
CN106296786A (en) * 2016-08-09 2017-01-04 网易(杭州)网络有限公司 The determination method and device of scene of game visibility region
CN112087618A (en) * 2019-06-12 2020-12-15 上海麦界信息技术有限公司 Method, device and computer readable medium for generating two-dimensional light field image
CN111476877A (en) * 2020-04-16 2020-07-31 网易(杭州)网络有限公司 Shadow rendering method and device, electronic equipment and storage medium
CN111773685A (en) * 2020-06-16 2020-10-16 网易(杭州)网络有限公司 Method and device for dynamically generating game role visual field
CN111803942A (en) * 2020-07-20 2020-10-23 网易(杭州)网络有限公司 Soft shadow generation method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113827960B (en) 2023-06-02

Similar Documents

Publication Publication Date Title
CN108236783B (en) Method and device for simulating illumination in game scene, terminal equipment and storage medium
CN111508052B (en) Rendering method and device of three-dimensional grid body
CN111968215B (en) Volume light rendering method and device, electronic equipment and storage medium
CN107077756B (en) Three-dimensional object visualization method, visualization apparatus, and computer-readable storage medium
JP7109907B2 (en) Image processing device, image processing method and program
AU2012390266B2 (en) A computer graphics method for rendering three dimensional scenes
DE102016103870A1 (en) Systems and methods for soft shading in 3D rendering
CN106296786A (en) The determination method and device of scene of game visibility region
CN108154548A (en) Image rendering method and device
CA2990109A1 (en) Fast rendering of quadrics
CN112819940B (en) Rendering method and device and electronic equipment
CN112184873B (en) Fractal graph creation method, fractal graph creation device, electronic equipment and storage medium
CN113509721B (en) Shadow data determining method, apparatus, device and readable medium
CN113205586A (en) Image processing method and device, electronic equipment and computer readable storage medium
CN113658316B (en) Rendering method and device of three-dimensional model, storage medium and computer equipment
CN111739142A (en) Scene rendering method and device, electronic equipment and computer readable storage medium
CN112052864B (en) Image drawing method and device, electronic equipment and readable storage medium
US9483873B2 (en) Easy selection threshold
WO2022055367A1 (en) Method for emulating defocus of sharp rendered images
CN116704102A (en) Automatic light distribution method based on point cloud scene and electronic equipment
CN112270759B (en) Image-based light effect processing method, device and equipment and storage medium
KR20160103926A (en) Shadow rendering method and shadow rendering apparatus
CN113827960B (en) Game view generation method and device, electronic equipment and storage medium
CN115359172A (en) Rendering method and related device
CN113117334A (en) Method for determining visible area of target point and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant