CN112365567B - Scene switching method, device and equipment - Google Patents

Scene switching method, device and equipment Download PDF

Info

Publication number
CN112365567B
CN112365567B CN202011095744.8A CN202011095744A CN112365567B CN 112365567 B CN112365567 B CN 112365567B CN 202011095744 A CN202011095744 A CN 202011095744A CN 112365567 B CN112365567 B CN 112365567B
Authority
CN
China
Prior art keywords
scene
height field
field data
processing
height
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
CN202011095744.8A
Other languages
Chinese (zh)
Other versions
CN112365567A (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.)
Beijing Perfect Chijin Technology Co Ltd
Original Assignee
Beijing Perfect Chijin 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 Beijing Perfect Chijin Technology Co Ltd filed Critical Beijing Perfect Chijin Technology Co Ltd
Priority to CN202011095744.8A priority Critical patent/CN112365567B/en
Publication of CN112365567A publication Critical patent/CN112365567A/en
Application granted granted Critical
Publication of CN112365567B publication Critical patent/CN112365567B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures

Abstract

The application discloses a scene switching method, a scene switching device and scene switching equipment, and relates to the technical field of image processing. The method comprises the following steps: firstly, acquiring a reference central point configured in a first scene and information of each element in the first scene; calculating height field data corresponding to the first scene according to the reference center point and the element information; then, carrying out random disturbance treatment on the height field data; and finally, based on the height field data after the disturbance processing, performing scene dissolution rendering processing by taking the contour lines as scanning lines, so that the first scene is switched to a second scene. The method and the device gradually realize the effect of dissolving and switching the scene in a layered manner at a relatively balanced rate, can improve the dissolving effect of scene switching, and cannot influence the scene switching efficiency of the dissolving effect.

Description

