Three-dimensional scene area drawing method and device, medium and electronic equipment

By responsive to point selection operations in a three-dimensional scene, the generated areas are automatically connected and the mesh material is set, the problem of low area drawing efficiency and accuracy in digital twin scenes is solved, and efficient and accurate area drawing is achieved .

CN118941747APending Publication Date: 2024-11-12SICHUAN JIANSHAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310516605.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-09
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

In digital twin scenarios, the division and drawing efficiency and accuracy of three-dimensional scene areas are low, mainly relying on manual operation, which is inefficient and prone to errors caused by misoperation.

Method used

Get the marking point in response to point selection operation, determine the index of the marking point, and generate the area to be drawn based on the index connection, create a mesh and set the material to complete the drawing, including obtaining touch position, ray detection, calculating relative distance parameters, new Add or delete marking points and move marking points to adjust the effectiveness of the area.

Benefits of technology

It improves the efficiency and accuracy of three-dimensional scene area drawing, reduces the error of manual operation, realizes automated area generation and adjustment, and enhances the accuracy of drawing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118941747A_ABST
    Figure CN118941747A_ABST
Patent Text Reader

Abstract

The invention provides a three-dimensional scene area drawing method and device, a medium and equipment, and relates to the technical field of computers. The three-dimensional scene area drawing method comprises the following steps: in response to a point selection operation, obtaining a mark point, and determining an index of the mark point; connecting the mark points according to the index to generate a to-be-drawn area; and creating a grid body in the to-be-drawn area, and setting a grid body material to complete drawing. According to the invention, the specific area can be rapidly and accurately drawn in the three-dimensional scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the computer field, and in particular to a three-dimensional scene area drawing method, a three-dimensional scene area drawing device, a computer-readable storage medium, and an electronic device. Background Art

[0002] With the development of computer technology, more and more fields are beginning to be digitized, including digital twin scenes. Digital twin scenes can be simulations of the existing real world or further imagination and expansion in three-dimensional scenes.

[0003] In the digital twin scenario, areas and plots need to be divided for planning and design. Currently, these areas are drawn manually by relevant technicians, which is inefficient and inaccurate.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] The purpose of the embodiments of the present disclosure is to provide a method, device, medium and electronic device for drawing a three-dimensional scene area, which can improve the efficiency and accuracy of drawing an area in a three-dimensional scene.

[0006] A first aspect of an embodiment of the present disclosure provides a method for drawing a three-dimensional scene area, including:

[0007] In response to the point selection operation, a marking point is obtained, and an index of the marking point is determined;

[0008] Connecting the marking points according to the index to generate a to-be-drawn area;

[0009] A mesh is created in the area to be drawn, and the material of the mesh is set to complete the drawing.

[0010] In an exemplary embodiment of the present disclosure, the step of acquiring a marking point in response to a point selection operation includes:

[0011] In response to the touch point selection operation, obtaining a touch position;

[0012] Sending a ray from the position of the virtual camera in the three-dimensional scene to the touch position;

[0013] The collision point between the ray and the three-dimensional scene is detected, and the collision point is the marking point.

[0014] In an exemplary embodiment of the present disclosure, there are three marking points; and determining the indexes of the marking points includes:

[0015] According to the order of the point selection operation, the indexes of the marked points are determined in sequence.

[0016] In an exemplary embodiment of the present disclosure, after determining the indexes of the marking points in sequence according to the order of the point selection operation, the method further includes:

[0017] In response to the newly added point selection operation, obtaining a newly added marking point;

[0018] Calculating a plurality of relative distance parameters according to the position information of the newly added marking point and the marking point;

[0019] A marking point corresponding to a minimum relative distance parameter among the multiple relative distance parameters is determined, and an index of the newly added marking point is determined according to the index of the marking point.

[0020] In an exemplary embodiment of the present disclosure, after creating a mesh body in the area to be drawn and setting the mesh body material to complete drawing, the method further includes:

[0021] In response to the point selection operation for deletion, a mark point to be deleted is determined, and an index of the mark point to be deleted is deleted.

[0022] In an exemplary embodiment of the present disclosure, the calculating of multiple relative distance parameters according to the position information of the newly added marking point and the marking point includes:

[0023] According to the newly added marking point and the position information of the marking points, a first distance between the newly added marking point and a first marking point among the marking points, a second distance between the newly added marking point and a second marking point among the marking points, and a third distance between the first marking point and the second marking point are obtained;

[0024] Obtaining a relative distance parameter based on a difference between the sum of the first distance and the second distance and the third distance;

[0025] The plurality of marking points are traversed in sequence to calculate and obtain a plurality of relative distance parameters.

[0026] In an exemplary embodiment of the present disclosure, after creating a mesh body in the area to be drawn and setting the mesh body material to complete drawing, the method further includes:

[0027] In response to the first moving point selection operation, determining a mark point to be moved and dragging the mark point to be moved;

[0028] In response to the second moving point selection operation, determining the current position of the to-be-moved marking point;

[0029] Generate a to-be-drawn area based on the current position, and detect the validity of the to-be-drawn area;

[0030] When the area to be drawn is valid, the area to be drawn is drawn.

[0031] In an exemplary embodiment of the present disclosure, the detecting the validity of the area to be drawn includes:

[0032] It is detected that the two line segments drawn from the to-be-moved mark point do not intersect with other line segments, and then the to-be-drawn area is valid.

[0033] According to a second aspect of an embodiment of the present disclosure, a three-dimensional scene area drawing device is provided, comprising:

[0034] A marking index module, configured to obtain a marking point in response to a point selection operation and determine an index of the marking point;

[0035] An area generation module, used for connecting the marking points according to the index to generate an area to be drawn;

[0036] The area drawing module is used to create a mesh body in the area to be drawn and set the material of the mesh body to complete the drawing.

[0037] According to a third aspect of an embodiment of the present disclosure, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the three-dimensional scene area drawing method as described in the first aspect of the above embodiment is implemented.

[0038] According to a fourth aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, which, when the one or more programs are executed by the one or more processors, enables the one or more processors to implement the three-dimensional scene area drawing method as described in the first aspect of the above embodiment.

[0039] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0040] In the technical solutions provided by some embodiments of the present disclosure, a marking point can be obtained by responding to a point selection operation, and an index of the marking point can be determined. The marking points are connected according to the index to generate an area to be drawn. A mesh body is created in the area to be drawn, and the mesh body material is set to complete the drawing.

[0041] By implementing the embodiments of the present disclosure, on the one hand, only a few marking points need to be selected to generate a region to be drawn according to the marking points and their indexes, without the need to manually determine the entire drawing region, thereby improving the efficiency of region drawing. On the other hand, the drawing region is automatically generated by marking points, thereby avoiding manual misoperation, reducing the error of the drawing region, and improving the accuracy of region drawing.

[0042] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0044] Figure 1 A schematic diagram schematically shows an exemplary scene to which a method and device for drawing a three-dimensional scene area according to an embodiment of the present disclosure can be applied;

[0045] Figure 2 A flowchart of a method for drawing a three-dimensional scene area according to an embodiment of the present disclosure is schematically shown;

[0046] Figure 3 A schematic diagram of an interface of a three-dimensional scene area according to an embodiment of the present disclosure is schematically shown;

[0047] Figure 4 A flowchart of a method for drawing a three-dimensional scene area according to an embodiment of the present disclosure is schematically shown;

[0048] Figure 5 The following is a schematic diagram of an interface of a method for drawing a three-dimensional scene area according to an embodiment of the present disclosure;

[0049] Figure 6 The structure block diagram of a three-dimensional scene area drawing device according to an embodiment of the present disclosure is schematically shown;

