Method for calculating visibility of objects in 3D scene

JP2024111824A5Pending Publication Date: 2024-08-30ガドメ
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2024014678
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-02-06
Filing Date
2024-02-02
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

Existing graphics rendering technologies struggle to accurately calculate object visibility in real-time across various render pipeline architectures and computational resources, especially when objects are partially masked or in shadow zones, without relying on stencil buffers that are incompatible with deferred pipelines.

Method used

A method using a dedicated camera clone of the main camera to perform color comparisons before and after rendering, replacing object textures with a predetermined color, and calculating visibility scores through sequential image processing to account for lighting and masking effects, ensuring accuracy and efficiency across different render pipelines.

Benefits of technology

The method enables precise real-time visibility scoring of objects, reducing computational resources and maintaining application performance, while accurately handling partial masking and lighting variations, and is compatible with a wide range of rendering configurations.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

To provide a method for calculating the visibility of objects in a 3D scene.SOLUTION: A method for calculating a visibility score for at least one object in a 3D scene is implemented by a dedicated camera that is a clone of a main camera and is associated with a dedicated render pipeline, and includes the steps of: selecting at least one object from among a plurality of objects in the scene; associating the selected object with a texture image containing only one predetermined color; rendering the scene with the dedicated camera to create at least one dedicated image; reading a color in the dedicated image, for the selected object, at least at one point corresponding to the object in the at least one dedicated image; and comparing the read color with the predetermined color to obtain a visibility score associated with the object.SELECTED DRAWING: None
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The technical field of the invention is that of three-dimensional rendering, i.e. 3D rendering, or 2D vs. 2D rendering, and object visibility detection in applications that use graphics rendering engines, such as video games, virtual worlds, virtual reality, augmented reality, etc.

[0002] The present invention relates to a method for calculating the visibility of objects in a three-dimensional scene, also known as a 3D scene. [Background technology]

[0003] In the art, graphics rendering engines such as Unity, Unreal, and others are commonly used to generate and display video streams that provide a virtual representation of a scene composed of 3D objects in real time.

[0004] The images that make up this video stream are two-dimensional images (or matrix images) also known as "renderings."

[0005] Each rendering is generated and displayed (and is also said to be "drawn") on a rendering plane called the "viewport" and at a predefined angle of view called the "camera". For this purpose, algorithms are used that are combined in a render pipeline used by the graphics rendering engine and integrated on the graphics card.

[0006] The render pipeline uses a representation in the coordinate space (x,y,z) of the 3D objects that make up the scene represented as input data.

[0007] From these input data, and with reference to FIG. 1, each object 100 is projected onto the viewport 110 from a point of view of the camera 120, also defined in the coordinate space (x,y,z).

[0008] Each rendering reproduces the 3D projection, texture (surface appearance), and lighting effects (shadows, reflections, etc.) of object 100.

[0009] The objects as seen by the end user (or viewer) are, for example, everyday objects, buildings, vehicles, and their textures and lighting are realistic, i.e. their appearance is close to their real appearance.

[0010] A camera 120 determines the viewing angle from which the scene is rendered. The position of this camera 120 may change during the video stream. Thus, the point of view used to render the scene may change from one image to the next. As a result, some objects may be visible in some images, or partially visible or completely invisible in other images.

[0011] For example, an object may be seen (and therefore visible) by camera 120 when there are no other objects intervening between object 100 and camera 120 and when the object is sufficiently lit. An object may be partially visible when there is a semi-transparent object intervening between the object and the camera, or when the object is partially located within a shadow zone. Finally, an object may be invisible when it is hidden behind another object or is located within an unlit zone.

[0012] Whether an object is visible in a scene is therefore not persistent in the video stream, and it is also not easy to determine a priori, since the movement of the camera 120 is generally not predictable. However, for some applications there is a need to control and monitor this visibility in real time. For example, knowledge of this visibility allows fine-tuned memory management. If an object is not visible or is no longer visible, the texture associated with that object may not be loaded into or unloaded from memory. Inasmuch as textures are the elements that occupy the most memory space, it is easy to understand the technical benefits of such a visibility calculation method.

[0013] Several solutions exist for this, which consist in expressing the visibility of an object by means of a so-called visibility score that is associated with the object.

[0014] A first solution consists in using the z-buffer technique, which makes it possible to determine the visibility of an object at the time it is drawn. During the production of the final rendering, other objects can therefore be drawn on top of it, which can mask the object whose visibility is being determined, making the visibility calculation inaccurate.

[0015] The second solution consists in using the "raycast" technique. This technique uses "colliders" or collision detectors that are usually used by physics engines to detect collisions between objects. The object for which the visibility is calculated must therefore be associated with such a collider. Added to this constraint is that this technique cannot be applied when an object is located behind another object, even if it is a semi-transparent object, or in a shadow zone.

[0016] A third solution is described in patent FR3112638B1. It consists in using a stencil buffer in a second rendering, intended exclusively to calculate visibility by a second camera that follows the position and characteristics of the main camera at all times and is therefore not displayed, and generated in parallel to the main rendering (which renders the scene from the main camera and is displayed to the user). Strictly speaking, the stencil buffer is used in a pipeline that serves to generate the second rendering, after a step of drawing the opaque objects in the scene. The rendering pipeline is necessarily of the "forward" type, i.e. it allows the opaque and transparent objects in the scene to be drawn in that order.

[0017] This technique is very accurate, which means that it can take into account the lighting and shadows of a scene. For example, it can be used to calculate the visibility of an object even if it is partially masked by another object or is located in a shadow zone. However, it requires access to a stencil buffer, and therefore adapted computational resources, and is not compatible with render pipelines other than the forward pipeline. For example, it cannot be implemented in a "deferred" type pipeline, which uses a different rendering strategy with a different drawing order.

