WO2022105737A1 - 游戏地图内地图区域边界的渲染方法、系统及计算机可读存储介质 - Google Patents

游戏地图内地图区域边界的渲染方法、系统及计算机可读存储介质 Download PDF

Info

Publication number
WO2022105737A1
WO2022105737A1 PCT/CN2021/130866 CN2021130866W WO2022105737A1 WO 2022105737 A1 WO2022105737 A1 WO 2022105737A1 CN 2021130866 W CN2021130866 W CN 2021130866W WO 2022105737 A1 WO2022105737 A1 WO 2022105737A1
Authority
WO
WIPO (PCT)
Prior art keywords
boundary
fuzzy
map
vertex
rendering
Prior art date
Application number
PCT/CN2021/130866
Other languages
English (en)
French (fr)
Inventor
朱志成
Original Assignee
上海莉莉丝网络科技有限公司
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 上海莉莉丝网络科技有限公司 filed Critical 上海莉莉丝网络科技有限公司
Priority to US18/011,821 priority Critical patent/US11887255B2/en
Publication of WO2022105737A1 publication Critical patent/WO2022105737A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/05Geographic models
    • 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
    • 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/5378Controlling 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 displaying an additional top view, e.g. radar screens or maps
    • 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/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/04Texture mapping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • G06T17/205Re-meshing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/66Analysis of geometric attributes of image moments or centre of gravity

