FR2960677A1 - Total light amount estimating method for studio, involves repeating estimation of amount of light and total amount of light during modification of light parameter of light source, and recording amount of light partially received by point - Google Patents
Total light amount estimating method for studio, involves repeating estimation of amount of light and total amount of light during modification of light parameter of light source, and recording amount of light partially received by point Download PDFInfo
- Publication number
- FR2960677A1 FR2960677A1 FR1059372A FR1059372A FR2960677A1 FR 2960677 A1 FR2960677 A1 FR 2960677A1 FR 1059372 A FR1059372 A FR 1059372A FR 1059372 A FR1059372 A FR 1059372A FR 2960677 A1 FR2960677 A1 FR 2960677A1
- Authority
- FR
- France
- Prior art keywords
- light
- light source
- point
- received
- amount
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/50—Lighting effects
- G06T15/506—Illumination models
Landscapes
- Engineering & Computer Science (AREA)
- Computer Graphics (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Generation (AREA)
Abstract
L'invention concerne un procédé d'estimation de la quantité de lumière totale reçue par un point P (124) d'un environnement virtuel éclairé par une pluralité de sources lumineuses (100 à 105). Afin d'accélérer le rendu de l'environnement virtuel, le procédé comprend les étapes de : A) sélection d'une première source lumineuse (100) parmi la pluralité de sources lumineuses (100 à 105), B) estimation de la quantité de lumière reçue par ledit point P (124) de chaque source lumineuse (101 à 104) à l'exception de ladite première source lumineuse (100), C) enregistrement d'une première quantité de lumière partielle reçue par ledit point P (124) correspondant à la somme des quantités de lumières reçues de chaque source lumineuse (101 à 105) à l'exception de ladite première source lumineuse (100), D) estimation de la quantité de lumière reçue par ledit point P (124) de ladite première source lumineuse (100), E) estimation d'une première quantité de lumière totale reçue par ledit point P (124) en ajoutant la quantité de lumière reçue de ladite première source lumineuse (100) à ladite première quantité de lumière partielle, seules les étapes D) et E) étant réitérées lors d'une modification d'au moins un paramètre d'éclairage de ladite première source lumineuse (100).The invention relates to a method for estimating the total amount of light received by a point P (124) of a virtual environment illuminated by a plurality of light sources (100 to 105). In order to speed up the rendering of the virtual environment, the method comprises the steps of: A) selecting a first light source (100) from among the plurality of light sources (100 to 105), B) estimating the amount of light received by said P-point (124) from each light source (101-104) except for said first light source (100), C) recording a first amount of partial light received by said P-point (124) corresponding to the sum of the light quantities received from each light source (101 to 105) with the exception of said first light source (100), D) estimation of the quantity of light received by said P-point (124) of said first light source (100) light source (100), E) estimating a first quantity of total light received by said P-point (124) by adding the amount of light received from said first light source (100) to said first partial light quantity, only the steps D) and E) being reiterated upon modification of at least one lighting parameter of said first light source (100).
Description
PROCEDE D'ESTIMATION DE LA QUANTITE DE LUMIERE RECUE EN UN POINT D'UN ENVIRONNEMENT VIRTUEL METHOD FOR ESTIMATING LIGHT QUANTITY RECEIVED IN ONE POINT OF A VIRTUAL ENVIRONMENT
1. Domaine de l'invention. L'invention se rapporte au domaine de la composition d'images de synthèse et plus particulièrement au domaine de la modélisation d'un environnement lumineux éclairant un environnement virtuel ou scène 3D (c'est-à-dire à trois dimensions). 2. Etat de l'art. Selon l'état de la technique, pour fournir à un spectateur d'un environnement virtuel une impression de réalisme la plus grande possible, il est connu de modéliser l'éclairage de l'environnement virtuel par l'utilisation d'un environnement lumineux composé d'un grand nombre de sources lumineuses, chaque source lumineuse étant indépendante et paramétrable avec des paramètres d'éclairage qui lui sont propres. Selon cette technique, il est possible de modéliser un éclairage naturel complexe par un environnement lumineux comprenant plusieurs sources lumineuses. En jouant sur les paramètres d'éclairage de chaque source lumineuse et en estimant les ombres qui en résultent dans l'environnement virtuel, il est possible de s'affranchir de coûteux calculs tels que par exemple les calculs de diffusion de la lumière en prenant en compte les inter-réflexions de la lumière avec les différents objets composant l'environnement virtuel. 1. Field of the invention The invention relates to the field of synthetic image composition and more particularly to the field of modeling a light environment illuminating a virtual environment or 3D scene (that is to say, three-dimensional). 2. State of the art According to the state of the art, to provide a viewer of a virtual environment with the greatest possible realism, it is known to model the lighting of the virtual environment by the use of a composite light environment. a large number of light sources, each light source being independent and configurable with lighting parameters that are specific to it. According to this technique, it is possible to model complex natural lighting by a light environment comprising several light sources. By playing on the lighting parameters of each light source and estimating the shadows that result in the virtual environment, it is possible to get rid of expensive calculations such as for example light scattering calculations by taking into account counts the inter-reflections of the light with the different objects composing the virtual environment.
Pour obtenir un résultat le plus réaliste possible, un artiste générant un environnement virtuel éclairé par un environnement lumineux comprenant plusieurs sources lumineuses est amené à modifier les paramètres d'éclairages associés aux sources lumineuses de manière itérative, c'est-à-dire de modifier les paramètres d'éclairage d'une source ou d'un groupe de sources, de visualiser le résultat avant de modifier le paramétrage de la même source ou d'une autre source. Pour se rendre compte de l'impact des modifications des paramètres d'éclairage d'une seule source, il est nécessaire de recalculer les contributions de chaque source lumineuse pour visualiser le résultat de la modification. Sachant que la simple prévisualisation de l'éclairage de la scène et le résultat en terme d'ombres peut prendre plusieurs heures sur des ordinateurs performants et qu'il peut s'avérer nécessaire de modifier à de nombreuses reprises les paramètres d'éclairage des sources lumineuses avant d'obtenir un éclairage réaliste de la scène, la génération d'une image d'un environnement virtuel et plus particulièrement la modélisation de l'environnement lumineux s'avère très coûteuse en temps de conception et de modélisation et en besoin de ressources pour les calculs nécessaires au rendu de l'environnement virtuel. To obtain the most realistic result possible, an artist generating a virtual environment illuminated by a light environment comprising several light sources is made to modify the lighting parameters associated with the light sources iteratively, that is to say to modify the lighting parameters of a source or a group of sources, to visualize the result before modifying the parameterization of the same source or another source. To be aware of the impact of changing lighting parameters from a single source, it is necessary to recalculate the contributions of each light source to visualize the result of the modification. Knowing that the simple preview of the lighting of the scene and the result in terms of shadows can take several hours on high-performance computers and that it may be necessary to modify many times the lighting parameters of the sources luminous before obtaining a realistic lighting of the scene, the generation of an image of a virtual environment and more particularly the modeling of the luminous environment proves very expensive in time of design and modeling and in need of resources for the calculations needed to render the virtual environment.
3. Résumé de l'invention. L'invention a pour but de pallier au moins un de ces inconvénients de l'art antérieur. 3. Summary of the invention. The invention aims to overcome at least one of these disadvantages of the prior art.
Plus particulièrement, l'invention a notamment pour objectif d'optimiser les temps de calcul et/ou la puissance de calcul nécessaire pour composer en temps réel l'environnement lumineux d'un environnement virtuel. L'invention concerne un procédé d'estimation de la quantité de lumière totale reçue par un point P d'un environnement virtuel, l'environnement virtuel étant éclairé par une pluralité de sources lumineuses, le procédé comprenant les étapes de : A) sélection d'une première source lumineuse parmi la pluralité de sources lumineuses, B) estimation de la quantité de lumière reçue par le point P de chaque source lumineuse de la pluralité de sources lumineuses à l'exception de la première source lumineuse, C) enregistrement d'une première quantité de lumière partielle reçue par le point P correspondant à la somme des quantités de lumières reçues de chaque source lumineuse de la pluralité à l'exception de la première source lumineuse, D) estimation de la quantité de lumière reçue par le point P de la première source lumineuse, E) estimation d'une première quantité de lumière totale reçue par le point P en ajoutant la quantité de lumière reçue de la première source lumineuse à la première quantité de lumière partielle, seules les étapes D) et E) étant réitérées lors d'une modification d'au moins un paramètre d'éclairage de la première source lumineuse (100). More particularly, the object of the invention is in particular to optimize the calculation times and / or the computing power necessary to compose in real time the light environment of a virtual environment. The invention relates to a method for estimating the total amount of light received by a point P of a virtual environment, the virtual environment being illuminated by a plurality of light sources, the method comprising the steps of: A) selecting a light source; a first light source among the plurality of light sources, B) estimating the amount of light received by the point P of each light source of the plurality of light sources except the first light source, C) recording of a first quantity of partial light received by the point P corresponding to the sum of the quantities of light received from each light source of the plurality with the exception of the first light source, D) estimation of the quantity of light received by the point P of the first light source, E) estimating a first quantity of total light received by the point P by adding the quantity of light received from the first first light source at the first partial light quantity, only steps D) and E) being repeated when a modification of at least one lighting parameter of the first light source (100).
Selon une caractéristique particulière, le procédé comprend en outres les étapes de : - sélection d'une deuxième source lumineuse parmi la pluralité de sources lumineuses, la deuxième source lumineuse sélectionnée étant différente de la première source lumineuse, - estimation d'une deuxième quantité de lumière partielle reçue par le point P correspondant à la somme des quantités de lumières reçues de chaque source lumineuse de la pluralité à l'exception de la deuxième source lumineuse, la deuxième quantité de lumière partielle reçue étant estimée en retranchant la quantité de lumière reçue de la deuxième source lumineuse sélectionnée de la première quantité de lumière totale reçue estimée, - modification d'au moins un paramètre d'éclairage de la deuxième source lumineuse puis estimation de la quantité de lumière reçue par le point P de la deuxième source lumineuse, - estimation d'une deuxième quantité de lumière totale reçue par le point P en ajoutant la quantité de lumière reçue de la deuxième source lumineuse à la deuxième quantité de lumière partielle reçue par le point P. Avantageusement, la quantité de lumière reçue de chaque source lumineuse de la pluralité de sources lumineuses est estimée à partir d'une carte d'ombre associée à chaque source lumineuse de la pluralité. Selon une caractéristique spécifique, le procédé comprend en outre une étape d'estimation de la quantité de lumière réfléchie par un élément de surface associé au point P en fonction de la quantité de lumière totale reçue par le point P et d'une information représentative de la réfléctance associée à l'élément de surface associé au point P. According to one particular characteristic, the method further comprises the steps of: selecting a second light source from among the plurality of light sources, the second selected light source being different from the first light source, estimating a second quantity of light, partial light received by the point P corresponding to the sum of the light quantities received from each light source of the plurality with the exception of the second light source, the second quantity of partial light received being estimated by subtracting the quantity of light received from the second light source selected from the estimated first total received light quantity; - modifying at least one lighting parameter of the second light source; then estimating the quantity of light received by the point P of the second light source; estimating a second quantity of total light received by the p Anoint P by adding the amount of light received from the second light source to the second amount of partial light received by the point P. Advantageously, the amount of light received from each light source of the plurality of light sources is estimated from a shadow map associated with each light source of the plurality. According to a specific characteristic, the method further comprises a step of estimating the amount of light reflected by a surface element associated with the point P as a function of the total amount of light received by the point P and of information representative of the reflectance associated with the surface element associated with the point P.
4. Liste des figures. L'invention sera mieux comprise, et d'autres particularités et avantages apparaîtront à la lecture de la description qui va suivre, la description faisant référence aux dessins annexés parmi lesquels : - la figure 1A illustre schématiquement un environnement virtuel éclairé par une source lumineuse, selon un mode de réalisation particulier de l'invention ; - la figure 1B illustre une carte d'ombre associée à l'environnement virtuel et à la source lumineuse de la figure 1A, selon un mode de réalisation particulier de l'invention ; - la figure 2 illustre schématiquement une méthode d'estimation de la quantité de lumière totale reçue par un point P de l'environnement virtuel de la figure 1, selon un mode de réalisation particulier de l'invention ; - la figure 3 illustre un dispositif mettant en oeuvre une méthode d'estimation de la quantité de lumière reçue en un point de l'environnement virtuel de la figure 1, selon un exemple de mise en oeuvre particulier de l'invention ; - la figure 4 illustre un procédé d'estimation de la quantité de lumière totale reçue en un point de l'environnement virtuel de la figure 1, selon un exemple de mise en oeuvre particulier de l'invention. 4. List of figures. The invention will be better understood, and other features and advantages will become apparent on reading the description which follows, the description referring to the appended drawings in which: FIG. 1A schematically illustrates a virtual environment illuminated by a light source, according to a particular embodiment of the invention; FIG. 1B illustrates a shadow map associated with the virtual environment and with the light source of FIG. 1A, according to one particular embodiment of the invention; FIG. 2 diagrammatically illustrates a method for estimating the total amount of light received by a point P of the virtual environment of FIG. 1, according to one particular embodiment of the invention; FIG. 3 illustrates a device implementing a method for estimating the quantity of light received at a point in the virtual environment of FIG. 1, according to an example of a particular implementation of the invention; FIG. 4 illustrates a method for estimating the total amount of light received at a point in the virtual environment of FIG. 1, according to an example of a particular implementation of the invention.
5. Description détaillée de modes de réalisation de l'invention. 5. Detailed description of embodiments of the invention.
La figure 1 illustre un environnement virtuel ou une scène virtuelle (dite aussi scène 3D) 1 éclairée par une pluralité de sources de lumière 100 à 105, la pluralité de sources lumineuses 100 à 105 formant un environnement lumineux. L'éclairage fourni par la source lumineuse 100 forme un cône de lumière 111. L'environnement virtuel 1 comprend un ou plusieurs objets virtuels 12, 13, 14 et 15, modélisés selon toute méthode connue de l'homme du métier, par exemple par modélisation polygonale, dans laquelle le modèle est assimilé à un ensemble de polygones chacun défini par la liste des sommets et des arêtes qui le compose, par modélisation par courbe de type NURBS (de l'anglais « Non uniform rational basic spline » ou en français « Spline basique rationnelle non uniforme ») dans laquelle le modèle est défini par un ensemble de courbes créées grâce à des points de contrôle (de l'anglais « control vertices »), par modélisation par subdivision de surfaces... On entend par objet virtuel toute représentation virtuelle (obtenue par modélisation) d'un objet (réel ou fictif) composant un environnement réel (par exemple le sol, une maison ou une façade d'une maison, une voiture, un arbre, c'est-à-dire tout élément composant un environnement tel qu'une pièce d'une maison, une rue, une ville, la campagne, ...) ou imaginaire. Chaque objet 12, 13, 14 et 15 de l'environnement virtuel est caractérisé par une surface le recouvrant, la surface de chaque objet ayant des propriétés de réflectance (correspondant à la proportion de lumière incidente réfléchie par la surface dans une ou plusieurs directions) qui lui sont propres. Avantageusement, la réflectance de la surface d'un objet varie en fonction de la zone de l'objet réfléchissant la lumière (une zone de la surface comprenant un ou plusieurs points de la surface) c'est-à-dire que la réflectance de la surface d'un objet n'est pas constante. Selon une variante, la réflectance de la surface d'un objet est constante en tout point de la surface de l'objet. Ainsi, l'objet 12 reçoit une quantité de lumière incidente de la source lumineuse 10, la surface de l'objet 12 éclairée par la source lumineuse 100 étant discrétisée en une pluralité de points 121 à 12i. Les points 121 à 12i correspondent à des points singuliers ou selon une variante à des éléments de surface. Dans la suite de la description de la figure 1, un point d'une surface désignera aussi bien un point unitaire qu'un élément de surface. De la même manière, l'objet 13 reçoit une quantité de lumière incidente de la source lumineuse 100, la surface de l'objet 13 éclairée par la source lumineuse 100 étant discrétisée en une pluralité de points 131 à 13i, chaque point correspondant à un point unitaire ou à un élément de surface. L'objet 15 reçoit également une quantité de lumière incidente, la surface de l'objet 15 éclairée par la source lumineuse 100 étant discrétisée en une pluralité de points 151 à 15i qui correspondent chacun à un point unitaire ou à un élément de surface. La normale à l'élément de surface associé à chaque point 121 à 12i, 131 à 13i, 151 à 15i est représentée par une flèche noire. L'information relative à la normale de chaque élément de surface réfléchissant la lumière est utile pour estimer la quantité de lumière réfléchie selon une direction donnée. De manière avantageuse, l'environnement virtuel 1 est rendu tel que vu depuis la source lumineuse 100. Les informations représentatives de l'environnement virtuel 1 tel qu'il est vu depuis la source lumineuse 100 sont stockées dans une carte d'ombre 110 (de l'anglais « shadow map »). La carte d'ombre comprend avantageusement pour chaque point de l'environnement virtuel 1 appartenant à un objet de l'environnement virtuel 1 et éclairé par la source lumineuse 100 (nommé premier point dans le reste de la description) une information représentative de la distance séparant la source lumineuse 100 du premier point considéré. La figure 1B illustre une telle carte d'ombre 110 selon un mode de réalisation particulier de l'invention. L'information représentative de la distance est représentée par un vecteur 1100 à 110i dont la norme est égale à la distance entre la source lumineuse et le premier point considéré. La carte d'ombre est ainsi composée d'une pluralité de points associés aux premiers points de l'environnement virtuel 1 projetés sur une surface formée par le cône de lumière 100 et perpendiculaire à la direction principale d'éclairage de la source lumineuse 100. Une information représentative de la distance source lumineuse / premier point est associée à chaque point correspondant de la carte d'ombre. En reliant chaque point de la carte d'ombre formé par le vecteur représentatif de la distance, on obtient une surface S représentative de l'ensemble des premiers points de l'environnement tels que vus depuis la source lumineuse 100. L'utilisation d'une carte d'ombre présente l'avantage de diminuer les calculs nécessaires à l'estimation de la quantité de lumière reçue par l'environnement virtuel et donc de diminuer les calculs nécessaires pour estimer la quantité de lumière reçue par un point de l'environnement virtuel. Grâce à la carte d'ombre, pour savoir si un point de l'environnement virtuel est éclairé ou non par la source lumineuse 100, il suffit de connaître la distance séparant ce point de la source lumineuse et de la direction d'incidence à laquelle il appartient. Aucun calcul d'intersection entre la droite formée par le point et la source lumineuse d'une part et les objets de l'environnement virtuel d'autre part n'est ainsi nécessaire, ce qui diminue les calculs nécessaires. En effet, pour déterminer si un point de l'environnement virtuel est éclairé par la source lumineuse 100, il suffit de comparer la distance séparant ce point de la source lumineuse 100 selon une direction d'incidence à la distance stockée dans la carte d'ombre pour la même direction d'incidence de la lumière. Ainsi, si la distance estimée pour le point considérée est supérieure à la distance stockée dans la carte d'ombre pour la même direction d'incidence, le point considéré de l'environnement virtuel 1 n'est pas éclairé par la source lumineuse 100 car occulté par au moins un des objets de l'environnement virtuel 1. La carte d'ombre permet de déterminer simplement avec de faibles coûts en calcul les points éclairés par une source lumineuse et ceux qui ne le sont pas. La quantité de lumière reçue par un point de l'environnement virtuel 1 éclairé par la source lumineuse 100 est avantageusement déterminée à partir de la fonction de distribution goniométrique associée à la source lumineuse 100. Une telle fonction de distribution goniométrique est avantageusement définie par un ensemble de paramètres qui sont modifiables par un utilisateur (dit également artiste) cherchant à modéliser l'environnement lumineux éclairant l'environnement virtuel 1. Les paramètres de la fonction de distribution goniométrique, dits paramètres d'éclairages associés à la source lumineuse 100, comprennent par exemple la puissance radiante de la source lumineuse exprimée en watts, l'intensité radiante correspondant à l'énergie rayonnée par la source lumineuse par angle plein unitaire exprimée en watts/stéradian (ou candela). Selon une variante la quantité de lumière reçue en un point de l'environnement virtuel 1 est également fonction de l'angle formé par la direction d'incidence au point considéré et la normale à la source lumineuse considérée. Selon une autre variante, la quantité de lumière reçue en un point de l'environnement virtuel 1 est également fonction de la distance séparant le point considéré de la source lumineuse 100 considérée. De manière avantageuse, la quantité de lumière reçue par le point P 124, et pour tout point de l'environnement virtuel 1 pour lequel la quantité de lumière reçue d'une source lumineuse a été estimée, est enregistrée et stockée dans une structure de données composée de tables enregistrées dans une mémoire associée aux GPUs. Bien entendu, Le nombre de sources lumineuses formant l'environnement lumineux n'est pas limité à 6 sources lumineuses mais s'étend avantageusement à tout nombre supérieur ou égal à 2, par exemple 100, 1000, 10000, 100000 ou 1000000 sources lumineuses. FIG. 1 illustrates a virtual environment or a virtual scene (also called 3D scene) 1 illuminated by a plurality of light sources 100 to 105, the plurality of light sources 100 to 105 forming a light environment. The illumination provided by the light source 100 forms a cone of light 111. The virtual environment 1 comprises one or more virtual objects 12, 13, 14 and 15, modeled according to any method known to those skilled in the art, for example by polygonal modeling, in which the model is assimilated to a set of polygons each defined by the list of vertices and edges that compose it, by NURBS curve modeling (of the English "Non uniform rational basic spline" or in French "Rational non-uniform basic spline") in which the model is defined by a set of curves created by control vertices, by modeling by subdivision of surfaces. virtual any virtual representation (obtained by modeling) of an object (real or fictitious) composing a real environment (for example the floor, a house or a facade of a house, a car, a tree, it is that is to say, any element composing an environment such as a room of a house, a street, a city, the countryside, ...) or imaginary. Each object 12, 13, 14 and 15 of the virtual environment is characterized by a surface covering it, the surface of each object having reflectance properties (corresponding to the proportion of incident light reflected by the surface in one or more directions) which are his own. Advantageously, the reflectance of the surface of an object varies as a function of the area of the light reflecting object (an area of the surface comprising one or more points of the surface), that is to say that the reflectance of the surface of an object is not constant. According to a variant, the reflectance of the surface of an object is constant at any point on the surface of the object. Thus, the object 12 receives a quantity of incident light from the light source 10, the surface of the object 12 illuminated by the light source 100 being discretized at a plurality of points 121 to 12i. Points 121 to 12i correspond to singular points or alternatively to surface elements. In the remainder of the description of FIG. 1, a point of a surface will designate both a unitary point and a surface element. In the same way, the object 13 receives a quantity of incident light from the light source 100, the surface of the object 13 illuminated by the light source 100 being discretized into a plurality of points 131 to 13i, each point corresponding to a unit point or surface element. The object 15 also receives a quantity of incident light, the surface of the object illuminated by the light source 100 being discretized into a plurality of points 151 to 15i which each correspond to a unit point or to a surface element. The normal to the surface element associated with each point 121-12i, 131-131, 151-15i is represented by a black arrow. The normalization information of each light reflecting surface element is useful for estimating the amount of light reflected in a given direction. Advantageously, the virtual environment 1 is rendered as seen from the light source 100. The information representative of the virtual environment 1 as seen from the light source 100 is stored in a shadow card 110 ( of the English "shadow map"). The shadow map advantageously comprises for each point of the virtual environment 1 belonging to an object of the virtual environment 1 and illuminated by the light source 100 (named first point in the rest of the description) an information representative of the distance separating the light source 100 from the first point considered. FIG. 1B illustrates such a shadow map 110 according to one particular embodiment of the invention. The representative information of the distance is represented by a vector 1100 to 110i whose norm is equal to the distance between the light source and the first point considered. The shadow map is thus composed of a plurality of points associated with the first points of the virtual environment 1 projected onto a surface formed by the light cone 100 and perpendicular to the main illumination direction of the light source 100. Information representative of the light source / first point distance is associated with each corresponding point of the shadow map. By connecting each point of the shadow map formed by the vector representative of the distance, we obtain a surface S representative of all the first points of the environment as seen from the light source 100. The use of a shadow map has the advantage of reducing the calculations necessary for estimating the quantity of light received by the virtual environment and thus of reducing the calculations necessary to estimate the quantity of light received by a point of the environment virtual. With the shadow map, to know if a point of the virtual environment is illuminated or not by the light source 100, it is sufficient to know the distance separating this point from the light source and the direction of incidence to which it belongs. No calculation of intersection between the line formed by the point and the light source on the one hand and the objects of the virtual environment on the other hand is thus necessary, which reduces the necessary calculations. Indeed, to determine if a point of the virtual environment is illuminated by the light source 100, it is sufficient to compare the distance separating this point from the light source 100 in a direction of incidence to the distance stored in the map of the light. shadow for the same direction of incidence of light. Thus, if the estimated distance for the point considered is greater than the distance stored in the shadow map for the same direction of incidence, the considered point of the virtual environment 1 is not illuminated by the light source 100 because obscured by at least one of the objects of the virtual environment 1. The shadow map makes it possible to simply determine, with low costs in calculation, the points illuminated by a light source and those that are not. The quantity of light received by a point of the virtual environment 1 illuminated by the light source 100 is advantageously determined from the goniometric distribution function associated with the light source 100. Such a goniometric distribution function is advantageously defined by a set parameters that are modifiable by a user (also called artist) seeking to model the light environment illuminating the virtual environment 1. The parameters of the direction-finding distribution function, said lighting parameters associated with the light source 100, comprise by for example, the radiant power of the light source expressed in watts, the radiant intensity corresponding to the energy radiated by the light source per unit solid angle expressed in watts / steradian (or candela). According to a variant, the quantity of light received at a point of the virtual environment 1 is also a function of the angle formed by the incidence direction at the point considered and the normal to the light source considered. According to another variant, the quantity of light received at a point of the virtual environment 1 is also a function of the distance separating the point considered from the light source 100 considered. Advantageously, the quantity of light received by the point P 124, and for any point of the virtual environment 1 for which the quantity of light received from a light source has been estimated, is recorded and stored in a data structure. composed of tables stored in a memory associated with GPUs. Of course, the number of light sources forming the light environment is not limited to 6 light sources but advantageously extends to any number greater than or equal to 2, for example 100, 1000, 10000, 100,000 or 1,000 light sources.
La figure 2 illustre schématiquement une méthode d'estimation de la quantité de lumière totale reçue par un point P de l'environnement virtuel 1, selon un exemple de mise en oeuvre non limitatif de l'invention. Dans un premier temps, une première source lumineuse 100 est sélectionnée parmi la pluralité de sources lumineuses 100 à 105. Cette première source lumineuse est sélectionnée par exemple par un utilisateur cherchant à modéliser et paramétrer l'éclairage de l'environnement virtuel 1 via une interface graphique utilisateur GUI (de l'anglais « Graphical User Interface »). Dans un deuxième temps, la quantité de lumière reçue par un point quelconque de l'environnement virtuel 1, par exemple le point P 124, de chaque source lumineuse 101 à 105, c'est-à-dire sans prendre en compte la contribution de la source lumineuse sélectionnée 100 dans l'éclairage du point P 124, est estimée par exemple selon la technique décrite en regard de la figure 1. Pour ce faire, une carte d'ombre est générée pour chaque source lumineuse 101 à 105 et la quantité de lumière reçue par le point P 124 de chaque source lumineuse 101 à 105 est estimée à partir des cartes d'ombre associées à chaque source lumineuse 101 à 105 et à partir des fonctions de distribution goniométrique associées à chaque source lumineuse. De manière avantageuse, une seule et même fonction de distribution goniométrique est associée à chaque source lumineuse 100 à 105 de l'environnement lumineux 1. Selon une variante, les fonctions de distribution goniométrique associées aux sources de lumière varient d'une source lumineuse à l'autre, ou d'un groupe de sources de lumière à un autre groupe de sources de lumière. FIG. 2 schematically illustrates a method for estimating the total amount of light received by a point P of the virtual environment 1, according to an exemplary non-limiting implementation of the invention. In a first step, a first light source 100 is selected from the plurality of light sources 100 to 105. This first light source is selected for example by a user seeking to model and parameterize the lighting of the virtual environment 1 via an interface User Graph GUI (Graphical User Interface). In a second step, the quantity of light received by any point of the virtual environment 1, for example the point P 124, of each light source 101 to 105, that is to say without taking into account the contribution of the selected light source 100 in the illumination of the point P 124, is estimated for example according to the technique described with reference to FIG. 1. To do this, a shadow map is generated for each light source 101 to 105 and the quantity light received by the point P 124 of each light source 101 to 105 is estimated from the shadow maps associated with each light source 101 to 105 and from the goniometric distribution functions associated with each light source. Advantageously, a single goniometric distribution function is associated with each light source 100 to 105 of the light environment 1. According to one variant, the goniometric distribution functions associated with the light sources vary from a light source to a light source. another, or from a group of light sources to another group of light sources.
Dans un troisième temps, les quantités de lumière reçues par le point P de chacune des sources de lumière 101 à 105 (à l'exception de la source lumineuse 100 sélectionnée) sont additionnées pour générer une première quantité de lumière partielle reçue par le point P 124. Cette première quantité de lumière partielle ainsi que les quantités de lumière reçues de chaque source lumineuse 101 à 105 sont avantageusement enregistrées et stockées dans une structure de données composée de tables enregistrées dans une mémoire associée aux GPUs. Ces enregistrements sont appelés enregistrements de quantité de lumière partielle reçue. Selon une variante, les quantités de lumière reçue des sources de lumière 101 à 105 sont additionnées au fur et à mesure qu'elles sont estimées, c'est-à-dire par exemple que la quantité de lumière reçue par le point P de la source lumineuse 101 est estimée et stockée dans un registre, que la quantité de lumière reçue de la source lumineuse 102 est estimée et ajoutée à la quantité de lumière stockée dans le registre, que la quantité de lumière reçue de la source lumineuse 103 est estimée et ajoutée à la quantité de lumière stockée dans le registre et correspondant à la quantité de lumière reçue des sources de lumière 101 et 102, et ainsi de suite pour toutes les sources de lumière de l'environnement lumineux à l'exception de la source lumineuse 100 sélectionnée. Puis dans un quatrième temps, la quantité de lumière reçue par le point P de la source lumineuse 100 sélectionnée est estimée de la même manière qu'ont été estimées les quantités de lumière reçues des autres sources de lumière 101 à 105, c'est-à-dire à partir de la carte d'ombre associée à la source lumineuse 100 et à partir de la fonction de distribution goniométrique associée à la source lumineuse 100. Cette valeur de quantité de lumière estimée reçue de la source lumineuse 100 est à son tour avantageusement stockée dans la table des enregistrements de quantité de lumière partielle reçue avant d'être ajoutée à la première quantité de lumière partielle reçue pour estimer la première quantité de lumière totale reçue par le point P 124 de l'environnement lumineux, c'est-à-dire en prenant en compte la contribution de chacune des sources de lumières 100 à 105 de l'environnement lumineux. Grâce à cette méthode, lorsque l'utilisateur modifie les paramètres d'éclairage de la première source lumineuse 100 sélectionnée pour en étudier l'impact sur le résultat global de l'éclairage de l'environnement virtuel 1, il n'est pas nécessaire de recalculer toutes les quantités de lumière reçues par le point P de chacune des sources de lumière 100 à 105 de l'environnement lumineux puisque la première quantité de lumière partielle reçue (correspondant à la quantité de lumière reçue par le point P de toutes les sources de lumière à l'exclusion de la première source lumineuse 100 sélectionnée) est stockée dans une table associée ou dans un registre associé. Pour visualiser le résultat de la modification des paramètres d'éclairage de la première source lumineuse 100 sélectionnée sur l'éclairage complet de l'environnement lumineux, seule la quantité de lumière reçue par le point P de la première source lumineuse 100 sélectionnée est calculée à nouveau en prenant en compte les nouveaux paramètres d'éclairage avant d'être ajoutée à la première quantité de lumière partielle reçue par le point P. Cette méthode présente l'avantage d'accélérer grandement les calculs nécessaire à la visualisation de l'impact de la modification de paramètres d'éclairage sur l'éclairage global de l'environnement virtuel 1 tout en minimisant les ressources en puissance de calcul nécessaires. Selon une variante, il est possible de modifier les paramètres d'éclairage d'un groupe de sources de lumière (c'est-à-dire un groupe comprenant au moins deux sources de lumière), par exemple lorsque plusieurs sources de lumière sont associées à une même fonction de distribution goniométrique avec les mêmes paramètres d'éclairage. Selon cette variante, le groupe de sources de lumière est sélectionné et la première quantité de lumière partielle reçue par le point P estimée correspond à la quantité de lumière reçue de chacune des sources de lumière de l'environnement lumineux à l'exception des sources de lumière appartenant au groupe. Puis, tel que cela a été décrit précédemment, la contribution de chacune des sources de lumière du groupe dans l'éclairage du point P est estimée, la somme des contributions étant stockée. Ainsi, lorsque les paramètres d'éclairage du groupe sont modifiés, seules les contributions des sources de lumière dans l'éclairage de l'environnement virtuel sont recalculées pour estimer la première quantité de lumière totale reçue par le point P. In a third step, the quantities of light received by the point P of each of the light sources 101 to 105 (with the exception of the selected light source 100) are summed to generate a first quantity of partial light received by the point P 124. This first quantity of partial light as well as the quantities of light received from each light source 101 to 105 are advantageously recorded and stored in a data structure composed of tables stored in a memory associated with the GPUs. These records are called partial light quantity records received. According to a variant, the quantities of light received from the light sources 101 to 105 are added as they are estimated, that is to say for example that the quantity of light received by the point P of the light source 101 is estimated and stored in a register, that the quantity of light received from the light source 102 is estimated and added to the quantity of light stored in the register, that the quantity of light received from the light source 103 is estimated and added to the amount of light stored in the register and corresponding to the amount of light received from light sources 101 and 102, and so on for all light sources in the light environment except for light source 100 selected. Then, in a fourth step, the quantity of light received by the point P of the selected light source 100 is estimated in the same way as the quantities of light received from the other light sources 101 to 105, namely that is to say from the shadow map associated with the light source 100 and from the goniometric distribution function associated with the light source 100. This value of estimated light quantity received from the light source 100 is in turn advantageously stored in the received partial light quantity record table before being added to the first received partial light quantity to estimate the first total light quantity received by the P 124 point of the light environment, that is, that is, taking into account the contribution of each light source 100 to 105 of the light environment. With this method, when the user changes the lighting parameters of the first light source 100 selected to study the impact on the overall result of the lighting of the virtual environment 1, it is not necessary to recalculating all the amounts of light received by the point P of each of the light sources 100 to 105 of the light environment since the first quantity of partial light received (corresponding to the quantity of light received by the point P from all sources of light light excluding the first selected light source 100) is stored in an associated table or associated register. In order to visualize the result of the modification of the lighting parameters of the first light source 100 selected on the complete illumination of the light environment, only the quantity of light received by the point P of the first light source 100 selected is calculated to again taking into account the new lighting parameters before being added to the first quantity of partial light received by the point P. This method has the advantage of greatly accelerating the calculations necessary to visualize the impact of the modification of lighting parameters on the overall lighting of the virtual environment 1 while minimizing the necessary computing power resources. According to one variant, it is possible to modify the lighting parameters of a group of light sources (that is to say a group comprising at least two light sources), for example when several light sources are associated to the same goniometric distribution function with the same lighting parameters. According to this variant, the group of light sources is selected and the first quantity of partial light received by the estimated point P corresponds to the quantity of light received from each of the light sources of the light environment with the exception of the sources of light. light belonging to the group. Then, as previously described, the contribution of each of the light sources of the group in the illumination of the point P is estimated, the sum of the contributions being stored. Thus, when the lighting parameters of the group are changed, only the contributions of the light sources in the lighting of the virtual environment are recalculated to estimate the first total amount of light received by the point P.
Selon un deuxième exemple de mise en oeuvre de l'invention, Une deuxième source lumineuse 101 est sélectionnée parmi la pluralité de sources lumineuses 100 à 105 de l'environnement lumineux éclairant l'environnement virtuel 1. La deuxième source lumineuse 101 sélectionnée est différente de la première source lumineuse 100 sélectionnée. Puis une deuxième quantité de lumière partielle reçue par le point P 124 est estimée, cette deuxième quantité de lumière partielle reçue par le point P 124 correspondant à la somme des quantités de lumière reçue par le point P de chaque sources de lumière 100, 102, 103, 104 et 105 de l'environnement lumineux à l'exception de la deuxième source lumineuse 101 sélectionnée (c'est-à-dire que la deuxième quantité de lumière partielle reçue par le point P ne prend pas en compte la contribution de la deuxième source lumineuse 101 sélectionnée dans l'éclairage du point P). De manière avantageuse, cette deuxième quantité de lumière partielle reçue par le point P est obtenue en retranchant la quantité de lumière reçue par le point P de la deuxième source lumineuse 101 sélectionnée à la quantité de lumière totale reçue par le point P de l'ensemble des sources de lumière calculée précédemment. Si la quantité de lumière reçue de la deuxième source lumineuse 101 sélectionnée calculée précédemment (c'est-à-dire lors de l'estimation de la première quantité de lumière partielle reçue) a été stockée et conservée en mémoire, alors il n'est pas nécessaire de recalculer la quantité de lumière reçue de cette deuxième source lumineuse 101 sélectionnée. Ce cas de figure présente l'avantage de minimiser les calculs nécessaires et donc d'accélérer les traitements nécessaires à l'estimation de la deuxième quantité de lumière partielle reçue. Dans le cas contraire, il est nécessaire de la recalculer (à partir de la carte d'ombre 111 et de la fonction de distribution goniométrique associées) pour la soustraire à la quantité de lumière totale reçue par le point P estimée précédemment. Une fois la deuxième quantité de lumière partielle reçue par le point P estimée, cette dernière est enregistrée, par exemple dans les enregistrements de quantité de lumière partielle reçue. Une fois la deuxième quantité de lumière partielle reçue par le point P estimée et enregistrée, au moins un des paramètres d'éclairage de la deuxième source lumineuse 101 sélectionnée est modifié. Puis la contribution de la deuxième source lumineuse 101 sélectionnée dans l'éclairage du point P est calculée en prenant en compte le ou les paramètres d'éclairage modifiés, c'est-à-dire que la quantité de lumière reçue par le point P de la deuxième source lumineuse 101 sélectionnée est estimée à nouveau. Cette valeur est alors avantageusement stockée dans un enregistrement ou registre associé, par exemple dans les enregistrements de quantité de lumière partielle reçue. Une fois estimée, la quantité de lumière reçue par le point P 124 de la deuxième source lumineuse 101 sélectionnée est ajoutée à la deuxième quantité de lumière partielle reçue par le point P 124 pour obtenir la deuxième quantité de lumière totale reçue par le point P. Ainsi, de la même manière que pour la première source lumineuse 100 sélectionnée, lorsque l'utilisateur modifie les paramètres d'éclairage de la deuxième source lumineuse 101 sélectionnée pour en étudier l'impact sur le résultat global de l'éclairage de l'environnement virtuel 1, il n'est pas nécessaire de recalculer toutes les quantités de lumière reçues par le point de chacune des sources de lumière 100 à 105 de l'environnement lumineux puisque la deuxième quantité de lumière partielle reçue (correspondant à la quantité de lumière reçue par le point P de toutes les sources de lumière à l'exclusion de la deuxième source lumineuse 101 sélectionnée) est stockée dans une table associée ou dans un registre associé. Pour visualiser le résultat de la modification des paramètres d'éclairage de la deuxième source lumineuse 101 sélectionnée sur l'éclairage complet de l'environnement lumineux, seule la quantité de lumière reçue par le point P de la deuxième source lumineuse 101 sélectionnée est calculée à nouveau en prenant en compte le ou les nouveaux paramètres d'éclairage avant d'être ajoutée à la deuxième quantité de lumière partielle reçue par le point P pour estimer à nouveau la deuxième quantité de lumière totale reçue par le point P 124. Selon une autre variante, la quantité de lumière réfléchie par l'élément de surface associé au point P 124 selon une direction d'observation (ou de réflexion) 21 est estimée en fonction de la quantité de lumière totale reçue par le point P 124, de la normale à l'élément de surface associé au point P et des propriétés de réflectance associées à l'élément de surface associé au point P. Cette quantité de lumière réfléchie par le point P correspond à la quantité de lumière reçue par un observateur 20 regardant l'environnement virtuel 1 selon la direction d'observation 21. According to a second example of implementation of the invention, a second light source 101 is selected from the plurality of light sources 100 to 105 of the light environment illuminating the virtual environment 1. The second selected light source 101 is different from the first light source 100 selected. Then a second quantity of partial light received by the point P 124 is estimated, this second quantity of partial light received by the point P 124 corresponding to the sum of the quantities of light received by the point P of each light source 100, 102, 103, 104 and 105 of the light environment with the exception of the second light source 101 selected (i.e. the second amount of partial light received by the point P does not take into account the contribution of the light source. second light source 101 selected in the illumination of the point P). Advantageously, this second quantity of partial light received by the point P is obtained by subtracting the amount of light received by the point P from the second selected light source 101 to the total amount of light received by the point P of the set previously calculated light sources. If the amount of light received from the second selected light source 101 calculated previously (i.e., when estimating the first received amount of partial light) has been stored and stored in memory, then it is no need to recalculate the amount of light received from this second selected light source 101. This case has the advantage of minimizing the necessary calculations and thus accelerating the processing required to estimate the second quantity of partial light received. In the opposite case, it is necessary to recalculate it (from the shadow map 111 and the associated goniometric distribution function) to subtract it from the total amount of light received by the point P estimated previously. Once the second amount of partial light has been received by the estimated point P, the latter is recorded, for example in the received partial light quantity records. Once the second amount of partial light has been received by the estimated and recorded point P, at least one of the lighting parameters of the selected second light source 101 is changed. Then the contribution of the second light source 101 selected in the illumination of the point P is calculated taking into account the modified lighting parameter or parameters, that is to say that the quantity of light received by the point P of the second light source 101 selected is estimated again. This value is then advantageously stored in an associated register or register, for example in the received partial light quantity records. Once estimated, the amount of light received by the point P 124 of the selected second light source 101 is added to the second amount of partial light received by the point P 124 to obtain the second total amount of light received by the point P. Thus, in the same way as for the first light source 100 selected, when the user modifies the lighting parameters of the second light source 101 selected to study the impact on the overall result of the lighting of the environment virtual 1, it is not necessary to recalculate all the amounts of light received by the point of each of the light sources 100 to 105 of the light environment since the second quantity of partial light received (corresponding to the amount of light received by the point P of all the light sources excluding the selected second light source 101) is stored in a associated file or in an associated register. In order to visualize the result of the modification of the lighting parameters of the second light source 101 selected on the complete illumination of the light environment, only the quantity of light received by the point P of the second selected light source 101 is calculated to again taking into account the new lighting parameter or parameters before being added to the second quantity of partial light received by the point P to estimate again the second total quantity of light received by the point P 124. According to another alternatively, the amount of light reflected by the surface element associated with the point P 124 in an observation (or reflection) direction 21 is estimated as a function of the total amount of light received by the point P 124 of the normal to the surface element associated with the point P and the reflectance properties associated with the surface element associated with the point P. This quantity of light Reflected by the point P corresponds to the quantity of light received by an observer 20 looking at the virtual environment 1 according to the observation direction 21.
La figure 3 illustre schématiquement un exemple de réalisation matérielle d'un dispositif 3 adapté à l'estimation de la quantité de lumière reçue en un point P d'un environnement virtuel 1 et à la création de signaux d'affichage d'une ou plusieurs images. Le dispositif 3 correspond par exemple à un ordinateur personnel PC, à un ordinateur portable (de l'anglais « laptop »), à une console de jeu ou à une station de travail. FIG. 3 schematically illustrates an example of a hardware embodiment of a device 3 adapted to the estimation of the quantity of light received at a point P of a virtual environment 1 and to the creation of display signals of one or more images. The device 3 corresponds, for example, to a personal computer PC, to a laptop (from the English "laptop"), to a game console or a workstation.
Le dispositif 3 comprend les éléments suivants, reliés entre eux par un bus 65 d'adresses et de données qui transporte également un signal d'horloge : un microprocesseur 31 (ou CPU) ; - une carte graphique 32 comprenant : - plusieurs processeurs de traitement graphique 320 (ou GPUs) ; - une mémoire vive de type GRAM (de l'anglais « Graphical Random Access Memory ») 321 ; - une mémoire non volatile de type ROM (de l'anglais « Read Only Memory ») 36 ; - une mémoire vive ou RAM (de l'anglais « Random Access Memory ») 37 ; - un ou plusieurs dispositifs I/O (de l'anglais « Input/Output » ou en français « Entrée/Sortie ») 34, tels que par exemple un clavier, une souris, une webcam ; et - une alimentation 38. Le dispositif 3 comprend également un dispositif d'affichage 33 de type écran d'affichage relié directement à la carte graphique 32 pour afficher notamment le rendu d'images de synthèse calculées et composées dans la carte graphique, par exemple en temps réel. L'utilisation d'un bus dédié pour relier le dispositif d'affichage 33 à la carte graphique 32 offre l'avantage d'avoir des débits de transmission de données beaucoup plus important et ainsi de diminuer le temps de latence pour l'affichage d'images composées par la carte graphique. Selon une variante, un appareil pour afficher est externe au dispositif 3 et est relié au dispositif 3 par un câble transmettant les signaux d'affichage. Le dispositif 3, par exemple la carte graphique 32, comprend un moyen de transmission ou connecteur (non représenté sur la figure 3) adapté à transmettre un signal d'affichage à un moyen d'affichage externe tel que par exemple un écran LCD ou plasma, un vidéoprojecteur. On observe que le mot « registre » utilisé dans la description des mémoires 32, 36 et 37 désigne dans chacune des mémoires mentionnées, aussi bien une zone de mémoire de faible capacité (quelques données binaires) qu'une zone mémoire de grande capacité (permettant de stocker un programme entier ou tout ou partie des données représentatives de données calculées ou à afficher). The device 3 comprises the following elements, interconnected by an address and data bus 65 which also carries a clock signal: a microprocessor 31 (or CPU); a graphics card 32 comprising: a plurality of graphic processing processors 320 (or GPUs); a random access memory of GRAM (Graphical Random Access Memory) type 321; a non-volatile memory of the ROM type (of the English "Read Only Memory") 36; a random access memory (Random Access Memory) 37; one or more I / O devices (English "Input / Output") 34, such as for example a keyboard, a mouse, a webcam; and - a power supply 38. The device 3 also comprises a display device 33 of the display screen type directly connected to the graphics card 32, in particular to display the rendering of synthetic images calculated and composed in the graphics card, for example in real time. The use of a dedicated bus for connecting the display device 33 to the graphics card 32 has the advantage of having much higher data transmission rates and thus of reducing the latency for the display of data. 'images composed by the graphics card. According to a variant, an apparatus for displaying is external to the device 3 and is connected to the device 3 by a cable transmitting the display signals. The device 3, for example the graphics card 32, comprises a transmission means or connector (not shown in FIG. 3) adapted to transmit a display signal to an external display means such as, for example, an LCD or plasma screen. , a video projector. It will be observed that the word "register" used in the description of the memories 32, 36 and 37 designates in each of the memories mentioned, both a memory area of small capacity (a few binary data) and a memory zone of large capacity (allowing storing an entire program or all or part of the representative data data calculated or display).
A la mise sous tension, le microprocesseur 31 charge et exécute les instructions du programme contenu dans la RAM 37. La mémoire vive 37 comprend notamment : - dans un registre 330, le programme de fonctionnement du microprocesseur 31 chargé à la mise sous tension du dispositif 3, - des paramètres 371 représentatifs de l'environnement virtuel 1 (par exemple paramètres de modélisation des objets de l'environnement virtuel 1, paramètres d'éclairage de l'environnement virtuel 1). Les algorithmes mettant en oeuvre les étapes du procédé propres à l'invention et décrits ci-après sont stockés dans la mémoire GRAM 37 de la carte graphique 32 associée au dispositif 3 mettant en oeuvre ces étapes. A la mise sous tension et une fois les paramètres 370 représentatifs de l'environnement virtuel chargés en RAM 37, les processeurs graphiques 320 de la carte graphique 32 charge ces paramètres en GRAM 321 et exécute les instructions de ces algorithmes sous la forme de microprogrammes du type « shader » utilisant le langage HLSL (de l'anglais « High Level Shader Language » ou en français « Langage de programmation « shader » de haut niveau »), le langage GLSL (de l'anglais « OpenGL Shading language » ou en français « Langage de shaders OpenGL ») par exemple. La mémoire vive GRAM 321 comprend notamment : - dans un registre 3210, les paramètres représentatifs de l'environnement virtuel 1 ; - des valeurs 3211 représentatives de quantités de lumière partielles reçues (par exemple première quantité de lumière partielle reçue, deuxième quantité de lumière partielle reçue, quantité de lumière reçue d'une seule source lumineuse ou d'un groupe de plusieurs sources de lumière) par un ou plusieurs points de l'environnement virtuel 1 ; - des valeurs 3212 représentatives de quantités de lumière totales reçues (par exemple première quantité de lumière totale reçue, deuxième quantité de lumière totale reçue) par un ou plusieurs points de l'environnement virtuel 1 ; - des paramètres 3213 représentatifs des paramètres d'éclairage des sources de lumière de l'environnement lumineux (par exemple puissance d'éclairage, direction d'éclairage, intensité d'éclairage, couleur d'éclairage, etc.) ; et - des valeurs 3214 représentatives de distance séparant les points des objets de l'environnement lumineux éclairés par chaque source lumineuse (c'est-à-dire la carte d'ombre associée à chaque source lumineuse considérée). Selon une variante, une partie de la RAM 37 est allouée par le CPU 31 pour stocker les valeurs 3211, 3212 et 3214 et les paramètres 3213 si l'espace mémoire disponible en GRAM 321 est insuffisant. Cette variante entraîne cependant des temps de latence plus important dans la composition d'une image comprenant une représentation de l'environnement 1 composé à partir des microprogrammes contenus dans les GPUs puisque les données doivent être transmises de la carte graphique à la mémoire vive 37 en passant par le bus 35 dont les capacités de transmission sont généralement inférieures à celles disponibles dans la carte graphique pour faire passer les données des GPUs à la GRAM et vice-versa. Selon une autre variante, l'alimentation 38 est externe au dispositif 3. At power-up, the microprocessor 31 loads and executes the instructions of the program contained in the RAM 37. The random access memory 37 comprises in particular: in a register 330, the operating program of the microprocessor 31 charged to power up the device 3, - parameters 371 representative of the virtual environment 1 (for example parameters for modeling the objects of the virtual environment 1, lighting parameters of the virtual environment 1). The algorithms implementing the steps of the method specific to the invention and described hereinafter are stored in the GRAM memory 37 of the graphics card 32 associated with the device 3 implementing these steps. On power-up and once the parameters 370 representative of the virtual environment loaded in RAM 37, the graphics processors 320 of the graphics card 32 load these parameters in GRAM 321 and executes the instructions of these algorithms in the form of microprograms of the a "shader" type using the High Level Shader Language (HLSL) or "OpenGL Shading language" (GLSL). For example, "OpenGL shader language". The random access memory GRAM 321 comprises in particular: in a register 3210, the parameters representative of the virtual environment 1; values 3211 representative of partial amounts of light received (for example, the first quantity of partial light received, the second quantity of partial light received, the quantity of light received from a single light source or a group of several light sources), one or more points of the virtual environment 1; values 3212 representative of received total light quantities (for example first quantity of total light received, second total quantity of light received) by one or more points of the virtual environment 1; parameters representative of the lighting parameters of the light sources of the light environment (for example lighting power, lighting direction, illumination intensity, illumination color, etc.); and representative distance values 3214 separating the points of the objects from the light environment illuminated by each light source (that is to say the shadow map associated with each light source considered). According to one variant, part of the RAM 37 is allocated by the CPU 31 to store the values 3211, 3212 and 3214 and the parameters 3213 if the available memory space in GRAM 321 is insufficient. This variant, however, leads to longer latency in the composition of an image comprising a representation of the environment 1 composed of the microprograms contained in the GPUs since the data must be transmitted from the graphics card to the random access memory 37. through the bus 35 whose transmission capacity is generally lower than those available in the graphics card for passing the data from GPUs to GRAM and vice versa. According to another variant, the power supply 38 is external to the device 3.
La figure 4 illustre un procédé d'estimation de la quantité de lumière totale reçue en un point P d'un environnement virtuel mis en oeuvre dans un dispositif 3, selon un exemple de mise en oeuvre non limitatif particulièrement avantageux de l'invention. Au cours d'une étape d'initialisation 40, les différents paramètres du dispositif 3 sont mis à jour. En particulier, les paramètres représentatifs de l'environnement virtuel 1 sont initialisés d'une manière quelconque. Ensuite, au cours d'une étape 41, une première source lumineuse est sélectionnée parmi une pluralité de sources lumineuses, par exemple parmi l'ensemble des sources de lumière formant un environnement lumineux éclairant un environnement virtuel (dit aussi scène 3D) 1. Selon une variante, un groupe comprenant plusieurs sources de lumière est sélectionné, par exemple un groupe comprenant des sources de lumière possédant des paramètres d'éclairage identiques. Puis, au cours d'une étape 42, la quantité de lumière reçue par un point P de chacune des sources de la pluralité de sources de lumières à l'exception de la première source lumineuse sélectionnée est estimée, par exemple en utilisant la carte d'ombre associée à chaque source lumineuse et la fonction de distribution goniométrique décrivant la distribution de la lumière dans le faisceau lumineux issu de chaque source lumineuse considérée. Selon une variante, la distribution de la lumière dans le faisceau lumineux issu d'une ou plusieurs sources de lumière est homogène et constante pour toute direction d'émission de la lumière, c'est-à-dire que la même quantité de lumière est émise pour toutes les directions d'émission de la lumière. Selon une autre variante, la quantité de lumière reçue par le point P de chacune des sources lumineuses est estimée en utilisant la technique de volume d'ombre (de l'anglais « shadow volume ») connue de l'homme du métier ou la technique de lancer de rayon (de l'anglais « ray tracing ») également connue de l'homme du métier à la place de la technique des cartes d'ombre. Puis, au cours d'une étape 43, une première quantité de lumière partielle reçue par le point P est estimée à partir des quantités de lumières reçues par le point P, et estimées à l'étape 42, de chaque source lumineuse sauf la source lumineuse sélectionnée lors de l'étape 41. La première quantité de lumière partielle correspond à la somme des quantités de lumière reçues par le point P de chaque source lumineuse de l'environnement lumineux à l'exception de la première source lumineuse sélectionnée. Cette première quantité de lumière reçue par le point P correspond à la somme des contributions des sources de lumières de l'environnement lumineux dans l'éclairage du point P sans prendre en compte la contribution de la première source lumineuse sélectionnée dans cet éclairage du point P. Cette première quantité de lumière partielle reçue est avantageusement enregistrée dans un registre ou dans une table d'enregistrements stockant les quantités de lumière partielles reçues, c'est-à-dire les valeurs de quantité de lumière reçue ne prenant pas en compte la contribution de l'ensemble des sources de lumière de l'environnement lumineux dans l'éclairage du point P. Puis, au cours d'une étape 44, la quantité de lumière reçue par le point P de la première source lumineuse sélectionnée est estimée en prenant en compte les paramètres d'éclairage courant de la première source lumineuse sélectionnée. Enfin, au cours d'une étape 45, la quantité de lumière totale reçue par le point P de l'ensemble des sources lumineuses est estimée en ajoutant à la première quantité de lumière partielle reçue par le point P la quantité de lumière reçue par le point P de la première source lumineuse sélectionnée estimée lors de l'étape 45. FIG. 4 illustrates a method for estimating the total amount of light received at a point P of a virtual environment implemented in a device 3, according to a non-limiting exemplary implementation of the invention. During an initialization step 40, the various parameters of the device 3 are updated. In particular, the representative parameters of the virtual environment 1 are initialized in any way. Then, during a step 41, a first light source is selected from a plurality of light sources, for example from the set of light sources forming a light environment illuminating a virtual environment (also called 3D scene). alternatively, a group comprising a plurality of light sources is selected, for example a group comprising light sources having identical lighting parameters. Then, during a step 42, the quantity of light received by a point P from each of the plurality of light sources except the first selected light source is estimated, for example by using the light source. shadow associated with each light source and the goniometric distribution function describing the distribution of light in the light beam from each light source considered. According to a variant, the distribution of the light in the light beam coming from one or more light sources is homogeneous and constant for any direction of emission of light, that is to say that the same amount of light is emitted for all directions of light emission. According to another variant, the quantity of light received by the point P of each of the light sources is estimated by using the shadow volume technique known to those skilled in the art or the technique. Ray tracing also known to those skilled in the art instead of the technique of shadow maps. Then, during a step 43, a first quantity of partial light received by the point P is estimated from the quantities of light received by the point P, and estimated at step 42, of each light source except the source. The first partial light amount corresponds to the sum of the amounts of light received by the point P of each light source of the light environment with the exception of the first light source selected. This first quantity of light received by the point P corresponds to the sum of the contributions of the light sources of the light environment in the illumination of the point P without taking into account the contribution of the first light source selected in this lighting of the point P This first quantity of partial light received is advantageously recorded in a register or in a table of records storing the partial quantities of light received, that is to say the values of quantity of light received not taking into account the contribution of all the light sources of the light environment in the illumination of the point P. Then, during a step 44, the quantity of light received by the point P of the first selected light source is estimated by taking the current lighting parameters of the first light source selected. Finally, during a step 45, the total amount of light received by the point P of all the light sources is estimated by adding to the first quantity of partial light received by the point P the quantity of light received by the light source. point P of the first selected light source estimated in step 45.
Les étapes 41 à 45 sont avantageusement réitérées pour l'ensemble des points de l'environnement virtuel, la quantité de lumière totale reçue par chacun des points de l'environnement étant enregistrée et stockée dans une table d'enregistrements, appelée enregistrement des quantités de lumière totales reçues. Selon une variante, les étapes 41 à 45 sont réitérées pour une partie des points de l'environnement virtuel 1. Lors de la modification d'un ou plusieurs paramètres d'éclairage de la première source lumineuse sélectionnée par un utilisateur (par exemple par l'intermédiaire d'une interface utilisateur), seules les étapes 44 et 45 sont exécutées à nouveau en prenant en considération les paramètres d'éclairage modifiés. Cela évite ainsi de devoir recalculer l'ensemble des quantités de lumières reçues par le point P de chaque source lumineuse de l'environnement lumineux, ce qui permet d'économiser du temps de calcul et de la puissance de calcul, accélérant grandement les traitements permettant de visualiser l'impact des modifications apportées aux paramètres d'éclairage sur l'éclairage global de l'environnement virtuel. Une fois les paramètres d'éclairage réglés pour la première source lumineuse sélectionnée, l'utilisateur effectuant la modélisation de l'éclairage peut avantageusement sélectionner une deuxième source lumineuse différente de la première source lumineuse. Les étapes nécessaires à la détermination d'une deuxième quantité de lumière reçue du point P par l'environnement lumineux correspondent avantageusement aux étapes 41, 43, 44 et 45. Il n'est en effet pas nécessaire de réitérer l'étape 42 puisqu'il s'avère avantageux de déterminer directement la deuxième quantité de lumière partielle reçue par le point P en partant de la première quantité de lumière totale reçue par le point p (estimée lors de la précédente étape 45) à laquelle est retranchée la contribution de la deuxième source lumineuse sélectionnée en prenant en compte les paramètres d'éclairage associée à cette deuxième source lumineuse sélectionnée lors des calculs de l'étape 42 précédente (soit en lisant cette information dans un registre si la quantité de lumière reçue par le point P de cette deuxième source lumineuse estimée à l'étape 42 a été stockée, soit en la recalculant). Puis, lors de la nouvelle étape 44, la quantité de lumière reçue de la deuxième source lumineuse sélectionnée est estimée en prenant en compte ses paramètres d'éclairage réglés par l'utilisateur. Enfin, lors de la nouvelle étape 45, une deuxième quantité de lumière totale reçue de l'ensemble des sources de lumières est estimée en ajoutant à la deuxième quantité de lumière partielle reçue estimée lors de la nouvelle étape 43 à la quantité de lumière reçue de la deuxième source lumineuse sélectionnée estimée lors de la nouvelle étape 43. De la même manière que pour la première source lumineuse sélectionnée, seules les étapes 44 et 45 sont à exécuter de nouveau lors d'un changement d'un ou plusieurs paramètres d'éclairage de la deuxième source lumineuse sélectionnée. Cette méthode présente l'avantage de permettre une modification itérative d'un ou plusieurs paramètres d'éclairage d'une ou plusieurs sources de lumière de l'environnement lumineux et de visualiser l'impact de ces modifications répétées sur l'éclairage de l'environnement virtuel sans avoir à recalculer à chaque fois la quantité de lumière reçue par l'environnement virtuel pour l'ensemble des sources de lumière, mais seulement pour la ou les sources de lumières pour lesquelles les paramètres d'éclairage ont été modifiés. The steps 41 to 45 are advantageously repeated for all the points of the virtual environment, the total amount of light received by each of the points of the environment being recorded and stored in a table of records, called recording of the quantities of total light received. According to one variant, steps 41 to 45 are reiterated for part of the points of the virtual environment 1. When one or more lighting parameters of the first light source selected by a user are modified (for example by through a user interface), only steps 44 and 45 are performed again taking into consideration the changed lighting parameters. This avoids having to recalculate all the amounts of light received by the point P of each light source of the light environment, which saves computing time and computing power, greatly accelerating the processing allowing visualize the impact of changes to lighting settings on the overall lighting of the virtual environment. Once the lighting parameters have been set for the first light source selected, the user performing the lighting modeling may advantageously select a second light source different from the first light source. The steps necessary for determining a second quantity of light received from the point P by the light environment advantageously correspond to the steps 41, 43, 44 and 45. It is indeed not necessary to repeat the step 42 since it is advantageous to directly determine the second quantity of partial light received by the point P starting from the first quantity of total light received by the point p (estimated in the previous step 45) to which is deducted the contribution of the second light source selected by taking into account the lighting parameters associated with this second light source selected during the calculations of the preceding step 42 (or by reading this information in a register if the quantity of light received by the point P of this light source second light source estimated at step 42 has been stored, either by recalculating it). Then, during the new step 44, the quantity of light received from the second selected light source is estimated by taking into account its lighting parameters set by the user. Finally, during the new step 45, a second quantity of total light received from the set of light sources is estimated by adding to the second received partial light quantity estimated in the new step 43 to the quantity of light received from the second selected light source estimated in the new step 43. In the same manner as for the first selected light source, only steps 44 and 45 are to be performed again when changing one or more lighting parameters. the second light source selected. This method has the advantage of allowing an iterative modification of one or more lighting parameters of one or more light sources of the light environment and to visualize the impact of these repeated modifications on the lighting of the light. virtual environment without having to recalculate every time the amount of light received by the virtual environment for all light sources, but only for the light source or sources for which the lighting parameters have been modified.
Bien entendu, l'invention ne se limite pas aux modes de réalisation décrits précédemment. En particulier, l'invention n'est pas limitée à un procédé d'estimation de la quantité de lumière reçue en un point P de l'environnement virtuel mais s'étend également à tout dispositif mettant en oeuvre ce procédé et notamment tous les dispositifs comprenant au moins un GPU. La mise en oeuvre des calculs nécessaires à l'estimation de la quantité de lumière reçue par le point P n'est pas non plus limitée à une mise en oeuvre dans des microprogrammes de type shader mais s'étend également à une mise en oeuvre dans tout type de programme, par exemple des programmes exécutables par un microprocesseur de type CPU. L'utilisation de l'invention n'est pas limitée à une utilisation temps réel mais s'étend également à toute autre utilisation, par exemple pour les traitements dits de postproduction en studio d'enregistrement pour le rendu d'images de synthèse par exemple. La mise en oeuvre de l'invention en postproduction offre l'avantage de fournir un excellent rendu visuel en termes de réalisme notamment tout en diminuant les temps de calcul nécessaires. L'invention concerne également un procédé de composition d'une image vidéo, en deux dimensions ou en trois dimensions, pour lequel la quantité de lumière reçue par tout point P visible depuis un point de vue selon une ou plusieurs directions d'observation est calculée et l'information représentative de la luminance qui en découle est utilisée pour l'affichage des pixels de l'image, chaque pixel correspondant à une direction d'observation. La valeur de luminance calculée pour affichage par chacun des pixels de l'image est recalculée pour s'adapter aux différents points de vue du spectateur. La présente invention peut être utilisée dans des applications de postproduction mais aussi de jeux vidéo pour la création de niveaux avec éclairage pré-calculé par exemple, ou encore dans la conception architecturale, que ce soit par des programmes exécutables dans un ordinateur de type PC ou portable ou dans des consoles de jeux spécialisées produisant et affichant des images en temps réel. Le dispositif 3 décrit en regard de la figure 3 est avantageusement doté de moyens d'interactions tels que clavier et/ou manette de jeux, d'autres modes d'introduction de commandes telle que par exemple la reconnaissance vocale étant également possibles. Of course, the invention is not limited to the embodiments described above. In particular, the invention is not limited to a method of estimating the amount of light received at a point P of the virtual environment but also extends to any device implementing this method and in particular all the devices. comprising at least one GPU. The implementation of the calculations necessary for estimating the quantity of light received by the point P is also not limited to an implementation in shader microprograms but also extends to an implementation in any type of program, for example programs executable by a microprocessor of the CPU type. The use of the invention is not limited to a real-time use but also extends to any other use, for example for so-called postproduction processing in the recording studio for the rendering of synthetic images, for example . The implementation of the invention in postproduction offers the advantage of providing an excellent visual rendering in terms of realism in particular while reducing the calculation time required. The invention also relates to a method for composing a two-dimensional or three-dimensional video image, in which the quantity of light received by any point P visible from a point of view along one or more observation directions is calculated. and the information representative of the resulting luminance is used for displaying the pixels of the image, each pixel corresponding to an observation direction. The luminance value calculated for display by each of the pixels of the image is recalculated to suit the viewer's different points of view. The present invention can be used in postproduction applications but also video games for the creation of levels with pre-calculated lighting for example, or in the architectural design, either by programs executable in a computer type PC or portable or in specialized gaming consoles producing and displaying real-time images. The device 3 described with reference to FIG. 3 is advantageously provided with interaction means such as keyboard and / or joystick, other modes of introduction of commands such as, for example, voice recognition being also possible.
Claims (4)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
FR1059372A FR2960677A1 (en) | 2010-11-15 | 2010-11-15 | Total light amount estimating method for studio, involves repeating estimation of amount of light and total amount of light during modification of light parameter of light source, and recording amount of light partially received by point |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
FR1059372A FR2960677A1 (en) | 2010-11-15 | 2010-11-15 | Total light amount estimating method for studio, involves repeating estimation of amount of light and total amount of light during modification of light parameter of light source, and recording amount of light partially received by point |
Publications (1)
Publication Number | Publication Date |
---|---|
FR2960677A1 true FR2960677A1 (en) | 2011-12-02 |
Family
ID=44279874
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
FR1059372A Pending FR2960677A1 (en) | 2010-11-15 | 2010-11-15 | Total light amount estimating method for studio, involves repeating estimation of amount of light and total amount of light during modification of light parameter of light source, and recording amount of light partially received by point |
Country Status (1)
Country | Link |
---|---|
FR (1) | FR2960677A1 (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5710876A (en) * | 1995-05-25 | 1998-01-20 | Silicon Graphics, Inc. | Computer graphics system for rendering images using full spectral illumination data |
EP1990776A2 (en) * | 2007-05-08 | 2008-11-12 | DreamWorks Animation LLC | System and method for rendering computer graphics utilizing a shadow illuminator |
-
2010
- 2010-11-15 FR FR1059372A patent/FR2960677A1/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5710876A (en) * | 1995-05-25 | 1998-01-20 | Silicon Graphics, Inc. | Computer graphics system for rendering images using full spectral illumination data |
EP1990776A2 (en) * | 2007-05-08 | 2008-11-12 | DreamWorks Animation LLC | System and method for rendering computer graphics utilizing a shadow illuminator |
Non-Patent Citations (1)
Title |
---|
J.S. NIMEROFF ET AL: "Efficient Re-rendering of Naturally IlluminatedEnvironments", FIFTH EUROGRAPHICS WORKSHOP ON RENDERING, 1994, pages 1 - 15, XP002654906 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
FR2965652A1 (en) | METHOD FOR ESTIMATING LIGHT QUANTITY RECEIVED IN ONE POINT OF A VIRTUAL ENVIRONMENT | |
US10936909B2 (en) | Learning to estimate high-dynamic range outdoor lighting parameters | |
CN108986195B (en) | Single-lens mixed reality implementation method combining environment mapping and global illumination rendering | |
FR2988891A1 (en) | METHOD FOR ESTIMATING OPACITY LEVEL IN A SCENE AND CORRESPONDING DEVICE | |
FR2966623A1 (en) | METHOD FOR ESTIMATING OCCULTATION IN A VIRTUAL ENVIRONMENT | |
EP1982310A2 (en) | Method for synthesizing a virtual image by beam launching | |
TW201805894A (en) | 3D rendering method and 3D graphics processing device | |
CN102667865B (en) | For the method for build environment map | |
EP2504816B1 (en) | Method for estimating light scattering | |
US11574449B1 (en) | Methods and systems for off-device image frame rendering in augmented reality applications | |
FR2964775A1 (en) | METHOD FOR ESTIMATING OCCULTATION IN A VIRTUAL ENVIRONMENT | |
CN116758208A (en) | Global illumination rendering method and device, storage medium and electronic equipment | |
Delalandre et al. | Transmittance function mapping | |
FR2988502A1 (en) | METHOD FOR REPRESENTING A PARTICIPATING ENVIRONMENT IN A SCENE AND CORRESPONDING DEVICE | |
Bornstein et al. | New Dimensions in Conservation Imaging: Combining Photogrammetry and Photometric Stereo for 3D Documentation of Heritage Artefacts | |
WO2011058007A2 (en) | Method for estimating light scattering | |
FR2974217A1 (en) | METHOD FOR ESTIMATING INFORMATION REPRESENTATIVE OF A HEIGHT | |
EP2502206A2 (en) | Method for estimating light scattering | |
Sabbadin et al. | High Dynamic Range Point Clouds for Real‐Time Relighting | |
FR2960677A1 (en) | Total light amount estimating method for studio, involves repeating estimation of amount of light and total amount of light during modification of light parameter of light source, and recording amount of light partially received by point | |
EP2589025A2 (en) | Method of estimating diffusion of light | |
FR2964776A1 (en) | METHOD FOR ESTIMATING LIGHT DISTRIBUTION IN A HOMOGENEOUS ENVIRONMENT | |
WO2010094619A1 (en) | Method for estimating light scattering | |
EP2153319A1 (en) | Source code generator for a graphics card | |
Boulanger et al. | Rendering trees with indirect lighting in real time |