FR2968812A1 - Method for rendering images in real-time from virtual three-dimensional scene, involves building data structure by merging all static objects of scene before making combinations of three-dimensional geometric data by spatial proximity - Google Patents

Method for rendering images in real-time from virtual three-dimensional scene, involves building data structure by merging all static objects of scene before making combinations of three-dimensional geometric data by spatial proximity Download PDF

Info

Publication number
FR2968812A1
FR2968812A1 FR1060281A FR1060281A FR2968812A1 FR 2968812 A1 FR2968812 A1 FR 2968812A1 FR 1060281 A FR1060281 A FR 1060281A FR 1060281 A FR1060281 A FR 1060281A FR 2968812 A1 FR2968812 A1 FR 2968812A1
Authority
FR
France
Prior art keywords
scene
objects
animated
data structure
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
FR1060281A
Other languages
French (fr)
Other versions
FR2968812B1 (en
Inventor
Marc Germain
Abilio Machado
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
AKKA Ingenierie Produit SAS
Original Assignee
Real Fusio France SAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Real Fusio France SAS filed Critical Real Fusio France SAS
Priority to FR1060281A priority Critical patent/FR2968812B1/en
Publication of FR2968812A1 publication Critical patent/FR2968812A1/en
Application granted granted Critical
Publication of FR2968812B1 publication Critical patent/FR2968812B1/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/06Ray-tracing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Graphics (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The method involves building a model of a data structure of a virtual three-dimensional (3D) scene (Sc) to enable a fast search of intersections between rays and the 3D scene, where the data structure is used to group elements of the 3D scene by spatial proximity. The data structure is built by merging all static objects (OS) of the 3D scene before making combinations of 3D geometric data by spatial proximity, where the data structure is built with all the static objects and animated objects (OA) that are marked only when animation is activated. An independent claim is also included for a computer program product for rendering images in real-time from a virtual 3D scene.

Description

La présente invention a pour objet un procédé et un système de rendu d'images d'une scène virtuelle en trois dimensions en temps réel. Un procédé de rendu en trois dimensions en temps réel consiste à générer une image d'une scène, comprenant éventuellement des éléments animés, dans l'instant précédant son affichage sur un support, par exemple un écran. Un rendu en trois dimensions ou 3D en temps réel est différent d'un rendu en trois dimensions dit « précalculé » dans la mesure ou le rendu de la scène est immédiat et que l'utilisateur a la possibilité de manipuler et d'interagir directement avec la scène, par exemple pour manipuler et changer les couleurs d'un objet, se déplacer au sein d'un univers virtuel, configurer les accessoires d'une automobile, simuler des cas d'urgence. Le rendu 3D des images s'effectue directement sur un périphérique d'affichage dans le cas d'un rendu temps-réel, contrairement à un rendu 3D précalculé dans lequel le résultat du rendu est une image ou une vidéo non modifiable. Pour que le temps de calcul d'un procédé de rendu 3D temps-réel soit imperceptible pour un utilisateur, il doit être inférieur à la persistance rétinienne. La vitesse de rendu des images étant mesurée en image par seconde (fps) ou Hertz (Hz), il apparaît que l'impression pour l'utilisateur d'un mode interactif existe à partir d'une vitesse de rendu de l'ordre de 6 fps, et qu'un procédé de rendu peut être considéré comme temps-réel à partir de 15 fps. Au delà de 72 fps, l'utilisateur ne peut plus remarquer de différence si la vitesse de rendu est encore augmentée. The present invention relates to a method and a system for rendering images of a virtual scene in three dimensions in real time. A real-time three-dimensional rendering method consists in generating an image of a scene, possibly comprising animated elements, in the instant preceding its display on a medium, for example a screen. Real-time rendering in three dimensions or 3D is different from a so-called "precalculated" rendering in that the rendering of the scene is immediate and the user can manipulate and interact directly with the scene, for example to manipulate and change the colors of an object, to move within a virtual universe, to configure the accessories of an automobile, to simulate emergency cases. The 3D rendering of the images is done directly on a display device in the case of a real-time rendering, unlike a pre-calculated 3D rendering in which the result of the rendering is a non-modifiable image or video. For the calculation time of a real-time 3D rendering method to be imperceptible to a user, it must be less than the retinal persistence. Since the rendering speed of the images is measured in frames per second (fps) or Hertz (Hz), it appears that the printing for the user of an interactive mode exists from a rendering speed of the order of 6 fps, and a rendering process can be considered real-time from 15 fps. Beyond 72 fps, the user can not notice any difference if the rendering speed is further increased.

Pour obtenir une telle vitesse de rendu, des moyens matériels d'accélération du calcul graphique dédiés à cette fonction sont couramment utilisés, connus sous le nom d'unité de traitement graphique ou GPU (Graphic Processing Unit). Ainsi, le procédé de rendu mis en oeuvre par un moteur de rendu 3D utilise des algorithmes optimisés, mais également de nombreux prétraitements sur les scènes 3D opérées par le GPU. L'utilisation de tels procédés de rendu en 3D temps réel utilisant une accélération matérielle est freinée par l'hétérogénéité des parcs de machines disponibles ce qui complexifie le déploiement des applications utilisant de tels procédés. To obtain such a rendering speed, hardware means for accelerating the graphical calculation dedicated to this function are commonly used, known as graphics processing unit or GPU (Graphic Processing Unit). Thus, the rendering method implemented by a 3D rendering engine uses optimized algorithms, but also many preprocessing on the 3D scenes operated by the GPU. The use of such real-time 3D rendering methods using hardware acceleration is hampered by the heterogeneity of the available machine parks which complicates the deployment of applications using such methods.

Ainsi, plusieurs versions d'une même application doivent être développées et paramétrées pour s'adapter aux différentes configurations matérielles existantes. Les modèles 3D exploités par ces applications sont mêmes fréquemment spécifiques de la configuration matérielle de la machine cible. En outre, ces applications nécessitent une configuration matérielle minimale empêchant leur utilisation sur des terminaux ou ordinateurs personnels de faibles capacités tels que des « netbooks », portables bureautiques, tablettes PC. Il est donc souhaitable de développer des procédés de rendu les plus performants possibles permettant de ne pas utiliser les moyens d'accélération matériels, ou permettant d'utiliser ces moyens de façon optionnelle. Parmi les procédés de rendu 3D en temps-réel, Il est connu, par exemple du document WO2009063319A2, d'utiliser un procédé dit de lancer de rayon, consistant à calculer pour un point donné de l'image la couleur attribuée en calculant les intersections entre un rayon passant par le point de l'image considéré et les objets de la scène. Un avantage du procédé de lancer de rayon est de permettre une parallélisation aisée, notamment en ce qui concerne les calculs relatifs aux rayons primaires. En effet, le calcul des intersections d'un rayon n'influe pas sur celui d'un rayon voisin. Il est donc facile de tirer parti des processeurs multicores modernes et des instructions de type SIMD (Single Instruction, Multiple Data). Afin de calculer de façon efficace les intersections entre les rayons et les objets de la scène, il est connu d'organiser les données concernant les objets de la scène sous forme d'une structure de données spécifique de type arbre regroupant les éléments de la scène par proximité afin de limiter le nombre de calculs d'intersection à réaliser. En particulier, les structures de données du type Grille régulière, octree, BVH, QBVH, BIH, Kdtree sont utilisées. L'utilisation d'une structure spécifique de donnée de ce type permet d'accélérer significativement le rendu de scènes statiques. Dans le cas d'une scène comportant des objets animés, l'utilisation d'une telle structure est complexe et plus coûteuse en temps de calcul car ladite structure doit être mise à jour ou reconstruite lors du rendu de chaque image. La présente invention a pour objet de résoudre tout ou partie des 35 inconvénients mentionnés ci-dessus. Thus, several versions of the same application must be developed and configured to adapt to different hardware configurations. The 3D models used by these applications are even frequently specific to the hardware configuration of the target machine. In addition, these applications require a minimum hardware configuration preventing their use on terminals or personal computers of low capacity such as "netbooks", office laptops, tablet PCs. It is therefore desirable to develop the most efficient rendering methods possible to not use the hardware acceleration means, or to use these means optionally. Among the real-time 3D rendering methods, it is known, for example from WO2009063319A2, to use a so-called radius casting method, consisting in calculating for a given point of the image the color attributed by calculating the intersections. between a ray passing through the point of the image considered and the objects of the scene. An advantage of the ray tracing method is to allow easy parallelization, particularly with regard to the calculations relating to the primary rays. Indeed, the calculation of the intersections of a ray does not affect that of a neighboring radius. It is therefore easy to take advantage of modern multi-core processors and SIMD (Single Instruction, Multiple Data) type instructions. In order to effectively calculate the intersections between the rays and the objects of the scene, it is known to organize the data concerning the objects of the scene in the form of a specific tree-type data structure grouping the elements of the scene. by proximity to limit the number of intersection calculations to be performed. In particular, data structures of the type Regular Grid, octree, BVH, QBVH, BIH, Kdtree are used. The use of a specific data structure of this type makes it possible to significantly accelerate the rendering of static scenes. In the case of a scene with animated objects, the use of such a structure is complex and more expensive in computing time because said structure must be updated or reconstructed when rendering each image. The object of the present invention is to solve all or some of the disadvantages mentioned above.

A cet effet, la présente invention concerne un procédé de rendu d'images en temps-réel à partir d'une scène virtuelle en trois dimensions utilisant une technique de lancer de rayon, comprenant les étapes consistant à construire à partir du modèle de la scène une structure de données destinée à permettre un calcul accéléré des intersections entre les rayons et la scène 3D, ladite structure de données permettant de regrouper des éléments de la scène par proximité spatiale, caractérisé en ce que la construction de la structure de données comprend une première étape consistant à fusionner l'ensemble des objets statiques de la scène avant de procéder aux regroupements des données géométriques 3D par proximité spatiale. Grâce aux dispositions selon l'invention, et à la création d'une structure de données définissant une organisation des objets dans différentes boîtes englobantes sur la base d'une fusion d'objets, les performances de calcul de l'intersection avec la scène sont améliorées significativement par rapport à une solution connue dans laquelle la structure est construite sur la base d'objets indépendants. En effet, il est ainsi possible de permettre des regroupements entre des données 3D proches appartenant initialement à deux objets distincts. Ces dispositions permettent de réaliser un rendu d'une scène 20 complexe sans utiliser d'accélération graphique de type GPU tout en conservant des performances acceptables. Selon un aspect de l'invention, la structure de données est construite avec l'ensemble des données 3D des objets statiques et, le cas échéant, au moins un objet animé, le ou les objets animés étant marqués 25 spécifiquement lorsque leur animation est activée. Ces dispositions permettent d'une part de traiter les objets animés comme les objets statiques lorsque ceux-ci ne sont pas animés et donc de bénéficier de gains de performance, et d'autre part d'éliminer ces objets des calculs d'intersection de la partie statique de la scène facilement, sans avoir à 30 reconstruire la structure de données contenant les objets statiques. Selon un autre aspect de l'invention, une seconde structure de données spécifique destinée à être mise à jour à chaque image comprenant les objets animés en cours d'animation est construite. Selon un aspect de l'invention, les données 3D relatives aux objets 35 animés ne sont pas situées dans la seconde structure de données, mais restent dans la première structure de donnée statique dans des noeuds de cette structure dépendant de noeuds correspondants aux objets animés. Selon un autre aspect de l'invention, le rendu d'une image finale est réalisé en : - calculant une image intermédiaire représentant les objets statiques et comprenant, pour chaque point de l'image ou est figuré un objet statique des informations de profondeur de l'intersection d'un rayon lancé avec ledit objet statique ; puis - en mettant à jour dans cette image intermédiaire les pixels correspondant à des objets animés en cours d'animation en comparant pour les points de l'image pour lesquels une intersection d'un rayon avec un objet en cours d'animation est détectée les informations de profondeur d'intersection pour la première image intermédiaire et pour l'objet animé considéré, la plus proche intersection étant conservée. For this purpose, the present invention relates to a method for rendering real-time images from a three-dimensional virtual scene using a ray tracing technique, comprising the steps of building from the scene model a data structure for enabling an accelerated calculation of the intersections between the rays and the 3D scene, said data structure for grouping elements of the scene by spatial proximity, characterized in that the construction of the data structure comprises a first step of merging all the static objects of the scene before proceeding with the grouping of 3D geometric data by spatial proximity. Thanks to the provisions according to the invention, and to the creation of a data structure defining an organization of the objects in different bounding boxes on the basis of a merger of objects, the calculation performances of the intersection with the scene are significantly improved over a known solution in which the structure is built on the basis of independent objects. Indeed, it is thus possible to allow groupings between close 3D data initially belonging to two distinct objects. These arrangements make it possible to render a complex scene without using GPU-type graphics acceleration while maintaining acceptable performance. According to one aspect of the invention, the data structure is constructed with the set of 3D data of the static objects and, where appropriate, at least one animated object, the animated object (s) being specifically marked when their animation is activated. . These provisions make it possible on the one hand to treat animated objects as static objects when they are not animated and thus to benefit from performance gains, and on the other hand to eliminate these objects from the intersection calculations of the static part of the scene easily, without having to reconstruct the data structure containing the static objects. According to another aspect of the invention, a second specific data structure to be updated to each image including the animated objects being animated is constructed. According to one aspect of the invention, the animated object 3D data is not located in the second data structure, but remains in the first static data structure in nodes of this node dependent structure corresponding to the animated objects. According to another aspect of the invention, the rendering of a final image is achieved by: - calculating an intermediate image representing the static objects and comprising, for each point of the image or is shown a static object of the depth information of the intersection of a ray launched with said static object; and then - by updating in this intermediate image the pixels corresponding to animated objects being animated by comparing for the points of the image for which an intersection of a ray with an object being animated is detected. intersection depth information for the first intermediate image and for the moving object considered, the nearest intersection being maintained.

Selon un autre aspect de l'invention, la première image intermédiaire comprend également les objets animés qui ne sont pas en cours d'animation. Selon un autre aspect de l'invention, la détermination de la première image est réalisée en utilisant un parcours de la première structure de données regroupant les objets statiques ; et la mise à jour correspondant aux objets en cours d'animation est réalisée en utilisant un parcours de la seconde structure de données regroupant les objets en cours d'animation. Lorsque le point de vue de l'utilisateur arrête de se déplacer par rapport à la scène pendant une durée déterminée, la première image intermédiaire constitue un fond qui reste identique pour toute cette durée et ne nécessite pas de nouveau calcul. Dans ce cas, il suffit à chaque image de copier ce fond et de mettre à jour les pixels avec des objets animés correspondant à la seconde image intermédiaire, si ceux-ci correspondent à des points d'intersection plus proches que ceux du fond. According to another aspect of the invention, the first intermediate image also includes animated objects that are not being animated. According to another aspect of the invention, the determination of the first image is performed using a path of the first data structure grouping the static objects; and the update corresponding to the objects being animated is performed using a path of the second data structure grouping the objects being animated. When the user's point of view stops moving relative to the scene during a determined period of time, the first intermediate image constitutes a background that remains identical for the entire duration and does not require a new calculation. In this case, it is sufficient for each image to copy this background and update the pixels with animated objects corresponding to the second intermediate image, if they correspond to points of intersection closer than those of the background.

Selon un autre aspect de l'invention, un résultat intermédiaire du procédé de rendu est produit sous forme d'un tampon de donnée, comprenant des informations de position dans l'image et des identifiants d'éléments de la géométrie correspondants. Selon un autre aspect de l'invention, les étapes d'éclairage et/ou 35 d'ombrage et/ou une ou plusieurs passes de retraitement sont réalisées en utilisant le tampon de données. According to another aspect of the invention, an intermediate result of the rendering method is produced in the form of a data buffer, comprising position information in the image and corresponding element identifiers of the geometry. According to another aspect of the invention, the lighting and / or shading steps and / or one or more reprocessing passes are performed using the data buffer.

Ces dispositions permettent de réaliser les étapes de type éclairage et/ou d'ombrage et/ou une ou plusieurs passes de retraitement sans interférer avec les première étapes de lancer de rayon. Selon un autre aspect de l'invention, une détection automatique de la configuration de la machine utilisateur est réalisée afin de choisir le mode de rendu et les options disponibles, et en particulier de permettre l'activation ou la désactivation de la réalisation d'étapes de rendu, de procéder à une baisse de la résolution de l'image lors des déplacement du point de vue de l'utilisateur dans la scène ou de désactiver des fonctionnalités d'ombrage et/ou de calcul de réflexion et/ou de transparence. Selon un autre aspect de l'invention, la structure de données utilisée peut notamment être une structure du type « hiérarchie de boîte englobante » BVH (Bounding Volume Hierarchy). Selon un autre aspect de l'invention, les données géométriques 3D des objets statiques sont traitées pour leur appliquer des transformations (ou « baking ») de façon à exprimer leurs coordonnées dans un repère de la scène commun à l'ensemble des objets. Selon un autre aspect de l'invention, les données géométriques 3D correspondants aux objets animés subissent également un traitement de transformation (ou « baking ») de façon à exprimer leurs coordonnées dans le repère de la scène en prenant en compte la position originale des objets animés dans l'animation. Ces dispositions permettent de faciliter le calcul des intersections entre la géométrie de la scène et les rayons lancés. These arrangements make it possible to carry out the lighting and / or shading steps and / or one or more reprocessing passes without interfering with the first ray launching steps. According to another aspect of the invention, an automatic detection of the configuration of the user machine is performed in order to choose the rendering mode and the available options, and in particular to allow the activation or deactivation of the realization of steps rendering, to decrease the resolution of the image when moving from the point of view of the user in the scene or to disable shading and / or reflection calculation and / or transparency features. According to another aspect of the invention, the data structure used can in particular be a structure of the type "bounding box hierarchy" BVH (Bounding Volume Hierarchy). According to another aspect of the invention, the 3D geometric data of the static objects are processed to apply transformations (or "baking") to express their coordinates in a frame of the scene common to all objects. According to another aspect of the invention, the 3D geometrical data corresponding to the animated objects also undergo a transformation processing (or "baking") so as to express their coordinates in the frame of the scene taking into account the original position of the objects animated in the animation. These provisions make it easier to calculate the intersections between the geometry of the scene and the launched rays.

Selon un autre aspect de l'invention, la structure de données comporte une arborescence présentant un ensemble de noeuds, ces noeuds étant stockés en série dans un tableau, chaque noeud de l'arborescence contenant une référence sur un noeud fils de gauche ou respectivement de droite, le noeud fils de droite, respectivement de gauche, se situant dans la case suivante du tableau. Selon un autre aspect de l'invention, la structure de données comporte une arborescence dont les feuilles comprennent un pointeur ou une référence sur des données géométriques de la scène contenues dans le modèle 3D. According to another aspect of the invention, the data structure comprises a tree having a set of nodes, these nodes being stored in series in a table, each node of the tree containing a reference on a left child node or respectively of right, the right child node, respectively left, located in the next box of the table. According to another aspect of the invention, the data structure comprises a tree whose leaves include a pointer or a reference on the geometric data of the scene contained in the 3D model.

L'invention concerne également un produit programme d'ordinateur mettant en oeuvre les étapes du procédé décrit ci-dessus, ainsi qu'un système informatique comprenant un ou plusieurs ordinateurs ou terminaux en possession d'un utilisateur comprenant un ou plusieurs processeurs permettant l'exécution de ce programme. L'invention sera mieux comprise à l'aide de la description détaillée qui est exposée ci-dessous en regard du dessin annexé dans lequel : La figure 1 est un organigramme d'une partie du procédé selon l'invention ; La figure 2 illustre schématique le principe de l'étape de fusion des objets statiques du procédé de figure 1 ; Les figures 3 et 4 illustrent l'étape de construction de la structure de données rassemblant les éléments de la scène par proximité spatiale du procédé de figure 1 ; Les figures 5 et 6 illustrent la structure de données utilisée par le procédé de figure 1 ; La figure 7 illustre la relation entre la structure de donnée relative aux objets statiques et la structure de données relative aux objets en cours d'animation. La figure 8 illustre l'étape de rendu du procédé de figure 1. La figure 9 illustre la mise à jour et le rendu dans le cas d'une 20 scène comprenant des objets animés. La figure 10a illustre un parcours d'une structure de données dans le cadre de l'étape de rendu du procédé de figure 1 pour un rayon particulier, pour la partie statique d'une scène comprenant des objets animés. La figure 10b illustre un parcours d'une structure de données dans 25 le cadre de l'étape de rendu du procédé de figure 1 pour un rayon particulier, pour la partie animée d'une scène comprenant des objets animés. La figure 11 illustre les sous étapes de l'étape de rendu du procédé de figure 1. La figure 12 illustre une sous étape de prise en compte de la 30 transparence dans l'étape de rendu du procédé de figure 1 et de figure 9. La figure 13 illustre une sous étape de prise en compte des ombres portées dans l'étape de rendu du procédé de figure 1 et de figure 9. La figure 14 est un tableau reprenant des mesures de performance pour le rendu d'une scène-type. 35 La figure 15 illustre la séparation de paquets de rayon dans le cadre d'une étape de rendu du procédé de figure 1. The invention also relates to a computer program product implementing the steps of the method described above, as well as a computer system comprising one or more computers or terminals in the possession of a user comprising one or more processors making it possible to execution of this program. The invention will be better understood from the detailed description which is set forth below with reference to the accompanying drawings in which: FIG. 1 is a flowchart of part of the method according to the invention; FIG. 2 schematically illustrates the principle of the step of melting the static objects of the method of FIG. 1; Figures 3 and 4 illustrate the step of constructing the data structure bringing together the elements of the scene by spatial proximity of the method of Figure 1; Figures 5 and 6 illustrate the data structure used by the method of Figure 1; Figure 7 illustrates the relationship between the static object data structure and the data structure of the objects being animated. Figure 8 illustrates the rendering step of the method of Figure 1. Figure 9 illustrates updating and rendering in the case of a scene including moving objects. Figure 10a illustrates a path of a data structure as part of the rendering step of the method of Figure 1 for a particular ray, for the static part of a scene including animated objects. FIG. 10b illustrates a path of a data structure as part of the rendering step of the method of FIG. 1 for a particular spoke, for the animated portion of a scene comprising animated objects. FIG. 11 illustrates the substeps of the rendering step of the process of FIG. 1. FIG. 12 illustrates a sub-step of taking into account the transparency in the rendering step of the process of FIG. 1 and FIG. FIG. 13 illustrates a sub-step of taking into account shadows carried in the rendering step of the process of FIG. 1 and FIG. 9. FIG. 14 is a table containing performance measurements for the rendering of a typical scene . FIG. 15 illustrates the separation of radius packets as part of a rendering step of the method of FIG.

Comme cela est représenté sur la figure 1, un procédé selon l'invention permet de traiter en entrée un modèle 3D représentant une scène Sc virtuelle 3D selon un format de type standard et de lui appliquer dans une première étape El une analyse destinée à identifier les objets statiques OS de la scène Sc et les objets animés OA. Dans une seconde étape E2, une fusion ou un « effondrement » des objets statiques OS est réalisée, de manière à obtenir un seul objet OSF fusionné comprenant l'ensemble des données 3D relatives aux objets statiques OS, comme cela est illustré sur la figure 2. As shown in FIG. 1, a method according to the invention makes it possible to input a 3D model representing a 3D virtual SC scene according to a standard type format and to apply to it in a first step E1 an analysis intended to identify the static OS objects from the Sc scene and OA animated objects. In a second step E2, a merger or a "collapse" of the static objects OS is performed, so as to obtain a single merged OSF object comprising all the 3D data relating to the static objects OS, as illustrated in FIG. 2 .

Dans une troisième étape E3, une structure de données S spécifique et destinée à permettre un calcul accéléré des intersections entre les rayons et les éléments de la scène 3D est construite. Cette structure de données permettant de regrouper les données 3D de la scène Sc, notamment constituées par des triangles T, par proximité spatiale. In a third step E3, a specific data structure S intended to allow an accelerated calculation of the intersections between the rays and the elements of the 3D scene is constructed. This data structure makes it possible to group the 3D data of the scene Sc, in particular constituted by triangles T, by spatial proximity.

La structure S comprend une arborescence présentant un ensemble de noeuds et de feuilles. Un noeud contient une information de boîte englobante BE. La boîte englobante BE est alignée sur les axes du repère global de la scène Sc, ce qui est désigné de façon connue par l'acronyme « AABB » 20 (Axis Aligned Bounding Box). Lorsqu'il s'agit d'une feuille f, le noeud contient, en plus de la boîte englobante, un groupe de données 3D, notamment constitués par des triangles. La structure S de donnée utilisée peut notamment être une 25 structure du type « hiérarchie de boîte englobante » ou BVH (Bounding Volume Hierarchy). Le BVH est utilisé car il possède une faible empreinte mémoire et est rapide à construire. D'autres types de structures de données peuvent toutefois être utilisés. A titre d'exemple, on peut citer les structures comprenant une grille 30 régulière, un octree, un BIH qui est une variante du BVH, un QBVH qui est une variante du BVH qui vise à diviser un noeud en 4 au lieu de 2, un KdTree. Les deux structures qui sont principalement utilisées sont le KdTree et le BVH car elles sont adaptatives et peuvent donc traiter efficacement des scènes présentant des différences importantes dans la densité des données 3D, que 35 l'on peut illustrer par une scène comprenant une théière dans un stade, la théière représentant une densité locale très importantes de données dans un ensemble de taille comparativement plus grand. Ces deux structures sont relativement rapides à construire et à traverser par rapport aux autres structures mentionnées ci-dessus. La structure S arborescente comprend une racine R, un noeud NOSF correspondant aux objets statiques de la scène, des noeuds NOA correspondant à chacun des objets animés, et des noeuds intermédiaires NI de regroupement deux par deux entre les noeuds NOSF et NOA jusqu'à la racine comme cela est représenté notamment sur la figure 6 et sur la figure 5. Lors de la mise en place de la structure S, les données 3D constitués par des triangles appartenant à l'objet statique fusionné et accessibles en dessous du noeud NOSF sont traitées pour leur appliquer des transformations (ou « baking ») de façon à exprimer leurs coordonnées dans le repère de la scène, et non plus dans le repère local de chaque objet. Cette disposition permet d'appliquer ces transformations une seule fois avant le rendu et d'optimiser ainsi la vitesse de procédé. De la même façon, les données 3d constituées par des triangles des noeuds NOA correspondants aux objets animés subissent ce prétraitement de transformation en prenant en compte la position originale de l'objet OA dans l'animation. The structure S comprises a tree with a set of nodes and leaves. A node contains BE bounding box information. The bounding box BE is aligned with the axes of the global coordinate system of the scene Sc, which is known in the known manner by the acronym "AABB" (Axis Aligned Bounding Box). When it is a sheet f, the node contains, in addition to the bounding box, a group of 3D data, in particular constituted by triangles. The data structure S used may in particular be a structure of the "bounding box hierarchy" or BVH (Bounding Volume Hierarchy) type. The BVH is used because it has a low memory footprint and is fast to build. Other types of data structures may, however, be used. By way of example, there may be mentioned structures comprising a regular grid, an octree, a BIH which is a variant of the BVH, a QBVH which is a variant of the BVH which aims to divide a node into 4 instead of 2, a KdTree. The two structures that are mainly used are KdTree and BVH because they are adaptive and can therefore effectively deal with scenes with significant differences in the density of 3D data, which can be illustrated by a scene including a teapot in a stadium, the teapot representing a very large local density of data in a comparatively larger size set. These two structures are relatively fast to build and cross compared to the other structures mentioned above. The tree structure S comprises a root R, a node NOSF corresponding to the static objects of the scene, NOA nodes corresponding to each of the animated objects, and intermediate nodes NI grouping two by two between the nodes NOSF and NOA until the root as shown in particular in Figure 6 and Figure 5. When setting up the structure S, the 3D data consisting of triangles belonging to the static object merged and accessible below the node NOSF are processed to apply them transformations (or "baking") so as to express their coordinates in the frame of the scene, and no longer in the local coordinate system of each object. This arrangement makes it possible to apply these transformations only once before rendering and thus to optimize the process speed. In the same way, the 3d data constituted by triangles of the NOA nodes corresponding to the animated objects undergo this pretreatment of transformation taking into account the original position of the object OA in the animation.

La construction des niveaux inférieurs de l'arborescence de la structure S, en dessous des noeuds NOSF et NOA, est réalisée en regroupant des données 3D par proximité selon une heuristique appelée SAH. D'autres méthodes de regroupement spatial peuvent être également utilisées. Selon un mode de mise en oeuvre, la première coupure de la géométrie de la scène est réalisée selon l'axe le plus long de celle-ci. En appliquant par la suite la méthode SAH, la boite englobante B correspondant à un noeud sera découpée en un nombre déterminé X de pré-coupures sur chaque axe. Un noeud n donné n'étant pas une feuille de l'arborescence 30 possède deux liens vers deux noeuds fils nd et ng qui seront disposés respectivement à droite et à gauche d'une coupure. Chaque triangle de la géométrie comprise dans la boîte englobante BE(n) d'un noeud n à un niveau donné de l'arborescence sera inséré dans le noeud fils de droite nd ou de gauche correspondant à la partie 35 droite ou gauche de la coupure, en fonction de la position de son barycentre. La position de la coupure C parmi les X pré-coupures est déterminée en fonction d'un coefficient K pondéré par le nombre de triangles T et la surface de la boite englobante BE de ces triangles T se trouvant de chaque côté de la coupure C comme cela est illustré sur la figure 4. L'utilisation d'un nombre discret X d e p ré-coupures permet 5 d'augmenter la rapidité du calcul de ces coupures. Deux boîtes englobantes BE(nd) et BE(ng) sont ainsi déterminées pour les noeuds fils droit nd et gauche ng respectivement. La réalisation de la coupure décrite ci-dessus est répétée pour les noeuds fils nd et ng jusqu'à atteindre un critère d'arrêt et à constituer les feuilles 10 de l'arborescence. Selon un mode de réalisation le critère d'arrêt est un nombre de triangle par feuille de l'arborescence, par exemple égal à 5, ce nombre pouvant être réglable. Selon un aspect de l'invention, les noeuds de l'arborescence sont stockés en série dans un tableau, chaque noeud n contenant une référence sur 15 le noeud fils de gauche. Le noeud fils de droite se situe dans la case suivante du tableau. Selon une variante, chaque noeud n contenant une référence sur le noeud fils de droite. Le noeud fils de gauche se situe dans la case suivante du tableau. 20 Les noeuds f constituant les feuilles de l'arborescence comprennent pour leur part un pointeur sur des données géométriques de la scène Sc contenus dans le modèle 3D M. En particulier, les données référencées concernent: les données 3D constituées par les coordonnées des triangles T, des informations sur les 25 textures et les matériaux correspondants. Une fois la structure S telle que décrite ci-dessus ainsi constituée, un rendu de la scène peut être réalisée dans une quatrième étape E4. Le procédé selon l'invention utilise une méthode de rendu de lancer de rayon. 30 Il convient donc de calculer pour un point donné de l'image la couleur attribuée en calculant les intersections entre un rayon passant par le point de l'image considéré et les objets statiques OS ou les objets animés OA de la scène Sc. Les calculs d'intersection utilisent la structure de données S. 35 Ainsi, cette structure est parcourue et les tests suivants sont effectués sur les noeuds n de cette structure: (1) La boite englobante BE(n) du noeud est-elle devant ou derrière la caméra ? (2) cette boite est-elle dans une pyramide de vision (ou Frustum) délimitée par le champ de vision de la caméra délimitée entre un plan proche et un plan lointain ? (3) Existe-t-il une intersection entre la boîte et un rayon particulier correspondant à un point de l'image ? Dans le cas d'une scène comprenant des objets animés OA, la structure S doit prendre en compte les déplacements de ces objets animés à partir du moment où leur animation est active. Tant que ces objets restent immobiles, ceux-ci peuvent être traités comme des objets statiques. A partir du moment où l'animation est active, un traitement spécifique doit être envisagé, étant donné que les boites englobantes calculées et la structure S doivent être modifiées. The construction of the lower levels of the Structure S tree, below the NOSF and NOA nodes, is done by grouping 3D data by proximity according to a heuristic called SAH. Other methods of spatial grouping can also be used. According to one embodiment, the first cut of the geometry of the scene is made along the longest axis thereof. By subsequently applying the SAH method, the bounding box B corresponding to a node will be cut into a predetermined number X of pre-cuts on each axis. A node n given not being a leaf of the tree 30 has two links to two child nodes nd and ng which will be respectively arranged to the right and left of a cut. Each triangle of the geometry included in the bounding box BE (n) of a node n at a given level of the tree will be inserted into the right or left nd child node corresponding to the right or left part of the cutoff. , depending on the position of its center of gravity. The position of the cutoff C among the X pre-cuts is determined as a function of a coefficient K weighted by the number of triangles T and the area of the bounding box BE of these triangles T being on each side of the cutoff C as this is illustrated in FIG. 4. The use of a discrete number X of re-interruptions makes it possible to increase the speed of calculation of these cuts. Two bounding boxes BE (nd) and BE (ng) are thus determined for the right nd and left ng respectively. The realization of the cut described above is repeated for the child nodes nd and ng until reaching a stop criterion and to constitute the leaves 10 of the tree. According to one embodiment, the stopping criterion is a number of triangles per leaf of the tree, for example equal to 5, this number being adjustable. According to one aspect of the invention, the nodes of the tree are stored serially in an array, each node n containing a reference on the left child node. The right child node is in the next box of the table. According to a variant, each node n containing a reference on the right child node. The left child node is in the next box of the table. The nodes f constituting the leaves of the tree structure for their part comprise a pointer to geometric data of the scene Sc contained in the 3D model M. In particular, the referenced data relate to: the 3D data constituted by the coordinates of the triangles T , information on the textures and the corresponding materials. Once the structure S as described above thus constituted, a rendering of the scene can be performed in a fourth step E4. The method according to the invention uses a ray casting rendering method. It is therefore necessary to calculate for a given point of the image the color allocated by calculating the intersections between a ray passing through the point of the image considered and the static objects OS or the animated objects OA of the scene Sc. In this way, this structure is traversed and the following tests are carried out on the nodes n of this structure: (1) Is the bounding box BE (n) of the node in front of or behind the camera? (2) Is this box in a pyramid of vision (or Frustum) delimited by the field of vision of the camera delimited between a close plane and a distant plane? (3) Is there an intersection between the box and a particular ray corresponding to a point in the image? In the case of a scene including animated objects OA, the structure S must take into account the movements of these animated objects from the moment when their animation is active. As long as these objects remain motionless, they can be treated as static objects. From the moment the animation is active, a specific treatment must be considered, since the bounding boxes calculated and the structure S must be modified.

A cet effet, lors de l'activation de l'animation d'un objet OA, les éléments de cet objet sont « blacklistés » ou marqués comme animés dans la structure de donnée S. Par ailleurs, les traitements de transformation (« baking ») pour exprimer les coordonnées de la géométrie dans le repère de la scène Sc sont 20 annulés. Le noeud NOA correspondant à l'objet animé est inséré dans une seconde structure de données « dynamique » Sa correspondant aux objets animés en cours d'animation, par exemple de type BVH. Cette seconde structure de donnée Sa comprend, comme cela est 25 représenté sur la figure 7, une racine R, des noeuds animés NOAa correspondant aux objets animés en cours d'animation, et des noeuds intermédiaires NI de regroupement deux par deux entre les noeuds NOAa jusqu'à la racine. Selon un aspect de l'invention, les données 3D relatives aux objets 30 animés OA ne sont pas situées dans la structure de donnée Sa, mais restent dans la structure de donnée statique Sa dans les noeuds n en dessous du noeud d'objet animé NOA. Ainsi, comme cela est représenté sur la figure 7, lors d'un parcours de la structure de donnée des objets en cours d'animation Sa, si on arrive à un 35 noeud correspondant à un objet animé, par exemple le noeud référence NOAa2 sur la figure, on parcourt ensuite, comme cela est indiqué par la flèche t de transition, la partie de la structure de données statique S sous le noeud NOAa2 correspondant au même objet OAa2. Dans la structure S, comme cela est indiqué par la croix de marquage m, le noeud NOAa2 est blacklisté ou marqué en tant qu'objet animé. For this purpose, when activating the animation of an object OA, the elements of this object are "blacklisted" or marked as animated in the data structure S. Moreover, the transformation processing ("baking" ) to express the coordinates of the geometry in the frame of the scene Sc are canceled. The NOA node corresponding to the animated object is inserted into a second "dynamic" data structure Sa corresponding to the animated objects being animated, for example of the BVH type. This second data structure Sa comprises, as shown in FIG. 7, a root R, animated nodes NOAa corresponding to the animated objects being animated, and intermediate nodes NI grouping two by two between the NOAa nodes. to the root. According to one aspect of the invention, the 3D data relating to the animated objects OA are not located in the data structure Sa, but remain in the static data structure Sa in the nodes n below the animated object node NOA . Thus, as shown in FIG. 7, during a traversal of the data structure of the objects being animated Sa, if we arrive at a node corresponding to an animated object, for example the reference node NOAa2 on In the figure, the part of the static data structure S under the node NOAa2 corresponding to the same object OAa2 is then traversed, as indicated by the transition arrow t. In the structure S, as indicated by the marking cross m, the node NOAa2 is blacklisted or marked as an animated object.

Ainsi les prétransformations géométriques (ou « baking ») pour ce noeud ont donc été annulées. Les transformations géométriques pour l'image considérées, qui corresponde à une position dans l'animation sont appliquées lors du parcours des noeuds n en dessous du noeud NOAa2 jusqu'aux feuilles. Ces dispositions évitent de recopier toutes les données géométriques dans deux structures. Selon un aspect de l'invention, le rendu d'une image finale I est réalisé en : - calculant dans un premier temps une première image intermédiaire Is comprenant tous les objets statiques OS et animés OAs non en cours d'animation et des informations de profondeur des intersections correspondant à chaque point de l'image Is ; puis - en mettant à jour dans cette image intermédiaire Is les pixels correspondant à des objets animés en cours d'animation OAa en comparant pour les points de l'image I pour lesquels une intersection d'un rayon avec un objet en cours d'animation OAa est détecté les informations de profondeur d'intersection d pour la première image intermédiaire et pour l'objet animé considéré OAa, la plus proche intersection étant conservée. La détermination de la première image intermédiaire Is est réalisée en utilisant un parcours de la première structure de données S regroupant les objets statiques OS et animés AOa non en cours d'animation; et la mise à jour correspondants aux objets en cours d'animation est réalisée en utilisant un parcours de la seconde structure de données Sa regroupant les objets en cours d'animation AOa. Comme cela est schématiquement représenté sur la figure 9, il convient donc pour chaque image de mettre à jour la structure Sa dans une première étape ER1, puis de procéder à une traversée de cette structure Sa des objets animés dans une seconde étape ER2 pour chaque rayon. Si le point de vue par rapport à la scène a été modifié, il convient également de procéder à un parcours de la structure S dans une troisième étape ER3. Enfin, un éclairage (« Shading ») est réalisé. Thus geometric pre-transformations (or "baking") for this node have been canceled. The geometric transformations for the image considered, which correspond to a position in the animation, are applied during the course of the nodes n below the node NOAa2 to the sheets. These provisions avoid copying all the geometric data in two structures. According to one aspect of the invention, the rendering of a final image I is achieved by: calculating at first a first intermediate image Is comprising all the static objects OS and animated OAs not being animated and information of depth of the intersections corresponding to each point of the image Is; then - by updating in this intermediate image Is the pixels corresponding to animated objects being animated OAa by comparing for the points of the image I for which an intersection of a radius with an object being animated OAa is detected the intersection depth information d for the first intermediate image and for the animated object considered OAa, the closest intersection being maintained. The determination of the first intermediate image Is is carried out using a path of the first data structure S grouping the static objects OS and animated AOa not being animated; and updating corresponding objects being animated is performed using a path of the second data structure Sa grouping the objects being animated AOa. As is schematically represented in FIG. 9, it is therefore appropriate for each image to update the structure Sa in a first step ER1, then to proceed to a crossing of this structure Sa of the animated objects in a second step ER2 for each radius . If the point of view with respect to the scene has been modified, it is also necessary to proceed to a course of the structure S in a third step ER3. Finally, lighting ("shading") is achieved.

Il est à noter que les étapes ER2 et ER3 ne sont pas nécessairement séquentielles mais peuvent être réalisées en parallèle. De la même façon, les étapes ER2, ER3 et ER4 ne sont pas nécessairement séparées, comme cela sera détaillé ultérieurement. It should be noted that the steps ER2 and ER3 are not necessarily sequential but can be performed in parallel. In the same way, the steps ER2, ER3 and ER4 are not necessarily separated, as will be detailed later.

Le calcul d'intersection utilisé à l'étape ER4 référencée sur la figure 9 pour la détermination de la première image Is en se basant sur la partie statique de la structure S est décrit sur la figure 10a pour un rayon donné Ry. Le parcours de la structure S débute à partir de la racine R comme 10 cela est indiqué à l'étape EIO et utilise une pile de traitement qui est initialement vide. Dans une étape E11, on détermine si le noeud n considéré est une feuille f. Si oui, dans une étape EI2, on détermine si le rayon Ry présente 15 une intersection avec la boîte englobante BE de ladite feuille f. Si oui, on détermine dans une étape EI3 l'intersection du rayon Ry avec la géométrie correspondant à la feuille et constituée par des triangles T, puis on procède, dans une étape EI4 à l'écriture du résultat, comprenant notamment la profondeur d de l'intersection par rapport au point de l'image et 20 une contribution à la couleur du point de l'image. Ensuite, dans une étape EI5, on vérifie si la pile de traitement de noeuds n à parcourir est vide. Si oui, le parcours de l'arborescence pour le rayon Ry est achevé. Sinon, on retourne à l'étape E11 pour une nouvelle itération. 25 Dans le cas où, à l'étape EI2, il apparaît qu'il n'existe pas d'intersection entre le rayon Ry et la boite englobante BE de la feuille f, l'étape EI5 est réalisée. Considérons à présent le cas où le résultat du test de l'étape E11 est négatif, c'est à dire que le noeud n n'est pas une feuille. 30 Dans ce cas, dans une étape EI7, on détermine si le rayon Ry présente une intersection avec la boîte englobante BE du noeud n. Si oui, on détermine dans une étape EI8 si les noeuds fils nd et ng du noeud n sont marqués comme étant animés (ou « blacklistés »). Si certains des fils ne sont pas marqués (« blacklistés »), ceux-ci 35 sont empilés sur la pile de traitement dans une étape EI9. On retourne ensuite à l'étape EI5. The intersection calculation used in step ER4 referenced in FIG. 9 for the determination of the first image Is based on the static part of the structure S is described in FIG. 10a for a given radius Ry. The path of the structure S starts from the root R as indicated in step E10 and uses a processing stack which is initially empty. In a step E11, it is determined whether the node n considered is a sheet f. If yes, in a step EI2, it is determined whether the ray Ry has an intersection with the bounding box BE of said sheet f. If so, the intersection of the radius Ry with the geometry corresponding to the sheet and constituted by triangles T is determined in a step EI3 and then, in a step EI4, the result is written, including in particular the depth d of the intersection with respect to the point of the image and a contribution to the color of the point of the image. Then, in a step EI5, it is checked whether the node processing stack n to be scanned is empty. If so, the tree path for the Ry ray is complete. Otherwise, return to step E11 for a new iteration. In the case where, in step EI2, it appears that there is no intersection between the ray Ry and the bounding box BE of the sheet f, the step EI5 is carried out. Now consider the case where the test result of step E11 is negative, ie node n is not a sheet. In this case, in a step EI7, it is determined whether the ray Ry intersects with the bounding box BE of the node n. If so, it is determined in a step EI8 if the child nodes nd and ng of the node n are marked as being animated (or "blacklisted"). If some of the wires are not marked ("blacklisted"), they are stacked on the processing stack in a step EI9. Then return to step EI5.

Si dans l'étape EI8 il est constaté que tous les fils sont marqués, l'étape EI5 est exécutée comme décrit ci-dessus. L'utilisation de cette traversée de l'arbre pour les rayons Ry correspondants aux points de l'image permet de constituer la première image 5 Is. Le calcul d'intersection utilisé à l'étape ER2 référencée sur la figure 9 qui utilise un parcours de la structure regroupant les objets animés Sa afin de calculer l'image la, et décrit à la décrit à la figure 10b, est similaire à celui décrit en référence à la figure 10a. Toutefois, le test concernant le 10 marquage a été supprimé. Ainsi, il dans le cas ou le test de l'étape E17a est positif, un empilage des noeuds fils dans la pile de traitement est réalisé, sans vérification d'un marquage éventuel. Comme nous l'avons vu précédemment, les données géométriques en elles-mêmes ne sont pas contenues dans la structure Sa, mais dans la 15 structure S L'étape ER4 d'éclairage (« shading ») indiquée sur la figure 9 va être à présent détaillée en référence aux figures 11 à 13. La figure 11 détaille de façon générale les différentes étapes de rendu. Comme nous l'avons indiqué ci-dessus, les étapes d'éclairage/shading 20 peuvent être réalisées en plusieurs étapes, de façon combinée avec plusieurs étapes de lancer de rayon. Ainsi, après une première étape ERD1 de création de paquets de rayons P, la réalisation d'un calcul pour un rayon Ry primaire tel que détaillé en référence aux figures 9, 10a, 10b, est réalisé dans une seconde étape ERD2. 25 Dans une troisième étape ERD3, un éclairage (« Shading ») est réalisé ainsi qu'un lancer de rayons d'ombre comme cela est détaillé sur la figure 13. Dans une quatrième étape ERD4, un calcul des rayons de transparence est effectué, qui sera détaillé ci-dessous en référence à la figure 12. Puis, dans une cinquième étape ERD5, un éclairage (« Shading ») 30 est réalisé ainsi qu'un lancer de rayons d'ombre. Dans une sixième étape ERD6, un calcul des rayons de transparence est effectué. Puis, dans une septième étape ERD7, un éclairage (« Shading ») est réalisé ainsi qu'un lancer de rayons d'ombre. Dans une huitième étape ERD8, un calcul des rayons d'anti 35 aliasing est effectué. Puis, dans une étape ERD9, un éclairage (« Shading ») est réalisé ainsi qu'un lancer de rayons d'ombre. If in step EI8 it is found that all the wires are marked, step EI5 is executed as described above. The use of this traversal of the tree for the Ry rays corresponding to the points of the image makes it possible to constitute the first image 5 Is. The intersection calculation used in the step ER2 referenced in FIG. 9 which uses a path of the structure grouping the animated objects Sa in order to compute the image 1a, and described in the description in FIG. 10b, is similar to that described with reference to FIG. 10a. However, the marking test has been removed. Thus, in the case where the test of step E17a is positive, a stacking of the child nodes in the treatment stack is performed, without verification of any marking. As we have seen previously, the geometrical data in themselves are not contained in the structure Sa, but in the structure S The step ER4 of lighting ("shading") indicated in FIG. present in detail with reference to Figures 11 to 13. Figure 11 details in general the different stages of rendering. As indicated above, the lighting / shading steps can be performed in several steps, in combination with several ray tracing steps. Thus, after a first step of creating P-ray packets ERD1, the realization of a calculation for a primary ray Ry as detailed with reference to FIGS. 9, 10a, 10b is carried out in a second step ERD2. In a third step ERD3, lighting ("shading") is performed as well as casting of shadow rays as detailed in FIG. 13. In a fourth step ERD4, a calculation of the rays of transparency is carried out, which will be detailed below with reference to FIG. 12. Then, in a fifth step ERD5, lighting ("shading") 30 is performed as well as casting shadow rays. In a sixth step ERD6, a calculation of the transparency rays is performed. Then, in a seventh step ERD7, a lighting ("shading") is performed as well as a casting of shadow rays. In an eighth step ERD8, a calculation of the anti-aliasing rays is performed. Then, in a step ERD9, a lighting ("shading") is performed as well as a casting of shadow rays.

En se référant à présent à la figure 12, la prise en compte des objets transparents est détaillée. Dans une étape ETO, un rendu relatif aux rayons primaires tel que décrit en référence aux figures 10a et 10b est réalisé. Au cours de ce rendu pour les rayons primaires, il est opéré un test, non représenté sur les figures 10a et 10b mais représenté à l'étape ET1 de la figure 12, dans lequel on détermine si une intersection avec un objet transparent intervient. Si aucune intersection avec un objet transparent n'est détectée, la vérification est terminée en étape ET5. Si une intersection avec un objet transparent est détectée, dans une étape ET2 ultérieure au rendu des rayons primaires, un déplacement de l'origine du rayon est réalisé, pour positionner l'origine au niveau de l'intersection avec la surface transparente. Par ailleurs, il est possible de marquer ou de « blacklister » la surface transparente, c'est-à-dire les triangles T faisant partie de cette surface, pour éviter de générer la détection d'une intersection du rayon réfléchi sur cette surface en raison d'une imprécision dans le positionnement relatif de la nouvelle origine et de la surface transparente. Ensuite, dans une étape ET3, un nouveau parcours des structures de données S, Sa est réalisé pour déterminer les nouvelles intersections, puis 20 dans une étape ET4, un éclairage (« shading ») est réalisé. Comme cela est décrit sur la figure 13, la prise en compte des ombres portées est réalisée de la façon suivante. Dans le cadre d'un rendu pour les rayons primaire, il est déterminé dans une étape E01 la présence ou non de lumières projetant des ombres sur 25 la scène. Dans ce cas, la création d'un paquet d'ombre est réalisée dans une seconde étape EO2, puis dans une troisième étape E03, le rendu est réalisé en prenant en compte ces paquets de rayons d'ombres. II est à noter que le calcul des lancers de rayon peut être parallélisé 30 de la façon décrite sur la figure 15. Ainsi, en partageant l'image I en portions correspondant chacune à un paquet P de rayons, par exemple comprenant 16x16 rayons, il est possible de traiter en parallèle les calculs pour les différents paquets de rayons. Des instructions de type Single Instruction, Multiple data 35 SIMD (MMX, 3DNow!, SSE, SSE2, SSE3, SSSE3 et SSE4) peuvent être utilisées. Les calculs peuvent être parallélisés sur les processeurs de la machine. Les performances sont quasiment linéairement multipliées par le nombre de processeurs physiques disponibles. Selon un aspect de l'invention, lors des déplacements du point de vue de l'utilisateur dans la scène, la résolution de l'image peut être baissée afin 5 d'améliorer les performances de rendu. En outre, certaines parties du calcul d'éclairage peuvent également être calculés à des résolutions inférieures ou désactivées pendant les déplacements, comme par exemple les techniques connues sous le nom de Bump Mapping. De la même façon, les calculs de réflexion peuvent être 10 calculés à des résolutions inférieures ou désactivés si nécessaire. Selon un aspect de l'invention, une détection automatique de la configuration de la machine utilisateur est réalisée afin de choisir le mode de rendu et les options disponibles permettant la meilleure expérience utilisateur pour fournir le meilleur niveau de performance.Referring now to Figure 12, consideration of transparent objects is detailed. In an ETO step, a rendering relative to the primary rays as described with reference to Figures 10a and 10b is made. During this rendering for the primary rays, a test is performed, not shown in FIGS. 10a and 10b but represented in step ET1 of FIG. 12, in which it is determined whether an intersection with a transparent object occurs. If no intersection with a transparent object is detected, the verification is completed in step ET5. If an intersection with a transparent object is detected, in a step ET2 subsequent to the rendering of the primary rays, a displacement of the origin of the ray is performed, to position the origin at the intersection with the transparent surface. Moreover, it is possible to mark or "blacklist" the transparent surface, that is to say the triangles T forming part of this surface, to avoid generating the detection of an intersection of the ray reflected on this surface. because of a lack of precision in the relative positioning of the new origin and the transparent surface. Then, in a step ET3, a new route of the data structures S, Sa is made to determine the new intersections, then in a step ET4, a lighting ("shading") is performed. As described in FIG. 13, the taking into account of the drop shadows is carried out as follows. As part of a rendering for the primary beams, it is determined in a step E01 the presence or absence of lights projecting shadows on the scene. In this case, the creation of a shadow packet is performed in a second step EO2, then in a third step E03, the rendering is performed taking into account these packets of shadow beams. It should be noted that the calculation of ray throws can be parallelized in the manner described in FIG. 15. Thus, by sharing the image I in portions each corresponding to a packet P of rays, for example comprising 16 × 16 rays, it is It is possible to process the calculations in parallel for the different ray packages. Single Instruction instructions, SIMD Multiple Data (MMX, 3DNow !, SSE, SSE2, SSE3, SSSE3 and SSE4) can be used. The calculations can be parallelized on the processors of the machine. The performance is almost linearly multiplied by the number of physical processors available. According to one aspect of the invention, when moving from the user's point of view in the scene, the resolution of the image may be lowered in order to improve the rendering performance. In addition, some parts of the illumination calculation can also be calculated at lower resolutions or disabled during travel, such as techniques known as Bump Mapping. In the same way, the reflection calculations can be calculated at lower resolutions or disabled if necessary. According to one aspect of the invention, an automatic detection of the configuration of the user machine is performed in order to choose the rendering mode and the available options allowing the best user experience to provide the best level of performance.

15 Selon un aspect de l'invention, dans le cas d'un rendu en basse résolution l'anti aliasing est utilisé pour augmenter la qualité du rendu sur les parties de l'image correspondant à des contours. Selon un aspect de l'invention, un résultat intermédiaire du procédé de rendu, avant l'image finale I, est une structure de données intermédiaire B, 20 sous forme d'un tampon de donnée, comprenant des positions dans l'image et des identifiants de triangles T. Ces données sont ordonnées par paquets de rayons P. En particulier, la structure utilisée peut être du type connu sous le nom de « FatBuffer ».According to one aspect of the invention, in the case of a low-resolution rendering, the anti-aliasing is used to increase the quality of the rendering on the parts of the image corresponding to contours. According to one aspect of the invention, an intermediate result of the rendering method, before the final image I, is an intermediate data structure B, in the form of a data buffer, comprising positions in the image and identifiers of triangles T. These data are ordered in packets of radii P. In particular, the structure used may be of the type known as "FatBuffer".

25 Des effets dits de « Post-Process » peuvent être appliqués sur le résultat obtenu, et notamment les effets connus suivants : Depth of Field, Desaturate, RadialMask, LightDirection Mask, Fog, ColorCurve, Glow, MotionBlur, SSAO. Il est également possible de prendre en compte dans le procédé 30 selon l'invention des effets de texturisation, et notamment les effets connus suivants, disponibles par exemple dans le logiciel 3DS MAX® commercialisé par la société Autodesk: Bump, Diffuse, Specular Level, Self Ilium, Opacity, Reflection. Selon un mode de mise en oeuvre, un éclairage de la scène S de 35 type PHONG est effectué. Un éclairage diffus et spéculaire est notamment réalisé. Bien entendu, d'autres types de méthodes d'éclairage peuvent être envisagés. A titre d'exemple, les processeurs suivants permettent la mise en oeuvre d'un logiciel exécutant le procédé selon l'invention : Intel Core i7®, Atom®, Athlon X2® 64, Intel Core2 Quad®, Intel Pentium D®, Intel Pentium III®, Intel Centrino 2®. Le tableau de la figure 14 représente différentes mesures de performance, à titre indicatif, pour un déplacement sur la scène de test « Sponza 93 kTrl » de Crytek© comprenant 93281 triangles et 62852 sommets avec textures. Le protocole de test est le suivant : 135 positions de caméra différentes sont définies dans la scène. On mesure le temps nécessaire (en ms) pour calculer les images correspondant à chaque position. On en déduit ensuite en fps moyen sur tout le parcourt. Les données du tableau indiquent le type de processeur utilisé, la résolution de rendu (en pixels), l'utilisation ou non des textures, la durée nécessaire au rendu d'un chemin sur 135 images (en millisecondes) et le nombre d'image par seconde (fps) moyen obtenu sur le chemin défini. Grâce aux dispositions selon l'invention, un pipeline de rendu adaptatif est mis en place selon les possibilités de calcul et de stockage des matériels utilisés pour la visualisation (station de travail, ordinateur portable, PDA, téléphone mobile, ...), permettant de visualiser en temps réel des scènes composées de quelques millions de polygones et fournissant une qualité d'image adaptée aux possibilités matérielles disponibles. Les dispositions selon l'invention permettent également de ne pas 25 adapter le modèle 3D en entrée du procédé à celui-ci. Bien que l'invention ait été décrite en liaison avec des exemples particuliers de réalisation, il est bien évident qu'elle n'y est nullement limitée et qu'elle comprend tous les équivalents techniques des moyens décrits ainsi que leurs combinaisons si celles-ci entrent dans le cadre de l'invention. So-called "Post-Process" effects can be applied to the result obtained, and in particular the following known effects: Depth of Field, Desaturate, RadialMask, LightDirection Mask, Fog, ColorCurve, Glow, MotionBlur, SSAO. It is also possible to take into account in the process according to the invention texturing effects, and in particular the following known effects, available for example in the 3DS MAX® software marketed by Autodesk: Bump, Diffuse, Specular Level, Self Ilium, Opacity, Reflection. According to one embodiment, lighting of the PHONG scene S is performed. Diffuse and specular lighting is particularly achieved. Of course, other types of lighting methods can be envisaged. By way of example, the following processors make it possible to implement software running the method according to the invention: Intel Core i7®, Atom®, Athlon X2® 64, Intel Core2 Quad®, Intel Pentium D®, Intel Pentium III®, Intel Centrino 2®. The table in Figure 14 represents various performance measurements, as a rough guide, for moving to the Crytek © Sponza 93 kTrl test scene with 93281 triangles and 62852 vertices with textures. The test protocol is as follows: 135 different camera positions are defined in the scene. The time required (in ms) is measured to calculate the images corresponding to each position. We then deduce in average fps all over the course. The data in the table indicates the type of processor used, the rendering resolution (in pixels), the use or not of textures, the time required to render a path on 135 images (in milliseconds) and the number of images per second (fps) average obtained on the defined path. Thanks to the provisions of the invention, an adaptive rendering pipeline is set up according to the calculation and storage possibilities of the materials used for visualization (workstation, laptop, PDA, mobile phone, etc.), allowing to visualize in real time scenes composed of a few million polygons and providing an image quality adapted to the material possibilities available. The arrangements according to the invention also make it possible not to adapt the 3D model at the input of the process to this one. Although the invention has been described in connection with particular embodiments, it is obvious that it is not limited thereto and that it comprises all the technical equivalents of the means described and their combinations if they are within the scope of the invention.

Claims (6)

REVENDICATIONS1. Procédé de rendu d'images (I) en temps-réel à partir d'une scène (Sc) virtuelle en trois dimensions utilisant une technique de lancer de rayon, comprenant les étapes consistant à construire à partir du modèle de la scène une structure de données (S, Sa) destinée à permettre un calcul accéléré des intersections entre les rayons (Ry) et la scène 3D (Sc), ladite structure de données (S, Sa) permettant de regrouper des éléments de la scène par proximité spatiale, Caractérisé en ce que la construction de la structure de données (S) comprend une étape (E2) consistant à fusionner l'ensemble des objets statiques (OS) de la scène avant de procéder(E3) aux regroupements des données géométriques 3D (T) par proximité spatiale. REVENDICATIONS1. A real-time image rendering (I) method from a three-dimensional virtual scene (Sc) using a ray tracing technique, comprising the steps of constructing from the scene model a structure of data (S, Sa) for allowing an accelerated calculation of the intersections between the rays (Ry) and the 3D scene (Sc), said data structure (S, Sa) for grouping elements of the scene by spatial proximity, Characterized in that the construction of the data structure (S) comprises a step (E2) of merging the set of static objects (OS) of the scene before proceeding (E3) to the groupings of the 3D geometric data (T) by spatial proximity. 2. Procédé selon la revendication 1, dans lequel la structure de données (S) est construite avec l'ensemble des données 3D des objets statiques (OS) et des objets animés (OA), les objets animés (OA) étant marqués spécifiquement lorsque leur animation est activée. The method of claim 1, wherein the data structure (S) is constructed with the set of 3D data of the static objects (OS) and animated objects (OA), the animated objects (OA) being specifically marked when their animation is enabled. 3. Procédé selon l'une des revendications précédentes, dans lequel une seconde structure de données (Sa) spécifique destinée à être mise à jour à chaque image (I) comprenant les objets animés (OAa) en cours d'animation est construite. 3. Method according to one of the preceding claims, wherein a second specific data structure (Sa) intended to be updated to each image (I) comprising the animated objects (OAa) being animated is constructed. 4. Procédé selon l'une des revendications précédentes, dans lequel le rendu d'une image finale (I) est réalisé en : - calculant dans un premier temps une première image intermédiaire (Is) représentant les objets statiques (OS) et comprenant, pour chaque point de l'image ou est figuré un objet statique des informations de profondeur (d) de l'intersection d'un rayon lancé avec ledit objet statique (OS) ; puis - en mettant à jour dans cette image intermédiaire (Is) les pixels correspondant à des objets animés (OAa) en cours d'animation en comparant pour les points de l'image pour lesquels une intersection d'un rayon avec un objet en cours d'animation (OAa) est détectée les informations de profondeur d'intersection (d) pour la première image intermédiaire et pour l'objet animé considéré, la plus proche intersection étant conservée. 4. Method according to one of the preceding claims, wherein the rendering of a final image (I) is achieved by: - calculating in a first step a first intermediate image (Is) representing the static objects (OS) and comprising, for each point of the image or is shown a static object information depth (d) of the intersection of a ray launched with said static object (OS); then - by updating in this intermediate image (Is) the pixels corresponding to animated objects (OAa) being animated by comparing for the points of the image for which an intersection of a ray with an object in progress animation (OAa) is detected the intersection depth information (d) for the first intermediate image and for the moving object considered, the nearest intersection being preserved. 5. Procédé selon la revendication 4, dans laquelle la première image intermédiaire (la) comprend également les objets animés (OAs) qui ne sont pas en cours d'animation. The method of claim 4, wherein the first intermediate image (1a) also includes animated objects (OAs) that are not being animated. 6. Procédé selon l'une des revendications 4 ou 5, et selon la revendication 3, dans lequel la détermination de la première image (Is) est réalisée en utilisant un parcours de la première structure de données (S) regroupant les objets statiques (OS, OAs) ; et la mise à jour correspondant aux objets en cours d'animation (OAa) est réalisée en utilisant un parcours de la seconde structure de données (Sa) regroupant les objets en cours d'animation.7. Procédé selon l'une des revendications précédentes, dans lequel un résultat intermédiaire du procédé de rendu est produit sous forme d'un tampon de donnée (B), comprenant des informations de position dans l'image (I) et des identifiants d'élément de la géométrie correspondants (T). 8. Procédé selon la revendication 7, dans lequel les étapes de d'éclairage et/ou d'ombrage et/ou une ou plusieurs passes de retraitement sont réalisées en utilisant le tampon de données (B). 9. Procédé selon l'une des revendications précédentes, dans lequel une détection automatique de la configuration de la machine utilisateur est réalisée afin de choisir le mode de rendu et les options disponibles, et en particulier de permettre l'activation, la dégradation ou la désactivation de la réalisation d'étapes de rendu, de procéder à une baisse de la résolution de l'image lors des déplacement du point de vue de l'utilisateur dans la scène ou de désactiver des fonctionnalités d'éclairage et/ou de calcul de réflexion et/ou de calcul de transparence. 10. Procédé selon l'une des revendications précédentes, dans lequel la structure de données (S) utilisée peut notamment être une structure du type « hiérarchie de boîte englobante » BVH (Bounding Volume Hierarchy). 11. Procédé selon l'une des revendications précédentes, dans lequel, les données géométriques 3D (T) des objets statiques sont traitées pour leur appliquer des transformations (ou « baking ») de façon à exprimer leurs coordonnées dans un repère de la scène (Sc) commun à l'ensemble des objets (OS) de cette scène (Sc). 12. Procédé selon la revendication 11, dans lequel les données géométriques 3D (T) correspondants aux objets animés (OA) subissent 35 également un traitement de transformation (ou « baking ») de façon à exprimerleurs coordonnées dans le repère de la scène (Sc) en prenant en compte la position originale des objets animés (OA) dans l'animation. 13. Procédé selon l'une des revendications précédentes, dans lequel la structure de données (S) comporte une arborescence présentant un ensemble de noeuds (n), lesdits noeuds (n) étant sont stockés en série dans un tableau, chaque noeud (n) n'étant pas une feuille de l'arborescence contenant une référence sur le noeud fils de gauche (ng) respectivement de droite (nd), le noeud fils de droite (nd), respectivement de gauche (ng), se situant dans la case suivante du tableau. 14. Procédé selon l'une des revendications précédentes, dans lequel la structure de données (S) comporte une arborescence dont les feuilles (f) comprennent pour leur part un pointeur ou une référence sur des données géométriques (T) de la scène (Sc) contenus dans le modèle 3D (M). 15. Produit programme d'ordinateur permettant la mise en oeuvre d'un procédé selon l'une des revendications précédentes. 6. Method according to one of claims 4 or 5, and according to claim 3, wherein the determination of the first image (Is) is performed using a path of the first data structure (S) grouping the static objects ( OS, OAs); and the update corresponding to the objects being animated (OAa) is performed using a path of the second data structure (Sa) grouping the objects being animated.7. Method according to one of the preceding claims, in which an intermediate result of the rendering method is produced in the form of a data buffer (B), comprising position information in the image (I) and element identifiers of the corresponding geometry (T). The method of claim 7, wherein the lighting and / or shading steps and / or one or more reprocessing passes are performed using the data buffer (B). 9. Method according to one of the preceding claims, wherein an automatic detection of the configuration of the user machine is performed in order to choose the rendering mode and available options, and in particular to enable activation, degradation or disabling rendering steps, decreasing the resolution of the image when moving from the viewpoint of the user to the scene, or disabling lighting and / or reflection and / or calculation of transparency. 10. Method according to one of the preceding claims, wherein the data structure (S) used may in particular be a structure of the type "BOH" (Bounding Volume Hierarchy). 11. Method according to one of the preceding claims, wherein the 3D geometrical data (T) of the static objects are processed to apply transformations (or "baking") so as to express their coordinates in a frame of the scene ( Sc) common to all the objects (OS) of this scene (Sc). 12. The method according to claim 11, wherein the 3D geometrical data (T) corresponding to the animated objects (OA) also undergo a transformation processing (or "baking") so as to express their coordinates in the frame of the scene (Sc). ) taking into account the original position of animated objects (OA) in the animation. Method according to one of the preceding claims, wherein the data structure (S) comprises a tree having a set of nodes (n), said nodes (n) being stored in series in an array, each node (n). ) not being a leaf of the tree containing a reference on the left child node (ng) respectively of right (nd), the node of right (nd), respectively of left (ng), lying in the next box of the table. 14. Method according to one of the preceding claims, wherein the data structure (S) comprises a tree whose leaves (f) comprise a pointer or a reference on geometric data (T) of the scene (Sc). ) contained in the 3D model (M). 15. Computer program product for implementing a method according to one of the preceding claims.
FR1060281A 2010-12-09 2010-12-09 REAL-TIME IMAGE RENDERING PROCESS FROM A THREE-DIMENSIONAL SCENE Expired - Fee Related FR2968812B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
FR1060281A FR2968812B1 (en) 2010-12-09 2010-12-09 REAL-TIME IMAGE RENDERING PROCESS FROM A THREE-DIMENSIONAL SCENE

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
FR1060281A FR2968812B1 (en) 2010-12-09 2010-12-09 REAL-TIME IMAGE RENDERING PROCESS FROM A THREE-DIMENSIONAL SCENE