Definitions

  • the present invention relates to the field of game control, and in particular, to a method, system and computer-readable storage medium for rendering a map area boundary in a game map.
  • the division of the game maps in the game adopts the area coloring method, and the game maps of the players who do not belong to the same faction are marked as different map areas.
  • a map area consists of a number of quadrilateral map pixels, and rarely is a hexagonal map pixel used.
  • the main reason is that the area coloring of hexagonal map pixels has many challenges compared to quadrilaterals, such as requiring more load at runtime for fast calculation of area boundaries; rapid updates when areas expand and contract; map zooming
  • the border lines of the map need to be rendered smoothly; the border lines after rendering are jagged, or under different focal lengths, the border lines after rendering may not be clear.
  • the purpose of the present invention is to provide a method, system and computer-readable storage medium for rendering the boundary of the map area in a game map, which uses a smaller load to render the boundary of the map area, and under various focal lengths, The user displays an interactive interface that distinguishes different attributable map areas.
  • the invention discloses a method for rendering a map area boundary in a game map, comprising the following steps:
  • the step of forming the boundary mesh includes:
  • the step of taking each boundary vertex of the fuzzy boundary and extending a preset distance from the boundary vertex along the normal direction of the fuzzy boundary to form a boundary mesh further comprises:
  • the invention also discloses a rendering system for the boundary of the map area in the game map, including:
  • the expansion module obtains the boundary of the map area in the game map, and expands to the inside of the boundary along the normal direction of the boundary to form a fuzzy boundary;
  • the generating module takes each boundary vertex of the fuzzy boundary, and extends a preset distance straight from the boundary vertex along the normal direction of the fuzzy boundary to form a boundary mesh;
  • the rendering module renders a border color in a first range between the blurred border and the border grid, and renders a border transparency in a second range extending a preset distance from the blurred border to the inner border, and converts the border color from the first range Do convolution incremental dilation rendering until the second range is covered.
  • the generation module includes:
  • an acquisition unit which acquires the vertex of each map pixel that forms the fuzzy boundary as the boundary vertex
  • the expansion unit taking each boundary vertex as a starting point, extends to the normal direction of the fuzzy boundary as an expansion line segment, and the length of the expansion line segment is a preset distance;
  • Mark the unit mark the intersection of at least two expanded line segments as the boundary mesh.
  • the generation module further includes:
  • the erasing unit when the boundary mesh formed based on the preset distance overflows the boundary, reduces the extension distance of the expansion line segment at the overflowing part until it intersects with the opposite fuzzy boundary.
  • the rendering system further includes:
  • the advancement module when the boundary of the map area changes dynamically, obtains the intersection boundary between the changed boundary and the initial boundary, and the center position of the changed map area, calculates the gradient from the intersection boundary to the center position, and renders the gradient.
  • the present invention further discloses a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above steps are implemented.
  • the calculation consumption is small, and the boundary of the map area of the game map can be quickly rendered
  • the phenomenon of borderless piercing can also be used in scenes facing map areas with holes.
  • FIG. 1 is a schematic flowchart of a method for rendering a map area boundary in a game map in accordance with a preferred embodiment of the present invention
  • FIG. 2 is a schematic diagram after rendering in accordance with a preferred embodiment of the present invention, the map area boundary in the game map;
  • FIG. 3 is a schematic structural diagram of a rendering system conforming to a map area boundary in a game map according to a preferred embodiment of the present invention.
  • first, second, third, etc. may be used in this disclosure to describe various pieces of information, such information should not be limited by these terms. These terms are only used to distinguish the same type of information from each other.
  • first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information, without departing from the scope of the present disclosure.
  • word "if” as used herein can be interpreted as "at the time of” or "when” or "in response to determining.”
  • the basic elements of the game map are hexagonal map pixels.
  • the pixel referred to in the present invention is the smallest unit that constitutes a game map or a map area, and in the embodiment of the present invention, a regular hexagon or a regular quadrilateral map pixel is mainly used.
  • edge Ei-3:Ei+3 using the axisymmetric property of the regular hexagon, define the edge Ei of the hexagon as a half edge.
  • the edge to be calibrated is Ei and another Ei belonging to the map pixels in the same map area, then stop the calibration; and when the edge to be calibrated is Ei and Fi belonging to the map pixels in two different map areas, then Continue to calibrate.
  • map pixels form a map area, and each map area belongs to a certain player in the game map, or when it is in a neutral state, the map area does not belong to any player.
  • different colors are used for the map area to render its area boundary. Therefore, when the ownership of the map area changes, for example, when the player newly occupies a certain map area, the rendered area boundary also changes. When the player's ownership of a certain map area is lost, the rendered area boundary will also change accordingly.
  • a method for rendering a map area boundary in a game map specifically includes the following steps:
  • each boundary needs to be rendered inside .
  • the width of the border needs to be enlarged in order to be clearly seen under a camera with a higher height, so it expands to the inside of the border along the normal direction of the border.
  • the range formed by the expansion is a blurred boundary. For example through Gaussian smoothing and Hermite Spline interpolation.
  • each boundary vertex of the fuzzy boundary that is, the end point on the boundary line forming the boundary
  • the endpoint it can be the endpoints on the boundary line separated by a certain distance, or it can be the continuous endpoints forming the boundary line, which is based on the upper limit of the number of endpoints that can be processed by the system load.
  • After obtaining the boundary vertices take each boundary vertex as the starting point, and extend along the normal direction of the fuzzy boundary (for example, the vertical direction of the tangent at the position of the curve where the boundary vertex is located), that is, a ray is formed. After extending a preset distance Cutoff, thus forming a boundary mesh inside the blurred boundary as the extent of subsequent pre-rendering.
  • S300 Rendering a border color in a first range between the blurred border and the border grid, and rendering a border transparency in a second range extending a preset distance from the blurred border to the interior of the inner border;
  • the first part is the fuzzy boundary
  • the second part is the area from the fuzzy boundary to the boundary grid
  • the third part is the boundary grid to the cut-off preset Set distance area.
  • different colors can be painted directly on different map areas to differentiate between different, even adjacent, map areas.
  • the first range from the blurred border to the border mesh a border color of a certain width will be pre-rendered to ColorRT.
  • the certain width is the area of the first range between the fuzzy boundary and the boundary grid.
  • a boundary transparency is pre-rendered to AlphaRT. That is to say, in step S300, a part of the range inside the boundary has been painted, and after the part of the larger area is given transparency, the part of the range within the boundary is the same color as the boundary, but more transparent. On the display, it presents the look and feel extending from the boundary inward.
  • S400 Perform convolution and incremental expansion rendering of the border color from the first range until the second range is covered.
  • step S400 since the area of the area to be rendered and colored is small, it is difficult to see the boundary under a very high camera. Therefore, the boundary color is rendered from the first range by convolution and incremental expansion until the second range is covered. That is, by increasing the Kernel Size of ColorRT to make the border color reach the width of the preset distance, the effect shown in Figure 2 is displayed. It can be seen that the different colors rendered represent map areas under different affiliations or camps, and different The extension under Transparency accentuates the border.
  • step S200 of taking each boundary vertex of the fuzzy boundary and extending a preset distance from the boundary vertex along the normal direction of the fuzzy boundary to form a boundary mesh includes:
  • the border vertex is the vertex of each map pixel that forms the blurred border. More preferably, the concept of vertices can be blurred, that is, the boundary of the map area is regarded as a closed line segment, and the whole of the closed line segment is regarded as the vertex to be extended, that is, the concept of a point is extended to the concept of a line.
  • S230 Mark the intersection of at least two expanded line segments as a boundary grid.
  • the boundary mesh is defined by the intersection, that is to say, the area from the fuzzy boundary to the intersection is the overall area of the boundary mesh.
  • step S200 also includes:
  • the width of the map area is relatively narrow, so that the opposite expansion line segment extends to the outside of the boundary, that is, overflows the boundary. Even the boundary grid formed by the intersection of each expansion line segment also overflows the boundary. In this regard, it is easy to cause that when the map area next to the map area is neutral, the color of the rendered map area overflows to other map areas, which is obviously inconsistent with the Attribution requirements and interaction requirements for map areas.
  • step S240 when the part of the boundary mesh formed based on the preset distance overflows the boundary, the extension distance of the expansion line segment at the overflow part is reduced until it intersects with the relative fuzzy boundary, that is, the expansion line segment continues to extend , when it intersects with the opposite fuzzy boundary, the extension is stopped, so that the first range pre-rendered in step S300 is maintained inside the boundary, and the situation of overflow of the rendering range will not occur.
  • the rendering method further includes:
  • gradient rendering will be performed on the gradient from the intersecting boundary to the center position to show the change of the boundary.
  • the embodiments of the present invention all have excellent performance in the context of boundary generation and boundary geometric operations (union and difference operations).
  • the rendering performance is avoided due to the complexity of rendering translucent objects and the actual situation of this example (effective under multi-level boundaries).
  • FIG. 3 it is a rendering system that conforms to the boundary of the map area in the game map in a preferred embodiment of the present invention, including:
  • the expansion module obtains the boundary of the map area in the game map, and expands the boundary along the normal direction of the boundary to form a fuzzy boundary;
  • the generation module takes each boundary vertex of the fuzzy boundary, and from the boundary vertex along the fuzzy boundary
  • the normal direction extends a predetermined distance in a straight line to form a boundary grid;
  • the rendering module renders a boundary color in a first range between the fuzzy boundary and the boundary grid, and expands the predetermined distance from the fuzzy boundary to the inner boundary.
  • a border transparency is rendered in the second range, and the border color is convolved and expanded from the first range until the second range is covered.
  • the generation module includes: an acquisition unit, which acquires the vertex of each map pixel forming the fuzzy boundary as a boundary vertex; an expansion unit, which takes each boundary vertex as a starting point and extends to the normal direction of the fuzzy boundary as an expansion line segment , and the length of the expansion line segment is a preset distance; marking unit, marking the intersection of at least two expansion line segments as the boundary grid.
  • the generation module further includes: an erasing unit, when the boundary mesh formed based on the preset distance overflows the boundary, reducing the extension distance of the expansion line segment at the overflowing part until it intersects with the opposite fuzzy boundary .
  • the rendering system further includes: a propulsion module, when the boundary of the map area changes dynamically, obtains the intersection boundary between the changed boundary and the initial boundary, and the center position of the changed map area, and calculates the intersection boundary to the center Gradient of position and gradient rendering.
  • a propulsion module when the boundary of the map area changes dynamically, obtains the intersection boundary between the changed boundary and the initial boundary, and the center position of the changed map area, and calculates the intersection boundary to the center Gradient of position and gradient rendering.
  • the present invention also discloses a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above steps are implemented.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Computer Graphics (AREA)
  • Software Systems (AREA)
  • Optics & Photonics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Processing Or Creating Images (AREA)
  • Image Generation (AREA)

