A method for calculating melanopic dose rate for a direction of gaze at a position in a virtual environment comprising the steps of: a) calculating, by a processor, a direct spherical irradiance at the position from one or more light sources, as a function of angle; b) multiplying, by the processor, the direct spherical irradiance by a melanopic conversion factor that depends on a spectral power distribution of the direct spherical irradiance; c) calculating, by the processor, an indirect spherical irradiance at the position from multiple light source patches, as a function of angle, the light source patches being surfaces in the virtual environment that are not themselves light-generating sources but from which light is reflected, each surface being subdivided into an array of said small patches; d) multiplying, by the processor, the indirect spherical irradiance by a melanopic conversion factor that depends on a spectral power distribution of the indirect spherical irradiance; characterized by the steps of e) adding, by the processor, the products from steps (b) and (d) to form a total spherical melanopic irradiance defined as a function of angle; and f) multiplying, by the processor, the total spherical melanopic irradiance by an angular responsivity that depends on the direction of gaze, to result in the melanopic dose rate, wherein the position is a position of a virtual illuminance meter in the virtual environment; and step (c) comprises, for each surface patch, calculation of its direct irradiance from the light sources and indirect irradiance from light reflected from other patches by projecting each light source patch onto faces of a convex polyhedron that encloses the position and for a given patch and a given face of the convex polyhedron that contributes to the indirect irradiance at said position, determining the indirect spherical irradiance. a) calculating, by a processor, a direct spherical irradiance at the position from one or more light sources, as a function of angle; b) multiplying, by the processor, the direct spherical irradiance by a melanopic conversion factor that depends on a spectral power distribution of the direct spherical irradiance; c) calculating, by the processor, an indirect spherical irradiance at the position from multiple light source patches, as a function of angle, the light source patches being surfaces in the virtual environment that are not themselves light-generating sources but from which light is reflected, each surface being subdivided into an array of said small patches; d) multiplying, by the processor, the indirect spherical irradiance by a melanopic conversion factor that depends on a spectral power distribution of the indirect spherical irradiance; characterized by the steps of e) adding, by the processor, the products from steps (b) and (d) to form a total spherical melanopic irradiance defined as a function of angle; and f) multiplying, by the processor, the total spherical melanopic irradiance by an angular responsivity that depends on the direction of gaze, to result in the melanopic dose rate, the position is a position of a virtual illuminance meter in the virtual environment; and step (c) comprises, for each surface patch, calculation of its direct irradiance from the light sources and indirect irradiance from light reflected from other patches by projecting each light source patch onto faces of a convex polyhedron that encloses the position and for a given patch and a given face of the convex polyhedron that contributes to the indirect irradiance at said position, determining the indirect spherical irradiance.