[0050] Figure 7 A schematic diagram of the computer system structure of an electronic device according to an embodiment of the present disclosure is shown schematically. DETAILED DESCRIPTION

[0051] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0052] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0053] Figure 1 The following is a schematic diagram schematically showing an exemplary system architecture to which the three-dimensional scene area rendering method according to an embodiment of the present disclosure can be applied.

[0054] like Figure 1 As shown, the system architecture may include one or more of terminal devices 101, 102, and 103. Figure 1 The terminal devices in the figure are only for illustration. Any number of terminal devices may be provided according to implementation requirements.

[0055] Among them, terminal device 101 can be a computer terminal, terminal device 102 can be a smart mobile terminal, and terminal device 103 can be a smart robot. The terminal devices can all be connected to an external display. The calculation processing and display can be completed locally at the terminal. The terminal can also only realize the display function and the function of obtaining user input instructions. The data processing and the rendering of the picture are not in the terminal device, but run in the cloud server, and the cloud server renders the map picture into a video and audio stream, which is transmitted to the terminal device through the network. The terminal device does not need to have powerful graphics computing and data processing capabilities.

[0056] It should be noted that although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0057] The three-dimensional scene area drawing method in the exemplary embodiment of the present disclosure can be applied to three-dimensional maps, three-dimensional games or other virtual three-dimensional scenes, and can be used for urban planning or other needs, and the present disclosure does not make any specific limitations here.

[0058] As an important direction of technological progress, digitalization is being integrated with various industries. Digital twin cities can digitally replicate real cities at a 1:1 ratio. When planning and designing a city, it can be verified in the three-dimensional scene of the digital twin city first, which often requires drawing certain specific areas and plots.

[0059] In one embodiment of the present disclosure, please refer to Figure 2 , Figure 2 A flowchart of a method for drawing a three-dimensional scene area according to an embodiment of the present disclosure is schematically shown. As shown in the figure, the method for drawing a three-dimensional scene area may include:

[0060] S210: In response to the point selection operation, a marking point is obtained, and an index of the marking point is determined.

[0061] In the disclosed embodiment, the point selection operation can be a touch operation directly acting on the touch screen, or can be a click operation through a signal input device such as a mouse, which is not limited here. In response to the point selection operation, a point is determined in the three-dimensional scene as a marking point according to the position of the click or touch.

[0062] The index of the marking point can be determined according to the operation order of the point selection operation. For example, to form a closed drawing area, at least three marking points are required, which can be the first marking point, the second marking point and the third marking point. Among them, in response to the first point selection operation, the first marking point is determined; in response to the second point selection operation, the second marking point is determined; in response to the third point selection operation, the third marking point is determined. The indexes of the corresponding three marking points can be 1, 2 and 3 respectively.

[0063] S220: Connect the marking points according to the index to generate an area to be drawn.

[0064] The index of the marking point indicates the order of connecting multiple marking points. Based on the connection order indicated by the index, the first marking point is connected to the second marking point, the second marking point is connected to the third marking point, and the third marking point is connected to the first marking point to generate the area to be drawn.

[0065] S230: Create a mesh body in the area to be drawn, and set the material of the mesh body to complete the drawing.

[0066] The drawing method can be to use the "create mesh section" function in the procedural mesh component plug-in in Unreal Engine to create a mesh, and then use "CreateDynamic Material Instance" to set the material for the procedural mesh to generate a drawing area with custom materials and colors. Figure 3 As shown, the area drawn in red is based on the four marker points in the scene.

[0067] The present disclosure also proposes a method for drawing a three-dimensional scene area. The method of obtaining a marking point in response to a point selection operation includes:

[0068] In response to the touch point selection operation, obtaining a touch position;

[0069] Sending a ray from the position of the virtual camera in the three-dimensional scene to the touch position;

[0070] The collision point between the ray and the three-dimensional scene is detected, and the collision point is the marking point.