Abstract

本发明提供了一种游戏地图内地图区域边界的渲染方法、系统及计算机可读存储介质,渲染方法,包括以下步骤:获取游戏地图内的地图区域的边界,并沿边界的法线方向向边界内部扩张,以形成模糊边界;取模糊边界的每一边界顶点,并自边界顶点沿模糊边界的法线方向直线延伸一预设距离,以形成边界网格;于模糊边界至边界网格间的第一范围渲染一边界颜色,并在自模糊边界向内边界内部扩张预设距离的第二范围内渲染一边界透明度;将边界颜色自第一范围作卷积递增膨胀渲染,直至覆盖第二范围。采用上述技术方案后,基于较小的负载渲染地图区域的边界,在各种焦距下,向用户展示区分不同归属的地图区域的交互界面。

Description

游戏地图内地图区域边界的渲染方法、系统及计算机可读存储介质 技术领域
本发明涉及游戏控制领域,尤其涉及一种游戏地图内地图区域边界的渲染方法、系统及计算机可读存储介质。
背景技术
随着智能终端的快速发展,用户使用智能终端进行各种操作的情况越来越普遍,尤其以使用智能终端进行游戏最为常见。以SLG游戏(模拟游戏)为例,游戏内需要存在大量游戏地图,以供用户操作游戏对象在游戏地图内移动。
现有技术中,游戏内的游戏地图的区分采用区域染色方式,将不属于同一阵营、玩家的游戏地图标记为不同的地图区域。通常地图区域由多个四边形的地图像素组成,而很少存在有使用六边形的地图像素的情况。其原因主要在于,六边形地图像素的区域染色较四边形的有不少挑战的地方,例如运行时需要更多负载,用于快速计算区域边界;区域扩张和收缩时的需要快速更新;地图缩放时地图的边界线需平滑渲染;渲染后的边界具有锯齿,或不同焦距下,渲染后的边界线可能无法看清。
因此,需要一种新型的游戏地图内动态区域边界的渲染方法、渲染系统及计算机可读存储介质,可有效地渲染地图区域的边界,并在不同高度下,均可展示符合用户体验的边界交互。
发明内容
为了克服上述技术缺陷,本发明的目的在于提供一种游戏地图内地图区域边界的渲染方法、系统及计算机可读存储介质,采用较小的负载渲染地图区域的边界,在各种焦距下,向用户展示区分不同归属的地图区域的交互界面。
本发明公开了一种游戏地图内地图区域边界的渲染方法,包括以下步骤:
获取游戏地图内的地图区域的边界,并沿边界的法线方向向边界内部扩张,以形成 模糊边界;
取模糊边界的每一边界顶点,并自边界顶点沿模糊边界的法线方向直线延伸一预设距离,以形成边界网格;
于模糊边界至边界网格间的第一范围渲染一边界颜色,并在自模糊边界向内边界内部扩张预设距离的第二范围内渲染一边界透明度;
将边界颜色自第一范围作卷积递增膨胀渲染,直至覆盖第二范围。
优选地,取模糊边界的每一边界顶点,并自边界顶点沿模糊边界的法线方向直线延伸一预设距离,以形成边界网格的步骤包括:
获取形成模糊边界的每一地图像素的顶点为边界顶点;
以每一边界顶点为起点,向模糊边界的法线方向延伸为扩张线段,且扩张线段的长度为预设距离;
标记至少两条扩张线段的交点为边界网格。
优选地,取模糊边界的每一边界顶点,并自边界顶点沿模糊边界的法线方向直线延伸一预设距离,以形成边界网格的步骤还包括:
当基于预设距离所形成的边界网格部分溢出于边界时,减少溢出部分处的扩张线段的延伸距离,直至与相对的模糊边界相交。
优选地,还包括以下步骤:
当地图区域的边界动态变化时,获取变化后的边界与初始边界的相交边界,及变化后的地图区域的中心位置;
计算相交边界至中心位置的梯度并梯度渲染。
本发明还公开了一种游戏地图内地图区域边界的渲染系统,包括:
扩张模块,获取游戏地图内的地图区域的边界,并沿边界的法线方向向边界内部扩张,以形成模糊边界;
生成模块,取模糊边界的每一边界顶点,并自边界顶点沿模糊边界的法线方向直线延伸一预设距离,以形成边界网格;
渲染模块,于模糊边界至边界网格间的第一范围渲染一边界颜色,并在自模糊边界向内边界内部扩张预设距离的第二范围内渲染一边界透明度,将边界颜色自第一范围作卷积递增膨胀渲染,直至覆盖第二范围。
优选地,生成模块包括:
获取单元,获取形成模糊边界的每一地图像素的顶点为边界顶点;
扩张单元,以每一边界顶点为起点,向模糊边界的法线方向延伸为扩张线段,且扩张线段的长度为预设距离;
标记单元,标记至少两条扩张线段的交点为边界网格。
优选地,生成模块还包括:
擦除单元,当基于预设距离所形成的边界网格部分溢出于边界时,减少溢出部分处的扩张线段的延伸距离,直至与相对的模糊边界相交。
优选地,渲染系统还包括:
推进模块,当地图区域的边界动态变化时,获取变化后的边界与初始边界的相交边界,及变化后的地图区域的中心位置,计算相交边界至中心位置的梯度并梯度渲染。
本发明又公开了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现如上所述的步骤。
采用了上述技术方案后,与现有技术相比,具有以下有益效果:
1.计算消耗较小,可快速地渲染出游戏地图的地图区域的边界;
2.当高度焦距在30米-3000米的尺寸范围时,用户均可明显观察到地图区域的边界,符合游戏应用的使用体验;
3.无边界穿出的现象,面对具有孔洞的地图区域的场景也可使用。
附图说明
图1为符合本发明一优选实施例中游戏地图内地图区域边界的渲染方法的流程示意图;
图2为符合本发明一优选实施例中游戏地图内地图区域边界的渲染后的示意图;
图3为符合本发明一优选实施例中游戏地图内地图区域边界的渲染系统的结构示意图。
具体实施方式
以下结合附图与具体实施例进一步阐述本发明的优点。
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。
在本公开使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本公开。在本公开和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。
应当理解,尽管在本公开可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本公开范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。
在本发明的描述中,需要理解的是,术语“纵向”、“横向”、“上”、“下”、“前”、“后”、“左”、“右”、“竖直”、“水平”、“顶”、“底”“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本发明的限制。
在本发明的描述中,除非另有规定和限定,需要说明的是,术语“安装”、“相连”、“连接”应做广义理解,例如,可以是机械连接或电连接,也可以是两个元件内部的连通,可以是直接相连,也可以通过中间媒介间接相连,对于本领域的普通技术人员而言,可以根据具体情况理解上述术语的具体含义。
在后续的描述中,使用用于表示元件的诸如“模块”、“部件”或“单元”的后缀仅为了有利于本发明的说明,其本身并没有特定的意义。因此,“模块”与“部件”可以混合地使用。
在本发明的实施例中,游戏地图的基本元素为六边形地图像素。本发明所指的像素,为组成游戏地图或地图区域的最小单元,且本发明实施例中,主要采用的为正六边形或正四边形的地图像素。以正六边形的地图像素为例,对于六边形的地图像素的各棱边定义如下:Ei表示正六边形的地图像素的某一棱边的方位;Pi为其六个定点的方位;OpEi为Ei的对边,则根据六边形本身的特性,定义有:Ei=Pi+1,及OpEi=Ei≥3?Ei-3:Ei+3,利用正六边形的轴对称属性,定义六边形的边Ei为半边。当待标定的边线为属于同一地图区域内的地图像素的Ei和另一Ei时,则停止标定;而当待标定的边线为属于两个不同地图区域内的地图像素的Ei和Fi时,则继续标定。
多个地图像素组成地图区域,每一地图区域在游戏地图中归属于某一玩家,或处于中立状态时,地图区域不属于任何玩家。为在游戏地图中区分不同的归属权,对于地图 区域将使用不同的颜色渲染其区域边界。因此在地图区域的归属发生变化,例如玩家新占领了某片地图区域时,所渲染的区域边界也随之变化。而玩家对某片地图区域的归属权丢失时,则所渲染的区域边界也将随之变化。
当用户进行游戏类应用程序体验,并在游戏内对游戏地图的地图区域发生被占领或者放弃的情况时,根据区域状态动态生成了新的边界。由于边界最初由六边形边形成,若不作渲染,在交互表现上有较多的锯齿。因此对边界的渲染,需要注意平滑性和稳定性,即游戏中边界线不仅仅是在同一高度下查看,而是需要在摄像机高度从30米到3000米这个尺度范围查看。若不做特殊处理,在底层渲染的边界线在高层时就会很难看清。因此,参阅图1,为符合本发明一优选实施例中游戏地图内地图区域边界的渲染方法,具体包括以下步骤:
S100:获取游戏地图内的地图区域的边界,并沿边界的法线方向向边界内部扩张,以形成模糊边界;
具有游戏地图内的地图区域后,先获取各地图区域的边界,无论该地图区域是否为已合并或已拆分的地图区域,在地图区域稳定的情况下,均需要对每一边界做内侧渲染。为在较高高度的摄像机下仍能清楚地看清,需扩大边界的宽度,因此,沿边界的法线方向向边界的内部扩张。同时为在交互界面上形成自边界至内部的平滑渲染,扩张所形成的范围为模糊边界。例如通过高斯平滑和Hermite Spline插值实现。
S200:取模糊边界的每一边界顶点,并自边界顶点沿模糊边界的法线方向直线延伸一预设距离,以形成边界网格;
对于模糊边界的后续处理,将采用获取模糊边界的每一边界顶点,即形成边界的边界线上的端点。对于该端点的选取,可以是边界线上相隔一定距离的端点,也可以是形成边界线的连续端点,根据系统负载可处理的端点数量上限为准。获取到边界顶点后,以每一边界顶点为起点,并沿模糊边界的法线方向(例如边界顶点所在曲线位置处的切线的垂直方向)延伸,即形成一射线,在延伸一预设距离后截止,从而在模糊边界的内部形成边界网格,作为后续预渲染的范围。
S300:于模糊边界至边界网格间的第一范围渲染一边界颜色,并在自模糊边界向内边界内部扩张预设距离的第二范围内渲染一边界透明度;
通过步骤S100和步骤S200的处理,在地图区域的边界内形成有三部分,第一部分为模糊边界,第二部分为模糊边界至边界网格的区域,第三部分为边界网格至所截止的预设距离的区域。对于第一部分,可直接在不同地图区域上涂以不同的颜色,以差异化 不同的,甚至相邻的地图区域。对于第二部分,即模糊边界至边界网格间的第一范围,将预渲染一定宽度的边界颜色至ColorRT。该一定宽度即为模糊边界至边界网格间的第一范围的面积。同时,对于第二部分连同第三部分,即模糊边界向边界内部扩张预设距离的第二范围(完整宽度)预渲染一边界透明度至AlphaRT。也就是说,在步骤S300中,边界内部的部分范围已被涂色,而更大面积的部分范围被赋予透明度后,呈现了边界内部分范围与边界同色,但更为透明的部分,在交互展示上,呈现了从边界向内延伸的观感。
S400:将边界颜色自第一范围作卷积递增膨胀渲染,直至覆盖第二范围。
在步骤S400中,由于渲染上色的区域面积较小,在极高高度的摄像机下,不易看出边界,因此,将边界颜色自第一范围作卷积递增膨胀渲染,直至覆盖第二范围,即通过对ColorRT做Kernel Size递增的膨胀,使其边界色达到预设距离的宽度,展示如图2所示的效果,可见,所渲染的不同颜色代表不同归属或阵营下的地图区域,而不同透明度下的延伸则突出边界。
进一步地,取模糊边界的每一边界顶点,并自边界顶点沿模糊边界的法线方向直线延伸一预设距离,以形成边界网格的步骤S200包括:
S210:获取形成模糊边界的每一地图像素的顶点为边界顶点;
在该实施例中,边界顶点为形成模糊边界的每一地图像素的顶点。更优选地,可模糊顶点的概念,即将地图区域的边界视为封闭线段,将封闭线段的整体作为即将延伸的顶点,也就是说,将点的概念扩展到线的概念。
S220:以每一边界顶点为起点,向模糊边界的法线方向延伸为扩张线段,且扩张线段的长度为预设距离;
S230:标记至少两条扩张线段的交点为边界网格。
由于边界本身呈曲线型,则扩展线段在形成后必将出现交点,则边界网格的形成由交点定义,也就是说,从模糊边界至交底间部分的区域,为边界网格的整体区域。利用交点的自然形成,确定边界网格的宽度,可基本符合不同焦距下的视觉要求。
更进一步地,步骤S200还包括:
S240:当基于预设距离所形成的边界网格部分溢出于边界时,减少溢出部分处的扩张线段的延伸距离,直至与相对的模糊边界相交。
可以理解的是,在某些情况下,地图区域的宽度较窄,使得对面的扩张线段在延伸后,延伸至边界的外部,也即溢出于边界。甚至,各扩张线段的交点所形成的边界网格 也溢出于边界,对此,容易形成当地图区域旁的地图区域为中立时,所渲染的地图区域的颜色溢出至其他地图区域,明显不符合地图区域的归属要求和交互要求。因此,在该步骤S240中,当基于预设距离所形成的边界网格部分溢出于边界时,减少溢出部分处的扩张线段的延伸距离,直至与相对的模糊边界相交,也即扩展线段不断延伸时,当与相对的模糊边界相交时,停止延伸,从而使得步骤S300中预渲染的第一范围维持在边界内部,不会出现渲染范围外溢的情况。
优选地或可选地,渲染方法还包括:
S500:当地图区域的边界动态变化时,获取变化后的边界与初始边界的相交边界,及变化后的地图区域的中心位置;
在游戏实际应用中,区域边界的扩张或者收缩时,都需要动画来表示其扩张/收缩过程。因此在地图区域的边界动态变化时,获取变化后的边界与初始边界的相交边界,及变化后的地图区域的中心位置,通过计算新区域边界与原边界相交部分到新区域中心的梯度图,来模拟其边界推进过程。
S600:计算相交边界至中心位置的梯度并梯度渲染。
具体模拟方式,将对相交边界至中心位置的梯度进行梯度渲染,以展现边界的变化情况。
通过上述配置,在边界的生成、边界的几何操作(并集、差集运算)的情境下,本发明的实施例都具有极好的性能表现。在最终的渲染上由于半透明物体渲染本身的复杂和本例实际情况(边界多层级下有效)避免了渲染性能的下降。
参阅图3,为符合本发明一优选实施例中游戏地图内地图区域边界的渲染系统,包括:
扩张模块,获取游戏地图内的地图区域的边界,并沿边界的法线方向向边界内部扩张,以形成模糊边界;生成模块,取模糊边界的每一边界顶点,并自边界顶点沿模糊边界的法线方向直线延伸一预设距离,以形成边界网格;渲染模块,于模糊边界至边界网格间的第一范围渲染一边界颜色,并在自模糊边界向内边界内部扩张预设距离的第二范围内渲染一边界透明度,将边界颜色自第一范围作卷积递增膨胀渲染,直至覆盖第二范围。
优选或可选地,生成模块包括:获取单元,获取形成模糊边界的每一地图像素的顶点为边界顶点;扩张单元,以每一边界顶点为起点,向模糊边界的法线方向延伸为扩张线段,且扩张线段的长度为预设距离;标记单元,标记至少两条扩张线段的交点为边界网格。
优选或可选地,生成模块还包括:擦除单元,当基于预设距离所形成的边界网格部分溢出于边界时,减少溢出部分处的扩张线段的延伸距离,直至与相对的模糊边界相交。
优选或可选地,渲染系统还包括:推进模块,当地图区域的边界动态变化时,获取变化后的边界与初始边界的相交边界,及变化后的地图区域的中心位置,计算相交边界至中心位置的梯度并梯度渲染。
本发明还公开了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如上所述的步骤。
应当注意的是,本发明的实施例有较佳的实施性,且并非对本发明作任何形式的限制,任何熟悉该领域的技术人员可能利用上述揭示的技术内容变更或修饰为等同的有效实施例,但凡未脱离本发明技术方案的内容,依据本发明的技术实质对以上实施例所作的任何修改或等同变化及修饰,均仍属于本发明技术方案的范围内。

