Rendering of overlapping textures in 3D scene
Patent Information
- Application Number
- JP2024134924
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-08-11
- Filing Date
- 2024-08-13
- Publication Date
- 2025-02-25
Smart Images

Figure 2025026807000001_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to the field of computer programs and systems, and more particularly to methods, systems and programs for mapping a texture to one or more points of a 3D scene. [Background technology]
[0002] Many systems and programs are offered to the market of designing, engineering and manufacturing objects. CAD is an acronym for Computer-Aided Design, e.g., for software solutions for designing objects. CAE is an acronym for Computer-Aided Engineering, e.g., for software solutions for simulating the physical behavior of future products. CAM is an acronym for Computer-Aided Manufacturing, e.g., for software solutions for defining product processes and manufacturing operations. In such computer-aided design systems, the graphical user interface plays an important role for the efficiency of the techniques. These techniques can be incorporated within product lifecycle management (PLM) systems. PLM refers to a business strategy that helps companies share product data, apply common processes and utilize company knowledge for the development of products from conception to the end of product life, across the concept of the extended enterprise. The PLM solutions offered by Dassault Systèmes (under the trademarks CATIA, ENOVIA and DELMIA) provide an Engineering Hub to organize product engineering knowledge, a Manufacturing Hub to manage manufacturing engineering knowledge, and an Enterprise Hub to enable business integration and connectivity to both the Engineering and Manufacturing Hubs. Together, the systems provide an open object model that relates products, processes and resources, enabling dynamic, knowledge-based product creation and decision making that drives optimal product definition, manufacturing preparation, production, and service.
[0003] Many technical fields implement 3D drawing; these are for example graphic creation, CAD or product design. One of the goals in these technical fields is to provide the user with an experience in a virtual 3D space that is closest to classical 2D sketching (such as using a pen on paper). To that end, one of the functions allows the user to texture the 3D scene, i.e. to add texture to the 3D scene (or to the 3D space). To that end, existing solutions usually involve the determination of a 3D curve drawn by the user and the addition of this determined 3D curve to the 3D scene. However, these existing solutions for 3D drawing are insufficient.
[0004] In particular, the quality of rendering of 3D curves in a 3D scene is inferior to that of 2D drawing and is defective. In particular, the superposition of two or more 3D curves is not equivalent to the 2D drawing case, if the 3D curves have an opacity less than 100%. Technically, the order used to render the curves depends on the optimization of the visualization engine or graphic card used. In existing solutions, the rendering order has a significant impact on the result. Therefore, the quality of the result cannot be guaranteed for overlapping 3D shapes.
[0005] A first example of a rendering defect will now be described with reference to Figures 1 and 2, which show renderings obtained using a 3D and a 2D drawing solution, respectively.
[0006] Figures 1 and 2 show the rendering of four 3D curves, 101, 102, 103a and 103b, drawn by a user. Curve 102 is drawn first, followed by curve 101 and curves 103a and 103b. Thus, curve 101 intersects with curve 102, and curves 103a and 103b intersect with curve 101 at 104 and 105, respectively. Curves 103a and 103b have 100% opacity, while curves 101 and 102 have 40% opacity. Figure 1 shows that there is a rendering problem at intersections 104 and 105 when using a 3D drawing solution. Indeed, the rendering in the overlapping area 104 is different from the rendering in the overlapping area 105, but the rendering of the two intersections should be identical. This problem occurs because in overlap region 104, curve 101 is rendered above curve 103a, while in overlap region 105, curve 101 is rendered below curve 103b. Thus, in overlap region 104, curve 103a is visible below curve 101 because curve 101 has 40% opacity, but in overlap region 105, curve 101 is not visible below curve 103b because curve 103b has 100% opacity.
[0007] Rendering in a 3D scene is therefore poor because it depends on the order in which different curves are rendered. Interestingly, this problem does not occur in 2D drawing solutions: in fact, in 2D drawing solutions, all curves are rendered in the same plane. Figure 2 shows the rendering of similar curves (101', 102', 103a', 103b', 104', 105', corresponding to 101, 102, 103a, 103b, 104, 105, respectively) using a 2D drawing solution. In the 2D drawing, the intersection area is identical between areas 104' and 105'. The rendering using the 3D drawing solution illustrated in Figure 1 should be the same as the 2D drawing solution, but it is not. This is a first example of the lack of rendering quality of existing 3D drawing solutions.
[0008] Another example of a rendering defect in a 3D scene relates to color blending, which will now be explained with reference to FIGS.
[0009] FIG. 3 shows the rendering of overlapping curves 106 and 107 using an existing 3D drawing solution: curve 106 is created by moving a graphical tool (e.g. a stylus operating on a tablet as a computer haptic device, an attachment on a touch screen, etc.) back and forth several times, thereby obtaining a colored area on the canvas, and curve 107 is obtained by performing a similar gesture on curve 106. The result on FIG. 3 shows that in the overlapping area, the rendering is not homogeneous and differences are visible. Hence, the overlap does not respect physics. In particular, in the area 108, the texture of the second curve 107 dominates, while in the area 108' the texture of the first curve 106 dominates. This is because curve 107 overlaps itself, so that the texture of the second curve 107 becomes more and more opaque in the area 108'. However, the rendering in the intersection area should have been homogeneous with that illustrated in Figure 4, which represents the result obtained when two curves overlap in the same way (i.e. 107 and 106, where 107' is created on top of 106') in a 2D drawing solution, where the overlap result depends on the brush and its physics. In known 3D drawing solutions, the way colors and curves mix cannot be controlled. This shows another example of the lack of rendering quality in 3D drawing solutions.
[0010] Furthermore, known 3D rendering solutions may be based on 3D ribbons (one for each curve) that are composed of a mesh of triangles. However, using one 3D ribbon per curve is not optimal for coloring. In fact, it implies a huge number of triangles to create a color stain. Figure 6 shows an example of a huge number of triangles used to render the texture 109 illustrated in Figure 5. The number of triangles affects the performance (e.g. frame rate) of the application: in fact, in the rendering, each of the triangles is considered and the computational power required to perform the rendering is a function of the number of triangles considered. Furthermore, each triangle is stored in memory and therefore the number of triangles also affects the size of the memory used. Hence, in existing 3D rendering solutions, the excessive use of computational resources and memory capacity required for rendering becomes a limitation.
[0011] In this context, there remains a need for improved solutions for rendering 3D scenes containing overlapping textures. Summary of the Invention
[0012] A computer-implemented method for rendering two overlapping textures in a 3D scene is provided, the method hereinafter referred to as the rendering method. The rendering method includes obtaining a first 3D support including a rendered first texture. The rendering method includes obtaining a second 3D support including a rendered second texture. The rendering method includes detecting an intersection of the second support with the first support. The rendering method includes calculating a third 3D support by merging the first 3D support and the second 3D support. The rendering method includes calculating a third texture by mixing the first texture and the second texture. The rendering method includes rendering the calculated third texture onto the calculated third 3D support. The rendering method includes displaying the rendered third texture onto the third 3D support.
[0013] The method may include one or more of the following. The first support and the second support may include respective tessellations. Merging the first 3D support and the second 3D support may include calculating a union of the tessellations of the first 3D support and a union of the tessellations of the second 3D support. - calculating said combination aggregating areas of a tessellation of the first 3D support and areas of a tessellation of the second 3D support that do not overlap each other; Merging the aggregated regions by creating a new tessellation connecting the overlapping regions, Merging the first 3D support and the second 3D support comprises: Calculating a surface covering the union of the first 3D support and the union of the second 3D support; Tessellating the calculated surface, - the one or more first points and the one or more second points may be coplanar. Merging the first 3D support and the second 3D support may include determining a rectangular surface including each of the one or more first points and each of the one or more second points. The determined rectangular surface may be composed of two triangles. - the first texture and the second texture may have respective colors, and mixing the second texture with the first texture may include blending the color of the first texture with the color of the second texture at an intersection of the second texture and the first texture; mixing the second texture with the first texture may include overlaying the first texture with the second texture at the intersection points; the second texture may have a transparency. The overlaying of the first texture with the second texture may be subject to the transparency of the second texture; obtaining each of said 3D supports determining, from a user input performed by an input device, one or more points of said 3D scene to texture; Calculating the 3D support including the determined point or points to texture; calculating said texture based on said determined point or points; Rendering the calculated texture onto the calculated 3D support, Obtaining each of the 3D supports may further comprise parameterizing the one or more points to be textured; - calculating the texture may include calculating the texture based on parameterized one or more points; The 3D scene may include a 3D modeled object. The step of calculating the 3D support may include: placing each of said one or more points on said 3D modelled object; determining a part of the 3D modeled object that serves as the 3D support; and / or The one or more points may be coplanar. Calculating the 3D support may include determining a rectangular surface that includes each of the one or more points. The determined rectangular surface may be composed of two triangles.
[0014] Further provided is a computer program comprising instructions which, when executed by a computer, cause the computer to carry out the rendering method.
[0015] Additionally, a computer readable (non-transitory) storage medium having a computer program recorded thereon is provided.
[0016] Further provided is a system comprising a processor coupled to a memory, the memory having a computer program recorded thereon. Optionally, the processor may be coupled to a graphical user interface.
[0017] Further provided is a device comprising a computer readable storage medium having a computer program recorded thereon.
[0018] The device may form or serve as a non-transitory computer-readable storage medium, such as in a Software as a Service (SaaS) or other server or cloud-based platform. The device may alternatively include a processor coupled to the data storage medium. The device may thus form in whole or in part a computer system (e.g., the device is a subsystem of an overall system). The system may further include a graphical user interface coupled to the processor. [Brief description of the drawings]
[0019] Non-limiting examples will now be described with reference to the accompanying drawings. [Figure 1] FIG. 1 illustrates the limitations of existing 3D rendering solutions. [Diagram 2] FIG. 2 illustrates the limitations of existing 3D rendering solutions. [Diagram 3] FIG. 3 illustrates the limitations of existing 3D rendering solutions. [Figure 4] FIG. 4 illustrates the limitations of existing 3D rendering solutions. [Diagram 5] FIG. 5 illustrates the limitations of existing 3D rendering solutions. [Figure 6] FIG. 6 illustrates the limitations of existing 3D rendering solutions. [Figure 7] FIG. 7 is a flowchart illustrating an example of a mapping method. [Figure 8] FIG. 8 is a diagram illustrating an example of an implementation of the mapping method. [Figure 9] FIG. 9 is a flowchart illustrating an example of a rendering update. [Figure 10] FIG. 10 is a diagram illustrating two examples of rendering updates. [Figure 11] FIG. 11 is a diagram illustrating an example of calculating the texture (S40). [Figure 12] FIG. 12 is a diagram illustrating an example of the calculated texture and 3D support. [Figure 13] FIG. 13 is a diagram illustrating an example of the calculated texture and 3D support. [Figure 14] FIG. 14 is a diagram illustrating an example of the calculated texture and 3D support. [Figure 15] FIG. 15 is a diagram showing an example of a graphical user interface of the system. [Figure 16] FIG. 16 is a diagram illustrating an example of a system. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0020] A computer-implemented method for rendering two overlapping textures in a 3D scene is provided, the method hereinafter referred to as the rendering method. The rendering method includes obtaining a first 3D support including a rendered first texture. The rendering method includes obtaining a second 3D support including a rendered second texture. The rendering method includes detecting an intersection of the second support with the first support. The rendering method includes calculating a third 3D support by merging the first 3D support and the second 3D support. The rendering method includes calculating a third texture by mixing the first texture and the second texture. The rendering method includes rendering the calculated third texture onto the calculated third 3D support. The rendering method includes displaying the rendered third texture onto the third 3D support.
[0021] Such a method forms an improved solution for rendering 3D scenes.
[0022] The rendering method overcomes the limitations of existing solutions for 3D drawing mentioned above, in particular because rendering of a computed tertiary texture is performed on a computed tertiary support.
[0023] Firstly, the quality of the rendering of a 3D scene is comparable to that of a 2D scene. In fact, the third texture is by definition 2D and the rendering method therefore calculates the third texture by mixing the first texture and the second texture as in a 2D drawing solution. The rendering method makes it possible to render the third texture calculated in the 3D scene and therefore with the same detail as in a 2D drawing. This is made possible by the third 3D support, which was calculated by merging the first 3D support and the second 3D support in the 3D scene and makes it possible to render the texture in the 3D scene. Mixing the two textures makes it possible to blend the colors correctly.
[0024] Secondly, the calculation of the third texture is performed independently of the third 3D support, avoiding inhomogeneous rendering and visible differences. In fact, the third texture is 2D by definition, reducing the complexity of calculating the third texture. In particular, this allows the overlap between the first and second textures to be calculated so that the calculated result complies with the physical and real world. For example, a homogeneous texture is obtained regardless of the intersection between multiple curves. The rendering method therefore provides a way to customize the blending of colors at the overlap, which is not possible with current 3D solutions that do not properly mix textures.
[0025] Thirdly, the rendering method reduces the computation and memory required for rendering. Indeed, the rendering method is for rendering a third texture into a calculated third 3D support of the 3D scene, which rendering is less expensive in terms of computational resources than mixing different textures directly into the 3D scene. The rendering method therefore reduces the consumption of computational resources. In addition, the rendering method allows optimizing the third 3D support according to the shape of the drawing (for example the number of triangles it contains). Furthermore, the rendering method is stable since the rendering is independent of the implementation of the rendering engine or graphic card used. In particular, rendering the first and second textures is independent of the rendering order of these two textures. In terms of memory space, computing the third 3D support allows controlling the number of triangles and therefore prevents the number of triangles from becoming too large (as in existing 3D drawing solutions). Compared to existing solutions, the number of triangles used is reduced. The rendering method therefore reduces the memory space used.
[0026] Fourth, the rendering method improves ergonomics. Indeed, the rendering method makes it possible to mix textures in a 3D scene in case of intersections. The user is therefore able to create a 3D scene by successively adding textures to the 3D scene, as in 2D drawing solutions. This is advantageous, since the rendering method makes it possible to mix realistic colors, especially in intersection areas.
[0027] The rendering method is computer-implemented. This means that the steps (or substantially all steps) of the rendering method are performed by at least one computer, or any similar system. The steps of the rendering method are thus performed by a computer, possibly fully automatically, or semi-automatically. In an example, triggering at least some of the steps of the rendering method may be performed by user-computer interaction. The level of user-computer interaction required may depend on the level of automation foreseen and may be balanced against the need to realize the user's wishes. In an example, this level may be user-defined and / or predefined.
[0028] A typical example of a computer implementation of the rendering method is executing the rendering method by a system adapted for this purpose. The system may include a processor coupled to a (e.g., non-transitory) memory and a graphical user interface (GUI), the memory having recorded thereon a computer program including instructions for executing the rendering method. The memory is any hardware adapted for such storage, possibly including multiple physically distinct parts (e.g., one for the program, possibly one for a database, etc.). The system may further include a graphics card. The graphics card may perform rendering of the calculated texture onto the calculated 3D support and / or updating the rendering of the recalculated first texture onto the recalculated first 3D support.
[0029] The 3D scene may include modeled objects. A modeled object is any object defined by data stored, for example, in a database. Thus, 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. A system may in fact be any combination of a CAD system, a CAE system, a CAM system, a PDM system and / or a PLM system. In these different systems, the modeled object is defined by the corresponding data. Thus, an object may refer to 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 exclusive of one another, since a modeled object may be defined by data corresponding to any combination of these systems. A system may therefore be both a CAD system and a PLM system, as is clear from the definition of such a system provided below.
[0030] By CAD system is further meant any system at least adapted to design a modeled object based on a graphical representation of the modeled object, such as CATIA. In this case, the data defining the modeled object includes data capable of representing the modeled object. The CAD system may provide a representation of the CAD modeled object, for example, using edges or lines, sometimes together with faces or surfaces. The lines, edges, or surfaces may be represented in various ways, for example, with non-uniform rational B-splines (NURBS). In particular, a CAD file contains specifications from which geometry may be generated, thereby generating a representation. The specifications of the modeled object may be stored in a single CAD file or in multiple such files. A typical size of a file representing a modeled object in a CAD system is in the range of 1 megabyte per part. The modeled object may typically be an assembly of several thousand parts.
[0031] In the context of CAD, a modeled object may typically be a 3D modeled object that represents, for example, a part or an assembly of parts, or possibly a product, such as an assembly of a product. By "3D modeled object" is meant any object that is modeled with data that allows for a 3D representation of it. The 3D representation allows for a view of the part from any angle. For example, when represented in 3D, the 3D modeled object can be manipulated and rotated around any of its axes or around any of the axes of the screen on which the representation is displayed. This notably excludes 2D icons that are not 3D modeled. The display of 3D representations facilitates design (i.e., increases the speed at which designers statistically accomplish their tasks). This speeds up the manufacturing process in industry, since the design of products is part of the manufacturing process.
[0032] A 3D modeled object may represent the geometry of a product that is manufactured in the real world following completion of its virtual design using a CAD software solution or CAD system, such as a part (e.g., of a machine) or an assembly of parts (or equivalently an assembly of parts when it is an assembly of parts that can be viewed as a part itself from the perspective of the method, or when the method can be applied independently to each part of the assembly), or more generally any rigid body assembly (e.g., a moving mechanism). CAD software solutions enable the design of products in various and limitless industrial sectors, including aerospace, architecture, construction, consumer goods, high tech devices, industrial equipment, transportation, marine, and / or offshore oil / gas or transportation. The 3D modeled objects designed by the rendering method may therefore represent industrial products, which may be any machine part, such as ground vehicle parts (including, for example, automobile and light truck equipment, racing cars, motorcycles, trucks and motor equipment, trucks and buses, trains), airplane parts (including, for example, airframe equipment, aerospace equipment, propulsion equipment, defense products, aviation equipment, space equipment), naval vehicle parts (including, for example, naval equipment, merchant ships, offshore equipment, yachts and workboats, marine equipment), general machinery parts (including, for example, industrial manufacturing machinery, mobile heavy equipment or equipment, stationary equipment, industrial equipment products, fabricated metal products, tire manufacturing products), electromechanical or electronic parts (including, for example, consumer electronics, security and / or control and / or measurement products, computing and communications equipment, semiconductors, medical devices and equipment), consumer goods (including, for example, furniture, home and garden products, leisure goods, fashion products, durable goods retail products, textile retail products), packaging (including, for example, food and beverage and tobacco, beauty and personal care, household goods packaging).
[0033] A CAD system may be history-based. In this case, the modeled object is further defined by data including the history of the geometric features. The modeled object is actually defined by a physical person (i.e., a designer / user) using standard modeling features (e.g., extrude, revolve, cut, and / or round) and / or standard surface features (e.g., sweep, blend, loft, fill, deform, and / or smooth). Many CAD systems that support such modeling capabilities are history-based systems. This means that the creation history of design features is preserved through acyclic data flows that typically connect said geometric features through input and output links. This history-based modeling paradigm has been well known since the early 80s. The modeled object is described by two persistent data representations: history and B-rep (i.e., boundary representation). B-rep is the result of the calculations defined in the history. When the modeled object is represented, the shape of the part displayed on the computer screen is the B-rep (e.g., its tessellation). The history of the part is the design intent. Essentially, the history collects information about the operations that the modeled object has undergone. B-reps can be stored with the history to facilitate the display of complex parts. History can be stored with the B-reps to allow design modifications of the part according to the design intent.
[0034] By PLM solution is further meant any system adapted for the management of modeled objects that represent physical products to be manufactured. In a PLM system, the modeled objects are therefore defined by data suitable for the manufacture of the physical objects. These may typically be dimensional values and / or tolerances. It is in fact preferable to have such values in order to manufacture the objects accurately.
[0035] By CAM solution is meant any solution, hardware or software, adapted to manage the manufacturing data of a product. The manufacturing data generally includes data about the product to be manufactured, the manufacturing process and the necessary resources. CAM solutions are used to plan and optimize the entire manufacturing process of a product. For example, this can provide the CAM user with information about the feasibility, the duration of the manufacturing process or the number of resources, such as specific robots, that may be used in a certain step of the manufacturing process, thus allowing decisions regarding management or necessary investments. CAM is a process that follows the CAD process and possibly the CAE process. Such CAM solutions are offered by Dassault Systèmes under the trademark DELMIA®.
[0036] By CAE solution is meant any solution, hardware or software, adapted for the analysis of the physical behavior of a modeled object. A known and widely used CAE technique is typically the Finite Element Method (FEM), which involves the division of the modeled object into elements whose physical behavior can be calculated and simulated via equations. Such a CAE solution is offered by Dassault Systèmes under the trademark SIMULIA®. Another growing CAE technique involves the modeling and analysis of complex systems made up of multiple components from different fields of physics without using CAD geometry data. CAE solutions allow the simulation and therefore the optimization, improvement and validation of the products to be manufactured. Such a CAE solution is offered by Dassault Systèmes under the trademark DYMOLA®.
[0037] PDM stands for Product Data Management. By PDM solution we mean any solution, hardware or software, adapted to manage all kinds of data about a particular product. PDM solutions can be used by all the parties involved in the product's life cycle, primarily engineers, but also project managers, financers, salespeople, and buyers. PDM solutions are generally based on a product-oriented database. This allows the parties to share consistent data about their products, thus avoiding the use of divergent data. Such PDM solutions are offered by Dassault Systèmes under the trademark ENOVIA®.
[0038] The rendering method may be included in a 3D drawing solution that may be used (e.g., by a user) to perform a graphical composition, which may involve creating, selecting, and / or using graphical elements (e.g., drawings, typefaces, photographs, or colors, etc.) to create a 3D object of communication and / or culture.
[0039] Alternatively or additionally, the 3D drawing solution may be a CAD or product design solution that may be used to design a 3D modeled object. "Designing a 3D modeled object" refers to any action or set of actions that is at least part of the process of elaborating a 3D modeled object. The 3D modeled object may be a 3D modeled object on which points are placed. The first and second 3D supports (and therefore also the third 3D support) may each be a copy of a portion of the 3D modeled object. The rendering method may render a third texture onto a surface of the 3D modeled object. The rendering method may include creating the 3D modeled object before obtaining the first and second 3D supports. The 3D modeled object may be created from scratch. Alternatively, the rendering method may include providing a previously created 3D modeled object and then modifying the 3D modeled object (e.g., adding textures). The rendering method may be used to render a post-manufacture object.
[0040] The rendering method may be included in a manufacturing process that includes, after performing the rendering method, producing a physical product that corresponds to the modeled object. In any case, the modeled object designed by the rendering method represents a manufacturing object. The modeled object may therefore be a modeled solid (i.e., a modeled object that represents a solid). The manufacturing object may be a product, such as a part, or an assembly of parts. Because the rendering method improves the design of the modeled object, the rendering method may also improve manufacturing the product, thus increasing the productivity of the manufacturing process.
[0041] The rendering method may be performed dynamically. For example, the step of acquiring the second 3D support may be performed while the user is performing the input, from which the second 3D support is calculated. In that case, the acquired second 3D support may change dynamically while the user's input is performed. For example, the rendering method may repeat acquiring the second 3D support while the user's input is performed, for example for each new point of the determined user's input (or each time a given number X of new points are detected), or alternatively, each time a duration T elapses. The rendering method may also perform detecting intersections dynamically, i.e., while the user's input is performed. For example, at each acquisition iteration, the rendering method may determine whether the second 3D support intersects with the first 3D support. The first 3D support may already be present in the 3D scene and may have already been acquired (for example, from another user's input previously performed). If the second 3D support intersects with the first 3D support, the rendering method may include detecting this intersection (i.e., for the iteration in which the intersection occurs).
[0042] Detecting the intersection will now be described in detail. In an example, detecting may include detecting that a user input is performed within the second 3D support. The user input is a user input performed to calculate the second 3D support (i.e., performed during obtaining the second 3D support). For example, detecting may include detecting that at least one of the one or more points determined from the user input is located on the first 3D support (e.g., the point may be included in the surface of the 3D support, e.g., taking into account a tolerance). If the user input is performed with a pointing device (e.g., a mouse, a pen, or a user's finger in the case of a touch tablet), the point detected as located on the 3D support may coincide with a point of the 3D scene pointed to by the pointing device.
[0043] In another example, the detecting may include detecting that a surface of the second 3D support and a surface of the first 3D support intersect with each other, in which case the detecting may include detecting that a crossover point between the surface of the second 3D support and the surface of the first 3D support is non-zero.
[0044] In a further example, the detecting may include detecting that a texture rendered on a first 3D support intersects with a texture rendered on a second 3D support. In that case, the detecting may include detecting that regions of the textures rendered on the first and second 3D supports intersect with one another. The detecting may include detecting that an intersection of the regions of the textures rendered on the first and second 3D supports is non-zero.
[0045] Two or more of the above detection examples can be combined. In such a case, detection can be achieved when at least one of the combined examples is performed (i.e., the required one is detected), and vice versa when each of the combined examples is performed. Calculating the third 3D support is now described in detail.
[0046] The computing of the third 3D support is based on the first and second 3D supports. The computing of the third 3D support includes merging the first and second 3D supports. The computed third 3D support may include the first and second 3D supports. The computed third 3D support is a result of merging the first and second 3D supports. For example, the first support and the second support may include respective tessellations. In that case, the computed third 3D support may include a tessellation of the first 3D support and a tessellation of the second 3D support. Between the tessellation of the first 3D support and the tessellation of the second 3D support, the computed third 3D support may further include connecting a tessellation that connects the tessellation of the first 3D support and the tessellation of the second 3D support.
[0047] Merging the first 3D support and the second 3D support may include calculating a union of the tessellation of the first 3D support and the tessellation of the second 3D support. Calculating the union facilitates calculating the third 3D support. In fact, it allows taking into account the first and second 3D supports already calculated.
[0048] Calculating the combination may be performed in two steps. In a first step, calculating the combination may include aggregating the tessellation of the first 3D support and the tessellation of the second 3D support. For example, calculating the combination may include aggregating the areas of the tessellation of the first 3D support and the areas of the tessellation of the second 3D support that do not overlap each other. For example, aggregating may include determining a portion of the tessellation (e.g., polygons) of the first 3D support that overlaps with the tessellation (e.g., polygons) of the second 3D support, and then subtracting this determined portion (e.g., determined polygons) from the result of adding the tessellations (e.g., all polygons) of the first and second 3D supports. The third 3D support may therefore include all polygons of the first and second 3D supports that do not overlap each other.
[0049] In a second step, computing the join may include merging the aggregated regions by creating a new tessellation that connects the overlapping regions. For example, the merging may include determining a connecting tessellation that connects the tessellations of the first and second 3D support. The merging may include determining a surface that connects the tessellation of the first 3D support and the tessellation of the second 3D support, and computing a tessellation of this surface, thereby determining the connecting tessellation. This connecting tessellation (e.g., polygon) may coincide with the tessellation of the first and second 3D support, i.e., with the boundary (e.g., boundary of the polygon) of these two tessellations. For example, the vertices of the polygon may coincide at the boundary.
[0050] In another example, merging the first and second 3D supports may include calculating a new 3D support that includes the first and second 3D supports. In that case, the resulting third 3D support may differ from the first and second 3D supports (i.e., the polygons of the third 3D support may differ from the polygons of the first and second 3D supports). Merging may include calculating a surface that covers the union of the first 3D support and the union of the second 3D support. For example, the surface may include the surfaces of the first and second 3D support, and optionally another surface that connects the first and second 3D support. Merging may then include tessellating the calculated surface. For example, merging may include tessellating the determined surface (having the same shape as the first and second 3D support). Calculating the new 3D support allows the complexity of the support to be reduced. In fact, the new tessellation may have triangles with a uniform size.
[0051] In an example, the one or more first points and the one or more second points may be coplanar. For example, the user's input to form the first and second 3D supports may not be made on a 3D modeled object, but rather the points may all be projected onto a background plane of the 3D scene. In that case, the first and second 3D supports may have a particular shape. For example, each 3D support may be a rectangular surface (or a circular surface). In that case, merging may include determining a surface (e.g., a minimum surface) having a particular shape (e.g., a rectangular surface or a circular surface) and including each of the one or more first points and each of the one or more second points. The determined surface may include points with a tolerance. In this case, determining the surface may be such that all points are at a distance from the boundary of the surface that is at least greater than this tolerance. If the determined surface is a rectangular surface, the determined surface may be composed of two triangles.
[0052] Computing the third texture will now be described in detail.
[0053] Computing the third texture includes mixing the first texture and the second texture. Computing the third texture may include gathering the first and second textures (i.e., in the same plane). The gathering may take into account a position of the 3D support rendered in the 3D scene and may position the two textures to maintain a relative position of the two textures rendered in the 3D scene. For example, the computing may include applying the same projection to the two textures (e.g., projecting two textures from the 3D scene onto the same 2D plane).
[0054] After assembling the two textures in the same 2D plane, computing the third texture may include determining the intersection points (i.e., on the 2D plane) of the two textures. At the intersection points (i.e., overlapping regions), the third texture may have a texture corresponding to the result of mixing the first texture and the second texture. Mixing the first and second textures may be performed in the overlapping regions. For non-overlapping regions, computing the third texture may include connecting the first and second textures. In the non-overlapping regions, the third texture may have the same texture as the textures (of the first and second textures) present in the region.
[0055] In an example, the first texture and the second texture may have respective colors. In that case, mixing the second texture with the first texture may include blending the color of the first texture with the color of the second texture at the intersection of the second texture and the first texture. The blending may be performed in any manner. For example, blending the color of the first texture with the color of the second texture may include determining a color that corresponds to a color that would result if the two colors were mixed (e.g., mixed by a brush in the real world) and applying this determined color at the intersection of the two textures. This determined color may correspond to an average of the two textures, e.g., an average of the parameters (red, green, and blue) that define the colors of the two textures.
[0056] Alternatively, mixing the second texture with the first texture may include overlaying the first texture with the second texture at the intersection. In that case, overlaying may include determining a texture that corresponds to a texture that would be obtained if the two textures were overlaid. For example, the second texture has a transparency. In that case, overlaying the first texture with the second texture depends on the transparency of the second texture. The transparency is between 0% and 100%. 0% transparency may represent full transparency (e.g., the transparency of a window without defects or color). In that case, the texture of the intersection may be the first texture. 100% transparency may represent full opacity. In that case, the texture of the intersection may be the second texture. If the transparency is between these two extremes, the texture of the intersection may vary proportionally to the situation of these two extremes (i.e., between the first texture and the second texture).
[0057] Although obtaining a 3D support is described here, the details developed below apply equally to obtaining a first 3D support and / or obtaining a second 3D support, and therefore the details below also apply to a first texture and a second texture that are rendered onto these 3D supports.
[0058] Obtaining the 3D support may be based on a method of mapping a texture to one or more points of the 3D scene (hereinafter referred to as a mapping method). The mapping method may include rendering a texture to the 3D support, and the 3D support may be the obtained (and rendered) 3D support. The rendering method may include execution of the mapping method. In that case, the 3D support may be obtained during execution of the rendering method. For example, the rendering method may obtain each of the first and second 3D supports based on execution of the mapping of each 3D support (e.g., based on a first user's input for the first 3D support and a second user's input for the second 3D support). Alternatively, the mapping method may already be executed before execution of the rendering method. In that case, the 3D support including the rendered texture may already be present in the 3D scene when the rendering method is executed. For example, the 3D support may be stored in a memory, and obtaining the 3D support may include retrieving the 3D support from the memory (i.e., retrieving the first 3D support and / or the second 3D support).
[0059] With reference to the flow chart of FIG. 7, an example of a mapping method performed to obtain a 3D support will now be described in detail.
[0060] The mapping method is for mapping a texture to one or more points of a 3D scene. In particular, the mapping method allows a user to map a texture by implementing a user input. Mapping may consist in applying the texture to one or more points, i.e. rendering the texture at the location of a 3D support of the 3D scene. The texture is mapped to the 3D scene according to the user's wishes. In fact, the 3D support and the texture are determined based on the one or more points determined from the user's input. The resulting texture therefore corresponds to what the user wants to obtain.
[0061] Determining one or more points (S10) will now be described in detail.
[0062] The mapping method determines one or more points from a user's input (S10). The determining (S10) may include, for example, detecting a user's input performed by an input device (e.g., a mouse, a trackball, a stylet, a tablet, a touch-sensitive screen or a touch screen, etc.) or using a virtual reality (VR) system. The user's input may be a gesture performed by the user (e.g., using a hand). The gesture defines a real-world trajectory (e.g., from a start point to an end point). The determining (S10) may include detecting a trajectory of the gesture performed by the 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 a trajectory followed by a mouse (e.g., on a table) during the gesture. Alternatively, the input device may be a touch-sensitive device (such as a tablet or a smartphone). In this case, the gesture may be performed by a finger or a stylus. The trajectory corresponds to a trajectory followed by a finger or a stylus on the touch-sensitive device during the gesture. Alternatively, the gestures may be performed using a VR system, which may be configured to capture the trajectory defined by the user's gestures in the real world, as known in the art.
[0063] Determining (S10) may transform the captured trajectory of the real world into a trajectory in a 3D scene. For example, transforming includes projecting the captured trajectory into the 3D scene (e.g., along a surface of a 3D modeled object in the 3D scene). Projecting includes applying a scale factor to account for differences in scale between the 3D scene and the environment (real world) in which the gesture was 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 a surface of a touch device) and may be a 2D trajectory. The transformation may thus include projecting this 2D trajectory into the 3D scene, i.e., in a direction towards the 3D scene. For example, the direction may be perpendicular to a screen (e.g., a screen of a touch-sensitive device) on which the 3D scene is displayed.
[0064] Alternatively, the captured trajectory may be 3D (e.g., in the case of a VR system), and the trajectory of the 3D scene may therefore correspond to the captured trajectory. For example, the trajectory of the 3D scene may be equal to what was captured after multiplying by a scale factor to account for differences in scale. Alternatively or additionally, it may also be offset from what was captured, e.g., to simulate the effect of a brush. In these examples, the transformation may also include a projection, but may be from near to near (i.e., the transformation may include a projection of each point to the closest point on the surface).
[0065] After transformation, determining (S10) may include sampling one or more points along the transformed trajectory. These one or more points are one or more points in the 3D scene that are to be textured. The transformed trajectory passes through each point. The one or more points may be regularly located along the transformed trajectory. For example, the one or more points may be regularly sampled in space along the transformed trajectory. In this case, the points may be regularly spaced the same distance from each other. Alternatively, the one or more points may be regularly sampled in time. In this case, the points may be regularly spaced the same time that elapsed during the gesture from each other. For example, the mapping method may place a point every X milliseconds that elapsed during the gesture, where X depends, for example, on the processor and / or graphics card of the computer on which the process is executed. It may also vary depending on what the computer is doing in parallel (for example, depending on the available RAM). In this case, the captured trajectory may include a time variable that represents when each point of the trajectory was realized. Sampling the one or more points varies depending on this time variable.
[0066] 3D supports are now described. The following disclosure applies to any 3D support, which is meant to apply to a calculated 3D support or to a general 3D support (e.g., a 3D support that is already present in the 3D scene when the mapping method is performed). A 3D support is a 3D modeled object (or a part thereof). For example, a 3D support can be a copy of a part of a 3D modeled object (e.g., one that represents an object in the depicted scene). A 3D support can be a (e.g., single) surface of a 3D scene. A 3D support can include a tessellation of this surface (e.g., by polygons such as triangles).
[0067] The computing 3D support (S20) will now be described in detail. The computed 3D support represents a surface of the 3D scene on which the computed texture is rendered. The computing 3D support (S20) may therefore depend on the 3D scene. For example, the computing (S20) may depend on whether the 3D scene includes a 3D modeled object to which the texture may be applied. Additionally, if the 3D scene includes a 3D modeled object, the computing (S20) may depend on whether the user's input is performed on this 3D modeled object (i.e., whether the projection of the captured trajectory is on the surface of the 3D modeled object). In a first example, the user's input is performed on a 3D modeled object of the 3D scene. In this case, the computed 3D support may correspond to a portion of the 3D modeled object. In a second example, the user's input may not be performed on a 3D modeled object. For example, the 3D scene may not include a 3D modeled object, or the user's input may not be performed on a 3D modeled object. In this case, computing the 3D support (S20) may not take into account the 3D modeled object. These first and second examples are explained in detail in the following paragraphs.
[0068] In a first example, calculating the 3D support may include placing one or more points on the 3D modeled object. The placing may include assigning to each of the one or more points a position in the 3D scene that is on the surface of the 3D modeled object. This means assigning to each point the coordinates of the point on the surface of the 3D modeled object. After the placing, calculating the 3D support may include determining a part of the 3D modeled object that will serve as the 3D support. This means that the 3D support may be a copy of this determined part. The mapping method may include copying the determined part, and the 3D support may be a copy of the determined part.
[0069] In an example of the first example, placing the one or more points may include projecting each of the points onto a (e.g., outer) surface (or envelope) of the 3D modeled object. For example, the projecting may be from near to near. For example, the mapping method may project each point onto a point of the surface that is closest to the point being placed. Alternatively, the projecting may be along a direction (e.g., perpendicular to a screen on which the 3D scene is displayed, as described above). In an example, the one or more points may be a plurality of points, and at least one point may already have a position on the surface of the 3D modeled object. In this case, placing the points may include projecting each of the points that do not already have a position onto the surface of the 3D modeled object.
[0070] In the first example example, the determined portion of the 3D modeled object is a single surface that includes each of one or more points located on the 3D modeled object. This means that the surface may be one piece. The surface may also not include gaps (or voids). The single surface may also be the smallest surface that includes all points. This means that the single surface may be optimal with respect to one or more criteria of size and shape, including all points. For example, the one or more criteria may include dimensional criteria considering the size of the surface area and / or criteria expressing the complexity of the surface (e.g., its boundaries). In an example, the single surface may include each point with a tolerance. For example, each point may be further away than a minimum distance from the boundary of the surface. The minimum distance may be a model tolerance (e.g., 0.1 millimeter) or a pixel distance (e.g., 2 pixels).
[0071] In an example of the 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 the 3D support may include identifying a polygon of the 3D modeled object that includes the placed point. The identifying may include, for each placed point, determining on which polygon of the 3D modeled object the point is placed. For example, the identifying may be based on contact between the point and the polygon, or alternatively, may take into account the distance between the point and the polygon (e.g., the centroid of the polygon). The identifying may also be performed during the aforementioned projection. In this case, the polygon may be the polygon onto which the point is projected.
[0072] After identifying the polygons, determining the portion may include aggregating the identified polygons to obtain a single surface. Aggregating may include forming a new tessellation with the identified polygons. The new tessellation may include all the identified polygons. Forming may include connecting adjacent identified polygons. The new tessellation may also include one or more other polygons. The one or more other polygons may connect the identified polygons. Forming may include generating such one or more other polygons at locations where the connected identified polygons include discontinuities / holes. The surface covered with the new tessellation may have the same properties as the single surface described above (i.e., one piece, no gaps, minimal and optimal surface according to the same criteria).
[0073] After aggregating, determining the portion may include computing a copy of the single surface that may serve as the 3D support, for example, the copy of the single surface may be stored in memory and retrieved by a method during rendering.
[0074] In the first example example, instead of considering the polygons of the 3D modeled object described above, the mapping method may directly calculate the 3D support from the determined part. In this case, the mapping method may further include calculating a new tessellation of the single surface. The tessellation of the single surface may be performed as known in the art. The tessellation may include cutting the single surface into basic regular elements (e.g., polygons). In this case, the calculated tessellation may inherit one or more properties of the tessellation of the 3D modeled object. For example, the calculated tessellation may have a tessellation density that is substantially the same as the tessellation density of the 3D modeled object (or of the part of the 3D modeled object).
[0075] In the first example example described in the previous paragraph, calculating the new tessellation may include calculating a new tessellation of the single surface with a tessellation density substantially the same as a tessellation density of the 3D modeled object or a tessellation density of a portion of the 3D modeled object. For example, calculating may include determining a tessellation density of the 3D modeled object (or a portion of the 3D modeled object) and calculating the new tessellation by applying a density criterion that targets a density approximately equal to the determined density (determining a tessellation by applying a density criterion is known in the art).
[0076] In the second example described above (i.e., when the user's input is not performed on a 3D modeled object), the calculating (S20) may include generating the 3D support without considering the 3D modeled object. In that example, the one or more points may be coplanar. For example, during the determining (S10), the one or more points may be projected onto a plane. This plane may be a background plane of the 3D scene or may be parallel to a screen on which the 3D scene is displayed. The calculating the 3D support may include determining a rectangular surface that includes each of the one or more points. This rectangular surface may have the same properties as the single surface described above (i.e., one piece, no gaps, minimal and optimal surface according to the same criteria). The determined rectangular surface may be composed of two triangles.
[0077] Computing the texture (S40) will now be described in detail.
[0078] A texture is a two-dimensional image that is applied to a three-dimensional surface (e.g., a background image) or volume (e.g., a volume bounded by a 3D modeled object) in a 3D scene to decorate that surface or volume. A texture may contain an array of texels that represent a texture space. A texel, also called a texture element or texture pixel, is the basic unit of a texture map, as known in the art. A texel can be described by an image region obtained through a simple procedure such as thresholding.
[0079] The computing of the texture (S40) is performed based on the determined point or points. The texture is 2D and the point or points are in a 3D scene. Prior to computing (S40), the mapping method may therefore further comprise parameterizing (S30) the point or points to be textured. For example, the mapping method may perform the parameterizing (S30) after determining the point or points (S10) or after computing the 3D support (S20). The parameterizing (S30) may comprise assigning to each of the point or points coordinates (U, V) in the 2D space. The parameterizing (S30) may comprise transforming the point or points into the 2D space (e.g., preserving the distance between them, as known in the art). The computing of the texture (S40) is based on the parameterized point or points. The computing of the texture (S40) may be performed based on these point or points, as known in the art. For example, each point may be associated with an elementary pattern, and the calculation may include determining the texture in which the elementary pattern is present at each point.
[0080] Rendering a texture onto a 3D support is now described. The following disclosure applies to rendering a texture onto any 3D support and therefore to rendering a computed texture onto a computed 3D support (S50). In other words, the following disclosure applies to rendering a texture onto any 3D support.
[0081] The rendering may be performed by a graphics card, more specifically by a GPU of the graphics card. The result of the rendering may include data for display of the 3D scene (i.e., including the texture projected onto the 3D support). The rendering may include processing a display of the 3D scene including the computed 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, e.g., the texture may be displayed and the 3D support may not be visible. The texture rendered onto the 3D support may include one or more rough curves (one per user input), each representing the result of one user's input. The rough curves are textures that result from applying a reference texture (e.g., color and / or pattern) to an area that is centered on a path defined by the user's input and has a predefined thickness (e.g., line thickness, etc.). The rendering may include preparing a display of the rough curves together with the textures of the 3D modeled objects present in the 3D scene at the time of rendering.
[0082] Displaying the rendered texture is now described. The following disclosure applies to any display and may therefore apply to rendering (S50). Displaying the rendered texture is performed after rendering the texture. Displaying may include displaying the 3D scene to a user (e.g., on a screen). Displaying may be based on the results of the rendering and may be performed as known in the art. The results of the rendering include data that enables the display of the 3D scene (and this is prepared by the graphics card during rendering). Displaying may include executing these data to display the 3D scene to a user.
[0083] In an example, the mapping method may be performed dynamically, i.e., in real time. For example, the rendering may be updated if the user's input is extended (e.g., if the user continues to move the mouse or touch the touch-sensitive device), thereby defining a new point. The user's input is extended means that the user's input is maintained and continues (i.e., the user continues the gesture and the trajectory is therefore extended). In that case, the mapping method may include repeating determining a new point based on the extended trajectory and calculating the 3D support and texture. For example, the mapping method may repeat calculating the 3D support and texture for each new point determined or each time a given number X of new points are detected, where X is, for example, an integer greater than 1 and / or less than 5. Alternatively, instead of calculating the support when the trajectory is extended, the mapping method may regularly repeat calculating the support and texture, for example, every time a duration T has elapsed, where T is, for example, a duration greater than 1 millisecond and / or less than 100 milliseconds. In this case, if one or more new points are determined for each iteration, the calculated support may include these new points or points, otherwise the calculated support may be the same as for the previous iteration.
[0084] In an example, the mapping method may further include detecting that the user's input has been extended. The mapping method may include determining one or more new points from the extended user's input. Determining the one or more new points may be performed for the one or more (initial) points as described above, but considering only the new part of the gesture performed by the user. The mapping method may then include recalculating the 3D support such 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 described above). Alternatively, recalculating the 3D support may include calculating a new 3D support with all the points (i.e., together with the points and the new points). Calculating the new 3D support may be equivalent to calculating the 3D support described above. The mapping method may also include recalculating the texture such that the recalculated texture includes the one or more new points with the texture applied. Recalculating the texture includes updating the texture, which means that only new data for the one or more new points may be calculated. The mapping method may then include updating the rendering of the recomputed first texture onto the recomputed first 3D support. Rendering the recomputed texture onto the recomputed 3D support may be performed as in the rendering described above.
[0085] After updating the rendering, in an example, the mapping method may further include displaying the rendering of the recalculated first texture onto the recalculated first 3D support. For such rendering, the 3D scene may be displayed to a user (e.g., on a screen) and may be based on the results of the rendering update (as known in the art).
[0086] With reference to Figures 8 to 16, examples of implementations of the rendering and / or mapping methods will now be described.
[0087] FIG. 8 illustrates an example of an implementation of the rendering method. The rendering method allows for rendering rough curves in a 3D sketching application. The rendering method includes calculating (S20) a 3D support 202 including one or more points to apply the determined texture. The calculating (S20) includes the generation of an optimal (e.g., virtual) 3D support for displaying the drawing of the 3D scene. The rendering method includes calculating (S40) a texture 201 based on the determined one or more points. The rendering method includes applying a texture to the support to display the actual drawing intent. The rendering method includes rendering (S50) the calculated texture to the calculated 3D support 203. The rendering method may use a shader (UV mapping) to render the texture to the 3D support. This allows the user to control all the effects of brushes, color blends, and drawings before or even after drawing the curve. The rendering method includes management of overlapping drawings to enrich existing supports or create new supports.
[0088] The rendering method optimizes the creation of new supports and executes algorithms capable of handling color blending in real time: if a new curve intersects with an existing curve, the support of the previous curve can be extended to cover the last curve. The texture of the support is also enriched and new colors created by the user are added. The rendering method answers all the limitations of the existing solutions mentioned above. In particular, the rendering method improves the rendering of overlapping 3D curves. Another improvement is that the rendering method offers the same possibilities as 2D drawing software. In fact, the color blending is calculated by rendering 2D textures to the 3D model, offering the same possibilities as 2D drawing software solutions. Additionally, the rendering method also drastically reduces the number of triangles used. The method therefore saves memory space.
[0089] FIG. 9 shows a flow chart of an example of a rendering update. The figure shows the workflow followed by the rendering method to create a new rough curve and, if necessary, a principle of enhancing support and texture. The rendering method includes detecting that the user's input has been extended (S70). In this example, the subsequent steps depend on the result of the test of step S71. In step S71, the rendering 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. a support other than the 3D support previously calculated for the user's input currently considered. If the rendering method determines that there is no another 3D support at the current mouse position (first situation), the rendering method performs steps S72, S73 and S74. Otherwise (second situation), the rendering method performs steps S75, S76 and S77. The method may repeat these steps. For example, the rendering method may repeat these steps for each new point determined or each time a given number X of new points are detected. Alternatively, the rendering method may repeat these steps periodically, for example after each time duration T has elapsed.
[0090] In a first situation, the rendering method includes extending (S72) the 3D support. The extending (S72) includes determining one or more new points from the extended user's input, and recalculating the 3D support such that the recalculated 3D support includes the one or more new points. The rendering method also includes recalculating (S73) a texture such that the recalculated texture includes the one or more new points textured. The recalculating (S73) includes augmenting a current texture (i.e., previously calculated by the rendering method prior to extending S72) to include the one or more new points. The rendering method then includes updating (S74) a rendering of the recalculated texture (i.e., augmented with each new point) to the recalculated 3D support.
[0091] In a second situation, there is another 3D support at the current mouse position. This other 3D support has been calculated (e.g., using a mapping method and based on previously performed user input). This other 3D support is called the first 3D support and the texture rendered on this first 3D support is called the first texture. The currently extended 3D support is called the second 3D support and the texture rendered on this second 3D support is called the second texture. In step S71, the rendering method therefore detects that the second support intersects with the first support. Then, the rendering method includes calculating a third 3D support by merging the first 3D support and the second 3D support (S75). The rendering method also includes calculating a third texture by mixing the first texture and the second texture (S76). The rendering method includes rendering the calculated third texture onto the calculated third 3D support (S77).
[0092] FIG. 10 illustrates two examples of rendering updates.
[0093] A first example 300 illustrates steps S72, S73 and S74 of the so-called first situation of the rendering method described with reference to Fig. 9. The rendering method includes extending the 3D support 301 to become the 3D support 302. During the extension, the rendering method detects that the extension of the 3D support does not intersect with another 3D support. The rendering method therefore proceeds as described above to recalculate the 3D support and textures and update the rendering.
[0094] A second example 310 illustrates steps S75, S76 and S77 of the so-called second scenario of the rendering method described with reference to Fig. 9. In this example, the 3D scene includes 3D supports 312 and 313 in addition to the extended 3D support 311. The rendering method detects that the extended 3D support 311 intersects with the 3D support 312. The rendering method therefore includes calculating a new 3D support 314 by merging the 3D support 311 and the 3D support 312. The rendering 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. Afterwards, the user's input is again extended and the rendering method therefore repeats these steps. Again, the rendering method detects that the extended 3D support 315 intersects with the 3D support 313. The rendering method therefore includes calculating a new 3D support 316 by merging the 3D support 315 and the 3D support 313. The rendering method also includes computing a new texture by mixing the texture rendered on the 3D support 315 with the texture rendered on the 3D support 313 .
[0095] FIG. 11 illustrates an example of computing a texture (S40). The rendering method includes parameterizing (S30) one or more points to be textured. The parameterizing (S30) may include projecting the 3D coordinates of the points into a 2D space that represents the texture (e.g., using known projection algorithms). The rendering method may store the 2D coordinates of each point as UV coordinates 320 on the texture. The rendering method may then include computing (S40) the texture based on the parameterized points 320 (i.e., based on the UV coordinates of these points). For example, computing (S40) may include processing parameters such as thickness, brush shape, compression, etc., to compute a resulting texture. The figure illustrates different resulting textures (321, 322, 323) obtained using different parameter values for the same parameterized point 320.
[0096] 12 to 14 illustrate examples of the use of computed textures and 3D supports. As already explained, the 3D support may not be visible when displayed, in which case it is a 3D shape compatible with other commands of the application. For example, the 3D support may be deformed and / or made more complex as needed. The rendering method may include deforming the 3D support according to the user's intention (e.g., when the user's input is augmented). The rendering method may adapt the texture according to the deformation of the 3D support. As explained in these examples, the 3D support may be a portion of a sphere or a plane.
[0097] FIG. 12 illustrates rendering a texture 322 on a 3D support 331. In this first example, the rendering method calculates the 3D support 331 based on a 3D modeled object (in this example, a sphere 330) present in the 3D scene. The rendering method may include calculating a tessellation (i.e., triangles) of the 3D support 331. In the examples of FIGS. 13 and 14, the rendering method may calculate the 3D support based on the 3D modeled object or without considering the 3D modeled object (e.g., by projecting points on a background image). In particular, FIG. 13 illustrates two examples (341, 342) of 3D supports calculated by the rendering method for rendering a texture 340. The type of 3D support may be selected by the user. For example, the rendering method may include providing the user with a way to create the closest shape from its drawing, creating a 3D support 342 for the texture 340, and using this newly created 3D support 342 instead of the 3D support 341 for rendering. The rendering method may include forming a single surface including each of the one or more determined points (e.g., based on a tooling shape of the drawing formed by the points and the texture). The rendering method may then include calculating a tessellation of this single surface, thereby obtaining a 3D support 342. FIG. 14 illustrates another example of a 3D support 351 for rendering a texture 350 calculated based on the new tessellation. The rendering method may include calculating a single surface based on the contour shape of the drawing (i.e., including the texture). The rendering method may then include calculating a new tessellation of this single surface to best optimize the number of triangles. The 3D support 351 is an example of a tessellation that the rendering method may extract from the contour of the drawing.
[0098] FIG. 15 shows an example of a GUI for a system, where the system is a CAD system.
[0099] The GUI 2100 may be a typical CAD-like interface, with standard menu bars 2110, 2120, and bottom and side toolbars 2140, 2150. Such menus and toolbars include a set of user-selectable icons, each icon associated with one or more operations or functions, as known in the art. Some of these icons are associated with software tools adapted for editing and / or working on the 3D modeled object 2000 displayed in the GUI 2100. The software tools are grouped into workbenches. Each workbench includes a subset of software tools. In particular, one of the workbenches is an editing workbench, suitable for editing geometric features of the modeled product 2000. In operation, the designer may, for example, pre-select a part of the object 2000 and then start an operation (e.g., change dimensions, color, etc.) or edit geometric constraints by selecting the appropriate icon. For example, a typical CAD operation is modeling a hole or a fold of the 3D modeled object displayed on the screen. The GUI may, for example, display data 2500 related to the displayed product 2000. In the illustrated example, the data 2500, displayed as a "feature tree", and their 3D representation 2000, relate to a brake assembly including a brake caliper and a brake disc. The GUI may further show various types of graphic tools 2130, 2070, 2080, for example, to facilitate 3D orientation of objects, to trigger a simulation of the operation of the edited product, or to render various attributes of the displayed product 2000. A cursor 2060 may be controlled by a haptic device to allow the user to interact with the graphic tools.
[0100] FIG. 16 shows an example of a system, where the system is a client computer system, for example a user's workstation.
[0101] The example client computer comprises a central processing unit (CPU) 1010 connected to an internal communication bus 1000, and a random access memory (RAM) 1070 also connected to the bus. The client computer is further provided with a graphical processing unit (GPU) 1110 associated with a video random access memory 1100 connected to the bus. The video RAM 1100 is also known in the art as a frame buffer. A mass storage device controller 1020 manages access to mass storage devices, such as a hard drive 1030. Mass storage devices suitable for tangibly carrying computer program instructions and data include all forms of non-volatile memory, including, by way of example, semiconductor memory devices such as EPROM, EEPROM, and flash memory devices, magnetic disks such as internal hard disks and removable disks, magneto-optical disks. Any of the above may be supplemented by or incorporated in specially designed ASICs (application specific integrated circuits). A network adapter 1050 manages access to a network 1060. The client computer may also include a haptic device 1090, such as a cursor control device, a keyboard, etc. A cursor control device is used in the client computer to allow a user to selectively position a cursor at any desired location on the display 1080. In addition, the cursor control device allows a user to select various commands and input control signals. The cursor control device includes a number of signal generating devices for inputting control signals into the system. Typically, the cursor control device may be a mouse, with the buttons of the mouse being used to generate the signals. Alternatively or additionally, the client computer system may include a sensitive pad and / or a sensitive screen.
[0102] The computer program may include instructions executable by a computer, the instructions including means for causing the system described above to perform the rendering method. The program may be recordable on any data storage medium, including the memory of the system. The program may be implemented, for example, in digital electronic circuitry, or in computer hardware, firmware, software, or a combination thereof. The program may be implemented as an apparatus, for example, as an article of manufacture 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 a program of instructions to perform the functions of the rendering method by manipulating input data and generating output. The processor may thus be programmable and coupled to receive data and instructions from and transmit data and instructions to a data storage system, at least one input device, and at least one output device. The application program may be implemented in a high-level procedural or object-oriented programming language, or, if desired, in assembly or machine language. In either case, the language may be a compiled or interpreted language. The program may be a full installation program or an update program. The application of the program on the system results in either case in instructions for performing the rendering method. The computer program may alternatively be stored and executed on a server in a cloud computing environment, the server being in communication with one or more clients over a network, in which case the processing unit executes instructions constituted by the program, thereby performing the rendering method on the cloud computing environment.
Claims
1. 1. A computer-implemented method for rendering two overlapping textures of a 3D scene, the method comprising: - obtaining a first 3D support (311) containing a rendered first texture; - obtaining a second 3D support (312) containing the rendered second texture; - detecting when said second support (312) intersects with said first support (311); - calculating a third 3D support (314) by merging said first 3D support (311) and said second 3D support (312); - calculating a third texture by mixing said first texture and said second texture; - rendering said calculated third texture onto said calculated third 3D support (314); - displaying said third texture rendered on said third 3D support; 4. A computer-implemented method comprising:
2. the first support and the second support include respective tessellations, and merging the first 3D support and the second 3D support includes computing a union of the tessellations of the first 3D support and a union of the tessellations of the second 3D support. The method of claim 1.
3. Calculating the combination comprises: - aggregating regions of a tessellation of the first 3D support and regions of a tessellation of the second 3D support that do not overlap each other; - merging the aggregated regions by creating a new tessellation connecting the overlapping regions; The method of claim 2 , comprising:
4. Merging the first 3D support and the second 3D support includes: - calculating a surface covering the union of the first 3D support and the union of the second 3D support; - tessellating said calculated surface; The method of claim 1 , comprising:
5. the one or more first points and the one or more second points are coplanar, and merging the first 3D support and the second 3D support includes determining a rectangular surface that includes each of the one or more first points and each of the one or more second points, the determined rectangular surface being composed of two triangles. The method of claim 1.
6. the first texture and the second texture have respective colors, and mixing the second texture with the first texture includes blending the color of the first texture with the color of the second texture at an intersection of the second texture and the first texture.
6. The method according to any one of claims 1 to 5.
7. mixing the second texture with the first texture includes overlaying the first texture with the second texture at the intersection points.
6. The method according to any one of claims 1 to 5.
8. the second texture has a transparency, and the overlaying of the first texture with the second texture is subject to the transparency of the second texture. The method of claim 7.
9. Obtaining each of the 3D supports comprises: - determining (S10) one or more points of said 3D scene to texture from a user input carried out by an input device; - calculating (S20) said 3D support (202, 331, 341, 342, 531) comprising said determined point or points to be textured; - calculating (S40) said texture (201, 321, 322, 323, 332, 340, 350) based on said determined point or points; - rendering (S50) said calculated texture onto said calculated 3D support (203); The method of any one of claims 1 to 8, comprising:
10. Obtaining each of the 3D supports comprises: - parameterizing (S30) said one or more points to be textured, - calculating (S40) the texture comprises calculating the texture on the basis of the parameterized one or more points (320); 10. The method of claim 9, comprising:
11. the 3D scene includes a 3D modeled object (330); The calculating of the 3D support (S20) comprises: - placing each of said one or more points on said 3D modeled object (330); - determining a part of said 3D modeled object (330) that serves as said 3D support (331); The method of claim 9 or 10, comprising:
12. the one or more points are coplanar, and calculating (S20) the 3D support (341) comprises determining a rectangular surface that includes each of the one or more points, the determined rectangular surface being composed of two triangles.
10. The method of claim 9.
13. A computer program comprising instructions which, when executed by a computer, cause the computer to carry out the method according to any one of claims 1 to 12.
14. A computer readable storage medium having recorded thereon the computer program of claim 13.
15. 14. A system comprising a processor coupled to a memory, the memory having the computer program of claim 13 recorded thereon.