[0018] Therefore, there is a need for a method for computing object visibility scores that is adapted to all render pipeline architectures, whether those architectures are software or hardware. Such a solution should also be able to adapt to available computational and energy resources. [Prior art documents] [Patent documents]

[0019] [Patent Document 1] French Patent No. 3112638 Summary of the Invention [Problem to be solved by the invention]

[0020] The present invention provides a solution to the problems discussed above by allowing visibility scores to be calculated from a second, final rendering rather than from a second, intermediate rendering corresponding to the rendering of opaque objects. [Means for solving the problem]

[0021] For this purpose, color comparison techniques are used that are deployed before and after the generation of the second rendering, making it possible to handle cases where the object whose visibility is to be verified is partially masked by a semi-transparent object or is rendered in a manner that is barely visible due to ambient light that is too weak or too intense, or due to reflections on the object's surface.

[0022] One aspect of the invention therefore relates to a method for calculating a visibility score of at least one object in a three-dimensional scene, the scene being composed of a plurality of objects and being displayed in a viewing zone by a main camera associated with a main render pipeline, the method being performed by a dedicated camera which is a clone of the main camera and is associated with a dedicated render pipeline, comprising the following steps: - selecting at least one object from a plurality of objects of the scene; - For at least one selected object: - associating an object with a texture image that includes only one predetermined color, replacing the texture image of the object associated with the main render pipeline; - rendering the scene with a dedicated camera to create at least one dedicated image; - for at least one selected object, - reading in the dedicated images a color at at least one point corresponding to an object in the at least one dedicated image, - comparing the retrieved color with a predetermined color to obtain a visibility score associated with the object. Including, The method is characterized in that the main camera and the dedicated camera operate sequentially, so that a dedicated image is created before or after the scene is displayed in the display zone.

[0023] Thanks to the invention, a second camera, which is a clone of the main camera (called a dedicated camera since it is used exclusively to calculate the visibility score), makes it possible to reproduce the context of the scene in real time and thus to calculate and communicate (for example to the user) the visibility score in real time. The term "real time" means in sync with the rendering of the scene as displayed to the user in the display zone. For this, a render pipeline is implemented by technical means: a processing unit, a display screen.

[0024] The association of the steps of assigning a plain texture of a predetermined color to the object being tested (associating the selected object with a texture image containing only one predetermined color), the rendering step, and the color comparison step performed based on the rendered image allows the visibility score to represent the visible, partially visible, or invisible aspects of the object in an accurate manner (i.e., as close as possible to what the user sees) and without the use of a stencil buffer.

[0025] Computational accuracy is achieved thanks to several properties.

[0026] Replacing the texture real associated with the selected object with a plain texture of a predefined color, known as a real texture as it is associated with the main render pipeline, makes it possible to provide a robust color standard compared to the real texture (displayed by the main camera), which typically contains multiple colors as well as variations in hue and lighting. The advantage is that even small variations in color, due for example to the presence of semi-transparent objects in the scene or changes in lighting or brightness, can be detected.

[0027] The rendering step, which is carried out consecutively with respect to the texture replacement step, makes it possible to create (without displaying that image) an image (known as the dedicated image) which is identical in every respect to the image displayed by the main camera, except for the texture of the selected object, which assumes a plain texture of a given color. The shading effects (shaders), lighting and all other effects are identical to the rendering displayed by the main camera. The color read out at least at one point corresponding to the selected object in the dedicated image conveys information about these different conditions.

[0028] Measuring the color difference at one or more points of a dedicated image that correspond to points located on an object makes it possible to increase the signal-to-noise ratio of the final visibility score (by averaging the measurements) and / or to obtain a visibility map of the object.

[0029] It should be noted that the sequential operation of the two main and dedicated cameras makes it possible to perform the step of allocating a plain texture image before the rendering of the dedicated camera.

[0030] Thus, the method according to the invention allows to accurately represent the visibility state of several objects in a 3D scene in real time across a wide range of rendering configurations and pipelines, and is simpler to implement than prior art techniques based on stencil buffers.

[0031] According to one preferred embodiment, a visibility score is calculated by taking the lowest visibility score among a first visibility score calculated during a first iteration of the dedicated camera and a second visibility score calculated during a second iteration of the dedicated camera, the first and second iterations being consecutive, and a predetermined color selected for the second iteration being opposite on the color wheel to the predetermined color selected for the first iteration.

[0032] This preferred embodiment makes it possible to avoid false positives (i.e. objects detected as visible when they are not) and therefore to improve the accuracy of the method.

[0033] This preferred embodiment makes it possible to accurately calculate visibility scores, especially when a scene has a color texture close to a predetermined color, and / or even when an object with a color texture close to a predetermined color hides or partially covers an object whose visibility it is desired to measure.

[0034] In addition to the characteristics just discussed in the previous paragraph, the method according to one embodiment of the invention may have one or more additional characteristics from among the following, considered individually or according to any technically possible combination:

[0035] A predetermined color is selected from the list consisting of at least: pink with red, green, and blue components equal to 255, 0, and 255, respectively; and green with red, green, and blue components equal to 0, 255, and 0, respectively.

[0036] Pink is advantageously chosen because it is a color that is generally not very present in the scene. This choice of a given color therefore reduces the probability of finding an object of the same color as the given color intervening between the selected object and the camera. Since this configuration may lead to visibility detection errors (small color differences found at the end of the comparison step indicating anomalous visibility of the selected object), the choice of pink favors a more reliable measurement of the visibility score.

[0037] Reading out the color of a selected object in the dedicated image is performed for a number of points, for example 16 points, corresponding to the selected object in at least one dedicated image, and a point out of the number of points is obtained by cutting the selected object into a zone to be tested and by taking the center point of the zone to be tested.