Claims (9)

  1. 一种游戏地图内地图区域边界的渲染方法,其特征在于,包括以下步骤:
    获取游戏地图内的地图区域的边界,并沿所述边界的法线方向向所述边界内部扩张,以形成模糊边界;
    取所述模糊边界的每一边界顶点,并自所述边界顶点沿所述模糊边界的法线方向直线延伸一预设距离,以形成边界网格;
    于所述模糊边界至所述边界网格间的第一范围渲染一边界颜色,并在自所述模糊边界向边界内部扩张所述预设距离的第二范围内渲染一边界透明度;
    将所述边界颜色自所述第一范围作卷积递增膨胀渲染,直至覆盖所述第二范围。
  2. 如权利要求1所述的渲染方法,其特征在于,
    取所述模糊边界的每一边界顶点,并自所述边界顶点沿所述模糊边界的法线方向直线延伸一预设距离,以形成边界网格的步骤包括:
    获取形成所述模糊边界的每一地图像素的顶点为边界顶点;
    以每一边界顶点为起点,向模糊边界的法线方向延伸为扩张线段,且所述扩张线段的长度为所述预设距离;
    标记至少两条扩张线段的交点为边界网格。
  3. 如权利要求2所述的渲染方法,其特征在于,
    取所述模糊边界的每一边界顶点,并自所述边界顶点沿所述模糊边界的法线方向直线延伸一预设距离,以形成边界网格的步骤还包括:
    当基于所述预设距离所形成的边界网格部分溢出于所述边界时,减少溢出部分处的扩张线段的延伸距离,直至与相对的模糊边界相交。
  4. 如权利要求1所述的渲染方法,其特征在于,还包括以下步骤:
    当所述地图区域的边界动态变化时,获取变化后的边界与初始边界的相交边界,及变化后的地图区域的中心位置;
    计算所述相交边界至所述中心位置的梯度并梯度渲染。
  5. 一种游戏地图内地图区域边界的渲染系统,其特征在于,所述渲染系统包括:
    扩张模块,获取游戏地图内的地图区域的边界,并沿所述边界的法线方向向所述边界内部扩张,以形成模糊边界;
    生成模块,取所述模糊边界的每一边界顶点,并自所述边界顶点沿所述模糊边界的法线方向直线延伸一预设距离,以形成边界网格;
    渲染模块,于所述模糊边界至所述边界网格间的第一范围渲染一边界颜色,并在自所述模糊边界向内边界内部扩张所述预设距离的第二范围内渲染一边界透明度,将所述边界颜色自所述第一范围作卷积递增膨胀渲染,直至覆盖所述第二范围。
  6. 如权利要求5所述的渲染系统,其特征在于,
    所述生成模块包括:
    获取单元,获取形成所述模糊边界的每一地图像素的顶点为边界顶点;
    扩张单元,以每一边界顶点为起点,向模糊边界的法线方向延伸为扩张线段,且所述扩张线段的长度为所述预设距离;
    标记单元,标记至少两条扩张线段的交点为边界网格。
  7. 如权利要求6所述的渲染系统,其特征在于,
    所述生成模块还包括:
    擦除单元,当基于所述预设距离所形成的边界网格部分溢出于所述边界时,减少溢出部分处的扩张线段的延伸距离,直至与相对的模糊边界相交。
  8. 如权利要求5所述的渲染系统,其特征在于,所述渲染系统还包括:
    推进模块,当所述地图区域的边界动态变化时,获取变化后的边界与初始边界的相交边界,及变化后的地图区域的中心位置,计算所述相交边界至所述中心位置的梯度并梯度渲染。
  9. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1-4任一项所述的步骤。
