{"id":3872,"date":"2019-02-09T15:56:39","date_gmt":"2019-02-09T22:56:39","guid":{"rendered":"http:\/\/mattfife.com\/?p=3872"},"modified":"2019-02-09T15:56:46","modified_gmt":"2019-02-09T22:56:46","slug":"sprite-dicing","status":"publish","type":"post","link":"https:\/\/mattfife.com\/?p=3872","title":{"rendered":"Sprite Dicing"},"content":{"rendered":"\n<p>Handy technique for saving texture space!  There are <a href=\"http:\/\/www.2dtoolkit.com\/doc\/2.4\/advanced\/sprite_dicing.html\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"various tools (opens in a new tab)\">various tools<\/a> to do this, but the basic scheme is to split up a large texture into much smaller chunks, individually trimming these chunks, and seamlessly reconstructing the sprite in the viewport. <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"453\" data-attachment-id=\"3874\" data-permalink=\"https:\/\/mattfife.com\/?attachment_id=3874\" data-orig-file=\"https:\/\/i0.wp.com\/mattfife.com\/wp-content\/themes\/mattTheme\/headerimgs\/2019\/02\/dicing_result2.png?fit=733%2C519&amp;ssl=1\" data-orig-size=\"733,519\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"dicing_result2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mattfife.com\/wp-content\/themes\/mattTheme\/headerimgs\/2019\/02\/dicing_result2.png?fit=640%2C453&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mattfife.com\/wp-content\/themes\/mattTheme\/headerimgs\/2019\/02\/dicing_result2.png?resize=640%2C453&#038;ssl=1\" alt=\"\" class=\"wp-image-3874\" srcset=\"https:\/\/i0.wp.com\/mattfife.com\/wp-content\/themes\/mattTheme\/headerimgs\/2019\/02\/dicing_result2.png?w=733&amp;ssl=1 733w, https:\/\/i0.wp.com\/mattfife.com\/wp-content\/themes\/mattTheme\/headerimgs\/2019\/02\/dicing_result2.png?resize=300%2C212&amp;ssl=1 300w, https:\/\/i0.wp.com\/mattfife.com\/wp-content\/themes\/mattTheme\/headerimgs\/2019\/02\/dicing_result2.png?resize=381%2C270&amp;ssl=1 381w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><figcaption>Source image<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"322\" height=\"600\" data-attachment-id=\"3873\" data-permalink=\"https:\/\/mattfife.com\/?attachment_id=3873\" data-orig-file=\"https:\/\/i0.wp.com\/mattfife.com\/wp-content\/themes\/mattTheme\/headerimgs\/2019\/02\/dicing_result.png?fit=322%2C600&amp;ssl=1\" data-orig-size=\"322,600\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"dicing_result\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mattfife.com\/wp-content\/themes\/mattTheme\/headerimgs\/2019\/02\/dicing_result.png?fit=322%2C600&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mattfife.com\/wp-content\/themes\/mattTheme\/headerimgs\/2019\/02\/dicing_result.png?resize=322%2C600&#038;ssl=1\" alt=\"\" class=\"wp-image-3873\" srcset=\"https:\/\/i0.wp.com\/mattfife.com\/wp-content\/themes\/mattTheme\/headerimgs\/2019\/02\/dicing_result.png?w=322&amp;ssl=1 322w, https:\/\/i0.wp.com\/mattfife.com\/wp-content\/themes\/mattTheme\/headerimgs\/2019\/02\/dicing_result.png?resize=161%2C300&amp;ssl=1 161w, https:\/\/i0.wp.com\/mattfife.com\/wp-content\/themes\/mattTheme\/headerimgs\/2019\/02\/dicing_result.png?resize=145%2C270&amp;ssl=1 145w\" sizes=\"auto, (max-width: 322px) 100vw, 322px\" \/><figcaption>Compresses down to this!<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Handy technique for saving texture space! There are various tools to do this, but the basic scheme is to split up a large texture into much smaller chunks, individually trimming these chunks, and seamlessly reconstructing the sprite in the viewport.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[6,5],"tags":[],"class_list":["post-3872","post","type-post","status-publish","format-standard","hentry","category-technicalproblemsolutions","category-technical"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4WECr-10s","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/mattfife.com\/index.php?rest_route=\/wp\/v2\/posts\/3872","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mattfife.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mattfife.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mattfife.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mattfife.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3872"}],"version-history":[{"count":1,"href":"https:\/\/mattfife.com\/index.php?rest_route=\/wp\/v2\/posts\/3872\/revisions"}],"predecessor-version":[{"id":3875,"href":"https:\/\/mattfife.com\/index.php?rest_route=\/wp\/v2\/posts\/3872\/revisions\/3875"}],"wp:attachment":[{"href":"https:\/\/mattfife.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3872"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mattfife.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3872"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mattfife.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3872"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}