[0071] In the embodiment of the present disclosure, there is a virtual camera in the three-dimensional scene, and the image in the three-dimensional scene is captured based on the position of the virtual camera in the three-dimensional scene and presented on the display screen. The position of the virtual camera can be constantly changing or fixed, and the present disclosure does not limit this.

[0072] It can be through the ray detection method, according to the click or touch position and the position of the virtual camera in the 3D scene, a ray is emitted from the position of the virtual camera to the click or touch position. It can be set to emit a ray of almost infinite length (for example, the parameter is 100000000), and the collision type to be detected is set to the ground collision type. After the collision occurs, the collision position is the position of the mark point on the ground.

[0073] In the process of drawing a region, it is often necessary to constantly adjust various parameters of the region, including position, size, shape, etc. Among them, if the accuracy of the drawn region needs to be higher, for example, to make the size and shape of the region meet the requirements, more markers need to be added. At this time, how to determine the index relationship between the newly added markers and the existing markers will affect whether the drawn region is accurate.

[0074] Based on this, the present disclosure also proposes a method for drawing a three-dimensional scene area. Figure 4 As shown, after determining the indexes of the marking points in sequence according to the order of the point selection operation, the following steps are also included:

[0075] S211, in response to the newly added point selection operation, obtaining a newly added marking point;

[0076] S212, calculating a plurality of relative distance parameters according to the position information of the newly added marking point and the marking point;

[0077] S213: Determine a marking point corresponding to a minimum relative distance parameter among the multiple relative distance parameters, and determine an index of the newly added marking point according to the index of the marking point.

[0078] In the embodiment of the present disclosure, based on the same method as the aforementioned method of acquiring the marking points, newly added marking points are acquired, the position information of the newly added marking points and the marking points in the three-dimensional scene is acquired, and a plurality of relative distance parameters are calculated.

[0079] The process of calculating multiple relative distance parameters can generate a position array from the position information of the existing markers. First, the newly added marker and any marker among the existing multiple markers and the next marker with the adjacent index to the marker are taken as a set of data to calculate a relative distance parameter. Then, the position array is traversed to obtain the relative distance parameter between the newly added marker and each existing marker.

[0080] Calculate the relative distance parameter, add the distance from the newly added mark point to the current traversal point and the distance from the newly added point to the next traversal point, then subtract the distance from the current traversal point to the next traversal point, and write the obtained relative distance parameter into a new floating-point array. It should be noted that when traversing the last point, the next traversal point is the first point in the array, and the minimum value in the array and the index of the mark point corresponding to the minimum value are obtained. The index of the newly added mark point is equal to the minimum value index plus 1.

[0081] For example, the distance from the newly added marker to the first marker among the existing markers is added to the distance from the newly added marker to the second marker, and then the distance from the first marker to the second marker is subtracted to obtain the relative distance parameter of the first marker. After traversal, the relative distance parameters corresponding to all existing markers are obtained, and the minimum value is screened out, and then the corresponding marker and its index are determined, and the index of the newly added marker is obtained by adding 1 to the corresponding marker index.

[0082] It is understandable that, when the index of a newly added marking point is determined, the marking points after the index need to be incremented by 1 to avoid the same index.

[0083] In addition, the existing marking point may be deleted, and then the area to be drawn may be determined directly based on the index of the deleted marking point, or the index of the marking point after the deleted marking point may be reduced by 1, which is not limited here.

[0084] The process of deleting an existing mark may be, in response to a delete operation such as clicking the right mouse button, using ray detection, setting the detection collision type to the collision type of the marker component. If a collision occurs, use the "cast to" node to convert the colliding primitive component into a marker component, use the "find" node to find the index of the selected marker component in the marker component array, use the "remove index" node to remove the index in the array, and use the new point array to draw the area.