Publications (2)

Publication Number Publication Date
FR2968812A1 true FR2968812A1 (en) 2012-06-15
FR2968812B1 FR2968812B1 (en) 2013-07-26

Family

ID=44483923

Family Applications (1)

Application Number Title Priority Date Filing Date
FR1060281A Expired - Fee Related FR2968812B1 (en) 2010-12-09 2010-12-09 REAL-TIME IMAGE RENDERING PROCESS FROM A THREE-DIMENSIONAL SCENE

Country Status (1)

Country Link
FR (1) FR2968812B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117576298A (en) * 2023-10-09 2024-02-20 中微智创(北京)软件技术有限公司 Battlefield situation target highlighting method based on context separation 3D lens

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
INGO WALD ET AL: "State of the Art in Ray Tracing Animated Scenes", EUROGRAPHICS TECHNICAL REPORT SERIES, EUROGRAPHICS, AIRE-LA-VILLE, FR, 1 September 2007 (2007-09-01), pages 89 - 116, XP007908773, ISSN: 1017-4656 *
SHEVTSOV M ET AL: "Highly parallel fast kd-tree construction for interactive ray tracing of dynamic scenes", COMPUTER GRAPHICS FORUM, WILEY-BLACKWELL PUBLISHING LTD, GB, vol. 26, no. 3, 1 September 2007 (2007-09-01), pages 395 - 404, XP008121738, ISSN: 0167-7055, DOI: 10.1111/J.1467-8659.2007.01062.X *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117576298A (en) * 2023-10-09 2024-02-20 中微智创(北京)软件技术有限公司 Battlefield situation target highlighting method based on context separation 3D lens
CN117576298B (en) * 2023-10-09 2024-05-24 中微智创(北京)软件技术有限公司 Battlefield situation target highlighting method based on context separation 3D lens