Scene switching method, device and equipment
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a scene switching method, apparatus, and device.
Background
Scene switching is a common technology, and various switching methods such as turning, flying, fading, etc. are commonly seen in the PPT class. Dissolving is a process of gradually replacing scene a with scene B at different speeds from a certain point along a certain direction or a certain shape. The situation in 3D scenes is more complex than 2D graphics.
At present, scene switching of the dissolving effect is mainly performed in a radial variation mode. However, in the scene switching method of the dissolving effect, the directionality is too strong and the vision is monotonous in the three-dimensional game scene switching, so that the dissolving effect of the scene switching is poor. In addition, in the process of dissolution in a radial variation mode, noise distortion added for making the dissolution effect more natural not only affects the scene switching efficiency of the dissolution effect, but also hardly has large variation and difference to the dissolution effect.
Disclosure of Invention
In view of this, the present application provides a scene switching method, device and apparatus, and mainly aims to solve the technical problems that in the current three-dimensional game scene switching, the scene dissolving switching is performed in a radial variation manner, so that the dissolving effect of the scene switching is poor, and the scene switching efficiency of the dissolving effect is affected.
According to an aspect of the present application, there is provided a scene switching method, including:
acquiring a reference central point configured in a first scene and information of each element in the first scene;
calculating height field data corresponding to the first scene according to the reference central point and the element information;
carrying out random disturbance processing on the height field data;
and based on the height field data after the disturbance processing, performing scene dissolving rendering processing by taking the contour lines as scanning lines, so that the first scene is switched to a second scene.
According to another aspect of the present application, there is provided a scene switching apparatus, including:
the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring a reference central point configured in a first scene and information of each element in the first scene;
the calculation module is used for calculating height field data corresponding to the first scene according to the reference central point and the element information;
the disturbance module is used for carrying out random disturbance processing on the height field data;
and the rendering module is used for performing rendering processing of scene dissolution by taking the contour lines as scanning lines based on the height field data after the disturbance processing, so that the first scene is switched to the second scene.
According to yet another aspect of the present application, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described scene switching method.
According to yet another aspect of the present application, there is provided a scene switching apparatus, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, the processor implementing the scene switching method when executing the program.
Compared with the prior art that scene dissolving switching is performed in a radial change mode, the scene dissolving switching method, the device and the equipment based on the height field can achieve the effect of gradually dissolving in different levels at a relatively balanced rate according to different models. Specifically, when the scenes of the three-dimensional game are switched, the height field data corresponding to the first scene can be calculated according to the reference center point configured in the first scene and the information of each element in the first scene; then, carrying out random disturbance processing on the height field data; and finally, based on the height field data after disturbance processing, rendering processing of scene dissolution is carried out by taking the contour lines as scanning lines, so that the first scene is switched to the second scene, for example, the scanning direction of the scanning lines is the height descending or ascending direction of the contour lines, and the like, so that the effect of scene dissolution switching is gradually realized in a hierarchical manner at a relatively balanced speed, the dissolution effect of scene switching can be improved, and the scene switching efficiency of the dissolution effect cannot be influenced.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 illustrates a flowchart of a scene switching method provided in an embodiment of the present application;
fig. 2 is a schematic flowchart illustrating another scene switching method provided in an embodiment of the present application;
FIG. 3 is a graphical illustration of a height field function prior to perturbation processing provided by an embodiment of the present application;
FIG. 4 is a graphical illustration of a perturbed field function provided by an embodiment of the present application;
FIG. 5 is a graphical diagram illustrating a height field function after superposition of a perturbation field provided by an embodiment of the present application;
FIG. 6 is a graphical illustration of a height field function after perturbation processing provided by an embodiment of the present application;
FIG. 7 is a graphical illustration of scan separation with contour lines based on a height field function as provided by an embodiment of the present application;
fig. 8 shows a schematic structural diagram of a scene switching device according to an embodiment of the present application.
Detailed Description
The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
The method aims to solve the technical problems that scene dissolving switching is performed in a radial change mode in the existing three-dimensional game scene switching, the dissolving effect of the scene switching is poor, and the scene switching efficiency of the dissolving effect is influenced. The present embodiment provides a scene switching method, as shown in fig. 1, the method includes:
101. and acquiring a reference central point configured in the first scene and information of each element in the first scene.
The first scene can be a current scene page of the three-dimensional game, and the first scene needs to be switched to another scene page. The reference center point in this embodiment may be used to calculate height field data corresponding to the current scene page. In each scene, a reference center point may be configured. The reference center point of the configuration may not necessarily be located at the center of the scene page, but may be regarded as a center point used in calculation, and the subsequent height field calculation will be based on the reference center point for performing the mapping calculation. After finding the position corresponding to the reference center point, the value is recorded, which contains information in three-dimensional space, such as x, y, z position information on three-dimensional coordinate axes.
The element information in the first scene may include content elements in the scene page and layout conditions of the content elements in the scene page, such as text, pictures, hyperlinks, backgrounds, character shadings, tables and other content elements in the scene page, and distribution positions, shapes, sizes and the like of the content elements.
The execution main body of the embodiment may be a device or an apparatus for scene switching, and may be configured on a client side (e.g., a terminal side such as a smart phone, a personal computer, a tablet computer, etc.), and may be used for scene switching processing of a dissolving effect when a three-dimensional game page on the client side is displayed. The dissolving effect of scene switching can be improved, and the scene switching efficiency of the dissolving effect cannot be influenced.
102. And calculating height field data corresponding to the first scene according to the reference central point and each element information in the first scene.
The embodiment provides a scene switching scheme of a dissolving effect based on a height field, and can realize the effect of gradually dissolving in a hierarchical manner at a relatively balanced rate according to different models. Therefore, the height field data corresponding to the current scene page needs to be accurately calculated. For example, based on the position of the reference center point, height field data of each element with the reference center point is calculated. By the method, the height field data corresponding to the current scene page can be accurately calculated based on a reasonable reference central point by combining the content elements in the scene page and the layout condition of the content elements in the scene page.
The height field of the invention corresponds to a three-dimensional game scene, and the three-dimensional A scene is switched to the three-dimensional B scene through three-dimensional height field data, so that the game scene switching enables the dissolving effect to be more three-dimensional.
103. And carrying out random disturbance processing on the height field data.
For the embodiment, after the height field data of the current scene is obtained by calculation, the generated height field data is compared regularly, and more noise, disturbance and the like are required for achieving scene switching of the dissolving effect, so that the calculated height field data of the current scene is further subjected to random disturbance processing, and the effect of dissolving and switching of the subsequent scene can be improved.
104. And based on the height field data after the disturbance processing, performing scene dissolving rendering processing by taking the contour lines as scanning lines, so that the first scene is switched to the second scene.
The second scene may be another scene page to which the current scene page needs to be switched. The contour lines can be regarded as lines connected by points of the same height in the height field data. The height of the contour may vary with the scan direction.
For example, when a scene a of a three-dimensional game needs to be switched to a scene B with a dissolving effect, height field data corresponding to the scene a can be calculated according to a reference central point and each element information in the scene a; and then carrying out random disturbance treatment on the height field data, further creating a corresponding height field according to the height field data subjected to disturbance treatment, and adding a contour line after the height field is created. The method is characterized in that the positions of contour lines are changed along with the height change of the contour lines, so that the scanning effect of scanning lines is generated, the contour lines are used as separation lines for dynamic scanning to achieve an effect similar to a deep solution, and the contour lines are introduced and used as the scanning separation reason. The problem of the dissolving speed caused by the height difference can be solved to a great extent after the contour lines are used, so that the dissolving effect of scene switching can be improved while the scene switching efficiency of the dissolving effect is ensured. When the contour lines are used as scanning lines to perform rendering processing of scene dissolution, the contour lines are used as alternative separation lines to convert pixels in the scene A at the position in the height field into pixels in the scene B, and then rendering processing effect of scene dissolution switching is achieved.
Compared with the conventional scene dissolving switching in a radial variation mode, the scene switching method provided by the embodiment provides a scene dissolving switching scheme based on a height field, and can realize the effect of gradually dissolving in a hierarchical manner at a relatively balanced rate according to different models. Specifically, when the scenes of the three-dimensional game are switched, in the embodiment, first, height field data corresponding to a first scene can be calculated according to a reference center point configured in the first scene and information of each element in the first scene; then, carrying out random disturbance processing on the height field data; and finally, based on the height field data after disturbance processing, rendering processing of scene dissolution is carried out by taking the contour lines as scanning lines, so that the first scene is switched to the second scene, for example, the scanning direction of the scanning lines is the height descending or ascending direction of the contour lines, and the like, so that the effect of scene dissolution switching is gradually realized in a hierarchical manner at a relatively balanced speed, the dissolution effect of scene switching can be improved, and the scene switching efficiency of the dissolution effect cannot be influenced.
Further, as a refinement and an extension of the specific implementation of the foregoing embodiment, in order to fully describe the implementation of this embodiment, this embodiment further provides another scene switching method, as shown in fig. 2, where the method includes:
201. element distribution information in a first scene is obtained.
The element distribution information in the first scene may include distribution conditions of content elements, such as distribution positions, shapes, sizes, and the like of content elements in a scene page, such as characters, pictures, hyperlinks, backgrounds, character shadings, tables, and the like.
202. And configuring a reference central point in the first scene according to the obtained element distribution information.
Since the distribution condition of the content elements in the scene page is determined according to the layout requirement of the three-dimensional game content set by the user, the element distribution information in different scene pages may have various forms. In order to find the position of the reference point (i.e., the reference center point) corresponding to the height field in each scene page, in this embodiment, the most suitable reference center point may be configured in the scene according to the element distribution information in the current scene page, so as to subsequently improve the accuracy and efficiency of the calculation of the height field data corresponding to the scene.
For example, the center point position with respect to the respective content elements in the current scene page is configured in the current scene page in accordance with the distribution position, shape, size, and the like of the content elements in the current scene page. If the pixel point coordinates of the content elements are obtained, then the central point position relative to the content elements is calculated in a world coordinate system based on the pixel point coordinates and is used as a reference central point.
203. And acquiring a reference central point configured in the first scene and information of each element in the first scene.
When the first scene needs to be switched to the second scene with the dissolving effect, the embodiment may obtain the reference center point configured in the first scene and information of each element in the first scene, so as to calculate height field data corresponding to the first scene by a height field method according to the world coordinates used during rendering, and may specifically perform the processes shown in steps 204 to 205.
204. And obtaining each pixel point of each element information in the first scene.
205. And calculating height field data corresponding to the first scene according to the pixel points of the element information and the reference central point configured in the first scene.
In this embodiment, according to the pixel point position and the reference center point position of each content element in the current scene page, the element layout condition in the current scene page may be referred to, and height field data corresponding to the current scene page may be accurately calculated, so as to ensure that subsequent accurate scene dissolving switching may be performed.
When the height field data is specifically calculated, optionally, step 205 may specifically include: firstly, according to the position of a pixel point of element information, acquiring a vertex of the element information in a world coordinate system; and then, calculating the position distances between the top points and the reference center point respectively in a world coordinate system by using a height field algorithm, and taking the position distances as height field data corresponding to the first scene.
For example, when a scene is converted, the world coordinates are mainly calculated in the rendering stage, because any model of the scene is combined in a set of vertex information matrixes, and when the world coordinate system is used, the positions of the vertex information in the matrixes are uniform and consistent when the height field data is calculated. In this case, the height field data of each point and the center point is calculated using a distance height field algorithm based on the position of the reference center point. The height field function may be as shown in equation one.
Figure BDA0002723680840000071
In the above formula I, x represents the abscissa of the world coordinate system, and y1Representing the ordinate of the world coordinate system. a is1And a2Represents a constant, abs (x) represents the absolute value of x. With a1=1.8,a2The height field function is shown in fig. 3, for example 2. As can be seen from fig. 3, the height field function generated at this time is compared with the rule, and the scene dissolving switch requires more noise and disturbance, so some changes need to be made to the height field function of this rule, i.e., the process shown in step 206 is performed.
206. And (4) randomly disturbing the value of the height field in frequency and amplitude.
For the embodiment, the effect of subsequent scene dissolving switching can be improved by performing random disturbance processing on the frequency and the amplitude of the value of the height field which is relatively regular. In this embodiment, there may be a plurality of alternative ways to perform the disturbance processing on the height field data. As an exemplary option, step 206 may specifically include: firstly, creating disturbance field data according to the frequency and amplitude of the value of the height field; then overlapping the disturbance field data and the height field data; and carrying out noise disturbance processing on the height field data after the superposition processing to obtain the height field data after the disturbance processing. In this way, the values of the height field can be well disturbed randomly in frequency and amplitude.
For example, from the frequency and amplitude of the value of the height field, the perturbing field data is created with the contents of equation two:
y2=sin(x·b1)·b2formula two
In the second formula, x represents the abscissa of the world coordinate system, and y2Representing the ordinate of the world coordinate system. b1And b2Representing a constant. With b1=2.1,b2For example, fig. 4 shows a function image generated by 0.3. And in combination with the height field function as shown in FIG. 3, for y1And y2And (3) performing superposition operation, namely superposing the height field and the disturbance field to form a graph as shown in fig. 5, and performing preliminary disturbance processing on the originally regular function image to obtain an irregular function image. Further, in order to achieve a better random disturbance effect, a function image as shown in fig. 6 can be formed by operating sound or other forms of disturbance based on the function as shown in fig. 5. As can be seen from the function image shown in fig. 6, the random disturbance processing of frequency and amplitude can be effectively performed on the value of the height field by the optional method, so that the subsequent scene dissolving and switching effect can be ensured.
207. And based on the height field data after the disturbance processing, performing scene dissolving rendering processing by taking the contour lines as scanning lines, so that the first scene is switched to the second scene. The first scene and the second scene are game scenes with three-dimensional data.
Optionally, step 207 may specifically include: traversing contour lines of all heights in the height field according to the scanning direction, and taking the contour line of the latest height as a separation line each time; then obtaining the separation position of the separation line in the height field data; and finally, converting the pixel at the corresponding position in the first scene into the pixel at the corresponding position in the second scene according to the separation position.
For example, after the calculation of the height field is completed as shown in fig. 6, as shown in fig. 7, a contour h may be added, and as the contour h goes down (corresponding to the scanning process of the scanning line), the contour h with the latest height is used as a separation line each time, so as to make an effect similar to a deep solution. Specifically, the separation position 1 of the current separation line in the height field data can be obtained; according to the partition position 1, the pixel of the corresponding position in the scene a is converted into the pixel of the corresponding position in the scene B. Then, along with the descending of the contour line h, the separation position 2 of the separation line in the height field data at the new height is obtained; according to the partition position 2, the pixel of the corresponding position in the scene a is converted into the pixel of the corresponding position in the scene B. Then, along with the descending of the contour line h again, the separation position 3 of the separation line in the height field data at the latest height is obtained; according to the partition position 3, the pixel of the corresponding position in the scene a is converted into the pixel of the corresponding position in the scene B. By analogy, the pixels in the scene a are converted into the pixels in the scene B one by one according to the scanning direction (the descending direction of the contour line h in fig. 7), and further the effect of dissolving and switching the scene a to the scene B is achieved. By the scene switching mode of the dissolving effect, the dissolving effect of scene switching can be improved by gradually dissolving according to different models and relatively balanced speed levels, and the scene switching efficiency of the dissolving effect cannot be influenced.
Further optionally, in order to save resource invocation of the system at the scene change, before step 207, the method may further include: detecting whether the first scene and the second scene have the same content or not; if the contents of the first scene and the second scene are the same, rendering processing of scene dissolving can be cancelled; correspondingly, step 207 may specifically include: if the contents of the first scene and the second scene are different, rendering processing of scene dissolution can be performed by taking the contour lines as scanning lines based on the height field data after disturbance processing, so that the first scene is switched to the second scene. For example, if the contents of the scene a and the scene B are the same, the scene switching with the dissolving effect may not be needed, so as to save the resource call of the system during the scene switching, and if the contents of the scene a and the scene B are different, the scene dissolving switching process of the method of the present embodiment may be executed. It should be noted that, according to specific practical application requirements, in practical applications, the scene dissolving and switching process of the method of the present embodiment may be set to be executed when the contents of the scene a and the scene B are the same, so as to meet certain requirements.
At present, in the three-dimensional game scene switching, the scene switching of the dissolving effect mainly takes MASK, random noise field and radial variation methods as main methods. The actual effects are monotonous and rough, the dissolution is mainly carried out by using points or shapes and a random noise method, the direction sense is avoided, and the effect is disordered; the radial mode is used for dissolution, the directivity is too strong, the visual monotonous effect is poor, and the noise distortion added for ensuring the dissolution effect to be natural has great change and difference on the effect per se besides the problem of efficiency; the method used as a MASK map scans in all directions, so that the effect of circular diffusion or contraction is difficult to make, or the dissolution form is limited, and the efficiency and the controllability of the program of the MASK are not high. To solve these problems in the prior art, the present embodiment provides a dissolution effect based on a height field. The effect of gradually dissolving in different layers at a relatively balanced rate according to different models is realized. Not only the controllability of the program is high, but also the dissolution effect is controllable by parameters; and the efficiency is high, the effect is good, and the natural layered dissolving and replacing effect can be achieved.
Further, as a specific implementation of the method shown in fig. 1 and fig. 2, the present embodiment provides a scene switching apparatus, as shown in fig. 8, the apparatus includes: an acquisition module 31, a calculation module 32, a perturbation module 33, and a rendering module 34.
An obtaining module 31, configured to obtain a reference center point configured in a first scene, and information of each element in the first scene;
a calculating module 32, configured to calculate height field data corresponding to the first scene according to the reference center point and the element information;
a perturbation module 33, configured to perform random perturbation processing on the height field data;
and the rendering module 34 is configured to perform rendering processing of scene dissolving by using the contour lines as scanning lines based on the height field data after the perturbation processing, so that the first scene is switched to the second scene.
In a specific application scenario, the calculation module 32 may be specifically configured to obtain each pixel point of the element information; and calculating height field data corresponding to the first scene according to the pixel points and the reference central point.
In a specific application scenario, the calculating module 32 may be further configured to obtain a vertex of the element information in a world coordinate system according to the position of the pixel point; and respectively calculating the position distance between the vertex and the reference center point as the height field data by using a height field algorithm in a world coordinate system.
In a specific application scenario, the rendering module 34 is specifically configured to traverse the contour lines of each height in the height field according to the scanning direction, and each time, use the contour line of the latest height as a separation line; acquiring the separation position of the separation line in the height field data; and converting the pixel at the corresponding position in the first scene into the pixel at the corresponding position in the second scene according to the separation position.
In a specific application scenario, the perturbation module 33 may be specifically configured to perform frequency and amplitude random perturbation processing on the value of the height field.
In a specific application scenario, the perturbation module 33 may be further configured to create perturbation field data according to the frequency and amplitude of the value of the height field; overlapping the disturbance field data and the height field data; and carrying out noise disturbance processing on the height field data after the superposition processing to obtain the height field data after the disturbance processing.
In a specific application scenario, the apparatus further comprises: a configuration module;
the obtaining module 31 may be further configured to obtain element distribution information in the first scene before obtaining the reference central point configured in the first scene;
the configuration module may be configured to configure the reference center point in the first scene according to the element distribution information.
In a specific application scenario, the apparatus further comprises: a detection module;
the detecting module may be configured to detect whether the first scene and the second scene have the same content;
the rendering module 34 is further configured to cancel the rendering process of scene dissolving if the first scene and the second scene have the same content;
correspondingly, the rendering module 34 is specifically configured to, if the contents of the first scene and the second scene are different, perform rendering processing of scene dissolution by using contour lines as scanning lines based on the height field data after the disturbance processing, so that the first scene is switched to the second scene.
It should be noted that other corresponding descriptions of the functional units related to the scene switching device provided in this embodiment may refer to the corresponding descriptions in fig. 1 and fig. 2, and are not repeated herein.
Based on the above-mentioned methods shown in fig. 1 and fig. 2, correspondingly, the present embodiment further provides a storage medium, on which a computer program is stored, which when executed by a processor implements the above-mentioned scene switching method shown in fig. 1 and fig. 2.
Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method of the embodiments of the present application.
Based on the method shown in fig. 1 and fig. 2 and the virtual device embodiment shown in fig. 8, in order to achieve the above object, an embodiment of the present application further provides a scene switching device, which may specifically be a personal computer, a notebook computer, a smart phone, a server, or other network devices, and the device includes a storage medium and a processor; a storage medium for storing a computer program; a processor for executing a computer program to implement the scene switching method as shown in fig. 1 and 2.
Optionally, the entity device may further include a user interface, a network interface, a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, and the like. The user interface may include a Display screen (Display), an input unit such as a keypad (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), etc.
It will be understood by those skilled in the art that the above-described physical device structure provided in the present embodiment is not limited to the physical device, and may include more or less components, or combine some components, or arrange different components.
The storage medium may further include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the above-described physical devices, and supports the operation of the information processing program as well as other software and/or programs. The network communication module is used for realizing communication among components in the storage medium and communication with other hardware and software in the information processing entity device.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present application can be implemented by software plus a necessary general hardware platform, and can also be implemented by hardware. Compared with the existing scene dissolving switching in a radial change mode, the scene dissolving switching scheme based on the height field can achieve the effect of gradual dissolving in a hierarchical mode at a relatively balanced speed according to different models. Specifically, when the scenes of the three-dimensional game are switched, in the embodiment, first, height field data corresponding to a first scene can be calculated according to a reference center point configured in the first scene and information of each element in the first scene; then, carrying out random disturbance processing on the height field data; and finally, based on the height field data after disturbance processing, rendering processing of scene dissolution is carried out by taking the contour lines as scanning lines, so that the first scene is switched to the second scene, for example, the scanning direction of the scanning lines is the height descending or ascending direction of the contour lines, and the like, so that the effect of scene dissolution switching is gradually realized in a hierarchical manner at a relatively balanced speed, the dissolution effect of scene switching can be improved, and the scene switching efficiency of the dissolution effect cannot be influenced.
Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above application serial numbers are for description purposes only and do not represent the superiority or inferiority of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of the present application, but the present application is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present application.

