CN113827960B - Game view generation method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN113827960B
CN113827960B CN202111022864.XA CN202111022864A CN113827960B CN 113827960 B CN113827960 B CN 113827960B CN 202111022864 A CN202111022864 A CN 202111022864A CN 113827960 B CN113827960 B CN 113827960B
Authority
CN
China
Prior art keywords
generating
information set
light source
point light
side information
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.)
Active
Application number
CN202111022864.XA
Other languages
Chinese (zh)
Other versions
CN113827960A (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 field of view generation method, a game field of view generation device, electronic equipment and a storage medium, which are used for solving the technical problem that a field of view area change has a visual effect which is not smooth and discontinuous. The invention comprises the following steps: generating an object diagram in a preset screen; acquiring character position information, and generating a point light source object in the character position information; obtaining 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 edge of the screen; generating a second effective side information set according to the first effective side information set of the object and the screen side line; 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; and generating a second view diagram according to the point light source object and the first view diagram.

Description

Game view generation method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of view generation, and in particular, to a game field of view generation method, apparatus, electronic device, and storage medium.
Background
In MOBA (Multiplayer Online Battle Arena, multiplayer online tactical game), the game field of view is an important component of countermeasure rules and playability. In the implementation of the field of view generation technology, a large number of game objects such as roles, buildings, objects and the like of the field of view layer and the scene map are required to be mixed and judged so as to render the size, shape and color of the field of view. Rendering processes typically include operations to gather, filter, calculate polygons, submit consumption performance of rendering, etc., of game objects within the screen device.
Most of the existing visual field implementation modes are based on the implementation of the foggy lattices, namely, the visual attribute of each foggy lattice is determined in the range of visual field equipment according to the position of a principal angle and the radius of the visual field, and the visible attribute is in the visual field, and the invisible attribute is out of the visual field.
However, the above-described solution has some drawbacks. First, when the grid is large, the field of view changes with a non-smooth and discontinuous visual experience when switching from one grid to the next. Second, since the shapes of the plurality of lattices constituting the visual field are fixed, the visual field area effect of an arbitrary shape cannot be achieved. Finally, the view field area generated based on the ray trace cannot be achieved.
Furthermore, another implementation is now based on pure polygon rendering. A significant disadvantage of this solution is that the shape can only be limited to a combination of polygons, and that a smoother shape and field of view containing areas of different color or transparency cannot be achieved.
Disclosure of Invention
The invention provides a game field of view generation method, a game field of view generation device, electronic equipment and a storage medium, which are used for solving the technical problem that a field of view change has a visual effect which is not smooth and discontinuous.
The invention provides a game field generating method, which comprises the following steps:
generating an object diagram in a preset screen;
acquiring character position information, and generating a point light source object in the character position information;
obtaining 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 diagrams;
acquiring a screen edge of the screen;
generating a second effective side information set according to the first effective side information set of the object and the screen side line;
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;
and generating a second view diagram according to the point light source object and the first view diagram.
Optionally, the step of generating the object graph in the 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 graph includes:
connecting the point light source object with each vertex of each object graph respectively to obtain a plurality of rays;
calculating an included angle between any two 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 two rays with the largest included angle as target vertexes;
connecting the target vertexes of the object graph to obtain a target connecting line;
acquiring an edge line between the target connecting line and the point light source object as a first effective edge 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.
Optionally, the step of generating a second set of valid side information according to the first set of valid side information of the object and the screen edge includes:
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 taking a line segment intersecting with the non-shielding area in the screen side line as a second effective side, and generating a second effective side 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 and the second effective side information set of the object includes:
generating a plurality of dark areas by adopting the first effective side information set, the second effective side information set and the light rays of the object;
a first view is generated based on the dark region.
Optionally, the step of generating a second view from the point light source object and the first view includes:
acquiring the radius of the point light source object;
generating a visual area according to the radius and the first view map; the visible area comprises a full visible area and a color gradient area;
and setting an area outside the visible area in the screen as a shadow area, and generating a second view map.
Optionally, the method further comprises:
receiving highlight object data;
and generating a highlight object display area in the second view map based on the highlight object data.
The invention also provides a game field generating device, which comprises:
the object diagram generation module is used for generating an object diagram in a preset screen;
the point light source object generating module is used for acquiring character position information and generating a point light source object in the character 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 object graphs;
a screen edge obtaining module, configured to obtain a screen edge 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 view diagram generation module is used for generating a first view diagram 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;
and the second view diagram generating module is used for generating a second view diagram according to the point light source object and the first view diagram.
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 field generation method according to any one of the above according to instructions in the program code.
The present invention also provides a computer-readable storage medium storing program code for executing the game field generating method according to any one of the above.
From the above technical scheme, the invention has the following advantages: the invention discloses a game field generating method, which comprises the following steps: generating an object diagram in a preset screen; acquiring character position information, and generating a point light source object in the character 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 diagrams; acquiring a screen edge of a screen; generating a second effective side information set according to the first effective side information set of the object and the screen side line; 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 view map is generated from the point light source object and the first 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 view field diagram and the second view field diagram, and adjusts the light and shade change in the screen based on the scattering and shielding conditions of the light source, so that the light and shade change in the screen has smoother and continuity.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the invention, and that other drawings can be obtained from these drawings without inventive faculty for a person skilled in the art.
FIG. 1 is a flow chart of steps of a game field generating method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating steps of a game field generation method according to another embodiment of the present invention;
FIG. 3 is a schematic diagram of determining a first effective edge according to an embodiment of the present invention;
FIG. 4 is a schematic illustration of an object according to an embodiment of the present invention;
FIG. 5 is a schematic view of a first view provided by an embodiment of the present invention;
FIG. 6 is a diagram of a second view illustration provided by an embodiment of the present invention;
fig. 7 is a block diagram of a game field generating device according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a game field generation method, a game field generation device, electronic equipment and a storage medium, which are used for solving the technical problem that a field of view change has an unsmooth and discontinuous visual effect.
In order to make the objects, features and advantages of the present invention more comprehensible, the technical solutions in the embodiments of the present invention are described in detail below with reference to the accompanying drawings, and it is apparent that the embodiments described below are only some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating steps of a game field generating method according to an embodiment of the present invention.
The game field of view generation method provided by the invention specifically comprises the following steps:
step 101, generating an object diagram in a preset screen;
in the embodiment of the invention, the object refers to a generic term of all objects such as buildings and the like in the screen range.
102, acquiring character position information, and generating a point light source object in the character position information;
in the embodiment of the invention, the point light source object is a light source structure body capable of emitting simulated light, and the irradiation range of the point light source object can be circular, fan-shaped or other self-defined shapes.
In the embodiment of the invention, a point light source object can be arranged at the position of the character, and the irradiation range of the point light source object is used for symbolizing the visual field range of the character.
Step 103, obtaining vertex position information of each vertex of all object graphs in the screen;
in the embodiment of the invention, all object graphs within the screen range can be searched based on a preset first device, the polygonal shape and the position of the object graph can be determined, and the vertex position information of each vertex of each object graph can be further determined.
Step 104, generating Cheng Wujian a first effective side information set according to the position information of the point light source object and the vertex position information of all object diagrams;
the first effective side information set of the object refers to a set of sides of each object actually irradiated by the point light source object.
The light emitted by the point light source object is 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 invention, the first effective side information set of the object can be generated according to the position information of the point light source object and the vertex position information of all object graphs.
Step 105, obtaining a screen edge 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 side line;
the second set of valid side information is a set of partial screen side lines to which light rays of the pointing light source object are irradiated.
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 scattered by the point light source object and the side 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 and the second effective side information set of the object are obtained, a first view diagram can be generated according to the shielding condition of the point light source object by the first effective side information set of the object and combining with the second effective side information set.
Step 108, generating a second view map from the point light source object and the first view map.
In the embodiment of the invention, after the first view map is obtained, the brightness change of the first view map can be adjusted according to the view field range of the point light source object 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 view field diagram and the second view field diagram, and adjusts the light and shade change in the screen based on the scattering and shielding conditions of the light source, so that the light and shade change in the screen has smoother and continuity.
Referring to fig. 2, fig. 2 is a flowchart illustrating steps of a game field generating method according to another embodiment of the present invention. Specifically, the method comprises the following steps:
step 201, polygon vertex data is obtained;
step 202, generating an object diagram in a preset screen by using polygon vertex data;
in the embodiment of the invention, the polygon vertex data of the object graph input from the outside can be received to generate the object graph in the preset screen. The generated object graph may be as shown in fig. 3.
Step 203, acquiring character position information, and generating a point light source object in the character position information;
in the embodiment of the invention, the point light source object is a light source structure body capable of emitting simulated light, and the irradiation range of the point light source object can be circular, fan-shaped or other self-defined shapes.
In the embodiment of the invention, a point light source object can be arranged at the position of the character, and the irradiation range of the point light source object is used for symbolizing the visual field range of the character.
Step 204, obtaining vertex position information of each vertex of all object graphs in the screen;
in the embodiment of the invention, all object graphs within the screen range can be searched based on a preset first device, the polygonal shape and the position of the object graph can be determined, and the vertex position information of each vertex of each object graph can be further determined.
Step 205, generating Cheng Wujian a first effective side information set according to the position information of the point light source object and the vertex position information of all object diagrams;
the light emitted by the point light source object is 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 invention, the first effective side information set of the object can 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 sub-steps of:
s51, respectively connecting point light source objects with each vertex of each object graph to obtain a plurality of rays;
s52, calculating an included angle between any two rays according to the position information of the point light source object and the vertex position information of each vertex of the object diagram;
s53, taking two vertexes corresponding to two rays with the largest included angles as target vertexes;
s54, connecting the target vertexes of the object graph to obtain a target connecting line;
s55, acquiring an edge line between the target connecting line and the point light source object as a first effective edge of the object diagram;
s56, integrating the first effective edges of all object graphs to obtain a first effective edge information set of the objects.
As shown in fig. 3, the point light source object may emit a plurality of light rays, each of which passes through a vertex of the object diagram. And calculating the included angle of the light rays corresponding to any two vertexes of the same object diagram. The two vertices with the largest included angles are taken as target vertices, such as A, B in fig. 3. Connecting A, B to obtain a target connection line AB, and taking the edge line of the object graph of the target connection line AB, which is close to the point light source object, as a first effective edge to obtain 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, obtaining 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 side line;
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 edge, the correlation between the light scattered by the point light source object and the screen edge can be calculated, so as to determine the second effective side information set.
In one example, step 207 may include the sub-steps of:
s71, determining an unobstructed area according to a first effective side information set of the object and position information of a point light source object;
s72, taking a line segment intersecting with the non-shielding 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 light rays of the point light source object which are not blocked by the first effective side information set can be intersected with the screen side line to obtain the second effective sides, 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 and the second effective side information set of the object 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 sub-steps of:
s81, generating a plurality of dark areas by adopting a first effective side information set, a second effective side information set and light rays of the object;
s82, generating a first view map based on the dark area.
In a specific implementation, an area surrounded by the screen edge line except the intersected first effective edge, the light ray and the second effective edge in the screen edge line is used as a dark area, so that a plurality of polygonal areas are obtained. And respectively transmitting the data of the polygonal area into a preset first device, calculating a first view diagram by the first device, and outputting the calculated first view diagram to a first storage area for standby. 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 that is executed by a rendering device.
Step 209, generating a second view map from the point light source object and the first view map.
In the embodiment of the invention, the second visual field rendering script can be executed according to the preset second device, so as to obtain a second visual field diagram.
In one example, step 209 may include the sub-steps of:
s91, acquiring the radius of the point light source object;
s92, generating a visual area according to the radius and the first view map; the visible area comprises a full visible area and a color gradient area;
s93, setting an area outside the visible area in the screen as a shadow area, and generating a second view map.
In a specific implementation, whether each pixel position in the first view is visible in the second view may be calculated according to the irradiation radius of the point light source object and the dark color region in the first view.
It should be noted that whether the object graph is ultimately visible is a comprehensive result for the pixels C on the object that are located within the radius of the light source; it is possible to first acquire its first visibility in the first view, and then acquire its second visibility (visible within the light source radius, invisible outside the light source radius) on the basis of the division of the light source radius. And performing logic AND operation on the first visibility and the second visibility to obtain the final visibility.
And then determining the visible area according to the radius of the light source and the visibility of each object graph in the screen. The visible area comprises a full visible area and a color gradient area. The full visible area is an area which takes a point light source object as a circle center and has no object diagram at all; the color gradient region is a region outside the full visible region and the object diagram in the visible region.
In addition, the area outside the visible area, including the object diagram itself, may be set as a shadow area. The second view map can be obtained by adjusting the pixels in the first view map as described above.
In an implementation, the second coordinates of the point light source object in the view map may be calculated according to the first position coordinates of the light source in the game scene. And transmitting the first view map into a view second rendering script, and calculating the color of each pixel in the second view map by combining the second coordinates of the point light source object in the view map to generate a second view map. The resulting second view may be as shown in fig. 6.
In an embodiment of the present invention, the method may further include: receiving highlight object data; a highlight item display region is generated in the second view based on the highlight item data.
The highlight object is an object which is not displayed as a shadow dark color in a shadow area, but is illuminated with light. It may set the pixel color inside the highlight object to the light 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 view field diagram and the second view field diagram, and adjusts the light and shade change in the screen based on the scattering and shielding conditions of the light source, so that the light and shade change in the screen has smoother and continuity.
Referring to fig. 7, fig. 7 is a block diagram of a game field generating apparatus according to an embodiment of the present invention.
An embodiment of the present invention provides a game field generating device, including:
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 character position information, and generate a point light source object in the character position information;
a vertex position information acquisition module 703, configured to acquire vertex position information of each vertex of all object graphs in the screen;
an article first effective side information set generating module 704, configured to generate an article first effective side information set according to the position information of the point light source object and the vertex position information of all article graphs;
a screen edge obtaining module 705, configured to obtain a screen edge of a screen;
a second valid side information set generating module 706, configured to generate a second valid side information set according to the first valid side information set of the object and the screen edge;
a first view diagram generating module 707, configured to generate a first view diagram according to the position information of the point light source object, the first valid side information set and the second valid side information set of the object;
a second view map generation module 708 is configured to generate a second view map from 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 sub-module is used for acquiring polygon vertex data;
and the object diagram generation sub-module is used for generating an object diagram in a preset screen by adopting 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 generation module 704 includes:
the light acquisition sub-module 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 calculating sub-module is used for calculating the included angle between any two rays according to the position information of the point light source object and the position information of the top point of each top point of the object diagram;
the target vertex obtaining sub-module is used for taking two vertexes corresponding to the two rays with the largest included angles as target vertexes;
the target connection line generation sub-module is used for connecting the target vertexes of the object graph to obtain a target connection line;
the first effective edge determining submodule is used for acquiring an edge line between the target connecting line and the point light source object and taking the edge line as a first effective edge of the object diagram;
and the object first effective side information set generation sub-module is used for integrating the first effective sides of all object graphs to obtain an object first effective side information set.
In the 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 generation submodule is used for taking a line segment intersecting with the non-shielding area in the screen side line as a second effective side to generate a second effective side information set.
In an embodiment of the present invention, the first view generating module 707 includes:
the dark region generation submodule is used for generating a plurality of dark regions by adopting a first effective side information set, a second effective side information set and light rays of the object;
and the first view diagram generation sub-module is used for generating a first view diagram based on the dark area.
In an embodiment of the present invention, the second view generating module 708 includes:
a radius acquisition sub-module for acquiring the radius of the point light source object;
the visual area generating sub-module is used for 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 the second view diagram generation sub-module is used for setting the area outside the visible area in the screen as a shadow area and generating a second view diagram.
In an embodiment of the present invention, the method further includes:
the highlight object data receiving module is used for receiving highlight object data;
and a highlight object display area generating module for generating a highlight object display area in the second view map based on the highlight object data.
The embodiment of the invention also provides electronic equipment, which comprises 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 the game wild forming method according to the embodiment of the present invention according to the instructions in the program code.
The embodiment of the invention also provides a computer readable storage medium for storing program codes for executing the game field generating method of the embodiment of the invention.
It will be clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the systems, apparatuses and units described above may refer to the corresponding processes in the foregoing method embodiments, which are not described in detail herein.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be apparent to those skilled in the art that 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 invention may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) 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 flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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 apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus 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 in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it is further noted that relational terms such as first and second, and the like are 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 one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. A game field generation method, comprising:
generating an object diagram in a preset screen;
acquiring character position information, and generating a point light source object in the character position information;
obtaining 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 edge of the screen;
generating a second effective side information set according to the first effective side information set of the object and the screen side line;
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;
generating a second view map from the point light source object and the first view map;
the step of generating a second effective side information set according to the first effective side information set of the object and the screen side line comprises the following steps:
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;
taking a line segment intersecting with the non-shielding area in the screen side line as a second effective side to generate a second effective side information set;
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 and the second effective side information set of the object includes:
generating a plurality of dark areas by adopting the first effective side information set, the second effective side information set and the light rays of the object;
generating a first view map based on the dark region;
wherein the step of generating a second view from the point light source object and the first view comprises:
acquiring the radius of the point light source object;
generating a visual area according to the radius and the first view map;
and setting an area outside the visible area in the screen as a shadow area, and generating a second view 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 graph includes:
connecting the point light source object with each vertex of each object graph respectively to obtain a plurality of rays;
calculating an included angle between any two 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 two rays with the largest included angle as target vertexes;
connecting the target vertexes of the object graph to obtain a target connecting line;
acquiring an edge line between the target connecting line and the point light source object as a first effective edge 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.
4. The method of claim 1, wherein the viewable area comprises a full viewable area and a color gradient area.
5. The method as recited in claim 1, further comprising:
receiving highlight object data;
and generating a highlight object display area in the second view map based on the highlight object data.
6. A game field generating apparatus, comprising:
the object diagram generation module is used for generating an object diagram in a preset screen;
the point light source object generating module is used for acquiring character position information and generating a point light source object in the character 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 object graphs;
a screen edge obtaining module, configured to obtain a screen edge 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 view diagram generation module is used for generating a first view diagram 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 view map generation module for generating a second view map from the point light source object and the first view map;
the second valid side information set generating module 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;
the second effective side information set generation submodule is used for taking a line segment intersecting with the non-shielding area in the screen side line as a second effective side to generate a second effective side information set;
wherein, the first view diagram generation module includes:
the dark region generation submodule is used for generating a plurality of dark regions by adopting a first effective side information set, a second effective side information set and light rays of the object;
a first view map generation sub-module for generating a first view map based on the dark region;
wherein the second view diagram generating module includes:
a radius acquisition sub-module for acquiring the radius of the point light source object;
the visual area generating sub-module is used for generating a visual area according to the radius and the first visual field diagram;
and the second view diagram generation sub-module is used for setting the area outside the visible area in the screen as a shadow area and generating a second view diagram.
7. An electronic device, the 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 field generation method of any one of claims 1-5 according to instructions in the program code.
8. A computer-readable storage medium storing program code for executing the game field generating method according to any one of claims 1 to 5.
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 CN113827960A (en) 2021-12-24
CN113827960B true 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 (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6903741B2 (en) * 2001-12-13 2005-06-07 Crytek Gmbh Method, computer program product and system for rendering soft shadows in a frame representing a 3D-scene

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN113827960A (en) 2021-12-24

Similar Documents

Publication Publication Date Title
CN108236783B (en) Method and device for simulating illumination in game scene, terminal equipment and storage medium
US10068368B2 (en) Method, visualization device, and computer program product for visualizing a three-dimensional object
CN114419240B (en) Illumination rendering method and device, computer equipment and storage medium
CN107038738A (en) Object is shown using modified rendering parameter
US9786095B2 (en) Shadow rendering apparatus and control method thereof
CN113509721B (en) Shadow data determining method, apparatus, device and readable medium
US9483873B2 (en) Easy selection threshold
CN111739142A (en) Scene rendering method and device, electronic equipment and computer readable storage medium
CN112184873A (en) Fractal graph creating method and device, electronic equipment and storage medium
CN115830208A (en) Global illumination rendering method and device, computer equipment and storage medium
CN113205586A (en) Image processing method and device, electronic equipment and computer readable storage medium
CN112734896A (en) Environment shielding rendering method and device, storage medium and electronic equipment
CN113827960B (en) Game view generation method and device, electronic equipment and storage medium
CN112819940B (en) Rendering method and device and electronic equipment
KR20160103926A (en) Shadow rendering method and shadow rendering apparatus
CN112270759B (en) Image-based light effect processing method, device and equipment and storage medium
CN112365572B (en) Rendering method based on surface subdivision and related products thereof
CN111340684B (en) Method and device for processing graphics in game
CN116012520B (en) Shadow rendering method, shadow rendering device, computer equipment and storage medium
EP3343513A1 (en) Device and method for generating flexible dynamic virtual contents in mixed reality
CN114520893A (en) Picture projection method and device, projection equipment and readable storage medium
CN116704102A (en) Automatic light distribution method based on point cloud scene and electronic equipment
CN115359172A (en) Rendering method and related device
CN112819929B (en) Water surface rendering method and device, electronic equipment and storage medium
CN114663564A (en) Browser WebGL large scene rendering method, device, equipment and medium

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