[0085] By implementing the embodiments of the present disclosure, after adding a new marking point, the index value of the new marking point can be determined by calculating and comparing the relative distance parameters between the existing marking point and the new marking point, so as to modify the area to be drawn, thereby improving the efficiency of modifying the area during the drawing process.

[0086] The modification of the drawing area may be to add or delete a marking point as mentioned above, or to modify the position of an existing marking point, thereby changing parameters such as the size and shape of the area to be drawn.

[0087] Based on this, the present disclosure also proposes a method for drawing a three-dimensional scene area. After creating a mesh body in the area to be drawn and setting the mesh body material to complete the drawing, the method further includes the following steps:

[0088] In response to the first moving point selection operation, determining a mark point to be moved and dragging the mark point to be moved;

[0089] In response to the second moving point selection operation, determining the current position of the to-be-moved marking point;

[0090] Generate a to-be-drawn area based on the current position, and detect the validity of the to-be-drawn area;

[0091] When the area to be drawn is valid, the area to be drawn is drawn.

[0092] In the embodiment of the present disclosure, it is necessary to start the drag event before moving the marker point. When the event is started, a timer is set to pause the event of dragging the marker point component. This can be when the left mouse button is pressed, ray detection is used, and the detection collision type is set to the collision type of the marker point component. If a collision occurs, the colliding primitive component is converted into a marker point component using the cast to node and assigned to the marker point component variable value. At the same time, the pause timer of the drag event is canceled, and the drag event can run.

[0093] After the variable of the marker component type is assigned a value, use ray detection to set the collision detection type to the ground collision type. After a collision occurs, get the point on the ground, and use "Set Scene Position" to set the moved marker point to the position of the ground point.

[0094] In the above process, for example, the first moving point selection operation can be a continuous operation of a click operation of the left mouse button and a mouse sliding operation, and in response to the first moving point selection operation, a mark point is selected and dragged. The second moving point selection operation can be a release operation of the left mouse button, and in response to the second moving point selection operation, the current position of the mouse is determined as the current position of the moved mark point.

[0095] It should be noted that the polygon formed by the current position of the moving marker and the positions of other markers, i.e. the area to be drawn, needs to be detected. The purpose of the detection is to determine whether the current polygon intersects with other line segments. The "intersect" node can be used to determine whether the two line segments drawn from the selected moving marker component intersect with the third line segment. If they intersect, it is an invalid polygon. If they do not intersect, it is a valid polygon.

[0096] By implementing the embodiments of the present disclosure, the existing marking points can be directly moved to change the parameters of the area to be drawn, thereby improving the efficiency of modifying the area to be drawn. In addition, by detecting the validity of the area to be drawn formed after moving the marking points, the error of crossing with other areas is avoided, thereby improving the accuracy of the drawing area.

[0097] It is understandable that, when the positions of each marker point have been obtained, the perimeter and area of ​​the area to be drawn can be calculated for reference. The positions of each marker point can be real geographic coordinate positions, and the calculated perimeter and area are also corresponding data in the real scene.

[0098] Optionally, when calculating the perimeter, you can initialize a floating-point value variable to 0, traverse the array of marked points that make up the current area, use the "distance" function to calculate the distance between the current traversal point and the next traversal point (when traversing the last point, the next point is the first point in the array), add it to the floating-point variable, and then assign the resulting value to the floating-point variable. Keep looping until the last point is reached, and you can get the perimeter of the polygonal area to be drawn.

[0099] Optionally, when calculating the area, Heron's formula can be used, which is as follows: Let the three sides of the triangle be a, b, and c, and p = a + b + c2, then the area of ​​the triangle △ = p (pa) (pb) (pc). Divide the polygonal area to be drawn into multiple triangles, calculate the area of ​​each triangle, and then add them up to get the area of ​​the area to be drawn. The disclosed embodiment does not limit the method of calculating the perimeter and area of ​​the drawing area. Figure 5 As shown, the area to be drawn generated based on four marking points can be divided into two triangles.

