{"id":1428,"date":"2018-06-12T22:48:32","date_gmt":"2018-06-12T22:48:32","guid":{"rendered":"http:\/\/huesgfx.com\/firedrake\/?p=1428"},"modified":"2018-06-12T22:49:12","modified_gmt":"2018-06-12T22:49:12","slug":"the-back-smear-of-death-on-the-gearvr","status":"publish","type":"post","link":"http:\/\/huesgfx.com\/firedrake\/the-back-smear-of-death-on-the-gearvr\/","title":{"rendered":"The Back Smear of Death on the GearVR!"},"content":{"rendered":"<p>\u00a0<\/p>\n<p>Ever since I stared to develop Firedrake , almost 11 months ago now, I have been constantly plagued by an odd display problem.\u00a0\u00a0 \u00a0\u00a0All of the dark colors in my environments would show a bit of \u201cghosting\u201d when I played the levels in the actual GearVR.\u00a0 This ghosting never showed in the unity editor and would not really affect the framerates, but it was an odd distraction.\u00a0\u00a0\u00a0 It was a strange shadow-like flicker, which showed around the edges of the dark shadows in my lighting\u2026 as if a candle or fire was burning and casting slight dancing shadows throughout the room.\u00a0 When the camera moved, then the flicker would happen as the shadow edges seemed to \u201creset\u201d each frame or two, with the moving camera.\u00a0 \u00a0\u00a0It was almost like there was a low level \u201cBloom optimized\u201d effect on the cameras.<\/p>\n<p>Since Firedrake, uses a full throttle first person, free roaming, movement schema,<\/p>\n<p>movement <em>sche<\/em>mea that causes a lot of VR sickness in general among players,\u00a0 any type of peripheral \u201cghosting\u201d in the VR images, started to lend itself to creating more of a VR sickness type of equation in the overall gameplay.\u00a0 So this was an issue I really wanted to fix.<\/p>\n<p>I used the RealisticFPS asset from the store, to do a lot of my prototyping and building on for Firedrake, It\u2019s a great asset and I figured there must be something buried in the code or set up on the prefab\u2019s cameras, so I spent countless hours, trying almost every variation of camera setting and Unity quality settings, trying to find the magic mix of check boxes that would change this effect\u2026.\u00a0\u00a0 All for not\u2026..\u00a0 I did learn a lot about how these sub systems worked in Unity, but never found anything remotely like a solution.<\/p>\n<p>Next, I repeatedly searched Google, Bing and\u00a0 Gogoduck with terms like \u201cUnity, Shadow dancing\u201d, or \u201cUnity\u00a0 frame ghosting, Gearvr\u201d\u00a0\u00a0 and would spend hours tracking back on the forum reading any and all threads for a hint of a solution to this problem.\u00a0\u00a0\u00a0 Unfortunately, I never found much concrete information about this phenomenon, but again, learned lots of periphery information on how Unity works in general.<\/p>\n<p>Next, I started experimenting with different versions of the OVR toolset and the different versions of Unity.\u00a0\u00a0\u00a0 I installed and tried almost every combination of version from Unity 5.2, up through Unity 5.6.5.\u00a0\u00a0 and no luck.\u00a0 On every version combination, I would build out a level and check it on the Gearvr and \u2026 there was my old friend, dancing, laughing, just at the edge\u2026.<\/p>\n<p>Then, just recently I was looking on the Unity Forums for some info on some other issue I was facing (Some info on how to effectively use the Dynamic Batching capability in Unity, for performance) and came across the term, \u201cBlack Smear\u201d\u00a0\u00a0 \u00a0\u00a0\u00a0Ah ha! \u00a0That suddenly clicked\u2026.\u00a0 I would never have thought to search with this term, but it explains exactly what I have been seeing in my VR imagery.\u00a0\u00a0 A black \u201csmear\u201d around the edges of the really dark shadow areas and the brighter, light, areas on my 3d levels.<\/p>\n<p>\u00a0<\/p>\n<p>I stared reading, digging down in the various forum threads and\u2026. Yup, this was it\u2026 and it seemed other folks, many other folks had experienced this same issue.\u00a0\u00a0\u00a0 In fact, it\u2019s even an acknowledged bug from Oculus and not only does the GearVR suffer from this issue, the Rift also has this issue.<\/p>\n<p>So what to do about it?\u00a0\u00a0 Well, come to find out, not much.\u00a0\u00a0 There is actually no real fix for this issue, but the best advice, from Oculus themselves, is to \u201cdesign your vr environments with this issue in mind and use it as design criteria\u201d\u00a0\u00a0 and \u201cuse adjustments within your Chroma settings to alleviate radical changes from dark to light areas in your environments\u201d<\/p>\n<p>This basically means; \u201cramp up your lighting so you don\u2019t have super darks or blown out white\u201d.\u00a0\u00a0 And this was a big problem for me and my level designs.<\/p>\n<p>The world of firedrake is set in dark dungeons and dank crypts.\u00a0\u00a0\u00a0\u00a0 Which by default, tend to traditionally be dark and barely lightup places.\u00a0\u00a0 I had designed almost all of my environments and levels to be fairly dark and spooky, so I had LOTS of these dark\/light zones spread throughout my levels that were causing these types of display problems.<\/p>\n<p>\u2026\u201dmake is a design criteria\u2026\u201d\u00a0\u00a0 Ok\u2026. Sure\u2026\u00a0\u00a0 My solution here was to set up a series of \u201ctorches\u201d made up of a static \u201cmagic light crystal\u201d and a baked point light, instead of a Unity based particle emitter traditionally used to make a fire effect of a burning torch.\u00a0\u00a0 Then use these to light the corridors and rooms of the dungeon levels.\u00a0\u00a0 Not using the particle emitter and using a static 40 vertex 3d model of a light crystal, allowed me to have a traditional fire torch on the wall type of effect, without the performance overhead of a particle emitter.\u00a0 The baked point light then acted like the fall off light from the torch\/crystal prefab, and since the light effect\/bug was \u201cdancing and flickering \u00a0shadows like a candle was burning\u201d\u00a0 this kinda worked\u2026 making the bug into the \u201cshadows of a burning torch\u201d.\u00a0 But it still was a distraction from gameplay and overall not that effective.<\/p>\n<p>\u00a0<\/p>\n<p>Ultimately though, I had to bump up the overall ambient lighting from dark to semi dark.\u00a0 This cut down the overall range from the dark to light and frankly, fixed the smear problem but at another cost.\u00a0\u00a0\u00a0\u00a0 This really lightened up the darker, spookier areas and corners of my levels and changed the overall feel of the game.\u00a0\u00a0\u00a0 In the end it\u2019s a workaround that I am not totally happy with, it changed the overall darker, more photorealistic feel of the game, of which I was really striving for to a more open, cartoony feel, but the game does run much smoother now. And in the end, this is a prime example of the trade-off between what we hope to create as artists and designers, and what we can actually pull off technically with the tools at hand, as developers of VR.<\/p>\n<div id=\"attachment_1430\" style=\"width: 310px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/huesgfx.com\/firedrake\/wp-content\/uploads\/2018\/06\/smear_old.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1430\" class=\"size-medium wp-image-1430\" src=\"http:\/\/huesgfx.com\/firedrake\/wp-content\/uploads\/2018\/06\/smear_old-300x184.jpg\" alt=\"\" width=\"300\" height=\"184\" srcset=\"http:\/\/huesgfx.com\/firedrake\/wp-content\/uploads\/2018\/06\/smear_old-300x184.jpg 300w, http:\/\/huesgfx.com\/firedrake\/wp-content\/uploads\/2018\/06\/smear_old-768x471.jpg 768w, http:\/\/huesgfx.com\/firedrake\/wp-content\/uploads\/2018\/06\/smear_old.jpg 950w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-1430\" class=\"wp-caption-text\">The old smear, with dark lighting<\/p><\/div>\n<div id=\"attachment_1429\" style=\"width: 310px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/huesgfx.com\/firedrake\/wp-content\/uploads\/2018\/06\/smear_new.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1429\" class=\"size-medium wp-image-1429\" src=\"http:\/\/huesgfx.com\/firedrake\/wp-content\/uploads\/2018\/06\/smear_new-300x184.jpg\" alt=\"\" width=\"300\" height=\"184\" srcset=\"http:\/\/huesgfx.com\/firedrake\/wp-content\/uploads\/2018\/06\/smear_new-300x184.jpg 300w, http:\/\/huesgfx.com\/firedrake\/wp-content\/uploads\/2018\/06\/smear_new-768x471.jpg 768w, http:\/\/huesgfx.com\/firedrake\/wp-content\/uploads\/2018\/06\/smear_new.jpg 950w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-1429\" class=\"wp-caption-text\">The new smear, with new litup lighting.<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 Ever since I stared to develop Firedrake , almost 11 months ago now, I have been constantly plagued by an odd display problem.\u00a0\u00a0 \u00a0\u00a0All of the dark colors in my environments would show a bit of \u201cghosting\u201d when I played the levels in the actual GearVR.\u00a0 This ghosting never showed in the unity editor [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1430,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1428","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-general"],"_links":{"self":[{"href":"http:\/\/huesgfx.com\/firedrake\/wp-json\/wp\/v2\/posts\/1428","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/huesgfx.com\/firedrake\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/huesgfx.com\/firedrake\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/huesgfx.com\/firedrake\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/huesgfx.com\/firedrake\/wp-json\/wp\/v2\/comments?post=1428"}],"version-history":[{"count":1,"href":"http:\/\/huesgfx.com\/firedrake\/wp-json\/wp\/v2\/posts\/1428\/revisions"}],"predecessor-version":[{"id":1431,"href":"http:\/\/huesgfx.com\/firedrake\/wp-json\/wp\/v2\/posts\/1428\/revisions\/1431"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/huesgfx.com\/firedrake\/wp-json\/wp\/v2\/media\/1430"}],"wp:attachment":[{"href":"http:\/\/huesgfx.com\/firedrake\/wp-json\/wp\/v2\/media?parent=1428"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/huesgfx.com\/firedrake\/wp-json\/wp\/v2\/categories?post=1428"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/huesgfx.com\/firedrake\/wp-json\/wp\/v2\/tags?post=1428"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}