[0038] It is therefore possible to determine a visibility score at different locations on the object. The advantage is that it is thus possible to take into account that the object partially covers the object being tested or that parts of the object are within the shadow zone.

[0039] Depending on the size of the selected object (which also depends on the resolution of the dedicated image), points of the multiple points may overlap each other, in this case the visibility score is calculated several times for the same point and the final visibility score is the average of the calculated visibility scores.

[0040] The step of comparing the retrieved color with a predetermined color comprises: - calculating, for each red, green and blue component, the absolute difference between the read color and a predetermined color; and - Calculate the average of the calculated absolute differences The color difference is calculated by:

[0041] The step of comparing the read color with a predetermined color includes the steps of: - determining the hue of the read color and the hue of the predetermined color from the red, green and blue components; - calculating the difference between the retrieved hue and the hue of a given color; - weighting the result of the calculated difference between the retrieved hue and the hue of the predetermined color to obtain a hue difference; - comparing the hue difference with a predefined threshold, such as a value of 0.25: - if the hue difference is less than or equal to the threshold, the difference between the read color and the given color is equal to the average of the hue difference and the color difference; - if the hue difference is greater than the threshold, the difference between the read color and the given color is equal to the hue difference, step It is further based on a hue difference calculation including:

[0042] The method is therefore more resilient to changes in the luminance of the scene. Indeed, the hue difference measurement makes it possible to determine whether two colors are similar, even if they differ in luminance (one light, the other dark). The advantage is that the visibility score is accurately determined even if the selected object is masked by a semi-transparent object, or / and the ambient light in the scene is too intense or too weak, making the selected object barely visible, or / and the selected object is subject to reflections that prevent the surface of the object from being clearly seen.

[0043] The image production frequency of the dedicated camera is lower than the calculation frequency of the main camera.

[0044] The dedicated camera creates images at a rate that is less than one-quarter of the rate that the main camera creates images.

[0045] Therefore, the required computational resources are limited and the performance of applications that use the rendering engine is not degraded.

[0046] The resolution of the dedicated image is lower than the rendering resolution of the main camera.

[0047] Similar to the reduction in frequency, reducing the resolution of the dedicated images means that the performance of the application does not degrade while at the same time allowing tracking of visibility in real time.

[0048] The smallest resolution of the dedicated images corresponds to an image width of 96 pixels.

[0049] This value has been found to provide a low, yet accurate and efficient visibility score that does not impact application behavior.

[0050] The method further includes an additional step performed for at least one selected object after the color comparison step of associating the object with a texture image associated with the main render pipeline, referred to as a real texture image, and replacing the texture image which only contains the predetermined color.

[0051] The method further comprises a step of testing the size of the selected object, including a step of determining the surface area occupied by the selected object on the dedicated image and the surface area ratio between said surface area occupied by the object and the surface area of ​​the dedicated image, and if this ratio is below a threshold value, for example equal to 1.5%, then the visibility score is equal to 0 and the selected object is considered to be too small to be visible.

[0052] In addition to the characteristics just discussed in the previous paragraph, the method may have one or more additional characteristics from among the following, considered individually or according to any technically possible combination: The method may further comprise a step of determining for a user a compliance with a visibility condition of the at least one object, said visibility condition depending on a visibility score of the at least one object. - the visibility condition may then further depend on predefined parameters, including a minimum duration of visibility of at least one object, and / or a surface area ratio between the surface area occupied by the object and the surface area of ​​the dedicated image, and / or an angle between the direction of the normal to the surface area occupied by the object and the normal direction of the display zone. - After the step of determining compliance with the visibility conditions, the method may comprise a step including a step of modifying the scene and / or triggering additional events inside or outside the scene. - As an alternative to the step of determining for a user the compliance of the at least one object with a visibility condition, the method may further comprise a step of repeating the step of modifying the object and calculating a visibility score of the modified object when the visibility score of the at least one object differs from a predetermined visibility score.

[0053] The invention and its different applications will be better understood on reading the following description and on examining the accompanying figures.

[0054] The figures are discussed to illustrate the scope of the invention and not to limit it in any way. [Brief description of the drawings]

[0055] [Figure 1] FIG. 2 illustrates a simplified illustration of the operation of a graphics rendering engine. [Diagram 2]FIG. 2 is a schematic diagram illustrating the sequence of steps in a computational method according to the invention; [Diagram 3] FIG. 1 is a schematic diagram of one embodiment of a computer. [Figure 4] FIG. 3 illustrates a simplified illustration of the operation of a graphics rendering engine used to implement the steps of FIG. 2. [Diagram 5] 5 is an exemplary diagram of a 3D scene rendered by the main camera of the graphics rendering engine of FIG. 4 during its next iteration. [Figure 6] FIG. 6 is a simplified exemplary diagram of the 3D scene of FIG. 5 obtained at the end of the third step of FIG. 2; [Figure 7] FIG. 6 is a simplified illustrative diagram of the rendering of the 3D scene of FIG. 5 by a dedicated camera of the graphics engine of FIG. 4. [Figure 8] FIG. 8 is an enlarged view of FIG. [Figure 9] FIG. 3 illustrates a preferred embodiment of the method of FIG. 2. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0056] Unless otherwise specified, identical elements appearing in different figures will have a single reference symbol.

[0057] The present invention relates to a method for calculating visibility scores associated with objects in a 3D virtual scene, and in particular to a calculation method that combines efficiency, accuracy and ease of implementation.

[0058] FIG. 2 illustrates diagrammatically the sequence of steps S205, S210, S220, S230, S240, S250, S260 and S270 of a computational method 200 according to the invention.