Claims (10)

1. A method for scene change, comprising:
acquiring a reference central point configured in a first scene and information of each element in the first scene;
calculating height field data corresponding to the first scene according to the reference center point and the element information, specifically comprising: calculating the height field data according to each pixel point of the element information and the reference center point;
carrying out random disturbance processing on the height field data;
based on the height field data after the disturbance processing, performing scene dissolving rendering processing by using the contour lines as scanning lines, so that the first scene is switched to a second scene, specifically comprising: traversing contour lines of all heights in the height field according to the scanning direction, and taking the contour line of the latest height as a separation line each time; and converting the pixel at the corresponding position in the first scene into the pixel at the corresponding position in the second scene according to the separation position of the separation line in the height field data.
2. The method according to claim 1, wherein the calculating the height field data according to the pixel points of the element information and the reference center point specifically comprises:
acquiring the vertex of the element information in a world coordinate system according to the position of the pixel point;
and respectively calculating the position distance between the vertex and the reference center point as the height field data by using a height field algorithm in a world coordinate system.
3. The method according to claim 1, wherein the randomly perturbing the height field data specifically comprises:
and (4) randomly disturbing the value of the height field in frequency and amplitude.
4. The method according to claim 3, wherein the randomly perturbing the values of the height field by frequency and amplitude comprises:
creating disturbance field data according to the frequency and amplitude of the value of the height field;
overlapping the disturbance field data and the height field data;
and carrying out noise disturbance processing on the height field data after the superposition processing to obtain the height field data after the disturbance processing.
5. The method of claim 1, wherein prior to said obtaining a reference center point configured in a first scene, the method further comprises:
acquiring element distribution information in the first scene;
configuring the reference center point in the first scene according to the element distribution information.
6. The method of claim 1, wherein before the rendering process of scene dissolving is performed with contour lines as scan lines based on the height field data after the perturbation process, so that the first scene is switched to a second scene, the method further comprises:
detecting whether the first scene and the second scene have the same content;
if the first scene and the second scene have the same content, cancelling the rendering process of scene dissolution;
the rendering processing of scene dissolution is performed by taking contour lines as scanning lines based on the height field data after the disturbance processing, so that the first scene is switched to the second scene, specifically including:
and if the contents of the first scene and the second scene are different, based on the height field data after disturbance processing, performing scene dissolution rendering processing by taking contour lines as scanning lines, so that the first scene is switched to the second scene.
7. A scene switching apparatus, comprising:
the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring a reference central point configured in a first scene and information of each element in the first scene;
a calculating module, configured to calculate height field data corresponding to the first scene according to the reference center point and the element information, where the calculating module specifically includes: calculating the height field data according to each pixel point of the element information and the reference center point;
the disturbance module is used for carrying out random disturbance processing on the height field data;
the rendering module is configured to perform rendering processing of scene dissolution with contour lines as scanning lines based on the height field data after the disturbance processing, so that the first scene is switched to a second scene, and specifically includes: traversing contour lines of all heights in the height field according to the scanning direction, and taking the contour line of the latest height as a separation line each time; and converting the pixel at the corresponding position in the first scene into the pixel at the corresponding position in the second scene according to the separation position of the separation line in the height field data.
8. The apparatus of claim 7,
the computing module is specifically further configured to obtain a vertex of the element information in a world coordinate system according to the position of the pixel point;
and respectively calculating the position distance between the vertex and the reference center point as the height field data by using a height field algorithm in a world coordinate system.
9. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method of any of claims 1 to 6.
10. A scene switching apparatus comprising a storage medium, a processor and a computer program stored on the storage medium and executable on the processor, characterized in that the processor implements the method of any one of claims 1 to 6 when executing the computer program.
CN202011095744.8A 2020-10-14 2020-10-14 Scene switching method, device and equipment Active CN112365567B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011095744.8A CN112365567B (en) 2020-10-14 2020-10-14 Scene switching method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011095744.8A CN112365567B (en) 2020-10-14 2020-10-14 Scene switching method, device and equipment