[0100] It should be noted that although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0101] Furthermore, in this exemplary embodiment, a three-dimensional scene area drawing device is also provided. Figure 6 , the three-dimensional scene area drawing device 600 includes:

[0102] A marking index module 610, configured to obtain a marking point in response to a point selection operation and determine an index of the marking point;

[0103] An area generation module 620, configured to connect the marking points according to the index to generate an area to be drawn;

[0104] The area drawing module 630 is used to create a mesh body in the area to be drawn and set the material of the mesh body to complete the drawing.

[0105] In an exemplary embodiment of the present disclosure, the marking index module is used to obtain the touch position in response to the touch point selection operation;

[0106] Sending a ray from the position of the virtual camera in the three-dimensional scene to the touch position;

[0107] The collision point between the ray and the three-dimensional scene is detected, and the collision point is the marking point.

[0108] In an exemplary embodiment of the present disclosure, there are three marking points; the marking index module is used to determine the indexes of the marking points in sequence according to the order of the point selection operation.

[0109] In an exemplary embodiment of the present disclosure, the three-dimensional scene area drawing device further includes:

[0110] A marking adding module, configured to obtain a newly added marking point in response to a newly added point selection operation after sequentially determining the indexes of the marking points according to the order of the point selection operation;

[0111] Calculating a plurality of relative distance parameters according to the position information of the newly added marking point and the marking point;

[0112] A marking point corresponding to a minimum relative distance parameter among the multiple relative distance parameters is determined, and an index of the newly added marking point is determined according to the index of the marking point.

[0113] In an exemplary embodiment of the present disclosure, the three-dimensional scene area drawing device further includes:

[0114] The marking deletion module is used to create a mesh body in the area to be drawn, set the mesh body material to complete the drawing, respond to the deletion point selection operation to determine the marking point to be deleted, and delete the index of the marking point to be deleted.

[0115] In an exemplary embodiment of the present disclosure, the marking adding module is used to obtain, according to the newly added marking point and the position information of the marking point, a first distance between the newly added marking point and a first marking point among the marking points, a second distance between the newly added marking point and a second marking point among the marking points, and a third distance between the first marking point and the second marking point;

[0116] Obtaining a relative distance parameter based on a difference between the sum of the first distance and the second distance and the third distance;

[0117] The plurality of marking points are traversed in sequence to calculate and obtain a plurality of relative distance parameters.

[0118] In an exemplary embodiment of the present disclosure, the three-dimensional scene area drawing device further includes:

[0119] A mark moving module, used for creating a mesh body in the to-be-drawn area, setting the mesh body material to complete drawing, and then, in response to a first moving point selection operation, determining a mark point to be moved and dragging the mark point to be moved;

[0120] In response to the second moving point selection operation, determining the current position of the to-be-moved marking point;

[0121] Generate a to-be-drawn area based on the current position, and detect the validity of the to-be-drawn area;

[0122] When the area to be drawn is valid, the area to be drawn is drawn.

[0123] In an exemplary embodiment of the present disclosure, the detecting the validity of the area to be drawn includes:

[0124] It is detected that the two line segments drawn from the to-be-moved mark point do not intersect with other line segments, and then the to-be-drawn area is valid.

[0125] The above modules can be the above devices used to execute the methods provided in the above embodiments. Their implementation principles and technical effects are similar and will not be described in detail here.

[0126] Figure 7 The structural diagram of the computer system of the electronic device suitable for implementing the embodiment of the present disclosure is shown. It should be noted that the computer system of the electronic device shown is only an example, and the function and scope of use of the embodiment of the present disclosure should not be limited. As shown in the figure, the computer system includes a central processing unit (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) or the program loaded from the storage part into the random access memory (RAM). In the RAM, various programs and data required for system operation are also stored. The CPU, ROM and RAM are connected to each other through a bus. The input / output (I / O) interface is also connected to the bus.