[0059] In practice, and with reference to FIG. 3, the method 200 is implemented by a system 3, which may comprise a computer 30, a games console, a smartphone, and more generally, any device capable of implementing a graphics rendering engine.

[0060] In this description, processing actions are performed by processing units, i.e. microprocessors 300, using memory 301. These microprocessors may be general purpose microprocessors, also called CPUs, and / or graphics microprocessors, also called GPUs.

[0061] The system 3 may comprise a screen 31 and / or a keyboard 32 .

[0062] The steps of method 200 are described below with reference to FIGS. 2, 4, 5, 6, 7, and 8.

[0063] The method begins with step S205 of declaring a dedicated camera 420 (see FIG. 4) that is to be added to the main camera 120. A programming interface of the rendering engine is used to declare and instantiate this dedicated camera 420.

[0064] In the remainder of this description, the term "camera" refers to the (virtual) viewpoint from which the scene is rendered. The expression "camera renders" refers to generating (or rendering) a 2D image from the camera's point of view from the 3D scene. For this purpose, the camera is associated with a render pipeline implemented by a processing unit.

[0065] A render pipeline consists of a sequence of algorithmic bricks designed to pixelate geometric objects in a 3D scene to obtain a 2D image.

[0066] Finally, "camera frequency" refers to the number of 2D images per second generated by the camera, which also corresponds to the number of camera iterations per second.

[0067] 5 represents diagrammatically a 3D scene 50 as rendered and displayed in the viewing zone by the main camera 120 and in which it is desired to verify the visibility of one or more objects. This scene 50 consists of several 3D objects 501, 502, 503, 504, each object having an identifier. An object is defined by a geometric shape and a list of attributes (textures, etc.).

[0068] The main camera 120 is associated with the main render pipeline.

[0069] The main camera 120 generates a series of consecutive images on a display zone (for example occupying all or part of the screen 32 illustrated in FIG. 3) and displays it to the user of the application. The time between two images in the series of images depends on the frequency of the main camera 120. The frequency is adapted to the human vision so as to give the necessary fluidity for real-time viewing of the scene. As a minimum, the image creation frequency of the main camera 120 is 30 images per second. Preferably, the frequency of the main camera 120 is 60 images per second. The frequency can also be 120 images per second.

[0070] The dedicated camera 420 is a clone of the main camera 120, i.e., it tracks the position and characteristics (position, scale, filter options, cutting plane, etc.) of the main camera 120 at all times. For example, the dedicated camera 420 reproduces shadows, lighting, and other effects identical to the main camera 120.

[0071] Dedicated camera 420 differs from camera 120 in several respects.

[0072] First, the dedicated camera 420 is associated with a dedicated render pipeline that is modified relative to the main render pipeline to integrate algorithms for performing steps S210 to S270 of the method 200.

[0073] Secondly, the dedicated camera 420 renders a so-called dedicated image in an "off-screen" manner, meaning that this dedicated image is not displayed on the screen 31. The dedicated image is therefore intended solely for calculating the visibility score, and not for the user of the application (unlike the main rendering displayed by the main camera 120).

[0074] Third, the dedicated camera 420 may create images less frequently than the main camera 120 .

[0075] The image production frequency of the dedicated camera may therefore be a quarter or less than the image production frequency of the main camera.

[0076] Fourth, the resolution of the dedicated image rendered by the camera 420 may be reduced, i.e. lower than the resolution of the main rendering. The resolution is defined, for example, by the size of the dedicated image. Preferably, the smallest dimension of the dedicated image is 96 pixels and the largest dimension is calculated relative to the dimensions of the screen 31.

[0077] Reducing the frequency and resolution of the dedicated camera 420 ensures that the performance of the graphics engine is not adversely affected.

[0078] Finally, it should be noted that the dedicated camera 420 and the main camera 120 work sequentially. Stated differently, one of the two cameras 120, 420 is rendered before the other. The rendering of the dedicated image is therefore triggered with a small time delay, for example 33 ms, relative to the rendering and display of the scene image in the main window.

[0079] Once a dedicated camera 420 is declared in step S205, steps S210, S220, S230, S240, S250, and optionally steps S260 and S270 are performed consecutively in each iteration of the dedicated camera 420.

[0080] Step S210 of method 200 begins with 3D scene 50, as described above with respect to Figure 5. This scene is the scene that will be displayed by main camera 120 during the next iteration of that main camera 120.

[0081] Step S210 is the step of selecting one or more objects 600 from the plurality of objects 501, 502, 503, 504 in the 3D scene 50. In the given example, one object 600 is selected, which corresponds to the object 502 in the scene 50.

[0082] The selected objects 600 are those objects 600 whose visibility is desired to be measured in real time by a visibility score calculation.

[0083] The selection step S210 creates, in the memory zone 301 of the system 3 implementing the method 200 according to the invention, a list of identifiers associated with each selected object 600, this list including the geometry of the object and the texture of the object. The texture of the selected object 600 is typically an image called a texture image. In this step, the texture 510 of the object 600 is the texture that is displayed to the user. The texture 510 will be called the "real texture 510" or the "real texture image 510" of the selected object 600.

[0084] Step S210 is followed by step S220, which consists in replacing the real texture image 510 of the selected object 600 with a texture image containing only one predetermined color.

[0085] For this purpose, during sub-step S2201 of step S220, the selected object 600 (or each selected object) is associated with a texture image 610 which only comprises a single predefined color 6101. In sub-step S2202, which may be performed before or after the association steps S220-S2201, it is further possible to extract and store in memory the real texture image 510 of the selected object 600 (or of each selected object). The term "save" refers to storing in memory by reference to the texture image, but not a copy of the texture image.

