added support for lights and env maps for maps