{"id":1192,"date":"2021-11-24T17:45:00","date_gmt":"2021-11-25T00:45:00","guid":{"rendered":"http:\/\/www.patrickmatte.com\/?p=1192"},"modified":"2025-08-15T10:50:34","modified_gmt":"2025-08-15T17:50:34","slug":"lighting-animation-prototype","status":"publish","type":"post","link":"https:\/\/www.patrickmatte.com\/?p=1192","title":{"rendered":"Light &#038; Animation Prototype"},"content":{"rendered":"<div class=\"text\">\n<div class=\"columnLeft\">\nWhile working on the Airpods Max project, I noticed a new thing in the ThreeJS examples, PMREMGenerator. It was now possible to render a ThreeJS scene as an environment map! Back at that time there was no example of it being animated but I figured that by rendering PMREMGenerator every frame, I could create an animation. So I decided to try to re-create the lighting animation that was at the time featured on the Airpods Pro page of apple.com. In order to match the apple.com animation as close as possible, I had to actually render two environment maps, one for each airpod. I also had an additional render pass that would bake the shadows from a directional light on two separate textures that were used as occlusion maps on the two airpods. Even after all this, the performance was still pretty decent.<\/div>\n<div class=\"columnRight\"><\/div>\n<\/div>\n<div id=\"entry-header\" style=\"position:relative; padding-top:56.25%; background-color:black;\">\n<iframe class=\"fixedRatio\" src=\"https:\/\/player.vimeo.com\/video\/880353702?badge=0&amp;byline=0&amp;portrait=0&amp;title=0&amp;color=00adef&amp;autoplay=1&amp;muted=1\" frameborder=\"0\" webkitallowfullscreen=\"\" mozallowfullscreen=\"\" allowfullscreen=\"\"><\/iframe><\/div>\n","protected":false},"excerpt":{"rendered":"<p>While working on the Airpods Max project, I noticed a new thing in the ThreeJS examples, PMREMGenerator. It was now possible to render a ThreeJS scene as an environment map! Back at that time there was no example of it being animated but I figured that by rendering PMREMGenerator every frame, I could create an [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1196,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1192","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.patrickmatte.com\/index.php?rest_route=\/wp\/v2\/posts\/1192"}],"collection":[{"href":"https:\/\/www.patrickmatte.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.patrickmatte.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.patrickmatte.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.patrickmatte.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1192"}],"version-history":[{"count":8,"href":"https:\/\/www.patrickmatte.com\/index.php?rest_route=\/wp\/v2\/posts\/1192\/revisions"}],"predecessor-version":[{"id":1273,"href":"https:\/\/www.patrickmatte.com\/index.php?rest_route=\/wp\/v2\/posts\/1192\/revisions\/1273"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.patrickmatte.com\/index.php?rest_route=\/wp\/v2\/media\/1196"}],"wp:attachment":[{"href":"https:\/\/www.patrickmatte.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.patrickmatte.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.patrickmatte.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}