[0086] Thus, at the end of step S220, and with reference to Figure 6, a so-called initial scene 60 is obtained, which is identical to the 3D scene 50 displayed by the main camera 120, except for the selected objects 600, which bear a plain texture 610 of a predefined color 6101. All other attributes (or settings and effects), e.g. lights, shading, shaders, etc., of these selected objects 600 are preserved.

[0087] A plain texture means that a single predefined color 6101 is used for a single object 600 .

[0088] Preferably, the predetermined color 6101 is a color that is not commonly present in 3D scenes, such as pink with a red component equal to 255, a green component equal to 0, and a blue component equal to 255 (i.e., RGB(255,0,255)).

[0089] When multiple objects are selected, the same predetermined color 6101 or different predetermined colors may be used.

[0090] Step S220 is followed by step S230 of generating, by a dedicated camera, a dedicated image of the real scene 60 captured at the end of step S220.

[0091] FIG. 7 shows an example of a specialized rendering 70 of a real scene 60 including objects 501 , 503 and 504 and a selected object 600 .

[0092] The selected object 600 is in the background.

[0093] The first object 501 is a certain amount of distance from the selected object 600 and has no influence on the selected object 600 .

[0094] A second object 503 is in the middle plane and partially overlaps the selected object 600 .

[0095] A third object 504 is in the foreground. Furthermore, this third object 504 is transparent and obscures the second object 503 and partially obscures the selected object 600.

[0096] The selected object 600 takes on a new color 710 that depends on the scene and the predefined color 610 that was assigned in the previous step S220.

[0097] The new color 710 actually results from a modification of the plane texture 610 due to the presence of an object in a plane between the plane of the selected object and the camera 420, or due to the presence of a shadow zone covering the selected object 600.

[0098] In the example of a dedicated image 70 illustrated in FIG. 7, the colors 710 are: the selected object 600 is not modified with respect to a given color 6101 in the uncovered zone 711, - the selected object 600 is modified with respect to a given color 6101, with some amplitude, in the zone 712 covered by the third transparent object 504, In the zone 713, where the selected object 600 is covered by the second object 503, it is modified with a larger amplitude than in the zone 712.

[0099] Thus, the more the selected object 600 is visible (not covered, such as in zone 711 ), the smaller the color difference between the color 710 in the dedicated image and the predetermined color 6101 .

[0100] Conversely, the less visible the selected object 600 is (covered by some object, like in zone 713 ), the greater the color difference between the color 710 in the dedicated image and the predefined color 6101 .

[0101] The color difference between the color 710 in the dedicated image (70) and the predefined color texture 6101 is therefore correlated to the visibility or invisibility state of the selected object 600: the greater the difference, the less visible the object is, and conversely, the smaller the difference, the more visible the object is.

[0102] The dedicated image 70 is therefore essentially an identical rendering to the main rendering that will be generated during the next iteration of the main camera 120. One difference is that the selected object or objects 600 take on a new color 710. Another difference may be the resolution of the dedicated image 70, depending on the parameter settings of the embodiment of the present invention.

[0103] In other words, it is the same scene that is rendered on the dedicated image 70 and on the image displayed by the main camera 120, but for some objects corresponding to the selected object 600, the real texture 510 is changed to a plain texture 610 of a predetermined color 6101 for rendering by the dedicated camera 420, but is still used by the main camera 120.

[0104] Step S230 is followed by steps S240 and S250, which aim to measure this color difference and to express it by a visibility score.

[0105] Step S240 is executed from the dedicated image 70. It consists in reading the color 710 of the object 600.

[0106] This step S240 may be performed by the dedicated camera 420 at the end of the rendering by adding a "compute shader" in a dedicated pipeline.

[0107] Referring to FIG. 8, the color 710 of a selected object 600 is retrieved at least one point 810 belonging to the object 600 .

[0108] Preferably, the color 710 is read out successively at each of a plurality of points belonging to the object, which points are determined by a preceding step (not represented in FIG. 2) of cutting the object into zones to be tested and determining a central point within each zone to be tested.

[0109] The number of points is, for example, 16. A point corresponds to a pixel.

[0110] Depending on the resolution chosen for the dedicated image, the points 810 may be overlapped with one another, in which case a color readout is made at the same point several times.

[0111] This is the case, for example, when the resolution of the dedicated image 70 is minimal (96 pixels for the smallest dimension of the dedicated image), the size of the selected object in the image may then only occupy a few pixels.

[0112] Step S250 follows step S240. It consists in comparing, at each measurement point 810, the color 710 obtained on the dedicated image 70 and the predetermined color 6101.

[0113] The result of this color comparison is advantageously between 0 (same or very similar colors) and 1 (opposite or very distant colors).

[0114] Two computational techniques can be implemented to compare colors.

[0115] The first technique consists in measuring the color difference by calculating the absolute difference between the read color 710 and the predetermined color 6101 for each red, green, and blue component, and then averaging these calculated absolute differences.

[0116] The second technique consists in associating a hue comparison with a color difference measurement. A hue comparison makes it possible to detect that one color is identical to another, even if the lighting is different. The comparison is therefore more accurate and more robust to changes in scene luminance.

[0117] More precisely, the second technique comprises the following steps: - determining the hue of the read color 710 and the hue of the predetermined color 6101 from the red, green and blue components; - calculating the difference between the retrieved hue and the hue of a given color; - weighting the result of the calculated difference between the retrieved hue and the hue of the predetermined color, the weighting result being between 0 and 1, to determine a weighting hue difference; - comparing the hue difference with a predefined threshold, such as 0.25: - if the hue difference is less than or equal to a threshold, the difference between the read color and the given color is equal to the average of the hue difference and the color difference; - if the hue difference is greater than the threshold, the difference between the read color and the given color is equal to the hue difference, step Includes.

[0118] The final result is a value between 0 (close or identical colors) and 1 (opposite or distant colors).