Publications (2)

Publication Number Publication Date
CN112365567A CN112365567A (en) 2021-02-12
CN112365567B true CN112365567B (en) 2021-06-22

Family

ID=74506668

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011095744.8A Active CN112365567B (en) 2020-10-14 2020-10-14 Scene switching method, device and equipment

Country Status (1)

Country Link
CN (1) CN112365567B (en)

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8717423B2 (en) * 2005-05-09 2014-05-06 Zspace, Inc. Modifying perspective of stereoscopic images based on changes in user viewpoint
CN103780801A (en) * 2012-10-25 2014-05-07 特克特朗尼克公司 Heuristic method for scene cut detection in digital baseband video
CN105912234B (en) * 2016-04-06 2019-01-15 腾讯科技(深圳)有限公司 The exchange method and device of virtual scene
CN107993279B (en) * 2017-11-03 2021-06-29 中国人民解放军陆军工程大学 Scene accurate expression method
CN110737266B (en) * 2019-09-17 2022-11-18 中国第一汽车股份有限公司 Automatic driving control method and device, vehicle and storage medium
CN111145326B (en) * 2019-12-26 2023-12-19 网易(杭州)网络有限公司 Processing method of three-dimensional virtual cloud model, storage medium, processor and electronic device
CN111340953A (en) * 2020-02-14 2020-06-26 北京中外建建筑设计有限公司 Method for realizing engineering design by combining point cloud data with building model
CN111586317A (en) * 2020-05-27 2020-08-25 上海姝嫣文化传播中心 Picture scene switching method and device, computer equipment and storage medium
CN111760286A (en) * 2020-06-29 2020-10-13 完美世界(北京)软件科技发展有限公司 Switching method and device of mirror operation mode, storage medium and electronic device