PCT/CN2021/130866 2020-11-20 2021-11-16 游戏地图内地图区域边界的渲染方法、系统及计算机可读存储介质 WO2022105737A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/011,821 US11887255B2 (en) 2020-11-20 2021-11-16 Method and system for rendering boundary of map area within game map, and computer-readable storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011308339.X 2020-11-20
CN202011308339.XA CN112509131B (zh) 2020-11-20 2020-11-20 游戏地图内地图区域边界的渲染方法、系统及计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2022105737A1 true WO2022105737A1 (zh) 2022-05-27

Family

ID=74959051

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/130866 WO2022105737A1 (zh) 2020-11-20 2021-11-16 游戏地图内地图区域边界的渲染方法、系统及计算机可读存储介质

Country Status (3)

Country Link
US (1) US11887255B2 (zh)
CN (1) CN112509131B (zh)
WO (1) WO2022105737A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112509131B (zh) * 2020-11-20 2022-12-06 上海莉莉丝网络科技有限公司 游戏地图内地图区域边界的渲染方法、系统及计算机可读存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101894363A (zh) * 2009-05-20 2010-11-24 新奥特(北京)视频技术有限公司 一种面片化的garbage mask边界渲染方法
US8730258B1 (en) * 2011-06-30 2014-05-20 Google Inc. Anti-aliasing of straight lines within a map image
US9251607B1 (en) * 2011-11-14 2016-02-02 Google Inc. Anti-aliasing techniques
CN106055331A (zh) * 2016-05-31 2016-10-26 福建天晴数码有限公司 模型边界生成方法和装置
CN108090945A (zh) * 2017-11-03 2018-05-29 腾讯科技(深圳)有限公司 对象渲染方法和装置、存储介质及电子装置
CN112509131A (zh) * 2020-11-20 2021-03-16 上海莉莉丝网络科技有限公司 游戏地图内地图区域边界的渲染方法、系统及计算机可读存储介质

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6917369B2 (en) * 2003-03-25 2005-07-12 Mitsubishi Electric Research Labs, Inc. Method and apparatus for rendering cell-based distance fields using texture mapping
JP5721225B2 (ja) * 2011-07-01 2015-05-20 富士通株式会社 形状データ生成方法、プログラム及び装置
CN108601978B (zh) * 2015-11-27 2020-05-15 株式会社阿尔斯比特 游戏系统以及游戏程序
CN108898679B (zh) * 2018-04-10 2023-07-21 宁波财经学院 一种零部件序号自动标注的方法
US11282198B2 (en) * 2018-11-21 2022-03-22 Enlitic, Inc. Heat map generating system and methods for use therewith
CN110288670B (zh) * 2019-06-19 2023-06-23 杭州绝地科技股份有限公司 一种ui描边特效的高性能渲染方法
CN111598986B (zh) * 2020-05-13 2023-09-26 网易(杭州)网络有限公司 虚拟流体表面的渲染方法、装置、设备及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101894363A (zh) * 2009-05-20 2010-11-24 新奥特(北京)视频技术有限公司 一种面片化的garbage mask边界渲染方法
US8730258B1 (en) * 2011-06-30 2014-05-20 Google Inc. Anti-aliasing of straight lines within a map image
US9251607B1 (en) * 2011-11-14 2016-02-02 Google Inc. Anti-aliasing techniques
CN106055331A (zh) * 2016-05-31 2016-10-26 福建天晴数码有限公司 模型边界生成方法和装置
CN108090945A (zh) * 2017-11-03 2018-05-29 腾讯科技(深圳)有限公司 对象渲染方法和装置、存储介质及电子装置
CN112509131A (zh) * 2020-11-20 2021-03-16 上海莉莉丝网络科技有限公司 游戏地图内地图区域边界的渲染方法、系统及计算机可读存储介质