Also Published As

Publication number Publication date
FR2968812B1 (en) 2013-07-26

Similar Documents

Publication Publication Date Title
EP1982310B1 (en) Method for synthesizing a virtual image by beam launching
US8243073B2 (en) Tree insertion depth adjustment based on view frustum and distance culling
Scherzer et al. A survey of real‐time hard shadow mapping methods
Hollander et al. Manylods: Parallel many‐view level‐of‐detail selection for real‐time global illumination
US20150277378A1 (en) Image based multiview multilayer holographic rendering algorithm
US20110285710A1 (en) Parallelized Ray Tracing
WO2016168002A1 (en) Mesh simplification by 3d model reconstruction
CA2810873C (en) Streaming hierarchy traversal renderer
JP2007514230A5 (en)
US20150254889A1 (en) Method and System for a Separated Shadowing in Ray Tracing
US11120610B2 (en) Coherent secondary rays for reflections in hybrid ray tracing
WO2014045094A1 (en) Hybrid engine for central processing unit and graphics processing unit
CN107392990A (en) Render the global illumination of 3D scenes
FR3075433A1 (en) METHOD FOR DETERMINING THE HIGHLIGHTS OF A TARGET ON AN IMAGE
WO2010086541A1 (en) Method for representing a material
FR2968812A1 (en) Method for rendering images in real-time from virtual three-dimensional scene, involves building data structure by merging all static objects of scene before making combinations of three-dimensional geometric data by spatial proximity
Kohek et al. Interactive Large‐Scale Procedural Forest Construction and Visualization Based on Particle Flow Simulation
EP2297705A1 (en) Method for the real-time composition of a video
EP2981944B1 (en) Look-based selection for rendering a computer-generated animation
Gerhards et al. Partitioned shadow volumes
KR20220139880A (en) Real-time, software-based hybrid ray tracing for battery-powered computing devices
WO2014023887A1 (en) Real-time image-rendering method
WO2012076778A1 (en) Method for rendering images from a three-dimensional virtual scene
FR2964776A1 (en) METHOD FOR ESTIMATING LIGHT DISTRIBUTION IN A HOMOGENEOUS ENVIRONMENT
CN114821001B (en) AR-based interaction method and device and electronic equipment

Legal Events

Date Code Title Description
PLFP Fee payment

Year of fee payment: 6

PLFP Fee payment

Year of fee payment: 7

CA Change of address

Effective date: 20170912

PLFP Fee payment

Year of fee payment: 8

PLFP Fee payment

Year of fee payment: 9

PLFP Fee payment

Year of fee payment: 10

PLFP Fee payment

Year of fee payment: 11

TP Transmission of property

Owner name: AKKA INGENIERIE PRODUIT, FR

Effective date: 20201228

PLFP Fee payment

Year of fee payment: 12

ST Notification of lapse

Effective date: 20230808