[0119] A partial visibility score Sp is then determined from the final result, this partial visibility score being between 0 (not visible test zones 800) and 1 (visible test zones 800).

[0120] A partial visibility score Sp is therefore obtained for each test point 810 (ie, each test zone 800).

[0121] A “final” visibility score S of the selected object 600 can then be determined by calculating the average of all the partial visibility scores Sp obtained in step S250, this final score S also being between 0 (non-visible object) and 1 (visible object).

[0122] It should be noted that the partial visibility score Sp is used to verify the visibility of the selected object 600 if: - the object 600 is partially masked by a semi-transparent object; - The ambient light in the scene is too intense or too weak, making objects barely visible, - The object is reflected so that its surface cannot be seen clearly.

[0123] The visible / invisible state may be determined from the final visibility score S of the object 600 and a threshold value.

[0124] The final visibility score S and / or the partial visibility score Sp are then communicated to the user of the application or to other users by communication means (not shown).

[0125] When the real texture image 510 is saved during step S220, step S250 may be followed by step S260, which consists in replacing the plain texture image 610 of a given color 6101 in the initial scene 60 with the real texture image 510.

[0126] To this end, the texture image 510 extracted and stored during step S220 is associated with each selected object 600.

[0127] Since the main camera 120 and the dedicated camera 420 operate sequentially, the rendering of the main camera 120 occurs before or after the rendering of the dedicated camera 420, i.e., before replacing the real texture image 510 with the plain texture image 610 (step S220), or after restoring the real texture image 510 (step S260) while the plain texture image 610 is used for the rendering 70 by the dedicated camera 420.

[0128] In other words, the rendering of the two main and dedicated cameras 120, 420 is never done simultaneously, making it possible to always use the real texture image 510 for the main camera 120 and the plain texture image 610 for the dedicated camera 420.

[0129] Following step S260, a step S270 may also be performed, which consists in adding a visibility criterion relating to the size of the selected object 600 in the scene 50. This step S270 aims to indicate as not visible an object 600 whose size is too small compared to the size of the display zone. This may be because the object is located at a long distance from the camera 120.

[0130] For this purpose, step S270 consists in determining the surface area occupied by the selected object 600 on the dedicated image 70 and the surface area ratio between the surface area occupied by the previously determined object and the surface area of ​​the dedicated image 70; if this ratio is less than a threshold value, for example 1.5%, the visibility score is equal to 0 and the selected object is considered to be too small to be visible.

[0131] A preferred embodiment of the method 200 is described below with respect to FIG.

[0132] In this preferred embodiment, the visibility score S is calculated by taking the lowest visibility score among a first visibility score S1 calculated during a first iteration I1 of the dedicated camera 240 and a second visibility score S2 calculated during a second iteration I2 of the dedicated camera 240.

[0133] The first and second iterations I1, I2 are consecutive iterations.

[0134] The predetermined color selected for the second iteration I2 is opposite on the color wheel to the predetermined color selected for the first iteration, for example, if pink RGB(255,0,255) is selected for the first iteration I1, then green RGB(0,255,0) will be selected for the second iteration I2.

[0135] This preferred embodiment has the advantage of eliminating false positives.

[0136] To illustrate this, let us take an example of a scene that is essentially pink in color: if a predefined color is used, which is also pink, the selected object 600 will unusually be detected as visible during a single iteration even if it is hidden behind another object in the scene, since the colors are close.

[0137] Similarly, if the object 600 being tested is hidden behind another object that is colored pink, the object 600 will obtain an abnormally high visibility score S1 with the first iteration I1 that uses a pink colored texture.

[0138] During the next iteration, by using a second color opposite to pink, for example green (with red, green, and blue components equal to 0, 255, and 0, respectively), the object 600 will be detected with a much lower visibility score S2 due to the difference between pink (of the scene or of objects obscuring the tested object) and green (of the tested object 600). By using this second visibility score S2, the object will be properly detected as not visible or barely visible, avoiding false positives.

[0139] Conversely, if the object being tested is obscured by another object that is green, the first iteration will give a low score, corresponding to the actual visibility of the object being tested in the scene.

[0140] It is further noted that it is not possible to obtain false negatives.

[0141] Thus, the method 200 according to the present invention makes it possible to track the visibility of objects in a 3D virtual scene in real time using visibility scores associated with the objects, with a combination of accuracy and efficiency across a wide range of configurations and rendering pipelines, while being simpler to implement than the stencil buffer technique described in patent FR3112638B1.

[0142] The method 200 can be used in any field of application that uses 3D virtual scenes, such as video games, virtual reality, and augmented reality, by enabling tracking of visibility by one or more users of objects in a 3D virtual scene in real time.

[0143] The visibility score thus makes it possible to evaluate whether an object, for example containing information of interest, has been seen by a user or users. This object of interest may for example be used to display marketing information, but also educational information or information relating to safety regulations.

[0144] The method 200 may therefore include an optional step for determining whether the user has seen the object, at least in part, based on a visibility score calculated for this object. The verb "see" in the expression "whether the user has seen the object" is understood here to mean visual perception, i.e. that the user has actually perceived the object. In other words, the method may include an optional step of determining that a visibility condition of the object is satisfied (for the user), where the visibility condition depends on the visibility score calculated for the object and on at least one predetermined visibility score.

[0145] The visibility condition may further depend on predefined parameters, including a minimum visibility duration of at least one object, and / or a surface area ratio between the surface area occupied by the object and the surface area of ​​the dedicated image, and / or an angle between the normal direction to the surface area occupied by the object and the normal direction of the display zone. The minimum visibility time typically corresponds to the minimum time required for a user to perceive the presence of an object in a scene and to perceive the information content of that object. For example, the visibility condition is said to be fulfilled when the visibility score calculated for a given object, e.g. the final visibility score S, is equal to 1 for a duration longer than 2s.

