Mapping of textures in three-dimensional scenes
By computing 3D support and rendering textures, the problems of low rendering quality and uneven rendering of overlapping curves in existing 3D drawing solutions are solved, high-quality 3D scene rendering is achieved, and the consumption of computing and storage resources is reduced.
Patent Information
- Application Number
- CN202411082858.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-08-11
- Filing Date
- 2024-08-08
- Publication Date
- 2025-02-18
AI Technical Summary
When rendering 3D curves in 3D scenes, the rendering quality is lower than that of 2D drawings, and the rendering results of overlapping 3D curves are uneven, affecting the visual effect.
By computeing 3D support pieces and rendering textures on these support pieces, ensuring texture uniformity and physicality, independent of the rendering order, reducing the consumption of computing resources and memory.
Improves rendering quality in 3D scenes, bringing it close to the details and uniformity of 2D drawings, reducing the use of computing resources and memory, stability and performance improvements.
Smart Images

Figure CN119478179A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer programs and systems, and more particularly, to a method, system and program for mapping textures on one or more points in a 3D scene. Background Art
[0002] Several systems and programs for design, engineering and manufacturing of objects are provided on the market. CAD (Computer-Aided Design) is an acronym for Computer-Aided Design, for example, it relates to software solutions for designing objects. CAE (Computer-Aided Engineering) is an acronym for Computer-Aided Engineering, for example, it relates to software solutions for simulating the physical behavior of future products. CAM (Computer-Aided Manufacturing) is an acronym for Computer-Aided Manufacturing, for example, it relates to software solutions for defining manufacturing processes and operations. In such computer-aided design systems, graphical user interfaces play an important role in technical efficiency. These technologies can be embedded in Product Lifecycle Management (PLM) systems. PLM refers to a business strategy under the concept of cross-extended enterprise, which helps companies share product data, apply common processes, and adopt company knowledge to develop the product from product concept to the end of the product life cycle. The PLM solution provided by Dassault Systèmes (using trademarks such as CATIA, ENOVIA and DELMIA) provides an engineering center (Engineering Hub) that integrates product engineering knowledge, a manufacturing center (Manufacturing Hub) that manages manufacturing engineering knowledge, and an enterprise center (Enterprise Hub) that integrates and connects enterprises to both engineering and manufacturing centers. These systems jointly deliver an open object model that links products, processes, and resources to achieve dynamic, knowledge-based product creation and decision support, which promotes the optimization of product definition, manufacturing preparation, production, and services.
[0003] Many technical fields employ 3D drawing; for example, graphic creation, CAD or product design. In these technical fields, one of the goals is to provide users with an experience that is closest to classic 2D sketching (e.g., using a pen on paper) in a virtual 3D space. To this end, one of the functionalities is to allow users to texture the 3D scene, i.e., to add a texture to the 3D scene (or 3D space). To this end, existing solutions usually include determining a 3D curve drawn by the user and adding the determined 3D curve to the 3D scene. However, these existing solutions for 3D drawing are insufficient.
[0004] In particular, the rendering quality of 3D curves in 3D scenes is worse than that of 2D drawings and has defects. It is worth noting that the superposition of two or more 3D curves is different from that in 2D drawings, especially when the 3D curves have an opacity lower than 100%. Technically, the order used for curve rendering depends on the visualization engine used or even on the optimization of the graphics card. In existing solutions, the order of rendering greatly affects the result. Therefore, the quality of the rendering result of overlapping 3D shapes cannot be ensured.
[0005] Reference now Figure 1 and Figure 2 A first example of rendering defects is shown showing a rendering obtained using a 3D drawing solution and a 2D drawing solution, respectively.
[0006] Figure 1 and Figure 2 A rendering of four 3D curves 101, 102, 103a and 103b drawn by a user is shown. Curve 102 is drawn first, and then curve 101 and curves 103a and 103b are drawn. Thus, curve 101 intersects curve 102, and curves 103a and 103b intersect curve 101 at 104 and 105, respectively. Curves 101 and 102 have an opacity of 40%, while curves 103a and 103b have an opacity of 100%. Figure 1 It is shown that there is a rendering problem at intersection points 104 and 105 using the 3D drawing solution. In fact, the rendering in the overlap area 104 is different from the rendering in the overlap area 105, while the rendering of these two intersection points should be the same. The problem occurs because in the overlap area 104, curve 101 is rendered above curve 103a, while in the overlap area 105, curve 101 is rendered below curve 103b. Therefore, since curve 101 has an opacity of 40%, curve 103a is visible below curve 101 in the overlap area 104, while in the overlap area 105, since curve 103b has an opacity of 100%, curve 101 is not visible below curve 103b.
[0007] Therefore, rendering in a 3D scene is insufficient, since it depends on the order in which the different curves are rendered. Interestingly, this problem does not occur in a 2D drawing solution: in fact, in a 2D drawing solution, all curves are rendered on the same plane. Figure 2 Renderings of similar curves (curves 101', 102', 103a', 103b', 104', 105' corresponding to curves 101, 102, 103a, 103b, 104, 105) are shown, but using a 2D drawing solution. In the 2D drawing, the intersection area between area 104' and area 105' is the same. Using a 2D drawing solution such as Figure 1The rendering of the 3D drawing solution shown should be the same as the 2D drawing solution, but this is not the case. This is a first example of the rendering quality defects of existing 3D drawing solutions.
[0008] Another example of rendering defects in 3D scenes involves color mixing. Figure 3 and Figure 4 Discuss this rendering defect.
[0009] Figure 3 Two overlapping curves 106 and 107 are shown rendered using an existing 3D drawing solution: curve 106 is created by drawing back and forth using a graphics tool (e.g., a stylus operated on a tablet computer as a computer tactile device, or an accessory on a touch screen) to obtain a colored area on the canvas, and a similar action is performed to obtain curve 107 on curve 106. Figure 3 The results above show that in the overlapping area, the rendering is not uniform and parallax is visible. Therefore, the overlap is not physically correct. In particular, in area 108, the texture of the second curve 107 is dominant, while in area 108', the texture of the first curve 106 is dominant. This is because curve 107 overlaps itself, making the texture of the second curve 107 increasingly opaque in area 108'. However, as Figure 4 As shown, the rendering in the intersection area should be uniform. Figure 4 The result obtained by similarly two overlapping curves (i.e., 107' created on top of 106', similar to 107 and 106) in a 2D drawing solution is shown, where the overlapping result depends on the brush and physics properties. In known 3D drawing solutions, there is no control over how the colors and curves are blended. This illustrates another example of the rendering quality shortcomings of existing 3D drawing solutions.
[0010] Furthermore, known 3D drawing solutions can be based on 3D ribbons (one ribbon per curve) comprising a triangle mesh. However, using one 3D ribbon per curve is not an optimal way of shading. In practice, this means that the number of triangles used for shading is huge. Figure 6 Shows the rendering Figure 5 109. The number of triangles affects the performance of the application (e.g., frame rate): in fact, rendering takes into account each triangle, and the computing power required to perform the rendering is a function of the number of triangles that need to be considered. In addition, each triangle is stored in memory, so the number of triangles also affects the amount of memory used. Therefore, in existing 3D graphics solutions, rendering requires excessive use of computing resources and memory capacity, thus forming limitations.
[0011] In this context, there remains a need for improved solutions for rendering 3D scenes including overlapping textures. Summary of the invention
[0012] Therefore, a computer-implemented method for mapping a texture on one or more points in a 3D scene is provided. The one or more points in the 3D scene are obtained from a user input of an input device. The method comprises: determining one or more points in the 3D scene to be textured based on the user input performed using the input device. The method comprises: calculating a 3D support including the determined one or more points to be textured. The method comprises: calculating a texture based on the determined one or more points. The method comprises: rendering the calculated texture on the calculated 3D support.
[0013] The method may include one or more of the following:
[0014] - the method may further comprise parameterizing one or more points to be textured;
[0015] - calculating the texture may include calculating the texture based on the parameterized one or more points;
[0016] -3D scenes can include 3D modeled objects. The calculation of 3D supports can include:
[0017] - placing all one or more points on the 3D modeled object; and
[0018] - determining a portion of the 3D modeled object as a 3D support;
[0019] - placing all of the one or more points on the 3D modeled object may comprise projecting all of the one or more points onto a surface of the 3D modeled object;
[0020] - the determined part of the 3D modeled object may be a single surface comprising all one or more points placed on the 3D modeled object;
[0021] The 3D modeled object may be tessellated using polygons. Determining the portion of the 3D modeled object used as a 3D support may include:
[0022] - identifying polygons in a 3D modeled object that include placement points;
[0023] - aggregating the identified polygons to obtain a single surface; and
[0024] - calculating a replica of a single surface, which is used as a 3D support;
[0025] - the method may further comprise calculating a new tessellation of the single surface;
[0026] - the calculation of the new tessellation may comprise calculating the new tessellation of the single surface at a tessellation density that is substantially the same as the tessellation density of the 3D modeled object or of a part of the 3D modeled object;
[0027] - The one or more points may be coplanar. The calculation of the 3D support may comprise determining a rectangular surface comprising each of the one or more points. The determined rectangular surface may comprise two triangles.
[0028] -The method may further comprise displaying the rendered texture on a 3D support;
[0029] The method may further comprise:
[0030] -Detect that user input is extended;
[0031] - determining one or more new points from the extended user input;
[0032] - calculating the 3D support such that the recalculated 3D support includes the one or more new points;
[0033] - recalculating the texture so that the recalculated texture includes the one or more new points of texturing; and
[0034] -updating the rendering of the recomputed texture on the recomputed 3D support; and / or
[0035] - The method may further comprise displaying a rendering of the recomputed texture on the recomputed 3D support.
[0036] There is also provided a computer program comprising instructions which, when executed by a computer, cause the computer to perform the method.
[0037] A computer-readable storage medium (eg, a non-transitory computer-readable storage medium) having a computer program recorded thereon is also provided.
[0038] A system is also provided, comprising a processor coupled to a memory having a computer program recorded thereon. Optionally, the processor may be coupled to a graphical user interface.
[0039] Also provided is a device including a computer-readable storage medium having a computer program recorded thereon.
[0040] The device may form or be used as a non-transitory computer-readable medium, such as on a SaaS (Software as a service) or other server or cloud-based platform, etc. The device may alternatively include a processor coupled to a data storage medium. Thus, the device may form a computer system in whole or in part (e.g., the device is a subsystem of the entire system). The system may also include a graphical user interface coupled to the processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Non-limiting examples will now be described with reference to the accompanying drawings, in which:
[0042] Figure 1-6 The limitations of existing 3D mapping solutions are shown;
[0043] Figure 7 A flow chart showing an example of the method;
[0044] Figure 8 An example of an implementation of the method is shown;
[0045] Fig. 9 A flowchart showing an example of rendering update;
[0046] Fig.10 Two examples of rendering updates are shown;
[0047] Fig.11 An example of the texture calculation step S40 is shown;
[0048] Figure 12 to Figure 14 Examples of computed textures and 3D supports are shown;
[0049] Fig.15 An example of a graphical user interface of the system is shown; and
[0050] Fig.16 An example of a system is shown. DETAILED DESCRIPTION
[0051] refer to Figure 7 A flowchart is provided, providing a computer-implemented method for mapping a texture on one or more points in a 3D scene. The one or more points in the 3D scene are obtained from a user input of an input device. The method comprises: S10, determining one or more points to be textured in the 3D scene according to the user input performed using the input device. The method comprises: S20, calculating a 3D support (3D support) including the determined one or more points to be textured. The method comprises: S40, calculating a texture based on the determined one or more points. The method comprises: S50, rendering the calculated texture on the calculated 3D support.
[0052] This approach forms an improved solution for rendering 3D scenes.
[0053] The method solves the above-mentioned limitations of existing 3D rendering solutions. It is worth noting that performing the rendering of the calculated texture on the calculated support makes it possible to solve the above-mentioned limitations.
[0054] First, the rendering quality of the 3D scene is equivalent to that of the 2D scene. In fact, textures are 2D by definition, so the method calculates a third texture as in a 2D drawing solution. The method allows to render the calculated texture in the 3D scene and thus have as much detail as in a 2D drawing. By calculating the 3D supports in the 3D scene, it is possible to render textures in the 3D scene. The method can mix colors correctly.
[0055] Secondly, the calculation of the texture is performed independently of the 3D support, avoiding non-uniform rendering and visible parallax. In fact, the texture is 2D by definition and is mapped in the 3D scene, which reduces the complexity of the texture calculation. In particular, this makes it possible to calculate overlapping areas so that the calculation results are consistent with physical properties and the real world. For example, a uniform texture can be obtained despite the intersection between several curves. Therefore, the method provides a way to customize color mixing at overlaps.
[0056] Furthermore, the method reduces the amount of calculation and memory capacity required for rendering. In fact, the method is used to map the texture on one or more points in the 3D scene, and the mapping requires less computing resources than directly adding colors in the 3D scene. Therefore, the method reduces the consumption of computing resources. In addition, the method can optimize the 3D support according to the shape of the graphics (for example, optimize the number of triangles included). In addition, the method is stable because this rendering is independent of the implementation of the rendering engine or graphics card used. In particular, the rendering of the texture does not depend on the rendering order. In terms of memory space, the method includes the calculation of the 3D support, which avoids the excessive number of triangles as in existing 3D drawing solutions. Compared with existing solutions, the number of triangles used is less. Therefore, the method reduces the memory space used.
[0057] The method is computer-implemented. This means that the steps (or substantially all steps) of the method are performed by at least one computer or any system. Therefore, the steps of the method are performed by a computer and can be performed fully automatically or semi-automatically. In an example, at least some of the steps of the method can be triggered by user interaction with the computer. The level of user-computer interaction required can depend on the level of automation foreseen and weighed against achieving user needs. In an example, the interaction level can be user-defined and / or predefined.
[0058] A typical example of a computer-implemented method is to perform the method using a system suitable for performing the method. The system may include a processor coupled to a memory (e.g., a non-transitory memory) and a graphical user interface (GUI), on which a computer program including instructions for performing the method is recorded. The memory is any hardware suitable for such storage and may include several physically different parts (e.g., one for the program and one for the database). The system may also include a graphics card. The graphics card may perform rendering of the calculated texture on the calculated 3D support and / or update rendering of the recalculated first texture on the recalculated first 3D support.
[0059] The 3D scene may include modeled objects. A modeled object is any object defined by data stored, for example, in a database. In a broad sense, the expression "modeled object" refers to the data itself. Depending on the type of system, the modeled object may be defined by different kinds of data. The system may actually be any combination of a CAD system, a CAE system, a CAM system, a PDM (Product Data Management) system, and / or a PLM (Product Lifecycle Management) system. In these different systems, the modeled object is defined by the corresponding data. Accordingly, it may be a CAD object, a PLM object, a PDM object, a CAE object, a CAM object, CAD data, PLM data, PDM data, CAM data, CAE data. However, these systems are not mutually exclusive, because the modeled object may be defined by data corresponding to any combination of these systems. Therefore, the system may be both a CAD and a PLM system, as can be clearly understood by the system definition provided below.
[0060] In addition, a CAD system refers to any system (such as CATIA) that is at least suitable for designing a modeled object based on a graphical representation of the modeled object. In this case, the data defining the modeled object includes data that can represent the modeled object. For example, a CAD system can use edges or lines to represent a CAD modeled object, and in some cases use faces or surfaces. Lines, edges or surfaces can be represented in various ways, for example, non-uniform rational B-splines (NURBS). Specifically, a CAD file contains specifications from which geometric shapes can be generated, thereby allowing the generation of a representation. The specifications of a modeled object can be stored in a single CAD file or in multiple CAD files. The typical size of a file representing a modeled object in a CAD system is in the range of one megabyte per part. And a modeled object can typically be a combination of thousands of parts.
[0061] In the context of CAD, a modeled object may typically be a 3D modeled object, for example, representing a product such as a part or an assembly of parts, or may be an assembly of a product. A "3D modeled object" refers to any object that is modeled by giving it data with a 3D representation. The 3D representation makes it possible to observe the part from all angles. For example, a 3D modeled object, when represented in 3D, may be manipulated and rotated about any of its axes or about any axis in the screen on which the representation is displayed. This specifically excludes 2D icons that are not modeled in 3D. The display of a 3D representation facilitates design (i.e., increases the speed at which the designer statistically completes his task). Since product design is part of the manufacturing process, the manufacturing process in industry is accelerated.
[0062] A 3D modeled object may represent the geometry of a product to be manufactured in the real world after its virtual design is completed, which virtual design may be completed by, for example, a CAD software solution or a CAD system, such as a part (e.g., a mechanical part) or an assembly of parts (or equivalently an assembly of parts, since an assembly of parts may be considered as a part itself from a method point of view, or the method may be applied independently to each part of the assembly), or more generally any assembly of rigid bodies (e.g., a moving mechanism). CAD software solutions are used for product design in a wide variety of industrial fields without limitation, including: aerospace, architecture, construction, consumer products, high-tech devices, industrial equipment, transportation, marine and / or offshore oil / gas production or transportation. Therefore, the 3D modeled object designed by the method can represent an industrial product, which can be any mechanical part, such as a part of a land vehicle (including, for example, automobile and light truck equipment, racing cars, motorcycles, trucks and motor equipment, trucks and buses, trains), a part of an aircraft (including, for example, fuselage equipment, aerospace equipment, propulsion equipment, defense products, airline equipment, space equipment), a part of a marine vehicle (including, for example, naval equipment, commercial ships, offshore equipment, yachts and workboats, marine equipment), general mechanical parts (including, for example, industrial manufacturing machinery, heavy mobile machinery or equipment, installation equipment, industrial equipment products, manufactured metal products, tire manufacturing products), electromechanical or electronic components (including, for example, consumer electronics products, safety and / or control and / or instrumentation products, computing and communication equipment, semiconductors, medical devices and equipment), consumer goods (including, for example, furniture, home and garden products, leisure goods, fashion products, hard goods retailers' products, soft goods retailers' products), packaging (including, for example, food and beverage and tobacco, beauty and personal care, household product packaging).
[0063] CAD systems can be history-based. In this case, the modeled object is further defined by data including the history of geometric features. The modeled object can actually be designed by a physicist (i.e., designer / user) using standard modeling features (e.g., extrusion, rotation, cutting and / or fillet) and / or standard surface treatment features (e.g., sweeping, blending, lofting, filling, deformation and / or smoothing). Many CAD systems that support this modeling function are history-based systems. This means that the creation history of the design features is usually saved by a non-cyclic data flow that links the geometric features together via input and output links. The history-based modeling paradigm has been well known since the early 1980s. The modeled object is described by two permanent data representations: history and B-rep (boundary representation). B-rep is the result of the calculation defined in the history. The shape of the part displayed on the screen of the computer when the modeled object is represented is B-rep (e.g., the tessellation of B-rep). The history of the component is the design intent. Basically, history integrates information about the operations that the modeled object has experienced. B-rep can be saved with history to make it easier to display complex components. The history can be saved with the B-rep to allow design changes to be made to the part according to the design intent.
[0064] Furthermore, by PLM system, it is meant any system suitable for managing modeling objects that represent physical manufactured products (or products to be manufactured). Thus, in a PLM system, modeling objects are defined by data suitable for manufacturing physical objects. These can typically be dimensional values and / or tolerance values. Having such values is indeed better for the correct manufacturing of an object.
[0065] Furthermore, a CAM solution means any solution, hardware or software suitable for managing the manufacturing data of a product. Manufacturing data typically includes data related to the product to be manufactured, the manufacturing process and the required resources. A CAM solution is used to plan and optimize the entire manufacturing process of a product. For example, it can provide the CAM user with information about the feasibility, the duration of a manufacturing process or the number of resources (such as a specific robot) that can be used at a specific step of the manufacturing process; and thus allow decisions about management or required investments. CAM is a subsequent process after the CAD process and potentially the CAE process. Such CAM solutions are manufactured by Dassault Systèmes under the trademark supply.
[0066] Furthermore, CAE solutions mean any solution, hardware or software suitable for analyzing the physical behavior of a modeled object. A well-known and widely used CAE technique is the Finite Element Method (FEM), which generally involves dividing the modeled object into elements whose physical behavior can be calculated and simulated by equations. This CAE solution is manufactured by Dassault Systèmes under the trademark Another growing CAE technology involves modeling and analyzing complex systems consisting of multiple components from different physical domains without CAD geometry data. CAE solutions allow simulations, thereby optimizing, improving and validating the products to be manufactured. This CAE solution is manufactured by Dassault Systèmes under the trademark supply.
[0067] PDM stands for Product Data Management. A PDM solution is any solution, hardware or software, suitable for managing all types of data related to a specific product. PDM solutions can be used by all actors involved in the product life cycle: primarily engineers, but also project managers, finance personnel, sales personnel and buyers. PDM solutions are usually based on a product-oriented database. It allows operators to share consistent data on their products, thus preventing operators from using different data. This PDM solution is sold by Dassault Systèmes under the trademark supply.
[0068] The method may be included in a 3D drawing solution that can be used (e.g., by a user) to perform graphic creation. Performing graphic creation may include creating, selecting and / or using graphic elements (e.g., drawings, typefaces, photos, or colors) to create a 3D object.
[0069] Alternatively or additionally, the 3D drawing solution may be a CAD or product design solution that can be used to design a 3D modeled object. "Designing a 3D modeled object" refers to any action or series of actions that refine at least a part of the process of a 3D modeled object. The 3D modeled object may be a 3D modeled object with points placed on it. Thus, the calculated 3D support may be a replica of a portion of the 3D modeled object. The method may render a texture on the surface of the 3D modeled object. The method may include creating a 3D modeled object before steps S10-S50. The 3D modeled object may be created starting from a sketch. Alternatively, the method may include providing a previously created 3D modeled object and then modifying the 3D modeled object (e.g., adding a texture). The method may be used to render an object after the object is manufactured.
[0070] The method may be included in a manufacturing process, which may include producing a physical product corresponding to the modeled object after performing the method. In any case, the modeled object designed by the method may represent a manufactured object. Therefore, the modeled object may be a modeled entity (i.e., a modeled object representing an entity). The manufactured object may be a product, such as a part or an assembly of parts. Because the method improves the design of the modeled object, the method also improves the manufacture of the product and therefore increases the productivity of the manufacturing process.
[0071] The method is used to map a texture on one or more points in a 3D scene. In particular, the method allows a user to map a texture by executing a user input. Mapping may include applying a texture on one or more points, i.e., rendering a texture at the location of a 3D support in the 3D scene. The texture is mapped onto the 3D scene according to the user's needs. In practice, the 3D support and the texture are determined based on one or more points determined from the user input. Thus, the resulting texture corresponds to the texture that the user desires to obtain.
[0072] The determination of the one or more points in S10 is now discussed in more detail.
[0073] According to the method, one or more points are determined from user input (S10). Determining step S10 may include detecting user input, for example, using an input device (e.g., a mouse, a trackball, a probe, a tablet, a touch-sensitive screen, or a touch screen) or using a virtual reality (VR) system. The user input may be a gesture performed by a user (e.g., by hand). The gesture defines a trajectory in the real world (e.g., from a starting point to an end point). Determining step S10 may include detecting the trajectory of a gesture performed with an input device. The input device may capture the trajectory defined by the gesture. For example, the input device may be a mouse, and the trajectory may be the trajectory that the mouse follows during the gesture (e.g., on a table). Alternatively, the input device may be a touch-sensitive device (such as a tablet or a smart phone). In this case, the gesture may be performed with a finger or a stylus. The trajectory may correspond to the trajectory that the finger or stylus follows on the touch-sensitive device during the gesture. Alternatively, the gesture may be performed using a VR system. As known in the art, a VR system may be configured to capture a trajectory defined by a user's gesture in the real world.
[0074] Determining step S10 may include converting the real-world captured trajectory into a trajectory within the 3D scene. For example, the conversion may include projecting the captured trajectory within the 3D scene (e.g., along the surface of a 3D modeled object within the 3D scene). The projection may include applying a scaling factor to account for differences in scale between the 3D scene and the environment (real world) in which the gesture is performed (e.g., depending on the scale at which the 3D scene is displayed). In an example, the trajectory may be performed along a plane (e.g., a table or surface of a touch device) and may be a 2D trajectory. Thus, the conversion may include projecting the 2D trajectory into the 3D scene, i.e., in a direction toward the 3D scene. For example, the direction may be perpendicular to a screen displaying the 3D scene (e.g., a screen of a touch-sensitive device).
[0075] Alternatively, the captured trajectory may be 3D (e.g., in the case of a VR system), and the trajectory in the 3D scene may therefore correspond to the captured trajectory. For example, the trajectory in the 3D scene may be equal to the captured trajectory after multiplication by a scale factor to account for differences in scale. Alternatively or additionally, it may also be offset from the captured trajectory, for example to simulate the effect of a brush. In these examples, the transformation may also include a near-to-near projection (i.e., the transformation may include a projection of each point to the nearest point on the surface).
[0076] After the conversion, determining step S10 may include sampling one or more points along the converted trajectory. These one or more points are in the 3D scene and are one or more points to be textured. The converted trajectory may pass through each point. One or more points may be regularly placed along the converted trajectory. For example, one or more points may be regularly sampled in space along the converted trajectory. In this case, the points may be regularly spaced the same distance from each other. Alternatively, one or more points may be regularly sampled in time. In this case, the points may be regularly spaced the same time intervals from each other during the gesture. For example, the method may place a point every X milliseconds during the gesture. For example, X may depend on the processor and / or graphics card of the computer on which the process is running. It may also vary according to the parallel processes of the computer (e.g., it may depend on the available RAM). In this case, the captured trajectory may include a time variable indicating when each point of the trajectory is achieved. The sampling of one or more points may be based on the time variable.
[0077] Now let's discuss 3D supports. The following disclosure applies to any 3D support, which means that it applies to calculated 3D supports as well as to 3D supports in the general sense (e.g., 3D supports that already exist in the 3D scene when the method is performed). A 3D support is a 3D modeled object (or a portion thereof). For example, a 3D support can be a replica of a portion of a 3D modeled object (e.g., representing an object in the represented scene). A 3D support can be a surface (e.g., a single surface) in a 3D scene. A 3D support can include a tessellation of the surface (e.g., with polygons such as triangles).
[0078] The calculation step S20 of the 3D support is now discussed in more detail. The calculated 3D support represents a surface in the 3D scene on which the calculated texture is rendered. Therefore, the calculation step S20 of the 3D support may be based on the 3D scene. For example, the calculation step S20 may depend on whether the 3D scene includes a 3D modeled object to which a texture may be applied. In addition, when the 3D scene includes a 3D modeled object, the calculation step S20 may depend on whether a user input is performed on the 3D modeled object (i.e., whether the projection of the capture trajectory is on the surface of the 3D modeled object). In a first example, the user input is performed on the 3D modeled object of the 3D scene. In this case, the calculated 3D support may correspond to a part of the 3D modeled object. In a second example, the user input may not be performed on the 3D modeled object. For example, the 3D scene may not include any 3D modeled object, or alternatively, the user input may not be performed on the 3D modeled object. In this case, the calculation step S20 of the 3D support may not take into account any 3D modeled object. The first and second examples are discussed in more detail in the following paragraphs.
[0079] In a first example, the calculation of the 3D support may comprise placing all of the one or more points on the 3D modeled object. The placement may comprise assigning to each of the one or more points a position on the surface of the 3D modeled object within the 3D scene. This means that the coordinates of a point on the surface of the 3D modeled object are assigned to each point. After the placement, the calculation of the 3D support may comprise determining a portion of the 3D modeled object to be used as the 3D support. This means that the 3D support may be a replica of the determined portion. The method may comprise replicating the determined portion, the 3D support being a replica of the determined portion.
[0080] In a first example, placing one or more points may include projecting each point onto a surface (e.g., an outer surface) (or envelope) of a 3D modeled object. For example, the projection may be from near to near. For example, the method may project each point onto a point on the surface that is closest to the point to be placed. Alternatively, the projection may be along a direction (e.g., perpendicular to a screen displaying a 3D scene, as described above). In an example, one or more points may consist of several points, and at least one point may already have a position on the surface of the 3D modeled object. In this case, the placement of the point may include projecting each point that does not yet have a position on the surface of the 3D modeled object.
[0081] In a first example, the determined portion of the 3D modeled object is a single surface that includes each of the one or more points placed on the 3D modeled object. This means that the surface can be integral. The surface may not include any gaps (or voids). The single surface may also be the minimum surface that includes all points. This means that a single surface that contains all points and meets one or more size and shape criteria may be optimal. For example, the one or more criteria may include a size criterion for the size of the surface area, and / or a criterion representing the complexity of the surface (e.g., the complexity of its boundaries). In an example, the single surface may include each point within a certain tolerance range. For example, the distance of each point from the surface boundary may be greater than a minimum distance. The minimum distance may be a model tolerance (e.g., 0.1 mm) or a pixel distance (e.g., 2 pixels).
[0082] In a first example, the 3D modeled object may be tessellated with polygons. For example, the 3D modeled object may be tessellated with quadrilaterals or triangles. In this case, determining the portion of the 3D modeled object that serves as a 3D support may include identifying a polygon in the 3D modeled object that includes the placement point. The identification step may include, for each placement point, determining on which polygon of the 3D modeled object the point is placed. For example, the identification step may be based on contact between the point and the polygon, or alternatively, the distance between the point and the polygon (e.g., the distance between the point and the center of gravity of the polygon) may be considered. The identification step may also be performed during the projection discussed previously. In this case, the polygon may be a polygon on which the point is projected.
[0083] After identifying the polygons, the determination of the part may include aggregating the identified polygons to obtain a single surface. The aggregation step may include re-forming a tessellation of the identified polygons. The new tessellation may include all identified polygons. Forming the tessellation may include joining adjacent identified polygons. The new tessellation may also include one or more other polygons. The one or more other polygons may join the identified polygons. Forming the tessellation may include generating one or more other polygons at locations where the joined identified polygons include discontinuities / holes. The surface covered by the new tessellation may have the same properties as the single surface mentioned above (i.e., a whole piece, no gaps, minimum and optimal surface according to the same criteria).
[0084] After aggregation, the determination of the components may include calculating a replica of the single surface. The replica of the single surface may be used as a 3D support. For example, the replica of the single surface may be recorded on a memory and may be retrieved by the method during rendering.
[0085] In a first example, in addition to considering the polygons of the 3D modeled object as described above, the method can calculate the 3D support directly from the determined part. In this case, the method can also include calculating a new tessellation of the single surface. The tessellation of the single surface can be performed as known in the art. The tessellation can include cutting the single surface into basic regular units (e.g., polygons). In this case, the calculated tessellation can inherit one or more properties of the tessellation of the 3D modeled object. For example, the tessellation density of the calculated tessellation is substantially the same as the tessellation density of the 3D modeled object (or a part of the 3D modeled object).
[0086] In the first example discussed in the previous paragraph, the calculation of the new tessellation may include calculating the new tessellation of the single surface at a tessellation density that is substantially the same as the tessellation density of the 3D modeled object or the tessellation density of the portion of the 3D modeled object. For example, the calculation may include determining the density of the tessellation of the 3D modeled object (or the portion of the 3D modeled object) and calculating the new tessellation by applying a density criterion for being approximately equal to the determined density (determining the tessellation by applying a density criterion is known in the art).
[0087] In the second example discussed above (i.e., when no user input is performed on the 3D modeled object), the calculation step S20 may include generating the 3D support without considering any 3D modeled object. In the example of this case, one or more points may be coplanar. For example, during the determination step S10, the one or more points may be projected onto a plane. The plane may be a background plane of the 3D scene, or may be parallel to a screen displaying the 3D scene. The calculation of the 3D support may include determining a rectangular surface including each of the one or more points. The rectangular surface may have the same properties as the single surface mentioned above (i.e., a whole piece, containing no gaps, a minimum and optimal surface according to the same criteria). The determined rectangular surface may include two triangles.
[0088] The texture calculation step S40 is now discussed in more detail.
[0089] A texture is a two-dimensional image that is applied to a three-dimensional surface (e.g., a background image) or volume (e.g., bounded by a 3D modeled object) in a 3D scene in order to modify the surface or volume. A texture may include an array of texels representing a texture space. A texel (also called a texture element or a texture pixel) is the basic unit of a texture map as known in the art. A texel may be described by an image region obtained by a simple process such as thresholding.
[0090] A calculation step S40 of the texture is performed based on the determined one or more points. The texture is 2D, and the one or more points are within the 3D scene. Therefore, before the calculation step S40, the method may also include S30 parameterizing the one or more points to be textured. For example, the method may perform parameterization S30 after determining one or more points (S10) or after calculating the 3D support (S20). Parameterization S30 may include assigning coordinates in 2D space (U, V) to all one or more points. Parameterization S30 may include converting one or more points into 2D space (e.g., to maintain the distance between them, as known in the art). The calculation S40 of the texture is based on the parameterized one or more points. The calculation S40 of the texture may be performed based on these one or more points known in the art. For example, each point may be associated with an element pattern, and the calculation step may include determining the texture in which the element pattern exists at each point.
[0091] Now, we discuss rendering a texture on a 3D support. The following disclosure applies to any rendering of a texture on a 3D support, and therefore also applies to rendering of a texture calculated on a calculated 3D support S50. In other words, the following disclosure applies to any rendering of a texture on a 3D support.
[0092] Rendering may be performed by a graphics card; more specifically, by a graphics processing unit (GPU) of the graphics card. The result of the rendering may include data for displaying a 3D scene (i.e., including a texture projected on a 3D support). Rendering may perform display processing on a 3D scene including a calculated texture. The texture may be displayed at the location of the 3D support (i.e., on the 3D support); the 3D support may be visible or invisible, for example, the texture is displayed and the 3D support is invisible. The rendered texture on the 3D support may include one or more rough curves (one rough curve per user input), each rough curve representing the result of one user input. The rough curve is a texture generated by applying a reference texture (e.g., a color and / or a pattern) to an area centered on a path defined by a user input and having a predetermined thickness (e.g., a line thickness). Rendering may include preparing to display the rough curve together with the texture of a 3D modeled object present in the 3D scene when rendering.
[0093] The display of the rendered texture is now discussed. The following disclosure is applicable to any display, and therefore may be applicable to rendering S50. The display of the rendered texture is performed after the texture is rendered. The display may include displaying the 3D scene to the user (e.g., on a screen). The display may be based on the result of the rendering, and may be performed in a manner known in the art. The result of the rendering includes data (prepared by a graphics card during rendering) that enables the 3D scene to be displayed. The display may include executing these data in order to display the 3D scene to the user.
[0094] In an example, the method can be performed dynamically (i.e., in real time). For example, when the user input is extended (e.g., if the user continues to move the mouse or touch the touch-sensitive device), the rendering can be updated to define new points. Extending the user input means maintaining the user input and continuing the user input (i.e., the user continues to make gestures and the trajectory is thus extended). In this case, the method can include determining new points based on the extended trajectory and repeating the calculation of 3D supports and textures. For example, the method can repeat the calculation of 3D supports and textures for each new point determined, or repeat the calculation after each detection of a given number of new points X, for example, X is an integer greater than 1 and / or less than 5. Alternatively, in addition to repeating the calculation of the supports when the trajectory is extended, the method can repeat these steps periodically, for example, repeat these steps after each time a duration T has passed, for example, T is a duration greater than 1 millisecond and / or less than 100 milliseconds. In this case, when one or more new points are repeatedly determined, the calculated 3D supports can include the one or more new points. When one or more new points are not repeated, the calculated supports can be the same as in the previous repetition.
[0095] In an example, the method may further include detecting an extension of the user input. The method may include determining one or more new points from the extended user input. The determination of the one or more new points may be performed as discussed above for one or more (initial) points, but the determination only takes into account the portion of the gesture newly performed by the user. The method may then include recalculating the 3D support so that the recalculated 3D support includes the one or more new points. Recalculating the 3D support may include extending the already calculated 3D support to include the one or more new points (e.g., using the same criteria discussed previously). Alternatively, the recalculation of the 3D support may include calculating a new 3D support using all points (i.e., points and new points together). The calculation of the new 3D support may be equivalent to the calculation of the 3D support discussed previously. The method may also include recalculating the texture so that the recalculated texture includes one or more new points of the texture. The recalculation of the texture may include an update of the texture, which means that only new data about the one or more new points may be calculated. The method may then include updating the rendering of the recalculated first texture on the recalculated first 3D support. The recomputed texture can be rendered on the recomputed 3D support as previously discussed.
[0096] After updating the rendering, in an example, the method may further include displaying the rendering of the recalculated first texture on the recalculated first 3D support. For the rendering discussed previously, the 3D scene may be displayed to the user (e.g., on a screen) based on the result of the rendering update (as known in the art).
[0097] refer to Figures 8 to 16 , examples of implementations of this method are now discussed.
[0098] Figure 8 An example of an implementation of the method is shown. The method can render a rough curve in a 3D sketching application. The method includes: S20, calculating a 3D support 202 including one or more points to be textured as determined. The calculation step S20 includes generating an optimal 3D support (e.g., a virtual 3D support) to display the drawing in a 3D scene. The method includes: S40, calculating a texture 201 based on the one or more points determined. The method includes texturing the support to show the true drawing intent. The method includes: S50, rendering the calculated texture on the calculated 3D support 203. The method can render the texture on the 3D support using a shader (UV mapping). This allows us to control all effects of brushes, color mixing and drawing before or even after the user draws the curve. The method includes managing overlapping drawings to enrich existing supports or create new supports.
[0099] The method implements an algorithm that optimizes the creation of new supports and handles color mixing in real time: when a new curve intersects an existing curve, the support of the previous curve can be extended to cover the last one. The texture of the supports is also enriched to add new colors added by the user. The method solves all the limitations of the existing solutions listed previously. In particular, the method improves the rendering of overlapping of 3D curves. Another improvement is that the method offers the same possibilities as 2D drawing software. In fact, color mixing is calculated by rendering 2D textures on the 3D model and thus offering the same possibilities as 2D drawing software solutions. In addition, the method also significantly reduces the number of required triangles. Therefore, the method saves memory space.
[0100] Fig. 9 A flow chart of an example of rendering update is shown. The figure shows the workflow of the method for constructing a new rough curve, and the principle of enriching supports and textures when necessary. In this example, the user input is extended, and the method calculates new 3D supports accordingly. The method comprises: S70, detecting the extension of the user input. In this example, the subsequent steps depend on the test result of step S71. In step S71, the method determines whether there is another 3D support at the current mouse position (i.e., the position of the cursor on the screen), i.e., another support in addition to the 3D support that has been previously calculated for the current user input. When the method determines that there is no other 3D support at the current mouse position (first case), the method performs steps S72, S73 and S74. Otherwise (second case), the method performs steps S75, S76 and S77. The method can repeat these steps. For example, the method can repeat these steps for each new point determined, or repeat these steps each time a given number X of new points are detected. Alternatively, the method can repeat these steps periodically, for example, after each time a duration T has passed.
[0101] In a first case, the method comprises: S72, extending the 3D support. The extending step S72 comprises determining one or more new points based on the extended user input and recalculating the 3D support so that the recalculated 3D support comprises the one or more new points. The method further comprises: S73, recalculating the texture so that the recalculated texture comprises the textured one or more new points. The recalculating step S73 comprises enriching the current texture (i.e., the texture previously calculated by the method before the extending step S72) so as to include the one or more new points. Then, the method comprises: S74, updating the rendering of the recalculated texture (i.e., the texture enriched with each new point) on the recalculated 3D support.
[0102] In a second situation, there is another 3D support at the current mouse position. The other 3D support may have been calculated (for example, using the method and calculated based on previously performed user input). The other 3D support is referred to as the first 3D support, and the texture rendered on the first 3D support is referred to as the first texture. The 3D support currently being expanded is referred to as the second 3D support, and the texture rendered on the second 3D support is referred to as the second texture. Therefore, in step S71, the method detects that the second support intersects with the first support. Then, the method includes: S75, calculating a third 3D support by merging the first 3D support and the second 3D support. The method also includes: S76, calculating a third texture by mixing the first texture and the second texture. The method includes: S77, rendering the calculated third texture on the calculated third 3D support.
[0103] In an example, the first texture and the second texture may each have a corresponding color. In this case, the mixing of the second texture with the first texture may include mixing the color of the first texture with the color of the second texture in the intersection of the second texture and the first texture. The mixing of the color of the first texture with the color of the second texture may include determining a color that matches a color that can be obtained by mixing the two colors (e.g., by mixing by a brush in the real world).
[0104] Alternatively, the blending of the second texture with the first texture may include overlapping the second texture with the first texture in the intersection portion. In this case, the overlap may include determining a texture corresponding to a texture obtainable by blending the two textures. For example, the second texture has transparency. In this case, the first texture overlaps the second texture based on the transparency of the second texture. The transparency may be in the range of 0% to 100%. 0% transparency may represent complete transparency (e.g., a window without defects or color). In this case, the texture at the intersection may be the first texture. 100% transparency may represent complete opacity. In this case, the texture at the intersection may be the second texture. When the transparency is between these two extremes, the texture at the intersection may vary proportionally between these two extreme cases (i.e., between the first texture and the second texture).
[0105] Fig.10 Two examples of rendering updates are shown.
[0106] The first example 300 shows a reference Fig. 9 Steps S72, S73 and S74 of the so-called first case of the method described. The method comprises extending the 3D support 301 to become the 3D support 302. During the extension, the method detects that the extension of the 3D support does not intersect with another 3D support. Therefore, the method performs as previously discussed and recalculates the 3D support and textures, and updates the rendering.
[0107] The second example 310 shows a reference Fig. 9 Steps S75, S76 and S77 of the so-called second case of the described method. In this example, in addition to the extended 3D support 311, the 3D scene also includes 3D supports 312 and 313. The method detects that the extended 3D support 311 intersects with the 3D support 312. Therefore, the method includes calculating a new 3D support 314 by merging the 3D support 311 and the 3D support 312. The method also includes calculating a new texture by mixing the texture rendered on the 3D support 311 and the texture rendered on the 3D support 312. Thereafter, the user input is extended again, and the method therefore repeats these steps. Similarly, the method detects that the extended 3D support 315 intersects with the 3D support 313. Therefore, the method includes calculating a new 3D support 316 by merging the 3D support 315 and the 3D support 313. The method also includes calculating a new texture by blending the texture rendered on the 3D support 315 and the texture rendered on the 3D support 313 .
[0108] Fig.11 An example of a calculation step S40 of a texture is shown. The method comprises: S30, parameterizing one or more points to be textured. The parameterization step S30 may comprise projecting the 3D coordinates of the points in a 2D space representing the texture (e.g., using a known projection algorithm). The method may store the 2D coordinates of each point as UV coordinates 320 on the texture. The method may then comprise: S40, calculating the texture based on the parameterized points 320 (i.e., based on the UV coordinates of these points). For example, the calculation step S40 may comprise processing parameters such as thickness, brush shape, pressure to calculate the resulting texture. The figure shows different texture results (321, 322, 323) obtained using different parameter values for the same parameterized point 320.
[0109] Figures 12 to 14 Examples of using calculated textures and 3D supports are shown. As already discussed, the 3D supports may be invisible when displayed, and in this case, the 3D supports are 3D shapes that are compatible with other commands of the application. For example, if desired, the 3D supports may be deformed and / or may be more complex. The method may include deforming the 3D supports according to the user's intent (e.g., when the user input is extended). The method may adapt the texture according to the deformation of the 3D supports. As shown in these examples, the 3D supports may be a portion of a sphere or a plane.
[0110] Fig.12Rendering of a texture 332 on a 3D support 331 is shown. In this first example, the method has calculated the 3D support 331 based on a 3D modeled object 330 present in the 3D scene (in this example, a sphere 330). The method may include calculating the tessellation (i.e., triangles) of the 3D support 331. Fig.13 and Fig.14 In an example of , the method can calculate the 3D support based on the 3D modeled object or without considering the 3D modeled object (for example, by projecting the point on the background image). Specifically, Fig.13 Two examples (341, 342) of 3D supports calculated by the method for rendering texture 340 are shown. The type of 3D supports can be user-selectable. For example, the method can include providing a way for the user to create the closest shape from their drawing, can include creating 3D supports 342 for texture 340, and using the newly created 3D supports 342 instead of 3D supports 341 for rendering. The method can include forming a single surface including all of the one or more determined points (e.g., based on an outline shape of the drawing formed by the points and the texture). The method can then include calculating a tessellation of the single surface to obtain 3D supports 342. Fig.14 Another example of a 3D support 351 for rendering a texture 350 calculated based on a new tessellation is illustrated. The method includes calculating a single surface based on the outline shape of a drawing (i.e., including the texture). The method can then include calculating a new tessellation for the single surface so as to optimize the number of triangles as much as possible. The 3D support 351 is an example of a tessellation that the method can extract from the outline of a drawing.
[0111] Fig.15 An example of a GUI for a system is shown, where the system is a CAD system.
[0112] The GUI 2100 may be a typical CAD-like interface having standard menu bars 2110, 2120 as well as a bottom toolbar 2140 and a side toolbar 2150. Such menus and toolbars contain a set of user-selectable icons, each icon being associated with one or more operations or functions, as is known in the art. Some of these icons are associated with software tools suitable for editing and / or processing the 3D modeled object 2000 displayed in the GUI 2100. The software tools may be grouped in workbenches. Each workbench includes a series of software tools. In particular, one of the workbenches is an editing workbench suitable for performing editing operations on geometric features of a modeled product, where the designer may, for example, pre-select a portion of the object 2000 and then initiate an operation (e.g., change size, color, etc.) or edit geometric constraints by selecting an appropriate icon. For example, a typical CAD operation is modeling of stamping or folding of a 3D modeled object displayed on the screen. For example, the GUI may display display data 2500 related to the displayed product, in which the user can select the desired item. Fig.15 In the example of FIG. 2 , data 2500 is displayed in the form of a “feature tree”, and a 3D representation 2000 thereof, relating to a brake assembly including a brake caliper and a disc. The GUI may also show various types of graphical tools 2130, 2070, 2080, such as for assisting in the 3D orientation of an object, for triggering a simulation of an operation to edit a product, or for rendering various properties of the displayed product 2000. The cursor 2060 may be controlled by a haptic device to allow the user to interact with the graphical tools.
[0113] Fig.16 An example of a system is shown, where the system is a client computer system, such as a user's workstation.
[0114] The client computer of this example includes a central processing unit (CPU) 1010 connected to an internal communication bus, to which a random-access memory (RAM) 1070 is also connected. The client computer is also provided with a graphical processing unit (GPU) 1110, which is associated with a video random-access memory 1100 connected to the bus. The video RAM 1100 is also referred to in the art as a frame buffer. A mass storage device controller 1020 manages access to a mass storage device such as a hard disk drive 1030. Mass storage devices suitable for tangibly embodying computer program instructions and data include all forms of non-volatile memory, including, for example, semiconductor memory devices, such as Erasable Programmable Read Only Memory (EPROM), Electrically Erasable Programmable Read Only Memory (EEPROM), and flash memory devices; disks, such as internal hard disks and removable disks; magneto-optical disks. Any of the foregoing may be supplemented or incorporated by a specially designed ASIC (application-specific integrated circuits). The network adapter 1050 manages access to the network 1060. The client computer may also include a tactile device 1090, such as a cursor control device, a keyboard, and the like. The cursor control device is used in the client computer to allow the user to selectively position the cursor at any desired location on the display 1080. In addition, the cursor control device allows the user to select various commands and input control signals. The cursor control device includes a plurality of signal generating devices for inputting control signals to the system. Typically, the cursor control device may be a mouse, the buttons of which are used to generate signals. Alternatively or additionally, the client computer system may include a sensitive board and / or a sensitive screen.
[0115] The computer program may include instructions executable by a computer, the instructions including means for causing the above-mentioned system to perform the method. The program may be recorded on any data storage medium, including the memory of the system. The program may be implemented, for example, in a digital electronic circuit, or in computer hardware, firmware, software, or a combination thereof. The program may be implemented as a device, such as a product tangibly embodied in a machine-readable storage device for execution by a programmable processor. The method steps may be performed by a programmable processor executing an instruction program to perform the functions of the method by operating on input data and generating output. Therefore, the processor may be programmable and coupled to receive data and instructions from a data storage system, at least one input device, and at least one output device, and to send data and instructions thereto. The application may be implemented in a high-level procedural or object-oriented programming language, or in an assembly or machine language if necessary. In any case, the language may be a compiled or interpreted language. The program may be a fully installed program or an update program. The application of the program on the system generates any situation in which instructions for executing the method are generated. The computer program may alternatively be stored and executed on a server in a cloud computing environment, which communicates with one or more clients via a network. In this case, the processing unit executes instructions included by the program, thereby causing the method to be performed on a cloud computing environment.
Claims
1. A computer-implemented method for mapping a texture on one or more points in a three-dimensional (3D) scene, wherein the one or more points in the 3D scene are obtained through user input of an input device, the method comprising: - S10, determining the one or more points to be textured in the 3D scene according to the user input performed using the input device; - S20, calculating a 3D support (202, 331, 341, 342, 531), the 3D support comprising the one or more points determined to be textured; - S40, calculating a texture based on the determined one or more points (201, 321, 322, 323, 332, 340, 350); and - S50, rendering the calculated texture on the calculated 3D support (203).
2. The method according to claim 1, further comprising: - S30, parameterizing the one or more points to be textured; in, - S40 Calculating the texture comprises: calculating the texture based on the parameterized one or more points (320).
3. The method according to claim 1 or 2, wherein The 3D scene includes a 3D modeled object (330), and S20 calculating the 3D support includes: - placing all of said one or more points on said 3D modeled object (330); and - determining a part of the 3D modeled object (330) to be used as the 3D support (331).
4. The method according to claim 3, wherein: Placing all of the one or more points on the 3D modeled object (330) includes projecting all of the one or more points onto a surface of the 3D modeled object (330).
5. A method according to claim 3 or 4, wherein The determined portion of the 3D modeled object (330) is a single surface, the single surface comprising all of the one or more points placed on the 3D modeled object (330).
6. The method according to claim 5, wherein: The 3D modeled object (330) is tessellated using polygons, and determining a portion of the 3D modeled object (330) to be used as the 3D support (331) comprises: - identifying a polygon in said 3D modeled object comprising said one or more placed points; - aggregating said identified polygons so as to obtain said single surface; and - calculating a replica of said single surface and using the replica of said single surface as said 3D support.
7. The method according to claim 5, wherein: The method further comprises: - Calculating a new tessellation of the single surface (342, 351).
8. The method according to claim 7, wherein: Calculating the new tessellation comprises calculating the new tessellation of the single surface at a tessellation density that is substantially the same as the tessellation density of the 3D modeled object (330) or the tessellation density of the part of the 3D modeled object (330).
9. The method according to claim 1, wherein: The one or more points are coplanar, and S20 calculating the 3D support (341) includes: determining a rectangular surface including all of the one or more points, and the determined rectangular surface includes two triangles.
10. The method according to any one of claims 1 to 9, further comprising: - S60, displaying the rendered texture on the 3D support.
11. The method according to any one of claims 1 to 10, further comprising: - S70, detecting that the user input is extended; - determining one or more new points from said extended user input; - S72, recalculating the 3D support, so that the recalculated 3D support includes the one or more new points; - S73, recalculating the texture so that the recalculated texture includes the one or more new points of texturing; as well as - S74. Update the rendering of the recalculated texture on the recalculated 3D support.
12. The method according to claim 11, wherein: The method further comprises: - displaying a recomputed rendering of said texture on said recomputed 3D support.
13. A computer program comprising instructions, which, when executed by a computer, cause the computer to perform the method according to any one of claims 1 to 12.
14. A computer-readable storage medium having recorded thereon the computer program according to claim 13.
15. A system comprising a processor coupled to a memory having recorded thereon the computer program according to claim 13.