[0127] The following components are connected to the I / O interface: an input section including a keyboard, a mouse, etc.; an output section including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section including a hard disk, etc.; and a communication section including a network interface card such as a LAN card, a modem, etc. The communication section performs communication processing via a network such as the Internet. A drive is also connected to the I / O interface as needed. Removable media, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., are installed on the drive as needed so that a computer program read therefrom is installed into the storage section as needed.

[0128] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible embodiments, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to perform the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.

[0129] The program product may adopt any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. A computer readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program used by or in conjunction with an instruction execution system, device, or device. The program code contained on the readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above. The program code for performing the operation of the present invention can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and also conventional procedural programming languages ​​such as "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0130] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A three-dimensional scene area rendering method, characterized in that: include: In response to the point selection operation, a marking point is obtained, and an index of the marking point is determined; Connecting the marking points according to the index to generate an area to be drawn; A mesh is created in the area to be drawn, and the material of the mesh is set to complete the drawing.

2. The method according to claim 1, characterized in that The step of acquiring a marking point in response to a point selection operation comprises: In response to the touch point selection operation, obtaining a touch position; Sending a ray from the position of the virtual camera in the three-dimensional scene to the touch position; The collision point between the ray and the three-dimensional scene is detected, and the collision point is the marking point.

3. The method according to claim 1, characterized in that There are three marking points; and determining the indexes of the marking points includes: According to the order of the point selection operation, the indexes of the marked points are determined in sequence.

4. The method according to claim 3, characterized in that After determining the indexes of the marking points in sequence according to the order of the point selection operation, the method further includes: In response to the newly added point selection operation, obtaining a newly added marking point; Calculating a plurality of relative distance parameters according to the position information of the newly added marking point and the marking point; A marking point corresponding to a minimum relative distance parameter among the multiple relative distance parameters is determined, and an index of the newly added marking point is determined according to the index of the marking point.

5. The method according to claim 4, characterized in that After creating a mesh in the area to be drawn and setting the mesh material to complete the drawing, the method further includes: In response to the point selection operation for deletion, a mark point to be deleted is determined, and an index of the mark point to be deleted is deleted.

6. The method according to claim 4, characterized in that The calculating a plurality of relative distance parameters according to the position information of the newly added marking point and the marking point includes: According to the newly added marking point and the position information of the marking points, a first distance between the newly added marking point and a first marking point among the marking points, a second distance between the newly added marking point and a second marking point among the marking points, and a third distance between the first marking point and the second marking point are obtained; Obtaining a relative distance parameter based on a difference between the sum of the first distance and the second distance and the third distance; The plurality of marking points are traversed in sequence to calculate and obtain a plurality of relative distance parameters.

7. The method according to claim 1, characterized in that After creating a mesh in the area to be drawn and setting the mesh material to complete the drawing, the method further includes: In response to the first moving point selection operation, determining a mark point to be moved and dragging the mark point to be moved; In response to the second moving point selection operation, determining the current position of the mark point to be moved; generating a region to be drawn based on the current position, and detecting validity of the region to be drawn; When the area to be drawn is valid, the area to be drawn is drawn.

8. The method according to claim 7, characterized in that Detecting the validity of the area to be drawn includes: It is detected that the two line segments drawn from the to-be-moved mark point do not intersect with other line segments, and then the to-be-drawn area is valid.

9. A three-dimensional scene area rendering device, characterized in that: include: A marking index module, used for obtaining a marking point in response to a point selection operation and determining an index of the marking point; An area generation module, used for connecting the marking points according to the index to generate an area to be drawn; The area drawing module is used to create a mesh body in the area to be drawn and set the material of the mesh body to complete the drawing.

10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the three-dimensional scene area rendering method according to any one of claims 1 to 8 is implemented.

11. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, enables the one or more processors to implement the three-dimensional scene area rendering method according to any one of claims 1 to 8.