       (when tx (transform-common scene tx))
       (light-common scene opts)
       {:__type :area-light
-       :__shape [(mesh-types mesh-type) mesh]
+       :__shape [(mesh-types mesh-type) {:__mesh mesh :__basename (str "light-" id)}]
        :nsamples [:int samples]}))))
 
 (defn shape-disk


(defmethod luxvalue :area-light
  [_ id opts]
  (let [[stype mesh] (:__shape opts)]
    (str
     (luxentity "AreaLightSource" "area" opts)
     (luxvalue stype (str id "-mesh") mesh))))

(defmethod luxvalue :light
  [_ id opts]

   [thi.ng.luxor.presets :as presets]
   [thi.ng.common.math.core :as m]
   [thi.ng.geom.core :as g]
   [thi.ng.geom.rect :as r]
   [thi.ng.geom.plane :as pl]
   [thi.ng.geom.mesh :as mesh]
   [thi.ng.geom.meshio :as mio]
   [clojure.java.io :as io])
  (:import
   [java.io File Writer OutputStreamWriter StringWriter]
   [java.util Date]))