[0146] The method 200 may then include modifying the scene upon determining whether the visibility condition is satisfied.

[0147] Thus, an optional final step of modifying the virtual environment may be performed when the visibility score of the object is below the first predefined visibility score. For example, the same object may be duplicated and / or displaced in the three-dimensional scene as long as the visibility score of said object is lower than the first predefined visibility score. In this case, the displacement may be performed at a particular point in the three-dimensional scene where the probability of said object being seen is high.

[0148] In a complementary and / or alternative manner, the object may be removed and / or displaced in the three-dimensional scene when the visibility score of the object is greater than a second predefined visibility score. In this case, the displacement may be made at a particular point in the three-dimensional scene where the object has a low probability of being seen. The method therefore optimizes the three-dimensional scene to ensure that the targeted information is seen by the user.

[0149] The optimization further saves memory and computational resources, since if an object has already been seen, it can, for example, be deleted and / or moved so that it is no longer displayed. Furthermore, the display of the object can be modified. Indeed, thanks to the visibility score thus calculated, textures associated with non-visible objects may not be loaded into memory or may be unloaded from memory.

[0150] In a first example of application, the method can be used to evaluate the effectiveness of vocational training when it is used within the scope of vocational training programs, for example using virtual reality and / or augmented reality. Indeed, thanks to the visibility score it is possible to objectively determine where and how, i.e. on which object, the learners focus their attention. This evaluation can be used, for example, to improve teaching methods and / or to evaluate the learners.

[0151] For example, the visibility scores may be used to analyze learner behavior and to understand how different types of learners, e.g., learners at different levels, focus their attention on different aspects of a vocational training program.

[0152] In a second example of application, the method may, for example, identify objects representing products for sale that have generated the most interest from a user or users. The method may then include optional steps, when performed with respect to several objects in a scene, including the following operations: - ordering the calculated visibility scores for each object in the scene; and - Determining the object with the highest visibility score.

[0153] This optional step may be followed by a further step that includes modifying the layout of one or more of said objects according to the ordering of their visibility scores. Thus, thanks to the visibility scores, it is possible to optimize the layout and appearance of one or more products represented in the 3D virtual scene by one or more objects, for example by customizing. Finally, it is even possible to perform market research and product testing by analyzing the visibility scores of different objects arranged in the 3D virtual scene.

[0154] In a third example of use, the method may enable measuring the effectiveness of one or more properties of an object so that the object generates interest on the part of one or more users. For example, the object may be used to advertise safety information or objects for sale.

[0155] Stated differently, the visibility score may be used to test several alternatives for the object. By a testing method known as "A / B testing", the visibility scores of these alternatives may be compared and the alternative with the best visibility score may be retained. In effect, the method 200 thus: using a visibility score of at least one object, - when the visibility score of at least one object differs from the predetermined visibility score, modifying the object and repeating the calculation of the visibility scores for the modified object. The method may further include the steps of:

[0156] Modifying an object means modifying information associated with the object, or of the object's representation, or modifying the location of the object in the scene. This step of using the visibility score allows advertising content to be reallocated, for example on the fly, to several locations in the scene in order to maximize the visibility of the advertising content. It also allows using the visibility score to compare different alternatives (or versions) of the same object.

[0157] In a fourth example of application, the method can allow an additional event to be triggered when the visibility score is less than or greater than a predefined visibility score. The event can be, for example, an additional object, or visual and / or haptic feedback, and / or the creation of a sound. The event can, for example, allow attention to be drawn to an object such that the visibility score of the object is increased. The event can even be used to convey other information. For example, the event can consist of displaying audio advertising content and / or additional advertising content in the form of immersive and / or interactive elements only when the user maintains a viewing angle for a time greater than a predefined time.

[0158] In a fifth example of use, the method can enable optimization of user interfaces and user experiences. For example, the visibility score can be used to analyze which parts of a user interface attract the most attention from a player in order to improve the design of the user interface and user experience. For example, the visibility score can be used to determine which buttons or features are most and / or least gazed upon by a user.

[0159] In a sixth example of application, the method can enable the difficulty level of a video game or training to be adapted to the level of the user. For example, the visibility scores of the main elements of a certain level can ensure that these main elements are neither too visible nor too difficult to find.

[0160] In a seventh example of use, the method may be used to improve a tutorial. In particular, the method may track the visibility of instructions or hints given during the tutorial so as to determine whether those instructions or hints are easily noticed and understood by the user.

[0161] In an eighth example of application, the method can identify anomalous user behavior, such as a user whose behavior is to ignore objects whose visibility score is above a threshold visibility score, or conversely, a user who, like a gamer, sees an opponent through a wall in a shooter game.

[0162] In a ninth example of application, the method can allow the improvement of the behavior of different characters of a 3D virtual scene controlled by artificial intelligence. For example, thanks to the visibility score, it is possible to adapt the behavior of the artificial intelligence of a targeted character depending on the visibility of said character. This therefore results in more realistic characters that are more difficult to predict. [Explanation of symbols]

[0163] 3. System 30 Computers 31 screens 32 Keyboard 50 3D scenes, scenes, 3D scenes 60 Early Scenes, Real Scenes 70 Dedicated Rendering, Dedicated Images, Rendering 100 Objects 110 Viewport 120 camera, main camera 200 Calculation method, method 300 Microprocessors 301 Memory, Memory Zone 420 Dedicated Camera, Camera 501 3D object, object, first object 502 3D objects, objects 503 3D object, object, second object 504 3D object, object, third object 510 Texture, Real Texture, Real Texture Image, Texture Image 600 Objects 610 Texture Image, Plain Texture, Plain Texture Image 6101 Predefined color, Predefined color texture 710 New colors, colors Zones 711, 712, 713 800 Test Zone 810 points, measurement points, test points I1 First iteration I2 Second iteration S final visibility score, final score, visibility score S1 1st visibility score, visibility score S2 Second visibility score, visibility score S205, S260 Step S210 Step, selection step, step to select S220 step, Association step S2201 Substep, Association step S2202 Substep S230 Step S240 Step, read step S250 Steps, Steps to Compare S270 Step, step to test Sp Partial visibility score, visibility score

