摘要 |
Systems, methods and program storage devices are disclosed, which cause one or more processing units to: obtain one or more two-dimensional components and one or more three-dimensional components; convert the pixel color values of the two-dimensional components into luminance values; create height maps over the two-dimensional components using the converted luminance values; calculate a normal vector for each pixel in each of two-dimensional components; and cause one or more processing units to render three-dimensional lighting effects on the one or more two-dimensional components and one or more three-dimensional components in a mixed scene, wherein the calculated normal vectors are used as the normal maps for the two-dimensional components, the pixel color values are used as the texture maps for the two-dimensional components, and the one or more three-dimensional components are rendered in the scene according their respective depth values, textures, and/or vertices—along with the one or more two-dimensional components. |
主权项 |
1. A non-transitory program storage device, readable by a programmable control device and comprising instructions stored thereon to cause one or more processing units to:
obtain a representation of a first scene graph, the first scene graph comprising one or more two-dimensional components and one or more three-dimensional components,
wherein each of the one or more two-dimensional components comprises a first plurality of pixels, and wherein each pixel comprises a second plurality of pixel color values and a transparency value, andwherein each of the one or more three-dimensional components comprises a depth value, one or more surface textures comprising a first plurality of pixels, wherein each pixel comprises a second plurality of pixel color values and a transparency value, one or more surface normals, and one or more vertices; for each of the one or more two-dimensional components:
convert the second plurality of pixel color values into a luminance value for each pixel in the first plurality of pixels of the respective two-dimensional component;create a height map using the converted luminance values for the respective two-dimensional component, wherein each position in the height map corresponds to a pixel from the first plurality of pixels of the respective two-dimensional component; andcalculate a normal vector for each pixel in the first plurality of pixels of the respective two-dimensional component; cause at least one of one or more processing units to render three-dimensional lighting effects onto at least one of the one or more two-dimensional components,
wherein the calculated normal vectors for each of the first plurality of pixels in each of the one or more two-dimensional components are used as a normal map for each of the respective one or more two-dimensional components, andwherein the second plurality of pixel color values and the transparency value for each pixel in the first plurality of pixels in each of the one or more two-dimensional components are used as a texture map for each of the respective one or more two-dimensional components; and cause at least one of the one or more processing units to render three-dimensional lighting effects onto at least one of the one or more three-dimensional components according to their respective depth value, one or more surface textures, one or more surface normals, and one or more vertices. |