Methods, devices, media, and computer program products for editing virtual scenes
By treating scene elements with different phase properties as independent objects for editing and rendering, the problem of disrupting solid materials and causing shape unevenness during liquid material editing is solved, achieving independent editing and automatic filling effects for liquid and solid materials.
Patent Information
- Application Number
- CN202210036337.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-13
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2042-01-13
AI Technical Summary
In existing technologies, liquid and solid materials tend to interfere with each other when edited within the same 3D object, leading to inaccurate editing and unreasonable shapes. Furthermore, editing liquid materials can easily damage solid materials, resulting in uneven shapes at the interface between liquid and solid materials, and holes in the bottom of liquid materials cannot be automatically filled during game operation.
Scene elements with different phase properties are edited as independent objects, and their structure, position and display properties are set separately. They are then rendered and displayed by overlay to ensure the independent editing and reasonable connection of liquid and solid materials.
It enables independent editing of liquid and solid materials, avoids accidental editing, ensures a smooth shape at the junction of liquid and solid materials, and automatically fills the liquid material when a hole is made at the bottom of the liquid material.
Smart Images

Figure CN114367113B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of 3D model creation technology, and in particular to methods, devices, media, and computer program products for editing virtual scenes. Background Technology
[0002] Existing volumetric terrain editors edit liquid and solid materials within the same 3D object, and any voxel in space can only have one material, which leads to the following technical problems.
[0003] First, editing liquid materials can easily damage solid materials. As mentioned above, since any voxel in space can only have one material, editing liquid materials can accidentally replace the solid materials of surrounding voxels with liquid materials.
[0004] Secondly, the junction between liquid and solid materials is prone to creating unreasonable shapes (e.g., uneven liquid surfaces). Editors typically use algorithms such as Marching Box to automatically calculate a smooth surface shape suitable for a particular voxel based on the fill value of the material within that voxel, in order to blend it with the surfaces of surrounding voxels. In other words, the surface shape of a voxel is affected by the surrounding voxels, which can cause solid voxels to influence the surface shape of liquid voxels. However, in reality, liquid surfaces should always be flat.
[0005] Third, during gameplay, for example, if you make a hole in the bottom of a liquid material, the hole will not automatically fill with liquid material. Summary of the Invention
[0006] The purpose of this invention is to provide a method, apparatus, medium, and computer program product for editing virtual scenes, which can treat scene elements with different phase attributes as different objects, independently edit scene elements with different phase attributes, and render and display these scene elements in an overlay manner.
[0007] This invention discloses a method for editing a virtual scene, the method being used in an electronic device, and the method comprising:
[0008] Identify a first scene element and a second scene element in the virtual scene to be edited, wherein the first scene element and the second scene element have different phase attributes;
[0009] The structural attributes of the first scene element and the second scene element are set respectively, and the positions of the first scene element and the second scene element in the virtual scene to be edited and / or the relative positions between the first scene element and the second scene element are determined, wherein the first scene element and the second scene element at least partially overlap in the space of the virtual scene to be edited.
[0010] Optionally, the method further includes:
[0011] The first scene element and the second scene element are rendered and displayed in an overlay manner.
[0012] Optionally, the overlay rendering and display of the first scene element and the second scene element includes:
[0013] The first scene element and the second scene element are superimposed, the superimposed first scene element and the second scene element are rendered, and the rendered first scene element and the second scene element are displayed.
[0014] Optionally, the overlay rendering and display of the first scene element and the second scene element includes:
[0015] Render the first scene element and the second scene element, overlay the rendered first scene element and the second scene element, and display the overlaid first scene element and the second scene element.
[0016] Optionally, the method further includes:
[0017] Set the display attributes of the first scene element and the second scene element respectively;
[0018] Based on the display attributes of the first scene element and the second scene element, the first scene element and the second scene element are superimposed;
[0019] Render the first scene element and the second scene element after overlay; and
[0020] Display the rendered first scene element and the second scene element.
[0021] Optionally, the method further includes:
[0022] Set the display attributes of the first scene element and the second scene element respectively;
[0023] Based on the display attributes of the first scene element and the second scene element, the rendered first scene element and the second scene element are overlaid; and
[0024] Displays the first scene element and the second scene element after they have been superimposed.
[0025] Optionally, when editing one of the first scene element and the second scene element, the other scene element can be hidden.
[0026] Optionally, the phase properties include at least one of physical morphology, fluidity, viscosity, and compressibility.
[0027] Optionally, the structural properties include at least one of shape and size.
[0028] Optionally, the display attributes include at least one of color and transparency.
[0029] This invention discloses a system for editing virtual scenes, the system comprising:
[0030] The confirmation unit determines the first scene element and the second scene element in the virtual scene to be edited, wherein the first scene element and the second scene element have different phase attributes;
[0031] The editing unit sets the structural attributes of the first scene element and the second scene element respectively, and determines the position of the first scene element and the second scene element in the virtual scene to be edited and / or the relative position between the first scene element and the second scene element, wherein the first scene element and the second scene element at least partially overlap in the space of the virtual scene to be edited.
[0032] The present invention discloses an electronic device including a processor and a memory storing computer-executable instructions, the processor being configured to execute the instructions to implement a method for editing a virtual scene.
[0033] The present invention discloses a computer-readable storage medium having computer-executable instructions stored thereon, the instructions being executed by a processor to implement a method for editing a virtual scene.
[0034] This invention discloses a computer program product, including computer-executable instructions, which are executed by a processor to implement a method for editing a virtual scene.
[0035] The main differences and effects of the embodiments of the present invention compared with the prior art are as follows:
[0036] This invention can treat scene elements with different phase attributes as different objects, so that when these scene elements are set in the space of the virtual scene to be edited, multiple phase attributes can exist for any voxel in the space.
[0037] This invention allows scene elements with different phase attributes to be edited independently, so that editing a scene element with one phase attribute will not affect a scene element with another phase attribute, and will not result in incorrect replacement.
[0038] This invention can display an edited virtual scene and its first and second scene elements in the editor's display area. When these two scene elements are displayed, the connection between them will not form an unreasonable shape. Furthermore, after resetting certain scene elements, a new virtual scene and its scene elements can be automatically displayed. Attached Figure Description
[0039] Figure 1 It is a schematic diagram of the principle of editing virtual scenes based on existing technology;
[0040] Figure 2 This is a schematic diagram of the principle of editing virtual scenes according to the present invention;
[0041] Figure 3 This is a flowchart of a method for editing a virtual scene according to the present invention;
[0042] Figure 4 This is a structural diagram of a system for editing virtual scenes according to the present invention;
[0043] Figure 5 This is another flowchart of the method for editing a virtual scene according to the present invention;
[0044] Figure 6 This is another structural diagram of the system for editing virtual scenes according to the present invention;
[0045] Figure 7 This is a hardware structure block diagram of an electronic device that implements the method for editing virtual scenes according to the present invention. Detailed Implementation
[0046] To make the objectives and technical solutions of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0047] Figure 1 It is a schematic diagram of the principle of editing virtual scenes based on existing technology.
[0048] Edit the virtual scene to be edited in the editor, and edit each voxel in the space of the scene, such as... Figure 1As shown, the virtual scene to be edited is a game terrain scene. A first number of voxels are selected and set as solid materials. These voxels form a mountain 101, which extends upwards from the bottom of the game terrain scene, forming multiple peaks 101A and multiple valleys 101B. A second number of voxels are selected and set as liquid materials. These voxels form multiple water bodies 102. The bottom 102A of each water body 102 matches the bottom shape of the corresponding valley 101B, and the top has a horizontal surface 102B. The mountain 101 and the multiple water bodies 102 are rendered and displayed respectively.
[0049] Existing technology edits each voxel in the space, and any voxel in the space can only have one material. The mountain 101 and multiple water bodies 102 are independent of each other. When selecting a second number of voxels to set as liquid materials, for example, when selecting a voxel above the bottom of valley 101B to set as liquid material, it is possible to accidentally set some voxels at the bottom of valley 101B as liquid material as well, thereby destroying the overall shape of valley 101B.
[0050] Secondly, for the voxel at the junction of the horizontal plane 102B and the upper part of the valley 101B, where one end is the steep upper part of the valley 101B and the other end is the horizontal plane 102B, the surface shape of this voxel will be an inclined surface to connect the upper part of the valley 101B and the horizontal plane 102B respectively. When this voxel is set to a liquid material, an inclined water surface will appear; however, in reality, the surface of the water body 102 should always be flat.
[0051] Additionally, if a hole is drilled at the bottom of a valley 101B, the corresponding water body 102 will not automatically fill the hole. Instead, the third number of voxels in the hole need to be selected as the liquid material, and these voxels need to be re-rendered and displayed.
[0052] To address the above problems, embodiments of this application propose a method for editing virtual scenes. According to the method for editing virtual scenes according to embodiments of this application, scene elements with different phase attributes can be treated as different objects, scene elements with different phase attributes can be edited independently, and these scene elements can be rendered and displayed in an overlay manner.
[0053] Figure 2 This is a schematic diagram of the principle of editing virtual scenes according to the present invention.
[0054] Edit the virtual scene to be edited, as well as its first and second scene elements, in the editor, such as... Figure 2As shown, the virtual scene to be edited is a game terrain scene, and mountains 201 and water bodies 202 are identified within this scene. Mountains 201 and water bodies 202 have different phase properties; mountains 201 are solid, and water bodies 202 are liquid. This invention can treat the solid mountain 201 and the liquid water body 202 as two distinct objects. Therefore, when mountains 201 and water bodies 202 are placed in the space of the game terrain scene, any voxel in that space can exist in either a solid or liquid state. For voxels with both phase properties, during rendering, one phase property can be displayed according to a preset priority, such as prioritizing the display of solid properties.
[0055] Structural properties are set for mountain body 201 and water body 202 respectively. Optionally, structural properties include at least one of shape and size. Figure 2 As shown, the mountain 201 extends upward from the bottom of the game terrain scene, forming multiple peaks 201A and multiple valleys 201B. The water body 202 has an arc-shaped bottom 202A and multiple horizontal surfaces 202B at its top.
[0056] Determine the positions of mountain 201 and water body 202 within the game terrain scene and / or the relative positions between mountain 201 and water body 202, wherein mountain 201 and water body 202 at least partially overlap in the space of the game terrain scene. For example... Figure 2 As shown, most of the water body 202 is inside the mountain 201 to form groundwater, and the portion with multiple horizontal planes 202B covers multiple valleys 201B to form lakes. This invention allows for independent editing of the solid mountain 201 and the liquid water body 202, so that editing the solid mountain 201 does not affect the liquid water body 202, and there is no risk of incorrect replacement.
[0057] The mountain 201 and water body 202 are rendered and displayed in an overlay manner. For example... Figure 2 As shown, based on the player's perspective, the surface of mountain peak 201A and the horizontal plane 202B covering valley 201B are displayed, but the interiors of mountain 201 and water body 202 are not displayed. This invention can display the edited game terrain scene and its mountains 201 and water bodies 202 in the editor's display area. When displaying mountains 201 and water bodies 202, their junctions do not form unreasonable shapes, and lakes maintain a horizontal surface.
[0058] After resetting the structural properties of mountain 201 (e.g., extending downwards into a valley 201B, and water 202 covering the downwardly extending valley 201B), the reset mountain 201 and water 202 are rendered and displayed overlay, so that the downwardly extending valley 201B is covered by water 202, thus presenting the effect of a hole in the bottom of a lake that can be automatically filled with water 202. This invention can automatically display a new virtual scene and its elements after resetting certain scene elements.
[0059] Figure 3 This is a flowchart of a method for editing a virtual scene according to the present invention. Figure 3 As shown, the first embodiment includes:
[0060] In step S301, a first scene element and a second scene element in the virtual scene to be edited are determined, and the first scene element and the second scene element have different phase attributes.
[0061] Optionally, the virtual scene to be edited can be a 3D virtual scene. The first and second scene elements can be 3D virtual objects, used to set up within the 3D virtual space to form a complete virtual scene. It is understood that the 3D virtual space can also include any number of scene elements; here, the first and second scene elements are selected as examples, and other scene elements are processed similarly to the first and second scene elements. A display area and an editing area can be set in the editor. The display area shows the virtual scene to be edited, along with its first and second scene elements, while the editing area has a first scene element tab and a second scene element tab for editing the first and second scene elements in the virtual scene to be edited. For example, as shown... Figure 2 As shown, the editor can be a game terrain editor, the virtual scene to be edited is a game terrain scene, and the first scene element and the second scene element are mountain 201 and water 202, respectively.
[0062] Optionally, for the determined first scene element and second scene element, a first scene element model and a second scene element model are established respectively. The first scene element model and the second scene element model store the phase attributes of the first scene element and the second scene element, respectively, and are presented as phase attribute options in the first scene element tab and the second scene element tab, respectively. Scene elements with different phase attributes are independent of each other in both the model layer and the data layer, belonging to different objects.
[0063] Optionally, the phase properties include at least one of physical state, fluidity, viscosity, and compressibility. The physical state includes liquid, solid, and gas, and the first scene element and the second scene element can have different physical states. For example, as mentioned above, the first scene element and the second scene element are a mountain (solid) and water (liquid), respectively. Similarly, the first scene element and the second scene element can also have different fluidities, viscosities, and / or compressibility. For example, the first scene element and the second scene element are a mountain and quicksand, respectively.
[0064] Through step S301, the present invention can treat scene elements with different phase attributes as different objects, so that when these scene elements are set in the space of the virtual scene to be edited, multiple phase attributes can exist for any voxel in the space.
[0065] In step S302, the structural attributes of the first scene element and the second scene element are set respectively, and the positions of the first scene element and the second scene element in the virtual scene to be edited and / or the relative positions between the first scene element and the second scene element are determined, wherein the first scene element and the second scene element can at least partially overlap in the space of the virtual scene to be edited. For example, as Figure 2 As shown, most of the water body 202 is located inside the mountain 201, and a small portion of the water body 202 floats outside the mountain 201, thus covering the valley 201B.
[0066] Optionally, the first scene element model and the second scene element model respectively store the structural attributes of the first scene element and the second scene element, as well as the positions of the first scene element and the second scene element in the virtual scene to be edited and / or the relative positions between the first scene element and the second scene element, and respectively present them as structural attribute options and position options in the first scene element tab and the second scene element tab.
[0067] The shape and size of the first scene element and the second scene element can be determined by performing operations such as scaling, stretching, adding, subtracting, smoothing, and painting in the display area, and / or by setting the shape and size parameters in the structure properties option of the scene element tab.
[0068] Specifically, by moving the elements in the display area and / or by setting the position parameters in the position options of the scene element tab, the positions of the first scene element and the second scene element in the virtual scene to be edited and / or the relative positions between the first scene element and the second scene element can be determined respectively.
[0069] In this scenario, the first scene element and the second scene element overlap at least partially in the space of the virtual scene to be edited, so that the first scene element and the second scene element can interact.
[0070] Optionally, when editing one of the first and second scene elements, the other scene element can be hidden. When editing multiple scene elements with different phase attributes, by switching between the first and second scene element tabs, while editing one scene element with a specific phase attribute, another scene element with a different phase attribute or all remaining scene elements can be hidden. This allows the scene element to be edited to be displayed more clearly in the display area, solving the problem of accidental editing of scene elements other than the scene element to be edited in the existing technology. The principle of switching between the first and second scene element tabs is similar to selecting different layers in graphics editing software. It can be understood that the first and second scene elements belong to different layers, and selecting different layers allows the corresponding scene elements to be rendered and displayed separately.
[0071] Through step S302, the present invention can independently edit scene elements with different phase attributes, so that editing a scene element with one phase attribute will not affect a scene element with another phase attribute, and will not result in incorrect replacement.
[0072] Figure 4 This is a structural diagram of a system for editing virtual scenes according to the present invention. Figure 4 As shown, the second embodiment includes:
[0073] The confirmation unit 401 is used to determine the first scene element and the second scene element in the virtual scene to be edited, wherein the first scene element and the second scene element have different phase attributes.
[0074] Through the confirmation unit 401, the present invention can treat scene elements with different phase attributes as different objects, so that when these scene elements are set in the space of the virtual scene to be edited, multiple phase attributes can exist for any voxel in the space.
[0075] The editing unit 402 is used to set the structural attributes of the first scene element and the second scene element respectively, and to determine the position of the first scene element and the second scene element in the virtual scene to be edited and / or the relative position between the first scene element and the second scene element, wherein the first scene element and the second scene element at least partially overlap in the space of the virtual scene to be edited.
[0076] Through the editing unit 402, the present invention can independently edit scene elements with different phase attributes, so that when editing a scene element with one phase attribute, it will not affect a scene element with another phase attribute, and there will be no situation such as incorrect replacement.
[0077] The first embodiment is a method embodiment corresponding to this embodiment, and this embodiment can be implemented in conjunction with the first embodiment. The relevant technical details mentioned in the first embodiment remain valid in this embodiment, and will not be repeated here to avoid repetition. Correspondingly, the relevant technical details mentioned in this embodiment can also be applied to the first embodiment.
[0078] Figure 5 This is another flowchart of the method for editing a virtual scene according to the present invention. Figure 5 As shown, in addition to the steps described in the first embodiment, the third embodiment also includes:
[0079] In step S303, the first scene element and the second scene element are rendered and displayed in an overlay manner. For example, based on the player's viewing perspective, after editing the game terrain scene through the editor, the rendered game terrain displays the surface of the mountain 201 and the surface of the water body 202 covering the valley 201B, but does not display the interior of the mountain 201 and the water body 202.
[0080] Optionally, one rendering and display scheme involves overlaying a first scene element and a second scene element, rendering the overlaid first scene element and the second scene element, and displaying the rendered first scene element and the second scene element. Further, optionally, display attributes of the first scene element and the second scene element are set respectively; based on the display attributes of the first scene element and the second scene element, the first scene element and the second scene element are overlaid; the overlaid first scene element and the second scene element are rendered; and the rendered first scene element and the second scene element are displayed.
[0081] The process involves first performing logical operations (such as AND, OR, NOT operations) on the display attributes of the first and second scene elements, then treating the superimposed element as a whole and determining its display attributes, and finally rendering and displaying it based on those attributes.
[0082] Alternatively, another rendering and display scheme involves rendering a first scene element and a second scene element, overlaying the rendered first scene element and the second scene element, and then displaying the overlaid first scene element and the second scene element. Further, optionally, display attributes of the first scene element and the second scene element are set respectively; based on the display attributes of the first scene element and the second scene element, the rendered first scene element and the second scene element are overlaid; and the overlaid first scene element and the second scene element are displayed.
[0083] The process involves rendering the first and second scene elements separately, then overlaying the rendered scene elements onto each other, and finally displaying the overlaid scene elements.
[0084] Optionally, the first scene element model and the second scene element model store the display attributes of the first scene element and the second scene element, respectively, and present them as display attribute options in the first scene element tab and the second scene element tab, respectively.
[0085] Optionally, display attributes include at least one of color and transparency. The color and transparency of the first and second scene elements can be set separately by adjusting parameters such as color and transparency in the display attributes options of the element tab.
[0086] Optionally, after resetting the structural properties of the first scene element and / or the second scene element, the positions of the first scene element and the second scene element in the virtual scene to be edited, and / or the relative positions between the first scene element and the second scene element, and / or the display properties of the first scene element and / or the second scene element, the reset first scene element and the second scene element are rendered and displayed in an overlay manner. For example, the shape of the mountain 201 is reset to extend the valley 201B downwards, and the water body 202 covers the downwardly extending valley 201B. By overlaying the rendering and display of the reset mountain 201 and water body 202, the downwardly extending valley 201B is covered by the water body 202, thus presenting the effect of drilling a hole underwater, which can be automatically filled with water.
[0087] Through step S303, the present invention can display the edited virtual scene and the first scene element and the second scene element therein in the display area of the editor. When these two scene elements are displayed, the places where they are connected will not form unreasonable shapes. Furthermore, after some scene elements are reset, a new virtual scene and the scene elements therein can be automatically displayed.
[0088] Figure 6 This is another structural diagram of the system for editing virtual scenes according to the present invention. For example... Figure 6As shown, in addition to the units described in the second embodiment, the fourth embodiment also includes:
[0089] Display unit 403 is used to overlay and display first scene elements and second scene elements.
[0090] Through the display unit 403, the present invention can display the edited virtual scene and the first scene element and the second scene element therein in the display area of the editor. When these two scene elements are displayed, the joints between them will not form unreasonable shapes. Furthermore, after resetting certain scene elements, a new virtual scene and the scene elements therein can be automatically displayed.
[0091] The third embodiment is a method implementation corresponding to this embodiment, and this embodiment can be implemented in conjunction with the third embodiment. The relevant technical details mentioned in the third embodiment remain valid in this embodiment, and will not be repeated here to avoid repetition. Correspondingly, the relevant technical details mentioned in this embodiment can also be applied to the third embodiment.
[0092] Figure 7 This is a hardware structure block diagram of an electronic device that implements the method for editing virtual scenes according to the present invention.
[0093] like Figure 7 As shown, the electronic device 700 may include one or more processors 702, a system motherboard 708 connected to at least one of the processors 702, a system memory 704 connected to the system motherboard 708, a non-volatile memory (NVM) 706 connected to the system motherboard 708, and a network interface 710 connected to the system motherboard 708.
[0094] Processor 702 may include one or more single-core or multi-core processors. Processor 702 may include any combination of general-purpose processors and special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In embodiments of the invention, processor 702 may be configured to perform operations according to... Figure 3 and 5 One or more embodiments of the various embodiments shown.
[0095] In some embodiments, the system motherboard 708 may include any suitable interface controller to provide any suitable interface to at least one of the processors 702 and / or any suitable device or component communicating with the system motherboard 708.
[0096] In some embodiments, system motherboard 708 may include one or more memory controllers to provide an interface to system memory 704. System memory 704 may be used to load and store data and / or instructions. In some embodiments, system memory 704 of electronic device 700 may include any suitable volatile memory, such as suitable dynamic random access memory (DRAM).
[0097] The NVM 706 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. In some embodiments, the NVM 706 may include any suitable non-volatile memory such as flash memory and / or any suitable non-volatile storage device, such as at least one of an HDD (Hard Disk Drive), a CD (Compact Disc) drive, or a DVD (Digital Versatile Disc) drive.
[0098] The NVM 706 may include a portion of the storage resources on a device installed on the electronic device 700, or it may be accessible by the device, but is not necessarily part of the device. For example, the NVM 706 may be accessed over a network via the network interface 710.
[0099] Specifically, system memory 704 and NVM 706 may each include a temporary copy and a permanent copy of instruction 720, respectively. Instruction 720 may include, when executed by at least one of processors 702, causing electronic device 700 to perform, as Figure 3 and 5 The instructions for the method shown. In some embodiments, the instructions 720, hardware, firmware and / or their software components may additionally / alternatively be located in the system motherboard 708, network interface 710 and / or processor 702.
[0100] Network interface 710 may include a transceiver for providing a radio interface to electronic device 700, thereby enabling communication with any other suitable device (e.g., front-end module, antenna, etc.) via one or more networks. In some embodiments, network interface 710 may be integrated into other components of electronic device 700. For example, network interface 710 may be integrated into at least one of processor 702, system memory 704, NVM 706, and firmware device (not shown) with instructions, wherein electronic device 700 implements [the desired functionality] when at least one of processor 702 executes the instructions. Figure 3 and 5 One or more embodiments of the various embodiments shown.
[0101] The network interface 710 may further include any suitable hardware and / or firmware to provide a multiple-input multiple-output radio interface. For example, the network interface 710 may be a network adapter, a wireless network adapter, a telephone modem, and / or a wireless modem.
[0102] In one embodiment, at least one of the processors 702 may be packaged together with one or more controllers for the system motherboard 708 to form a system-in-package (SiP). In another embodiment, at least one of the processors 702 may be integrated on the same die with one or more controllers for the system motherboard 708 to form a system-on-a-chip (SoC).
[0103] The electronic device 700 may further include an input / output (I / O) device 712 connected to the system motherboard 708. The I / O device 712 may include a user interface enabling a user to interact with the electronic device 700; the peripheral component interface is designed to allow peripheral components to also interact with the electronic device 700. In some embodiments, the electronic device 700 may also include sensors for determining at least one type of environmental condition and location information related to the electronic device 700.
[0104] In some embodiments, the I / O device 712 may include, but is not limited to, a display (e.g., a liquid crystal display, a touch screen display, etc.), a speaker, a microphone, one or more cameras (e.g., a still image camera and / or a video camera), a flashlight (e.g., an LED flash) and a keyboard.
[0105] In some embodiments, the peripheral component interface may include, but is not limited to, a non-volatile memory port, an audio jack, and a power interface.
[0106] In some embodiments, the sensor may include, but is not limited to, a gyroscope sensor, an accelerometer, a proximity sensor, an ambient light sensor, and a positioning unit. The positioning unit may also be part of or interact with the network interface 710 to communicate with components of the positioning network (e.g., Global Positioning System (GPS) satellites).
[0107] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 700. In other embodiments of this application, the electronic device 700 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0108] Program code can be applied to input instructions to perform the functions described in this invention and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a system for processing instructions including processor 702 includes any system having a processor such as a digital signal processor (DSP), microcontroller, application-specific integrated circuit (ASIC), or microprocessor.
[0109] The program code can be implemented using a high-level procedural language or an object-oriented programming language to communicate with the processing system. Assembly language or machine language can also be used when needed. In fact, the mechanisms described in this invention are not limited to any particular programming language. In either case, the language can be a compiled language or an interpreted language.
[0110] One or more aspects of at least one embodiment can be implemented by instructions stored on a computer-readable storage medium, which, when read and executed by a processor, enable an electronic device to implement the methods of the embodiments described in this invention.
[0111] The present invention also provides a computer-readable storage medium having stored thereon computer-executable instructions that are executed by a processor to implement the method for editing a virtual scene described above.
[0112] The present invention also provides a computer program product including computer-executable instructions that are executed by a processor to implement the method for editing a virtual scene described above.
[0113] Although the invention has been illustrated and described with reference to certain preferred embodiments thereof, those skilled in the art will understand that various changes in form and detail may be made therein without departing from the spirit and scope of the invention.
Claims
1. A method for editing a virtual scene, characterized in that, The method is used in an electronic device, and the method includes: determining a first scene element and a second scene element in a virtual scene to be edited, wherein the virtual scene to be edited is a terrain scene, the first scene element and the second scene element are terrain scene elements, and the first scene element and the second scene element have different phase attributes; The structural attributes of the first scene element and the second scene element are set respectively, and the positions of the first scene element and the second scene element in the virtual scene to be edited and / or the relative positions between the first scene element and the second scene element are determined, wherein the first scene element and the second scene element at least partially overlap in the space of the virtual scene to be edited.
2. The method according to claim 1, characterized in that, The method further includes: The first scene element and the second scene element are rendered and displayed in an overlay manner.
3. The method according to claim 2, characterized in that, The overlay rendering and displaying of the first scene element and the second scene element includes: The first scene element and the second scene element are superimposed, the superimposed first scene element and the second scene element are rendered, and the rendered first scene element and the second scene element are displayed.
4. The method according to claim 2, characterized in that, The overlay rendering and displaying of the first scene element and the second scene element includes: Render the first scene element and the second scene element, overlay the rendered first scene element and the second scene element, and display the overlaid first scene element and the second scene element.
5. The method according to claim 3, characterized in that, The method further includes: Set the display attributes of the first scene element and the second scene element respectively; Based on the display attributes of the first scene element and the second scene element, the first scene element and the second scene element are superimposed; Render the first scene element and the second scene element after overlay; and Display the rendered first scene element and the second scene element.
6. The method according to claim 4, characterized in that, The method further includes: Set the display attributes of the first scene element and the second scene element respectively; Based on the display attributes of the first scene element and the second scene element, the rendered first scene element and the second scene element are overlaid; and Displays the first scene element and the second scene element after they have been superimposed.
7. The method according to any one of claims 1-6, characterized in that, While editing one of the first and second scene elements, hide the other scene element.
8. The method according to any one of claims 1-6, characterized in that, The phase properties include at least one of physical morphology, fluidity, viscosity, and compressibility.
9. The method according to any one of claims 1-6, characterized in that, The structural properties include at least one of shape and size.
10. The method according to claim 5 or 6, characterized in that, The display attributes include at least one of color and transparency.
11. An electronic device, characterized in that, The electronic device includes a processor and a memory storing computer-executable instructions, the processor being configured to execute the instructions to implement the method of editing a virtual scene according to any one of claims 1-10.
12. A computer-readable storage medium having computer-executable instructions stored thereon, characterized in that, The instructions are executed by the processor to implement the method of editing a virtual scene as described in any one of claims 1-10.
13. A computer program product comprising computer-executable instructions, characterized in that, The instructions are executed by the processor to implement the method of editing a virtual scene as described in any one of claims 1-10.
Citation Information
Patent Citations
Three-dimensional scene generation method and device, equipment and storage medium
CN112516597A