EFFICIENT LIGHTING EFFECTS IN DESIGN SOFTWARE
System, methods, and apparatus allow for maintaining a real-time rendering time for rendering the lighting effect during a time interval that is independent of the number of the one or more light sources within the design space. One or more implementations allow a user to provide inputs regarding the location of an object within a design space. Furthermore, one or more implementations receive from the user one or more inputs regarding the location of one or more light sources within the design space. Additionally, one or more implementations calculate a lighting effect of the one or more lights on the object within the design space. Furthermore, one or more implementations render the lighting effect during a time interval that is independent of the number of the one or more light sources within the design space, such that rendering the lighting effect for one of the one or more light sources takes the same amount of time as rendering the lighting effect for a plurality of the light sources.
1 . In a computerized architectural design environment in which a design program is loaded into memory and processed at a central processing unit, a computer-implemented method for rendering the lighting effects of a scene during a consistent time interval irrespective of the number of light sources within the scene, the method comprising:
receiving from a user one or more user inputs regarding a location of an object in a design space;
receiving from the user one or more user inputs regarding a location of one or more lights within the design space, wherein the one or more light sources project onto the object;
calculating a lighting effect of the one or more lights on the object in the design space; and
rendering the lighting effect during a time interval that is independent of the number of the one or more light sources within the design space, whereby rendering the lighting effect for one of the one or more light sources takes the same amount of time as rendering the lighting effect for a plurality of the light sources.
2 . The method as recited in claim 1 , wherein calculating a lighting effect of the one or more lights on the object in the design space comprises:
creating a volume map of the object within the design space by dividing the object in the design space into a plurality of discrete segments; and
calculating the lighting effect on at least one of the plurality of discrete segments.
3 . The method as recited in claim 2 , wherein calculating the lighting effect on the at least one of the plurality of discrete segments comprises associating an assigned surface vector with the at least one of the plurality of discrete segments, wherein the assigned surface vector points in a particular direction.
4 . The method as recited in claim 2 , further comprising:
creating multiple volume maps of the object within the design space; and
calculating the lighting effect on the at least one of the plurality of discrete segments within each volume map.
5 . The method as recited in claim 4 , further comprising:
creating six volume maps of the object in the design space; and
associating assigned surface vectors with all of the discrete segments within each respective volume map, such that the assigned surface vectors within each respective volume map point in the same direction.
6 . The method as recited in claim 5 , further comprising:
associating with the discrete segments in a first volume map assigned surface vectors that point in a positive x direction;
associating with the discrete segments in a second volume map assigned surface vectors that point in a negative x direction;
associating with the discrete segments in a third volume map assigned surface vectors that point in a positive y direction;
associating with the discrete segments in a fourth volume map assigned surface vectors that point in a negative y direction;
associating with the discrete segments in a fifth volume map assigned surface vectors pointing in a positive z direction; and
associating with the discrete segments in a sixth volume map assigned surface vectors point in a negative z direction.
7 . The method as recited in claim 6 , wherein rendering the lighting effect during a interval time that is independent of the number of the one or more light sources within the design space comprises accessing only three of the volume maps.
8 . The method as recited in claim 1 , further comprising:
calculating a voxel within the design space;
calculating at least one ray extending from the voxel to at least one light source with the scene;
determining that the at least one ray extending between the voxel and the at least one light sources in the scene intersects with a surface; and
calculating the lighting effect information based upon the intersection of the at least one ray with the surface, wherein the lighting effect information comprises a shading effect.
9 . The method as recited in claim 8 , further comprising storing the calculated shading effect within a volume map.
10 . The method as recited in claim 1 , wherein the scene is re-rendered a plurality of times without re-calculating the lighting effect of the one or more lights on the object in the design space.
11 . In a computerized architectural design environment in which a design program is loaded into memory and processed at a central processing unit, a computer-implemented method for rendering a lighting effect from a light source on an object within a design space, the method comprising:
receiving from a user one or more inputs regarding a location of the object in the design space;
calculating a voxel, wherein the voxel represents at least a discrete portion of the object in the design space;
assigning at least one surface vector to the voxel, wherein the at least one surface vector extends from the voxel;
calculating lighting information generated by the light source on the voxel by combining a light source vector extending from the light source and the at least one surface vector; and
rendering, using the lighting information, the lighting effect on the discrete portion of the object in the design space.
12 . The claim as recited in claim 11 , further comprising:
calculating a voxel map for at least the object in the design space, wherein the voxel map is associated with a plurality of light sources in the design space;
calculating a shading effect on the voxel, wherein calculating a shading effect on the voxel comprises determining whether any of a plurality of rays extending between the voxel and each of the plurality of light sources in the design space intersects with a surface.
13 . The method as recited in claim 12 , wherein rendering the lighting effect on the object in the design space comprises using the shading effect, the lighting information, and a normal vector of the discrete portion of the object to interpolate the lighting effect on the object in the design space.
14 . The claim as recited in claim 11 , further comprising:
associating with the discrete segments in a first volume map assigned surface vectors that point in a positive x direction;
associating with the discrete segments in a second volume map assigned surface vectors that point in a negative x direction;
associating with the discrete segments in a third volume map assigned surface vectors that point in a positive y direction;
associating with the discrete segments in a fourth volume map assigned surface vectors that point in a negative y direction;
associating with the discrete segments in a fifth volume map assigned surface vectors pointing in a positive z direction; and
associating with the discrete segments in a sixth volume map assigned surface vectors point in a negative z direction.
15 . The method as recited in claim 14 , further comprising:
calculating a plurality of volume cube maps, wherein each volume cube map comprises one or more voxels that represent various portions of the design space; and
assigning to each volume cube map a surface vector, such that all of the one or more voxels within each respective volume cube map comprise the same surface vector.
16 . The method as recited in claim 15 , wherein rendering, using the lighting information, the lighting effect on the discrete portion of the object in the design space comprises using information from only three of the calculated volume cube maps.
17 . The method as recited in claim 15 , wherein assigning to each volume cube map a surface vector, comprises assigning surface vectors to the plurality of volume cube maps such that the surface vectors create a basis for a vector space.
18 . The method as recited in claim 11 , wherein the lighting effect is re-rendered a plurality of times without re-calculating either the shading effect or the light intensity.
19 . The method of claim 18 , further comprising re-calculating the lighting information when the user changes the location of the object within the design space.
20 . A computer program product for use at a computer system, the computer program product for implementing a method for maintaining a real-time rendering time for rendering the lighting effects of a scene during a time interval that does not increase with respect to the number of light sources within the scene, the computer program product comprising one or more computer storage media having stored thereon computer-executable instructions that, when executed at a processor, cause the computer system to perform the method, including the following:
receiving from a user one or more user inputs regarding a location of an object in a design space;
receiving from the user one or more user inputs regarding a location of one or more lights within the design space, wherein the one or more light sources project onto the object;
calculating a lighting effect of the one or more lights on the object in the design space; and
rendering the lighting effect during a time interval that is independent of the number of the one or more light sources within the design space, whereby rendering the lighting effect for one of the one or more light sources takes the same amount of time as rendering the lighting effect for a plurality of the light sources.