Claims

1. A method (200) for calculating a visibility score (S, Sp) of at least one object (600) in a three-dimensional scene (50), the scene (50) being composed of a number of objects (501, 502, 503, 504) and being displayed in a display zone by a main camera (120) associated with a main render pipeline, the method being performed by a dedicated camera (420) which is a clone of the main camera (120) and associated with a dedicated render pipeline, comprising the following steps: - selecting (S210) at least one object (600) from a plurality of objects of the scene, for at least one selected object (600), a step (S220) of associating with the object (600) a texture image (610) that contains only one predefined color (6101) and replacing the texture image (510) of the object associated with the main render pipeline; - rendering (S230) the scene by a dedicated camera to produce at least one dedicated image (70); for at least one selected object (600), - reading (S240) in the dedicated image (70) a color (710) at at least one point (810) corresponding to an object (600) in at least one dedicated image (70), Comparing the retrieved color (710) with a predefined color (6101) to obtain (S250) a visibility score (S) associated with the object (600). Including, A method (200) characterized in that the main camera (120) and the dedicated camera (420) operate sequentially, such that a dedicated image (70) is created before or after the scene is displayed in the display zone.

2. 2. The method (200) of claim 1, characterized in that the visibility score (S) is calculated by taking the lowest visibility score from a first visibility score (S1) calculated during a first iteration (I1) of the dedicated camera (420) and a second visibility score (S2) calculated during a second iteration (I2) of the dedicated camera (420), the first and second iterations (I1, I2) being consecutive and the predetermined color selected for the second iteration (I2) being opposite on the color wheel to the predetermined color selected for the first iteration (I1).

3. 3. The method (200) according to claim 1 or 2, characterized in that the predetermined color (710) is selected from the list formed by at least pink with red, green and blue components equal to 255, 0 and 255 respectively, and green with red, green and blue components equal to 0, 255 and 0 respectively.

4. A method (200) according to claim 1 or 2, characterized in that the step (S240) of reading out the color (710) of the selected object (600) in the dedicated image (70) is performed for a number of points (810), for example 16 points, corresponding to the selected object (600) in the at least one dedicated image, the number of points being obtained by cutting the selected object (600) into the zone (800) to be tested and taking the center point (810) of the zone to be tested.

5. A step of comparing the read color (710) with a predetermined color, - calculating, for each red, green and blue component, the absolute difference between the read color (710) and the predetermined color (6101); and - calculating the average of the calculated absolute differences; 3. The method (200) according to claim 1 or 2, characterized in that the color difference is obtained by calculating the color difference by:

6. The comparison of the read color (710) with a predetermined color is carried out by the following steps: - determining the hue of the read color (710) and the hue of the predetermined color (6101) from its red, green and blue components; - calculating the difference between the hue read and the hue of a given color; - weighting the result of the calculated difference between the retrieved hue and the hue of the predetermined color to obtain a hue difference; - comparing the hue difference with a predefined threshold, such as the value 0.25, if the hue difference is less than or equal to the threshold, then the difference between the read color (710) and the predefined color (6101) is equal to the average of the hue difference and the color difference; If the hue difference is greater than the threshold, the difference between the read color (710) and the predetermined color (6101) is equal to the hue difference, step 6. The method (200) of claim 5, further based on a hue difference calculation comprising:

7. The method (200) according to claim 1 or 2, characterized in that the image creation frequency of the dedicated camera (420) is lower than the calculation frequency of the main camera (120).

8. 8. The method of claim 7, wherein the image production frequency of the dedicated camera is equal to or less than one-fourth the image production frequency of the main camera.

9. The method (200) according to claim 1 or 2, characterized in that the resolution of the dedicated image is less than the render resolution of the main camera (120).

10. 10. The method (200) of claim 9, characterized in that the smallest resolution of the dedicated image (70) corresponds to an image width of 96 pixels.

11. Method (200) according to claim 1 or 2, characterized in that the method further comprises a step (S270) of testing the size of the selected object (600), including a step of determining the surface area occupied by the selected object (600) on the dedicated image (70) and the surface area ratio between said surface area occupied by the object and the surface area of ​​the dedicated image, whereby if this ratio is below a threshold value, for example equal to 1.5%, the visibility score is equal to 0 and the selected object is considered to be too small to be visible.

12. 3. The method (200) of claim 1 or 2, further comprising a step of determining for a user the suitability of at least one object with a visibility condition, said visibility condition depending on a visibility score (S, Sp) of the at least one object (600).

13. The method (200) according to claim 12, wherein the visibility condition further depends on predetermined parameters including a minimum duration of visibility of at least one object (600), and / or a surface area ratio between the surface area occupied by the object (600) and the surface area of ​​the dedicated image, and / or an angle between a direction of a normal to the surface area occupied by the object (600) and a normal direction of the display zone.

14. The method (200) of claim 12, further comprising, after the step of determining compliance with the visibility conditions, a step of modifying the scene (50) and / or a step of triggering an additional event inside or outside the scene (50).

15. The method (200) according to claim 1 or 2, further comprising the step of repeating the steps of modifying the objects (600) and calculating the visibility scores of the modified objects when the visibility score (S, Sp) of at least one object (600) differs from a predetermined visibility score.