Also Published As

Publication number Publication date
CN112509131A (zh) 2021-03-16
US11887255B2 (en) 2024-01-30
US20230196671A1 (en) 2023-06-22
CN112509131B (zh) 2022-12-06

Similar Documents

Publication Publication Date Title
CN102396003B (zh) 用于向计算机图形中的对象添加阴影的方法
JP4896761B2 (ja) 立体地図表示システム、立体地図の表示方法、及びそのプログラム
US8259103B2 (en) Position pegs for a three-dimensional reference grid
CN108022285B (zh) 地图渲染方法及装置
JP2006190049A (ja) 頂点削減図形描画方法および装置
CN112365572B (zh) 一种基于曲面细分的渲染方法及其相关产品
CN110428504B (zh) 文本图像合成方法、装置、计算机设备和存储介质
WO2022105737A1 (zh) 游戏地图内地图区域边界的渲染方法、系统及计算机可读存储介质
WO2023066121A1 (zh) 三维模型的渲染
KR20150093689A (ko) 쉘 메쉬에 기초한 최적화된 다각형을 형성하기 위한 방법
CN109636889A (zh) 一种基于动态缝合带的大规模三维地形模型渲染方法
Zhang et al. A geometry and texture coupled flexible generalization of urban building models
CN111402385A (zh) 一种模型处理的方法及装置、电子设备、存储介质
CN108171784B (zh) 一种渲染方法及终端
CN116501209A (zh) 编辑视角的调整方法、装置、电子设备及可读存储介质
CN106716500A (zh) 程序、信息处理装置、深度定义方法及记录介质
CN108536698B (zh) web数据三维展示方法及装置
CN116485967A (zh) 一种虚拟模型的渲染方法及相关装置
CN112233226B (zh) 基于指标与图形联动的指标信息确定方法、装置和系统
CN114676616A (zh) 一种三维场景下流体风场图渲染方法
Wang et al. A method for ink-wash painting rendering for 3D scenes
Li Architectural design virtual simulation based on virtual reality technology
CN107481194B (zh) 基于相册应用的相框内照片旋转自适应缩放的方法
US7016821B2 (en) System and method for the industrialization of parts
CN116740298B (zh) 一种基于三维引擎的场景实时地图的构建方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21893884

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21893884

Country of ref document: EP

Kind code of ref document: A1