Also Published As

Publication number Publication date
CN112365567A (en) 2021-02-12

Similar Documents

Publication Publication Date Title
US11301954B2 (en) Method for detecting collision between cylindrical collider and convex body in real-time virtual scenario, terminal, and storage medium
CN110610453B (en) Image processing method and device and computer readable storage medium
CN112288665A (en) Image fusion method and device, storage medium and electronic equipment
JP2016508635A (en) Output ordering of domain coordinates for tessellation
CN106960470B (en) Three-dimensional point cloud curved surface reconstruction method and device
CN110570507A (en) Image rendering method and device
CN112138386A (en) Volume rendering method and device, storage medium and computer equipment
CN112967367B (en) Water wave special effect generation method and device, storage medium and computer equipment
CN112245926A (en) Virtual terrain rendering method, device, equipment and medium
CN113952720A (en) Game scene rendering method and device, electronic equipment and storage medium
US9959672B2 (en) Color-based dynamic sub-division to generate 3D mesh
CN114782605A (en) Rendering method and device of hair virtual model, computer equipment and storage medium
CN113269280B (en) Text detection method and device, electronic equipment and computer readable storage medium
CN112365567B (en) Scene switching method, device and equipment
CN112734900A (en) Baking method, baking device, baking equipment and computer-readable storage medium of shadow map
WO2023231926A1 (en) Image processing method and apparatus, device, and storage medium
CN110264546B (en) Image synthesis method and device, computer-readable storage medium and terminal
CN112070854A (en) Image generation method, device, equipment and storage medium
CN103310409A (en) Quick triangle partitioning method of Tile-based rendering architecture central processing unit (CPU)
CN114742970A (en) Processing method of virtual three-dimensional model, nonvolatile storage medium and electronic device
CN114742934A (en) Image rendering method and device, readable medium and electronic equipment
CN112843697A (en) Image processing method and device, storage medium and computer equipment
CN113362348B (en) Image processing method, image processing device, electronic equipment and storage medium
US11875445B2 (en) Seamless image processing of a tiled image region
CN115953553B (en) Avatar generation method, apparatus, electronic device, and storage 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