{"id":5869,"date":"2024-05-26T22:47:51","date_gmt":"2024-05-26T19:47:51","guid":{"rendered":"https:\/\/unitycoder.com\/blog\/?p=5869"},"modified":"2024-05-28T11:34:35","modified_gmt":"2024-05-28T08:34:35","slug":"customize-spriteshaperenderer-quality-but-has-issues","status":"publish","type":"post","link":"https:\/\/unitycoder.com\/blog\/2024\/05\/26\/customize-spriteshaperenderer-quality-but-has-issues\/","title":{"rendered":"Customize SpriteShapeRenderer quality (but has issues)"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2024\/05\/image-2.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"928\" height=\"710\" data-attachment-id=\"5870\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2024\/05\/26\/customize-spriteshaperenderer-quality-but-has-issues\/image-2-12\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2024\/05\/image-2.png?fit=928%2C710&amp;ssl=1\" data-orig-size=\"928,710\" 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=\"image-2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2024\/05\/image-2.png?fit=928%2C710&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2024\/05\/image-2.png?resize=928%2C710&#038;ssl=1\" alt=\"\" class=\"wp-image-5870\" srcset=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2024\/05\/image-2.png?w=928&amp;ssl=1 928w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2024\/05\/image-2.png?resize=300%2C230&amp;ssl=1 300w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2024\/05\/image-2.png?resize=768%2C588&amp;ssl=1 768w\" sizes=\"auto, (max-width: 928px) 100vw, 928px\" \/><\/a><\/figure>\n\n\n\n<p>Tried using custom shader to have &#8220;bend&#8221; surface for SpriteShapeRenderer, and it works.. but the mesh is so low resolution, that it doesnt look nice.. Then tried to increase SpriteShape mesh resolution, which worked &#8211; but inner mesh and collider broke. (and didnt have time to look further..)<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><\/li>\n<\/ul>\n\n\n\n<p><strong>Steps:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>import SpriteShape Package<\/li>\n\n\n\n<li>Make it editable (Right click over SpriteShape in Project\/Packages\/, Show in Explorer)<\/li>\n\n\n\n<li>Move the folder from Library\/PackageCache\/ into project Packages\/ folder<\/li>\n\n\n\n<li>Open com.unity.2d.spriteshape\\Runtime\\SpriteShapeGenerator.cs<\/li>\n\n\n\n<li>Modify kHighestQualityTolerance value to some higher value<\/li>\n\n\n\n<li>Open com.unity.2d.spriteshape\\Runtime\\SpriteShape.cs<\/li>\n\n\n\n<li>Adjust public enum QualityDetail High value to something higher (like 24)<\/li>\n\n\n\n<li>Get back to Unityt Editor, adjust quality dropdown to update mesh<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Problems:<\/strong><br>&#8211; Inner mesh is broken, collider is broken..<\/p>\n\n\n\n<p>Making of<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<span class=\"embed-youtube\" style=\"text-align:center; display: block;\"><iframe loading=\"lazy\" class=\"youtube-player\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/MVZo37arQJI?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-US&#038;autohide=2&#038;wmode=transparent\" allowfullscreen=\"true\" style=\"border:0;\" sandbox=\"allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox\"><\/iframe><\/span>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Tried using custom shader to have &#8220;bend&#8221; surface for SpriteShapeRenderer, and it works.. but the mesh is so low resolution, that it doesnt look nice.. Then tried to increase SpriteShape mesh resolution, which worked &#8211; but inner mesh and collider broke. (and didnt have time [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5870,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_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":false,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[3],"tags":[1297,1296],"class_list":["post-5869","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-unity3d","tag-customize","tag-spriteshaperenderer"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2024\/05\/image-2.png?fit=928%2C710&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p1KTaT-1wF","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/5869","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/comments?post=5869"}],"version-history":[{"count":2,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/5869\/revisions"}],"predecessor-version":[{"id":5872,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/5869\/revisions\/5872"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media\/5870"}],"wp:attachment":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media?parent=5869"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/categories?post=5869"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/tags?post=5869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}