Virtual prop building methods, graphical programming methods and devices, electronic devices
Patent Information
- Application Number
- CN202310094487.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-17
- Publication Date
- 2026-03-10
- Estimated Expiration
- 2043-01-17
AI Technical Summary
[0023]One or more technical solutions provided in this disclosure can respond to the current position positioning operation within the window. When the fusion constraint condition is met between the current position and the historical position to which the historically built object belongs within the window, the current built object, which is fused with the historical built object, is displayed at the current position based on the building template and the historical built object. Therefore, the method of the exemplary embodiment of this disclosure can respond to the current position positioning operation within the window after selecting the building template. The user does not need to perform any additional operations. Under the condition that the fusion constraint condition is met between the current position and the historical position within the window, the current built object, which is fused with the historical built object, can be adaptively displayed. This allows for the rapid drawing of various virtual props, enriching the programming scene of graphical programming and improving programming efficiency.
Smart Images

Figure CN116048492B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computers, and in particular to a method for building virtual props, a graphical programming method and apparatus, and electronic devices. Background Technology
[0002] Graphical programming tools can convert text-based programming languages into easily understandable graphical programming languages, allowing users to understand the functional meaning expressed by reading a series of graphical content.
[0003] In related technologies, the window scene of visual programming can be edited through material selection, editing, and combination, thereby diversifying and enriching the window scene of visual programming. Summary of the Invention
[0004] According to one aspect of this disclosure, a method for constructing virtual props is provided, comprising:
[0005] In response to the template selection request, confirm the template to be built;
[0006] In response to the current position location operation within the building interface, if the current position and the historical position of the historical building object within the building interface satisfy the fusion constraint condition, the current building object, which is fused with the historical building object, is displayed at the current position based on the building template and the historical building object.
[0007] According to another aspect of this disclosure, a graphical programming method is provided, comprising:
[0008] Identify the target character within the viewport scene, wherein the viewport scene has virtual props constructed using the method described in this disclosure;
[0009] In response to the selection operation of the moving block, add the moving block corresponding to the target role in the visual programming interface;
[0010] If the moving block is detected to collide with the virtual prop during the movement of the target character, movement control parameters are determined based on the position where the target character collides with the virtual prop. These movement control parameters are used to control the movement parameters of the target character when it collides with the virtual prop.
[0011] According to another aspect of this disclosure, a virtual prop building device is provided, comprising:
[0012] The determination module is used to determine the construction template in response to the template selection request;
[0013] The display module is used to respond to the current position positioning operation within the building interface. If the current position and the historical position of the historical building object within the building interface meet the fusion constraint conditions, the current building object, which is fused with the historical building object, is displayed at the current position based on the building template and the historical building object.
[0014] According to another aspect of this disclosure, a graphical programming apparatus is provided, comprising:
[0015] A determination module is used to determine the target character within a viewport scene, wherein the viewport scene has virtual props constructed by the method described in this disclosure;
[0016] Add a template to respond to the selection operation of the moving block, and add the moving block corresponding to the target role in the visual programming interface;
[0017] The determining module is further configured to, if it detects that the moving block collides with the virtual prop during the process of controlling the target character to move, determine movement control parameters based on the position where the target character collides with the virtual prop, and the movement control parameters are used to control the movement parameters when the target character collides with the virtual prop.
[0018] According to another aspect of this disclosure, an electronic device is provided, characterized in that it comprises:
[0019] Processor; and,
[0020] Memory for stored programs;
[0021] The program includes instructions that, when executed by the processor, cause the processor to perform the method according to an exemplary embodiment of the present disclosure.
[0022] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided, the non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the method according to exemplary embodiments of this disclosure.
[0023] One or more technical solutions provided in this disclosure can respond to the current position positioning operation within the window. When the fusion constraint condition is met between the current position and the historical position to which the historically built object belongs within the window, the current built object, which is fused with the historical built object, is displayed at the current position based on the building template and the historical built object. Therefore, the method of the exemplary embodiment of this disclosure can respond to the current position positioning operation within the window after selecting the building template. The user does not need to perform any additional operations. Under the condition that the fusion constraint condition is met between the current position and the historical position within the window, the current built object, which is fused with the historical built object, can be adaptively displayed. This allows for the rapid drawing of various virtual props, enriching the programming scene of graphical programming and improving programming efficiency. Attached Figure Description
[0024] Further details, features, and advantages of this disclosure are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:
[0025] Figure 1 An exemplary interface diagram of a graphical editor that implements the exemplary embodiments of the present disclosure is shown;
[0026] Figure 2 A flowchart illustrating a virtual prop construction method according to an exemplary embodiment of this disclosure is shown;
[0027] Figure 3 A schematic diagram of a map editing interface according to an exemplary embodiment of the present disclosure is shown;
[0028] Figure 4 This illustration shows a possible scenario where the historical and current positions of an exemplary embodiment of this disclosure satisfy the fusion constraint conditions.
[0029] Figure 5 The diagram shows the current and historical construction objects in the construction interface, using a turf plot template as an example.
[0030] Figure 6A This diagram illustrates a historical construction object in the construction interface, using a turf plot template as an example.
[0031] Figure 6B This diagram illustrates the current and historical built objects in the building interface, using a grassy plot as an example.
[0032] Figure 7A The diagram shows a historical construction object in the construction interface, using a pipe template as an example.
[0033] Figure 7B The diagram shows the current and historical construction objects in the construction interface, using a pipe template as an example.
[0034] Figure 8A This shows another schematic diagram of the historical construction object in the construction interface, using a turf plot template as an example;
[0035] Figure 8B This shows another schematic diagram of the current and historical built objects in the building interface, taking a grassy plot as an example;
[0036] Figure 9A This shows another schematic diagram of a historical construction object in the construction interface, using a turf plot template as an example;
[0037] Figure 9B This shows another schematic diagram of the historical and current built objects in the building interface, using a turf plot template as an example;
[0038] Figure 10 A schematic flowchart of a graphical programming method also provided in an exemplary embodiment of this disclosure is shown;
[0039] Figure 11A A partial schematic diagram of a block editing interface according to an exemplary embodiment of the present disclosure is shown;
[0040] Figure 11B A partial schematic diagram of a block editing interface in an exemplary embodiment of this disclosure, showing the state in which the target addition control is triggered;
[0041] Figure 11C A partial schematic diagram of a block editing interface in an animated addition control state, as shown in an exemplary embodiment of the present disclosure, is displayed.
[0042] Figure 12 A schematic diagram illustrating the block programming result of an exemplary embodiment of this disclosure is shown;
[0043] Figures 13A-13E The operation was shown Figure 12 The diagram shows the changes in the window content of the block programming result;
[0044] Figure 14 A schematic block diagram of the functional modules of a virtual prop building apparatus according to an exemplary embodiment of the present disclosure is shown;
[0045] Figure 15 A schematic block diagram of the functional modules of a graphical programming apparatus according to an exemplary embodiment of the present disclosure is shown;
[0046] Figure 16 A schematic block diagram of a chip according to an exemplary embodiment of the present disclosure is shown;
[0047] Figure 17 A structural block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation
[0048] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0049] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0050] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc., used in this disclosure are only used to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.
[0051] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0052] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0053] Before introducing the embodiments of this disclosure, the relevant terms involved in the embodiments of this disclosure are first defined as follows:
[0054] Graphical programming tools are tools that convert text-based programming languages into easily understandable graphical programming languages. Users can understand the functional meaning expressed by reading a series of graphical content and use graphical editing languages to program.
[0055] An Abstract Syntax Tree (AST), or simply a syntax tree, is an abstract representation of the syntactic structure of source code. It represents the syntactic structure of a programming language in a tree-like structure, where each node in the tree represents a structure within the source code.
[0056] Game Engine is a JavaScript-based animation engine for web animation rendering. It is a portable, lightweight game engine that can be extended to various platforms.
[0057] The block code is based on Blockly and provides functional blocks of different categories such as logic, events, and actions. These blocks can be dragged and snapped together to generate a sequence of logical blocks for a role.
[0058] When using visual programming tools for visual programming, you can select a visual programming window scene from the resource library, or select a large number of resources from the resource library for editing and combination, thereby building a window scene within the window area.
[0059] However, in related technologies, using visual programming tools such as Scratch to build windowed scenes, especially when building large-scale world scenes, makes it difficult to quickly build windowed scenes, thus reducing programming efficiency.
[0060] This disclosure provides an exemplary embodiment of a virtual scene building method and a graphical programming method, thereby enabling the rapid construction of different window scenes and improving programming efficiency. It should be understood that the method of this exemplary embodiment can be executed by an electronic device or by a chip applied to an electronic device. This method can be applied to a visual programming client of an electronic device or to a visual programming webpage opened in a browser on an electronic device.
[0061] For example, the electronic device of the exemplary embodiments of this disclosure may be an electronic device with display function, and the electronic device may be a mobile phone, tablet computer, wearable device, in-vehicle device, laptop computer, ultra-mobile personal computer (UMPC), netbook, PDA, and wearable device based on augmented reality (AR) and / or virtual reality (VR) technology, etc.
[0062] For example, when an electronic device is a wearable device, the term "wearable device" can also refer to any device that uses wearable technology to intelligently design and develop everyday wearable items, such as glasses, gloves, watches, clothing, and shoes. Wearable devices are portable devices worn directly on the body or integrated into a user's clothing or accessories. Wearable devices are not merely hardware devices; they achieve powerful functions through software support, data interaction, and cloud interaction. Broadly defined, wearable smart devices include those with comprehensive functions, large sizes, and the ability to perform complete or partial functions without relying on a smartphone, such as smartwatches or smart glasses, as well as those focused on a specific application function that require interaction with other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.
[0063] The method of the exemplary embodiment of this disclosure can be implemented by a graphical editor. The graphical editor of the exemplary embodiment of this disclosure can be divided according to function and may include a window editing and running area, a character attribute configuration area, and a block editing and running area. These three areas can be located in the same interface or in different interfaces. For example, one or two areas can be hidden by tabs, or one or two areas can be displayed on other web pages by links.
[0064] Figure 1 An exemplary interface diagram of a graphical editor implementing the exemplary embodiments of the present disclosure is shown. Figure 1 As shown, the block editor 100 of this exemplary embodiment has a block editing interface and a map editing interface, which can be switched using tabs. For example, clicking the block editing tab 101 will enter the block editing interface, and clicking the map editing tab 102 will enter the map editing interface.
[0065] For example, the block editing interface is used to realize visual programming through block programming. The block editing interface may include a stage editing and running component 1011, a character attribute configuration component 1012, and a block programming component 1013.
[0066] like Figure 1 As shown, the stage editing and running component 1011 includes a map editing component 1011a and a viewport 1011b. When running programming blocks, rendered content based on the programming blocks can be played in the viewport 1011b. The map editing component 1011a can be located around the viewport 1011b to edit the scene (or stage) within the viewport, enabling rapid construction of virtual scenes. The map editing interface can also enable rapid construction of virtual scenes, providing the same rapid construction functionality as the programming block component.
[0067] The aforementioned character attribute configuration component 1012 allows you to add the required characters, backgrounds, etc. within the window. It also supports configuring multiple actions for the character. Each action can include a single frame of image or an animation composed of multiple frames of images. The character attribute configuration component 1012 can also be used to adjust the background, character name, visibility, scaling ratio, position coordinates, rotation angle, and shape creation and editing.
[0068] The aforementioned block programming component 1013 allows for the addition of various types of blocks to a selected character, enabling block programming for that character. The types of blocks can include events, controls, actions, appearances, sounds, detections, operations, variables, and functions. The window can display a virtual scene (or stage) and run the abstract syntax tree of the program written using the block programming component, displaying the corresponding rendered content.
[0069] The virtual props constructed by the exemplary embodiment of this disclosure can be categorized by dimension as either two-dimensional or three-dimensional virtual props, and by type as either obstacle props or non-obstacle props within the viewport scene, such as various platforms, roadblocks, walls, and pipes. After these virtual props are constructed, they can include multiple construction objects. During the construction process, these multiple construction objects can be categorized into historical construction objects, currently construction objects, and unconstructed objects based on whether they have been constructed.
[0070] Figure 2 A flowchart illustrating a virtual prop creation method according to an exemplary embodiment of this disclosure is shown. Figure 2 As shown, the virtual scene construction method of the exemplary embodiments of this disclosure may include:
[0071] Step 201: In response to the template selection request, confirm the template. Templates can be displayed in the form of a template list, and the confirmed template can be one of the templates in the list.
[0072] To make efficient use of interface space, building templates can be hidden. For example, the list of building templates can be hidden within the map editing component or the map editing interface itself. Furthermore, in response to an operation to display the building list, the building template list can be expanded. In response to a request to select a building template, the desired building template can be selected from the list, thus confirming the building template.
[0073] like Figure 1 As shown, the map editing component 1011a of this exemplary embodiment can be located above the window 1011b, and it may include list expansion controls, clear controls, and canvas movement controls, etc. (the order of these controls can be arranged according to...) Figure 1(The layout is shown from left to right). When the list expansion control is triggered, a list of building templates can be displayed, from which the desired building template can be selected. If you need to clear virtual props or parts of virtual props, you can use the clear control to clear parts of virtual props that have already been built in the window. When you need to move the canvas, you can use the canvas movement control to move the canvas.
[0074] Figure 3 A schematic diagram of a map editing interface according to an exemplary embodiment of this disclosure is shown. Figure 3 As shown, the map editing interface 300 may include a canvas 301 and a map editing component 302 located on one side of the canvas. The map editing component 302 also includes list expansion controls, clear controls, and canvas movement controls (e.g., distributed in a top-to-bottom order), and their functions are described in detail below. Figure 1 The relevant description is provided. Additionally, exemplary embodiments of this disclosure can also arrange drawing tools in the map editing interface, allowing for the creation and editing of virtual props and selected building templates within the canvas.
[0075] Step 202: In response to the location operation of the current position within the building interface, detect whether the current position and the historical position of the historical building object within the window satisfy the fusion constraint condition. The building interface can be a window, a canvas, etc., and is not limited here. It should be understood that in the exemplary embodiments of this disclosure, both the current position and the historical position refer to the generation position or generation area of the building object for building virtual props; the current position is the position corresponding to the current building operation, while the historical position is the position corresponding to a completed building operation.
[0076] If the fusion constraint is met, it means that the current building object needs to be generated by referring to the historical building objects at the historical location. In this case, step 203 can be executed. If the fusion constraint is not met, the current building object can be rendered at the current location using the rendering parameters of the building template. In this case, step 204 can be executed.
[0077] In practical applications, the aforementioned fusion constraints may include distance constraints. For example, when the distance between the current location and the historical location is less than or equal to a preset distance, the historically constructed object at the historical location can be merged with the currently constructed object at the current location. Furthermore, the aforementioned fusion constraints also include orientation constraints, which include: the relative position between the current location and the historical location is a preset relative position. This preset relative position may include the current location being above, below, to the left of, or to the right of the historical location, etc.
[0078] For example, the construction interface is divided into grids, with each grid representing a construction position. The preset distance is set to the distance between the geometric centers of two construction positions as the length of one grid. The orientation constraint parameters can be a set, which may include relative position parameters of the current position being directly above the historical position, relative position parameters of the current position being directly below the historical position, relative position parameters of the current position being directly to the left of the historical position, or relative position parameters of the current position being directly to the right of the historical position.
[0079] Figure 4 This illustration shows a possible scenario where the historical and current positions of an exemplary embodiment of this disclosure satisfy fusion constraints. For example... Figure 4 As shown, the interface 400 contains a historical position A1 and six selectable current positions: first current position B1, second current position B2, third current position B3, fourth current position B4, fifth current position B5, and sixth current position B6. When the current position is any one of the first, second, third, or fourth current positions B1, it satisfies both the orientation and distance constraints. However, if the current position is any of the positions shown by other grids, it at least does not satisfy the distance constraints. For example, the fifth current position B5 is directly above the historical position A, satisfying the orientation constraint, but the geometric center distance between the fifth current position B5 and the historical position A is greater than the preset position, thus disqualifying it from the distance constraint. It is also possible to disqualify both the distance and orientation constraints simultaneously. For example, the sixth current position B6 is located to the lower left of the historical position A, disqualifying it from the orientation constraint, and the geometric center distance between the sixth current position B6 and the historical position A is greater than the length of one grid. Therefore, the sixth current position B6 does not satisfy the distance constraint between the sixth current position B6 and the historical position A.
[0080] When the current position and the historical position are the locations where the building object is generated, the geometric center of the generated position can coincide with the geometric center of the building object. The dimensions of the building object (such as length and width) can be preset or customized. When the current position and the historical position are the areas where the building object is generated, the building object can fill those areas.
[0081] Step 203: Based on the building template and historical building objects, display the current building object at the current position, which is integrated with the historical building objects.
[0082] If the current position and at least one historical position satisfy the fusion constraint, then when the current building object is displayed at the current position based on the building template and historical building objects, the historical building objects can be one or more.
[0083] For example, based on the pose parameters and corresponding relative position parameters of at least one historical built object, theoretical rendering parameters that are merged with the historical built objects are obtained from the rendering parameters of the building template. Then, based on the theoretical rendering parameters corresponding to at least one historical built object, the current built object is displayed at the current position. Here, the relative position parameters include the relative position parameters between the historical position and the current position.
[0084] As can be seen, for each historical building object, based on its actual pose parameters and corresponding relative position parameters, the target part in the building template that will be integrated with the historical building object is determined. Then, the rendering parameters of the target part are obtained from the rendering parameters of the building template, and the theoretical rendering parameters are determined based on the rendering parameters of the target part. In other words, the theoretical rendering parameters can be considered as the rendering parameters of the region in the building template that matches the part of the historical building object closest to the current position, which can ensure good integration between the current building object and the historical building object.
[0085] Figure 5 The diagram illustrates the current and historical construction objects in the construction interface, using a turf plot template as an example. Figure 5 As shown, in the interface 500, assuming that the current position and the historical position meet the fusion constraint conditions, the relative position parameter corresponding to the historical position can describe that the current position is directly below the historical position, and the posture parameter of the historical virtual plot 501 displayed in the historical position can describe that the grass of the historical virtual plot 501 is on top and the plot is below.
[0086] Based on this, such as Figure 5 As shown, based on the relative position parameters and pose of the historical virtual plot 501, the target area in the grassy plot template that merges with the historical virtual plot 501 can be determined as the plot area in the grassy plot template. Therefore, this plot area can be used as the target area. The rendering parameters of this plot area can be obtained from the rendering parameters of the template, and the theoretical rendering parameters can be determined based on the rendering parameters of this plot area. Simultaneously, the current virtual plot 502 rendered at the current position based on the theoretical rendering parameters can completely fill the grid at the current position, or it can partially fill it, depending on the actual design.
[0087] Step 204: Generate the current building object at the current position based on the building template. This current building object is independent of the historical building objects. In other words, if the current position and the historical position do not meet the fusion constraint, the rendering parameters of the building template can be used as the rendering parameters of the current building object, and the current building object can be displayed at the current position, so that the current building object does not need to be merged with the historical building object.
[0088] As can be seen, the method of the exemplary embodiment of this disclosure can perform positioning operations on the current position in the window after selecting the building template. The user does not need to perform any additional operations. Under the condition that the current position and the historical position in the window meet the fusion constraint conditions, the current building object is adaptively displayed and merged with the historical building object. This allows for the rapid drawing of various virtual props, enriches the programming scene of graphical programming, and improves programming efficiency.
[0089] As one possible implementation, the historical build objects and the current build objects in this exemplary embodiment of the present disclosure may correspond to the same build template, or they may correspond to different build templates. That is to say, it means that the same build template is used when building the historical build objects and the current build objects.
[0090] If the building template is the smallest unit of a virtual prop, the posture parameters of the historical building object and the current building object are matched before and after merging. In this case, the posture of the current building object, that is, the posture of the historical building object, is not affected by the posture of the current building object. For example, the building template can be stone, land, brick, etc. Figure 6A This diagram illustrates a historical construction object in the construction interface, using a turf plot template as an example. Figure 6A As shown, in the historical position of the building interface 600, there is a historical building object 601, which is a plot of land with grass, and the grass is located on top of the plot. Figure 6B This diagram illustrates the current and historical built objects in the building interface, using a grassy plot as an example. Figure 6B As shown, the historical and current locations displayed on the construction interface 600 meet the fusion constraints. The historical location displays the historical construction object 601, and the current location displays the current construction object 602. Both historical construction object 601 and current construction object 602 are plots of land with grass. (Comparison) Figure 6A and Figure 6B It can be seen that the appearance of the grassy plots displayed in the historical location has not changed.
[0091] If the template is a part of the smallest unit of a virtual prop, after the current object is merged with the historical objects, their posture parameters are matched. This matching can be identical, or it can be a match that conforms to natural laws or the characteristics of the final prop. In this case, if the posture of the historical object before and after displaying the current object is mismatched, the posture of the historical object may be affected by the current object. Therefore, after displaying the current object, the posture parameters of the historical object will be adaptively adjusted based on the current object to ensure that the constructed virtual prop is more natural and realistic. These templates can be pipe segments, parts of trees, etc.
[0092] For example, when the template is a part of the smallest unit of a virtual prop, the posture parameters of each historical building object can be the updated posture parameters. The method of the exemplary embodiment of this disclosure may further include: determining posture control parameters based on the relative position parameters corresponding to each historical building object, determining target posture parameters based on the posture control parameters corresponding to at least one historical building object, and updating the posture parameters of the historical building objects and the posture parameters of the building template based on the target posture parameters, so that the posture of the updated historical building objects matches the posture of the current building object.
[0093] Figure 7A This shows a schematic diagram of a historical construction object in the construction interface, using a pipe template as an example. Figure 7A As shown, a historical virtual pipe 701 is displayed at the historical position of the construction interface 700, and the historical virtual pipe 701 extends upward. Figure 7B This diagram illustrates the current and historical construction objects in the construction interface, using a pipe template as an example. Figure 7B As shown, the historical and current positions displayed on the interface 700 meet the fusion constraints. The historical position displays the historical virtual pipe 701, and the current position displays the current virtual pipe 702. The historical virtual pipe 701 and the current virtual pipe are connected as one. (Comparison) Figure 7A and Figure 7B It can be seen that the extension direction of the historical virtual pipe 701 displayed at the historical position changes from upward to rightward, while the extension direction of the current virtual pipe 702 is also rightward. Therefore, the orientation of both the historical virtual pipe 701 and the current virtual pipe 702 is affected by the relative position parameters between the historical and current positions, ensuring that the orientations of the historical virtual pipe 701 and the current virtual pipe 702 are the same.
[0094] For example, the aforementioned current position positioning operation may at least include: a confirmation operation of the current position, such as determining the current position through clicking, touching, or other means. This current position positioning operation may also include: a rendering pose operation of the currently constructed object, such as defining the pose of the currently constructed object through the swiping direction. That is, taking a virtual pipeline as an example, such as... Figure 7B As shown, the pose of the current virtual pipe 701 can be controlled by the rendering pose operation at the current position. For example, the extension direction of the current virtual pipe can be set by sliding the direction, thereby determining the pose of the current virtual pipe.
[0095] For example, when displaying the current built object merged with the historical built object at the current position based on the building template, the exemplary embodiment of this disclosure can also adaptively adjust the shape parameters of the parts of the current built object and the historical built object that need to be merged, so as to ensure that the fusion effect of the current built object and the historical built object is better and the scene is more realistic.
[0096] For example, the rendering parameters and corresponding theoretical rendering parameters of each historical built object can be adjusted, and the historical built object can be updated based on the rendering parameters of each historical built object so that the historical built object can be integrated with the current built object.
[0097] For example, when adjusting the rendering parameters of each historical built object and its corresponding theoretical rendering parameters, it is possible to coordinate the rendering parameters of the historical built object and its corresponding theoretical rendering parameters to ensure that after updating the historical built object based on the rendering parameters of each historical built object, it can adapt to the shape of the currently displayed virtual object.
[0098] Figure 8A This shows another schematic diagram of a historical construction object in the construction interface, using a turf plot template as an example. (See diagram below.) Figure 8A As shown, historical virtual plot 801 is displayed in the historical location of the interface 800. Figure 8B This illustrates another diagram of the current and historical built objects in the building interface, using a grassy plot as an example. Figure 8B As shown, the current virtual plot is displayed at its current location on the setup interface 800. Whether it's the historical virtual plot 801 or the current virtual plot 802, the plot template used can be referenced from the historical virtual plot 801. (Comparison) Figure 8A and Figure 8B As can be seen, before and after displaying the current virtual plot 802 at the current location, the shape of the grass on the historical virtual plot and the shape of the plot under the grass have changed to adapt to the shape of the grass on the current virtual plot and the plot under the grass, ensuring that the fusion result of the historical virtual plot 801 and the current virtual plot 802 has good overall consistency and is more natural.
[0099] In one alternative approach, if the current position and multiple historical positions satisfy fusion constraints, when displaying the current constructed object at the current position based on the theoretical rendering parameters corresponding to at least one of the historical constructed objects, a first actual rendering parameter can be determined based on the theoretical rendering parameters corresponding to multiple historical constructed objects. Then, the current constructed object is displayed at the current position based on the first actual rendering parameter. In this case, since the current position and multiple historical positions satisfy fusion constraints, the first actual rendering parameter can be set to the rendering parameter formed by the intersection of the theoretical rendering parameters corresponding to multiple historical constructed objects. This ensures that the current constructed object displayed at the current position based on the first actual rendering parameter can be fused with all the multiple historical constructed objects.
[0100] For example, after determining the first actual rendering parameters in the exemplary embodiment of this disclosure, if the rendering parameters of the historically constructed object do not match the first actual rendering parameters, it indicates that the current constructed object and the historically constructed object have poor fusion after the current constructed object is displayed at the current position. Based on this, a second actual rendering parameter matching the first actual rendering parameter can be obtained from the rendering parameters of the historically constructed object based on the first actual rendering parameter, thereby filtering out the rendering parameters of parts that cannot be fused with the current constructed object from the rendering parameters of the historically constructed object. Then, the historically constructed object is updated based on the second actual rendering parameter, thereby ensuring that the fusion between the historically constructed object and the current constructed object is relatively high.
[0101] Figure 9A This diagram illustrates another instance of a historical construction object in the construction interface, using a turf plot template as an example. As shown in 9A, the construction interface 900 displays historical virtual plots using the plot template shown in Figure 8 (referencing historical virtual plot 801). The historical virtual plots 901 are designated as the first historical virtual plot 901, the second historical virtual plot 902, the third historical virtual plot 903, and the fourth historical virtual plot 904. These four plots are arranged in a cross shape around the current location.
[0102] Figure 9B This illustrates another diagram of the historical and current built objects in the building interface, using a turf plot template as an example. Figure 9B As shown, the current virtual plot 905 is displayed at the current position of the construction interface 900. The first historical virtual plot 901 is located to the left of the current virtual plot 905, the second historical virtual plot 902 is located directly above the current virtual plot 905, the third historical virtual plot 903 is located to the right of the current virtual plot 905, and the fourth historical virtual plot 904 is located directly below the current virtual plot 905.
[0103] contrast Figure 9Aand Figure 9B It can be observed that the first historical virtual plot 901, the second historical virtual plot 902, the third historical virtual plot 903, and the fourth historical virtual plot 904 have all changed in at least their shape. Furthermore, the original grass on the fourth historical virtual plot 904 has disappeared, and the current virtual plot 905 displayed at the current location is actually a plot without grass.
[0104] For the first historical virtual plot 901 and the third historical virtual plot 903, if matching with both is required, the plot and turf of the current virtual plot 905 can be retained. For the second historical virtual plot 902, the parts of the current virtual plot 905 excluding the turf can be retained. For the fourth historical virtual plot, the plot and turf of the current virtual plot 905 can be retained. By intersecting the rendering parameters of the current virtual plots corresponding to the first historical virtual plot 901, the second historical virtual plot 902, the third historical virtual plot 903, and the fourth historical virtual plot 904, the final rendering parameters of the current virtual plot can be determined as the virtual parameters of the plots excluding the turf. These virtual parameters can be used as the rendering parameters of the current virtual plot 905 displayed at the current location.
[0105] Meanwhile, through comparison, it was found that Figure 9A The fourth historical virtual plot 904 shown is a plot with grass. Figure 9B The current virtual plot 905 shown is a plot other than grass, and it is located above the grass of the fourth historical virtual plot 904. Therefore, the current virtual plot 905 and the fourth historical virtual plot 904 do not blend well. The rendering parameters of the plot without grass can be obtained from the rendering parameters of the fourth historical virtual plot 904. The rendering parameters of the plot without grass can be used to update the fourth historical virtual plot 904, so that the fourth historical virtual plot 904 can be transformed from a plot with grass to a plot without grass.
[0106] Figure 10 A schematic flowchart illustrating a graphical programming method also provided in an exemplary embodiment of this disclosure is shown. Figure 10 As shown, the graphical programming method of this exemplary embodiment may include:
[0107] Step 1001: Determine the target character within the viewport scene, which has virtual props constructed using the method described in the exemplary embodiments of this disclosure. It should be understood that the target character in the exemplary embodiments of this disclosure can be determined by selection, drawing, editing, or by block programming.
[0108] Step 1002: In response to the selection operation of the moving block, add the moving block corresponding to the target character in the visual programming interface. At this time, when the moving block is run, the abstract syntax tree corresponding to the moving block can control the determined target character to move along the direction designed by the moving block.
[0109] Step 1003: A collision between a moving block and a virtual prop is detected during the movement of the target character. Based on the collision location, movement control parameters are determined. These parameters control the movement of the target character when it collides with the virtual prop. The movement parameters at the collision location can include those at the point of collision. These movement control parameters can be generated in the background when the target character collides with the virtual prop, or they can be specified through block programming.
[0110] For example, in response to the selection of an action switching block, an action switching block corresponding to the target character can be added to the visual programming interface. This action switching block is used to define the movement control parameters corresponding to the target character. Here, the movement control parameters can control the target character to interrupt its movement operation when it collides with a virtual prop, or control the target character to switch its movement action when it collides with a virtual prop, and even set the speed of the action. It is evident that this exemplary embodiment of the present disclosure can adaptively build virtual props through a simple model selection method and synchronize the data of the virtual props to the stage where the programming results are executed, thereby greatly improving the efficiency of block programming.
[0111] The target character in this exemplary embodiment can have multiple motion images, which can be determined by responding to a selection operation of the target character. Furthermore, the method in this exemplary embodiment can also update the action configuration list of the action switching block based on the multiple motion images. The action configuration list includes multiple action identifiers corresponding to the multiple motion images. Based on this, in response to a selection operation of a target action identifier in the action configuration list, movement control parameters are determined based on the motion image corresponding to the target action identifier.
[0112] For example, the aforementioned various action images can be static images or include animation modes. For instance, an action image may include an action composed of multiple frames, such as running, walking, or jumping. An action configuration list is established for the various action images, allowing the use of action switching blocks to select an action from the list and switch actions. This can even switch to a specific frame within an action image to achieve more complex visual effects. Simultaneously, the animation playback speed of the action image can be set, and animation playback parameters can be configured for the target character when moving in the selected action. For example, the movement control list in the exemplary embodiment of this disclosure may include character posture parameters and animation playback speed.
[0113] This exemplary embodiment can determine multiple positions of a target character during movement based on the abstract syntax tree corresponding to the moving blocks. It can also determine which position of the target character collides with a virtual prop during movement using a collision algorithm. If a collision occurs, movement control parameters are determined based on the collision position. These parameters control the movement of the target character when it collides with the virtual prop. These movement control parameters can be used to interrupt the movement of the target character when it collides with the virtual prop, or to switch actions when it collides with the virtual prop. Switching actions can include changing the movement direction or directly using a jump action to pass through the virtual prop. Therefore, the virtual props in this exemplary embodiment act as obstacles within the viewport scene, enriching the programming scenario of graphical programming and improving programming efficiency.
[0114] As one possible implementation, when the target character of this exemplary embodiment is determined through selection, drawing, editing, etc., materials can be selected from the material library or inventory through the character attribute configuration component. Materials can also be uploaded, randomly given, selected from the inventory, or drawn. Simultaneously, the selected materials can be edited, allowing for personalized display of the target character.
[0115] Figure 11A A partial schematic diagram of a block editing interface according to an exemplary embodiment of this disclosure is shown. Figure 11A As shown, the character attribute configuration component 1101 included in the block editing interface 1100 may contain a target addition control 1101a and an attribute editing control 1101b. The target addition control 1101a can be used to add a target character and display the virtual character 1102a in the window 1102. The attribute editing control 1101b can be used to edit the original size, proportion, whether it is hidden, whether it is locked, rotation angle, etc. of the selected target character.
[0116] Figure 11BA partial schematic diagram of a block editing interface in an exemplary embodiment of this disclosure, showing the state in which the target addition control is triggered, is illustrated. Figure 11B As shown, when the target addition control 1101a is triggered in the block editing interface 1100, a target addition method list 1101a-1 can be displayed. This target addition method list 1101a-1 provides three methods: adding target characters from the material library, randomly adding target characters, and uploading materials. However, other methods can also be used to add target characters, for example: through... Figure 1 The backpack shown displays the saved target character. To delete a target character, select it; a delete button will appear on the target character's thumbnail within the attribute editing control 1101b. This delete button will remove the target character from the viewport 1102.
[0117] from Figure 11B As can be seen, when the target addition control 1101a is triggered, the target addition method list 1101a-1 includes three methods: material library, random, and uploaded material. The material library contains a large number of various characters, icons, and other prop materials, from which the desired target character can be selected for addition. When clicking random, the system default or preset target character can be retrieved. Clicking upload material allows you to select a suitable image from your local storage and upload it.
[0118] like Figure 11A As shown, the attribute editing control 1101b of this exemplary embodiment includes not only a basic attribute control for the character, but also an animation addition control 1101c. When a target character is added via the target addition control 1101a, various motion images of the target character configuration saved in the system can be automatically retrieved and displayed. When a target character is deleted, the various motion images corresponding to the target character will also disappear.
[0119] If the target character does not have an animated image or does not have an animated image that meets the user's needs, a new motion image can be configured for the target character using the animation addition control 1101c. For example, if the target character's name is Xiaofen, after it is added, three actions—standing, running, and jumping—will be displayed below the animation addition control 1101c. More motion images can also be added for Xiaofen using the animation addition control 1101c.
[0120] Figure 11C A partial schematic diagram of a block editing interface in an animated state, as shown in an exemplary embodiment of this disclosure, is displayed. Figure 11C As shown, when the animation adding control 1101c is triggered, the animation adding method list 1101a-2 can be displayed. The animation adding method list 1101a-2 includes three methods: material library, drawing, and uploading materials.
[0121] When selecting a drawing method, you can jump to the animation drawing interface. This interface provides a large number of drawing tools, such as graphic tools, text tools, and color tools, for users to create animations on the drawing board. Users can also add target characters to the drawing board using the "Add" button, choosing from three methods: resource library, drawing, and uploading resources. These target characters can then be edited. When the motion image is animated, the target character's motion image can be drawn frame by frame in the drawing interface.
[0122] like Figure 11C As shown, when the motion image below the animation addition method list 1101a-2 is selected, the corresponding motion image can be deleted by using the delete button on the motion image, or the motion drawing interface can be entered by using the edit button on the motion image.
[0123] Figure 12 A schematic diagram of the block programming result of an exemplary embodiment of the present disclosure is shown. Figures 13A-13E The operation was shown Figure 12 The diagram shows the changes in the view content of the block programming result. (Example:) Figure 12 and Figures 13A-13E As shown, window 1300 displays the target character 1301 and the uneven terrain 1302.
[0124] In the initial stage, such as Figures 13A-13C As shown, when the target character 1301 collides with a higher part of the land plot 1302 while moving to the right, if an upward indicator appears (such as swiping upwards or pressing the upward arrow), the character's motion image can be switched to a character-jump animation, and the animation playback speed can be set to 1, thus presenting the following... Figure 13B The state shown, and finally jumps to Figure 13C The higher part of plot 1302 shown.
[0125] like Figures 13A-13D As shown, when the target character 1301 collides with the higher part of the plot 1302 while moving to the right, if a right-direction instruction appears (such as sliding to the right or pressing the right arrow), the character's motion image can be switched to a character-running animation, and the animation playback speed can be set to 20, thereby directly controlling the target character to jump to the higher part of the plot 1302 and move to the right with a running animation.
[0126] like Figure 13A and Figure 13EAs shown, when the target character 1301 collides with a higher part of tile 1302 while moving to the right, if a left-direction instruction appears (such as swiping left or pressing the left arrow), the character's motion image can be switched to a running animation, and the animation playback speed can be set to 20. This directly controls the target character to jump to a higher part of tile 1302 and move to the left with a running animation. Figure 13A As shown, when the target character 1301 collides with the higher part of the plot 1302 while moving to the right, and no instruction operation occurs, the character's motion image can be switched to a standing animation, and the animation playback speed is set to 20.
[0127] One or more technical solutions provided in this disclosure can respond to the current position positioning operation within the window. When the fusion constraint condition is met between the current position and the historical position to which the historically built object belongs within the window, the current built object, which is fused with the historical built object, is displayed at the current position based on the building template and the historical built object. Therefore, the method of the exemplary embodiment of this disclosure can respond to the current position positioning operation within the window after selecting the building template. The user does not need to perform any additional operations. Under the condition that the fusion constraint condition is met between the current position and the historical position within the window, the current built object, which is fused with the historical built object, can be adaptively displayed. This allows for the rapid drawing of various virtual props, enriching the programming scene of graphical programming and improving programming efficiency.
[0128] The foregoing mainly describes the solutions provided by the embodiments of this disclosure. It is understood that, in order to achieve the above functions, the electronic device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein, this disclosure can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.
[0129] This disclosure embodiment can divide the electronic device into functional units according to the above method example. For example, each function can be divided into a separate functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this disclosure embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0130] By dividing each functional module according to its corresponding function, an exemplary embodiment of this disclosure provides a virtual prop building device, which can be an electronic device or a chip applied to an electronic device. Figure 14 A schematic block diagram of the functional modules of a virtual prop building apparatus according to an exemplary embodiment of the present disclosure is shown. Figure 14 As shown, the virtual prop building device 1400 includes:
[0131] The determining module 1401 is configured to determine a building template in response to a template selection request, wherein the scenario is built by the method described in the exemplary embodiment of this disclosure;
[0132] The display module 1402 is used to respond to the current position positioning operation in the building interface. If the current position and the historical position to which the historical building object belongs in the building interface meet the fusion constraint conditions, the current building object fused with the historical building object is displayed at the current position based on the building template and the historical building object.
[0133] As one possible implementation, the display module 1402 is also used to display the building template list in response to the operation of expanding the building template list.
[0134] As one possible implementation, the historical building object and the current building object correspond to the same building template;
[0135] If the building template is the smallest unit of the virtual prop, the posture parameters of the historical building object before and after merging with the current building object are matched;
[0136] If the construction template is a part of the smallest unit of the virtual prop, after the current construction object and the historical construction object are merged, the posture parameters of the current construction object and the historical construction object are matched.
[0137] As one possible implementation, the posture parameters of each historical building object are updated posture parameters. The determining module 1401 is further configured to determine posture control parameters based on the relative position parameters corresponding to each historical building object, determine target posture parameters based on the posture control parameters corresponding to at least one historical building object, and update the posture parameters of at least the historical building object and the posture parameters of the building template based on the target posture parameters, so that the updated posture of the historical building object matches the posture of the current building object. The relative position parameters include the relative position parameters between the historical position and the current position.
[0138] As one possible implementation, if the current position and at least one of the historical positions satisfy the fusion constraint, the display module 1402 is used to obtain the theoretical rendering parameters for fusion with the historical construction object from the rendering parameters of the construction template based on the posture parameters and corresponding relative position parameters of each historical construction object, and display the current construction object at the current position based on the theoretical rendering parameters corresponding to at least one of the historical construction objects, wherein the relative position parameters include the relative position parameters between the historical position and the current position.
[0139] As one possible implementation, the display module 1402 is used to determine the target part in the construction template that is merged with the historical construction object based on the true posture parameters of each historical construction object and the corresponding relative position parameters, obtain the rendering parameters of the target part from the rendering parameters of the construction template, and determine the theoretical rendering parameters based on the rendering parameters of the target part.
[0140] As a possible implementation, if the current position and multiple historical positions satisfy the fusion constraint conditions, the display module 1402 is further configured to determine a first actual rendering parameter based on the theoretical rendering parameters corresponding to the multiple historical built objects, and display the current built object at the current position based on the first actual rendering parameter.
[0141] As one possible implementation, the first actual rendering parameters include: rendering parameters formed by the intersection of the theoretical rendering parameters corresponding to multiple historical building objects, wherein the theoretical rendering parameters include rendering parameters of the region in the building template that matches the part of the historical building object near the current position.
[0142] As one possible implementation, the display module 1402 is further configured to, if the rendering parameters of the historically constructed object do not match the first actual rendering parameters, obtain a second actual rendering parameter that matches the first actual rendering parameters from the rendering parameters of the historically constructed object, and update the historically constructed object based on the second actual rendering parameters.
[0143] As one possible implementation, the display module 1402 is also used to adjust the rendering parameters of each historical building object and the corresponding theoretical rendering parameters, and update the historical building object based on the rendering parameters of each historical building object, so that the corresponding historical building object is merged with the current building object.
[0144] As one possible implementation, the display module 1402 is further configured to display the current construction object at the current position based on the construction template if the current position and the historical position do not meet the fusion constraint conditions. The current construction object and the historical construction object are independent of each other. The current position positioning operation includes: a confirmation operation of the current position and a rendering posture operation of the current construction object.
[0145] As one possible implementation, the fusion constraint includes at least a distance constraint, wherein the distance between the current position and the historical position is less than or equal to a preset distance;
[0146] The fusion constraint also includes an orientation constraint, which includes: the relative position between the current position and the historical position is a preset relative position.
[0147] In the case of dividing each functional module according to its corresponding function, an exemplary embodiment of this disclosure provides a graphical programming device, which can be an electronic device or a chip applied to an electronic device. Figure 15 A schematic block diagram of the functional modules of a graphical programming apparatus according to an exemplary embodiment of the present disclosure is shown. Figure 15 As shown, the graphical programming device 1500 includes:
[0148] The determining module 1501 is used to determine the target character within the viewport scene, wherein the viewport scene has virtual props constructed by the method described in the exemplary embodiments of this disclosure;
[0149] Add template 1502 to respond to the selection operation of the moving block, and add the moving block corresponding to the target role in the visual programming interface;
[0150] The determining module 1501 is further configured to, if it is detected that the moving block collides with the virtual prop during the process of controlling the target character to move, determine the movement control parameters based on the position where the target character collides with the virtual prop, and the movement control parameters are used to control the movement parameters when the target character collides with the virtual prop.
[0151] As one possible implementation, the adding module 1502 is used to add an action switching block corresponding to the target character in response to the selection operation of the action switching block. The action switching block is used to define the movement control parameters corresponding to the target character.
[0152] As one possible implementation, the target character corresponds to multiple action images, and the adding module 1502 is further configured to update the action configuration list of the action switching block based on the multiple action images. The action configuration list includes multiple action identifiers corresponding to the multiple action images. In response to the selection operation of the target action identifier in the action configuration list, the movement control parameters of the action image corresponding to the target action identifier are determined.
[0153] Figure 16 A schematic block diagram of a chip according to an exemplary embodiment of the present disclosure is shown. Figure 16 As shown, the chip 1600 includes one or more processors 1601 and a communication interface 1602. The communication interface 1602 can support the electronic device to perform the data transmission and reception steps of the method of the exemplary embodiments of this disclosure, and the processor 1601 can support the electronic device to perform the data processing steps of the method of the exemplary embodiments of this disclosure.
[0154] Optional, such as Figure 16 As shown, the chip 1600 also includes a memory 1603, which may include read-only memory and random access memory, and provides operation instructions and data to the processor. A portion of the memory may also include non-volatile random access memory (NVRAM).
[0155] In some implementations, such as Figure 16 As shown, processor 1601 executes corresponding operations by calling operation instructions stored in memory (which may be stored in the operating system). Processor 1601 controls the processing operations of any terminal device; processor can also be called a central processing unit (CPU). Memory 1603 may include read-only memory and random access memory, and provides instructions and data to processor 1601. A portion of memory 1603 may also include NVRAM. For example, in applications, memory, communication interfaces, and other components are coupled together via a bus system, which may include, in addition to a data bus, a power bus, a control bus, and a status signal bus, etc. However, for clarity, in... Figure 16 The general designated all buses as Bus System 1604.
[0156] The methods disclosed in the embodiments of this disclosure can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above methods can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an ASIC, a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this disclosure. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this disclosure can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above methods.
[0157] Exemplary embodiments of this disclosure also provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to cause the electronic device to perform a method according to an embodiment of this disclosure.
[0158] Exemplary embodiments of this disclosure also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to embodiments of this disclosure.
[0159] Exemplary embodiments of this disclosure also provide a computer program product, including a computer program, wherein, when executed by a processor of a computer, the computer program is used to cause the computer to perform a method according to an embodiment of this disclosure.
[0160] refer to Figure 17The present invention describes a structural block diagram of an electronic device 1700 that can serve as a server or client of the present disclosure, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0161] like Figure 17 As shown, the electronic device 1700 includes a computing unit 1701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1702 or a computer program loaded from a storage unit 1708 into a random access memory (RAM) 1703. The RAM 1703 may also store various programs and data required for the operation of the device 1700. The computing unit 1701, ROM 1702, and RAM 1703 are interconnected via a bus 1704. An input / output (I / O) interface 1705 is also connected to the bus 1704.
[0162] like Figure 17 As shown, multiple components in electronic device 1700 are connected to I / O interface 1705, including: input unit 1706, output unit 1707, storage unit 1708, and communication unit 1709. Input unit 1706 can be any type of device capable of inputting information to electronic device 1700. Input unit 1706 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of the electronic device. Output unit 1707 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 1708 may include, but is not limited to, disks and optical discs. Communication unit 1709 allows electronic device 1700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth™ devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.
[0163] like Figure 17As shown, computing unit 1701 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of computing unit 1701 include, but are not limited to, central processing unit (CPU), graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Computing unit 1701 performs the various methods and processes described above. For example, in some embodiments, the methods of exemplary embodiments of this disclosure can be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 1708. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 1700 via ROM 1702 and / or communication unit 1709. In some embodiments, computing unit 1701 can be configured to perform the methods of exemplary embodiments of this disclosure by any other suitable means (e.g., by means of firmware).
[0164] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0165] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0166] As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0167] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0168] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0169] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.
[0170] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this disclosure are performed entirely or partially. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a terminal, a user equipment, or other programmable device. The computer program or instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; it can also be an optical medium, such as a digital video disc (DVD); or it can be a semiconductor medium, such as a solid-state drive (SSD).
[0171] Although this disclosure has been described in conjunction with specific features and embodiments, it will be apparent that various modifications and combinations can be made therein without departing from the spirit and scope of this disclosure. Accordingly, this specification and drawings are merely exemplary illustrations of the disclosure as defined by the appended claims and are to be considered as covering any and all modifications, variations, combinations, or equivalents within the scope of this disclosure. It is obvious that those skilled in the art can make various alterations and modifications to this disclosure without departing from its spirit and scope. Thus, this disclosure is also intended to include any such modifications and modifications that fall within the scope of the claims of this disclosure and their equivalents.
Claims
1. A virtual prop building method, characterized by, The virtual prop includes a plurality of building objects, and the method includes: In response to a selection request of a building template, determining the building template; In response to a current position positioning operation in the building interface, if the current position and a historical position to which a historical building object in the building interface satisfies a fusion constraint condition, displaying a current building object fused with the historical building object at the current position based on the building template and the historical building object; The historical building object and the current building object correspond to the same building template; if the building template is the smallest unit of the virtual prop, the posture parameters of the historical building object and the current building object match before and after fusion; if the building template is part of the smallest unit of the virtual prop, the posture parameters of the current building object and the historical building object match after fusion.
2. The method of claim 1, wherein, The building template is one of a building template list, and the method further includes: In response to an operation of expanding the building template list, displaying the building template list.
3. The method of claim 1, wherein, The posture parameter of each historical building object is an updated posture parameter, and the method further includes: Determining a posture control parameter based on a relative position parameter corresponding to each historical building object, the relative position parameter including a relative position parameter of the historical position and the current position; Determining a target posture parameter based on the posture control parameter corresponding to at least one historical building object; Updating at least the posture parameter of the historical building object and the posture parameter of the building template based on the target posture parameter, so that the updated posture of the historical building object matches the posture of the current building object.
4. The method of claim 1, wherein, If the current position and at least one historical position satisfy the fusion constraint condition, the displaying of the current building object fused with the historical building object at the current position based on the building template and the historical building object includes: Obtaining a theoretical rendering parameter fused with the historical building object from a rendering parameter of the building template based on the posture parameter of each historical building object and a corresponding relative position parameter, the relative position parameter including a relative position parameter of the historical position and the current position; Displaying the current building object at the current position based on the theoretical rendering parameter corresponding to at least one historical building object.
5. The method of claim 4, wherein, The obtaining of the theoretical rendering parameter fused with the historical building object from the rendering parameter of the building template based on the posture parameter of each historical building object and a corresponding relative position parameter includes: Determining a target part in the building template fused with the historical building object based on the true posture parameter of each historical building object and the corresponding relative position parameter; Obtaining a rendering parameter of the target part from the rendering parameter of the building template; Determining the theoretical rendering parameter based on the rendering parameter of the target part.
6. The method of claim 4, wherein, If the current position and a plurality of historical positions satisfy the fusion constraint condition, the displaying of the current building object at the current position based on the theoretical rendering parameter corresponding to at least one historical building object includes: determining a first actual rendering parameter based on corresponding theoretical rendering parameters of a plurality of the historical build objects; displaying the current build object at the current position based on the first actual rendering parameter.
7. The method of claim 6, wherein, The first actual rendering parameter comprises a rendering parameter formed by an intersection of the theoretical rendering parameters of the plurality of the historical build objects, the theoretical rendering parameters comprising rendering parameters of areas in the build template that match parts of the historical build objects close to the current position.
8. The method of claim 6, wherein, The method further comprises: if the rendering parameter of the historical build object does not match the first actual rendering parameter, obtaining a second actual rendering parameter that matches the first actual rendering parameter from the rendering parameter of the historical build object based on the first actual rendering parameter; updating the historical build object based on the second actual rendering parameter.
9. The method of claim 4, wherein, The displaying of the current build object at the current position based on the build template and the historical build object further comprises: adjusting the rendering parameter of each of the historical build objects and the corresponding theoretical rendering parameter; updating the historical build object based on the rendering parameter of each of the historical build objects so that the corresponding historical build object is fused with the current build object.
10. The method according to any one of claims 1 to 9, characterized in that, The method further comprises: if the fusion constraint condition is not met between the current position and the historical position, displaying the current build object at the current position based on the build template, the current build object being independent of the historical build object; The current position positioning operation comprises a current position confirmation operation and a rendering pose operation of the current build object.
11. The method according to any one of claims 1 to 9, characterized in that, The fusion constraint condition at least comprises a distance constraint condition, the distance between the current position and the historical position being less than or equal to a preset distance; The fusion constraint condition further comprises an orientation constraint condition, the orientation constraint condition comprising a preset relative position of the current position and the historical position.
12. A graphical programming method, characterized in that, The method further comprises: determining a target role in a window scene, the window scene having a virtual prop built by the method of any one of claims 1-11; in response to a selection operation of a moving block, adding a moving block corresponding to the target role to a visual programming interface; if it is detected that the moving block collides with the virtual prop in the process of controlling the movement of the target role, determining a movement control parameter based on the position at which the target role collides with the virtual prop, the movement control parameter being used to control the movement parameter of the target role when the target role collides with the virtual prop.
13. The method of claim 12, wherein, The determining of the movement control parameter based on the position at which the target role collides with the virtual prop comprises: in response to a selection operation of an action switching block, adding an action switching block corresponding to the target role to the visual programming interface, the action switching block being used to define the movement control parameter corresponding to the target role.
14. The method of claim 13, wherein, The target role corresponds to a plurality of action images, and the method further comprises: updating an action configuration list of the action switching block based on a plurality of the action images, the action configuration list comprising a plurality of action identifiers corresponding to a plurality of action images; In response to a selection operation of a target action identifier in the action configuration list, a movement control parameter of an action image corresponding to the target action identifier is determined.
15. A virtual prop building device, comprising: The method comprises the steps of: A determination module is configured to determine a build template in response to a selection request of the build template. A display module is configured to, in response to a current position positioning operation in a build interface, display a current build object fused with a historical build object at a current position based on the build template and the historical build object, if the current position and a historical position to which the historical build object belongs in the build interface satisfy a fusion constraint condition. The historical build object and the current build object correspond to the same build template. If the build template is a minimum unit of the virtual prop, the pose parameters of the historical build object and the current build object before and after fusion match; if the build template is part of the minimum unit of the virtual prop, the pose parameters of the current build object and the historical build object match after fusion.
16. A graphical programming device, characterized by The method comprises the steps of: A determination module is configured to determine a target role in a window scene, the window scene having a virtual prop built by the method of any one of claims 1-11. An addition template is configured to add a movement block corresponding to the target role in a visual programming interface in response to a selection operation of the movement block. The determination module is further configured to, if it is detected that the movement block collides with the virtual prop during control of the movement of the target role, determine a movement control parameter based on a position at which the target role collides with the virtual prop, the movement control parameter being used to control the movement parameter of the target role when colliding with the virtual prop.
17. An electronic device, comprising: The method comprises the steps of: A processor; and A memory storing a program; The program comprises instructions which, when executed by the processor, cause the processor to perform the method according to any one of claims 1-14.
18. A non-transitory computer-readable storage medium, comprising: The non-transitory computer-readable storage medium stores computer instructions for causing the computer to perform the method according to any one of claims 1-14.
Citation Information
Patent Citations
Application interface design method and device, electronic equipment and storage medium
CN113626018A