{"id":627,"date":"2016-12-25T20:47:49","date_gmt":"2016-12-26T04:47:49","guid":{"rendered":"https:\/\/jacksontech.net\/?p=627"},"modified":"2016-12-25T20:47:49","modified_gmt":"2016-12-26T04:47:49","slug":"vr-game-project-day-3-of-8","status":"publish","type":"post","link":"https:\/\/jacksontech.net\/index.php\/2016\/12\/vr-game-project-day-3-of-8\/","title":{"rendered":"VR Game Project &#8211; Day 3 of 8"},"content":{"rendered":"<p>More progress, although not in the direction I was anticipating!<\/p>\n<h1>Bug Fixes and Improvements<\/h1>\n<p>The &#8220;blink&#8221; script continued to be problematic, so I removed the fancy one I grabbed from the Unity wiki and wrote my own very simple one. It works. I will release it CC-BY when I upload the source and build.<\/p>\n<p>I did some &#8220;hallway testing&#8221; with family members. One of them had trouble getting out of the starting room because the door closed too fast after it opened. Instead of bumping up the delay, I did some hacking and came up with a context-sensitive &#8220;polite&#8221; door that refuses to close as long as you&#8217;re looking at it. Unrealistic? Maybe. Convenient for the game? Very much so! Like the &#8220;blink&#8221; script, I will release the door controller CC-BY later.<\/p>\n<p>Last, the targets did not fully disable their collider when you teleported to them. I added some code that fixes this.<\/p>\n<h1>Lighting<\/h1>\n<p>Got lots more lighting done. I figured out my workflow&#8230;<\/p>\n<ol>\n<li>Create my models in Blender.<\/li>\n<li>Assign materials to vertices. I tried to keep the names straight so I wouldn&#8217;t end up with lots of duplicates (Unity reuses materials after it sees one for the first time, which is kinda nice) but I still ended up with a few typos and duplicate materials. Oh well, lesson learned.<\/li>\n<li>Create a UV map.<\/li>\n<li>In Unity, check the &#8220;Generate Lightmap UV&#8221; checkbox.<\/li>\n<li>Mark the mesh as static.<\/li>\n<li>Mark all my lights as &#8220;bake&#8221; vs &#8220;realtime&#8221;<\/li>\n<li>Disable realtime GI baking in the scene lightmap settings and just leave general GI baking enabled.<\/li>\n<li>Tweak the Baked GI resolution (40-60 seems good for testing; 128 looks reasonable for final builds)<\/li>\n<li>Check &#8220;Final Gather&#8221; for final builds.<\/li>\n<li>Bake!<\/li>\n<\/ol>\n<div id=\"attachment_628\" class=\"wp-caption alignleft\" style=\"width: 370px\"><a href=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_adduv.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-628\" src=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_adduv.png\" alt=\"\" width=\"370\" height=\"220\" srcset=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_adduv.png 370w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_adduv-300x178.png 300w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/><\/a><p class=\"wp-caption-text\">Adding a UV map in Blender<\/p><\/div>\n<div id=\"attachment_634\" class=\"wp-caption alignleft\" style=\"width: 292px\"><a href=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_import.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-634\" src=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_import.png\" alt=\"\" width=\"292\" height=\"506\" srcset=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_import.png 292w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_import-173x300.png 173w\" sizes=\"auto, (max-width: 292px) 100vw, 292px\" \/><\/a><p class=\"wp-caption-text\">Telling Unity to create lightmap UVs.<\/p><\/div>\n<h1>Skybox<\/h1>\n<p>It&#8217;s wasteful to use 6 huge images, but I did make a skybox using Unity&#8217;s skybox shader. I used Ingar&#8217;s space sky textures from Unvanquished for now. These are available CC-BY-SA 3.0 and I will make these files available when I realize a build and the source.<\/p>\n<h1>Furniture!<\/h1>\n<p>A table, a chair, a couch, a bed, a bedside table, two lamps, a computer monitor, a keyboard, a small desk, and a refined version of the curvy desk, all handcrafted with the finest non-GMO free range organic vertices by yours truly.<\/p>\n<h1>Screenshots<\/h1>\n<p>Here&#8217;s the fun bits!<\/p>\n<div id=\"attachment_639\" class=\"wp-caption alignleft\" style=\"width: 768px\"><a href=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/Screenshot_20161225-194727.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium_large wp-image-639\" src=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/Screenshot_20161225-194727-768x432.jpg\" alt=\"\" width=\"768\" height=\"432\" srcset=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/Screenshot_20161225-194727-768x432.jpg 768w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/Screenshot_20161225-194727-300x169.jpg 300w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/Screenshot_20161225-194727-1024x576.jpg 1024w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/Screenshot_20161225-194727.jpg 1920w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><p class=\"wp-caption-text\">In game screenshot. Office!<\/p><\/div>\n<div id=\"attachment_638\" class=\"wp-caption alignleft\" style=\"width: 768px\"><a href=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/Screenshot_20161225-194701.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium_large wp-image-638\" src=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/Screenshot_20161225-194701-768x432.jpg\" alt=\"\" width=\"768\" height=\"432\" srcset=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/Screenshot_20161225-194701-768x432.jpg 768w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/Screenshot_20161225-194701-300x169.jpg 300w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/Screenshot_20161225-194701-1024x576.jpg 1024w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/Screenshot_20161225-194701.jpg 1920w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><p class=\"wp-caption-text\">In game screenshot. Polite door won&#8217;t close until you look away. Just like Wheatley!<\/p><\/div>\n<div id=\"attachment_637\" class=\"wp-caption alignleft\" style=\"width: 768px\"><a href=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/Screenshot_20161225-194641.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium_large wp-image-637\" src=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/Screenshot_20161225-194641-768x432.jpg\" alt=\"\" width=\"768\" height=\"432\" srcset=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/Screenshot_20161225-194641-768x432.jpg 768w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/Screenshot_20161225-194641-300x169.jpg 300w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/Screenshot_20161225-194641-1024x576.jpg 1024w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/Screenshot_20161225-194641.jpg 1920w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><p class=\"wp-caption-text\">In game screenshot. Bedroom lighting.<\/p><\/div>\n<div id=\"attachment_636\" class=\"wp-caption alignleft\" style=\"width: 768px\"><a href=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_Screenshot_20161225-201216.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium_large wp-image-636\" src=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_Screenshot_20161225-201216-768x432.jpg\" alt=\"\" width=\"768\" height=\"432\" srcset=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_Screenshot_20161225-201216-768x432.jpg 768w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_Screenshot_20161225-201216-300x169.jpg 300w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_Screenshot_20161225-201216-1024x576.jpg 1024w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_Screenshot_20161225-201216.jpg 1920w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><p class=\"wp-caption-text\">In game screenshot. You have to find the password!<\/p><\/div>\n<div id=\"attachment_635\" class=\"wp-caption alignleft\" style=\"width: 768px\"><a href=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_office2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium_large wp-image-635\" src=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_office2-768x538.png\" alt=\"\" width=\"768\" height=\"538\" srcset=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_office2-768x538.png 768w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_office2-300x210.png 300w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_office2-1024x718.png 1024w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_office2.png 1599w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><p class=\"wp-caption-text\">New version of the office, with fancy chairs.<\/p><\/div>\n<div id=\"attachment_633\" class=\"wp-caption alignleft\" style=\"width: 768px\"><a href=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_display.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium_large wp-image-633\" src=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_display-768x550.png\" alt=\"\" width=\"768\" height=\"550\" srcset=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_display-768x550.png 768w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_display-300x215.png 300w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_display-1024x733.png 1024w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_display.png 1587w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><p class=\"wp-caption-text\">Computer monitor.<\/p><\/div>\n<div id=\"attachment_632\" class=\"wp-caption alignleft\" style=\"width: 768px\"><a href=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_cleanup.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium_large wp-image-632\" src=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_cleanup-768x547.png\" alt=\"\" width=\"768\" height=\"547\" srcset=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_cleanup-768x547.png 768w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_cleanup-300x214.png 300w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_cleanup-1024x729.png 1024w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_cleanup.png 1613w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><p class=\"wp-caption-text\">General mesh outline. I don&#8217;t see me adding new areas in the time I have left in the challenge.<\/p><\/div>\n<div id=\"attachment_631\" class=\"wp-caption alignleft\" style=\"width: 768px\"><a href=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_appartment.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium_large wp-image-631\" src=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_appartment-768x546.png\" alt=\"\" width=\"768\" height=\"546\" srcset=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_appartment-768x546.png 768w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_appartment-300x213.png 300w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_appartment-1024x729.png 1024w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_appartment.png 1598w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><p class=\"wp-caption-text\">Adding computer monitors.<\/p><\/div>\n<div id=\"attachment_630\" class=\"wp-caption alignleft\" style=\"width: 768px\"><a href=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_apartmentlighting2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium_large wp-image-630\" src=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_apartmentlighting2-768x531.png\" alt=\"\" width=\"768\" height=\"531\" srcset=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_apartmentlighting2-768x531.png 768w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_apartmentlighting2-300x207.png 300w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_apartmentlighting2-1024x708.png 1024w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_apartmentlighting2.png 1595w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><p class=\"wp-caption-text\">Second take on the appartment. New furniture!<\/p><\/div>\n<div id=\"attachment_629\" class=\"wp-caption alignleft\" style=\"width: 768px\"><a href=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_apartmentlighting.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium_large wp-image-629\" src=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_apartmentlighting-768x536.png\" alt=\"\" width=\"768\" height=\"536\" srcset=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_apartmentlighting-768x536.png 768w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_apartmentlighting-300x209.png 300w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_apartmentlighting-1024x715.png 1024w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_apartmentlighting.png 1601w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><p class=\"wp-caption-text\">Early take on some lighting.<\/p><\/div>\n<div id=\"attachment_640\" class=\"wp-caption alignleft\" style=\"width: 768px\"><a href=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_bed.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium_large wp-image-640\" src=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_bed-768x545.png\" alt=\"\" width=\"768\" height=\"545\" srcset=\"https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_bed-768x545.png 768w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_bed-300x213.png 300w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_bed-1024x727.png 1024w, https:\/\/jacksontech.net\/wp-content\/uploads\/2016\/12\/day3_bed.png 1605w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><p class=\"wp-caption-text\">Early build with bed.<\/p><\/div>\n<h1>Tomorrow&#8217;s work<\/h1>\n<ul>\n<li>Dialog system. No, really. I need this.<\/li>\n<li>Possibly a cute little robot to sit in the chair. I don&#8217;t know. I&#8217;ve never successfully animated anything in Blender before.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>More progress, although not in the direction I was anticipating! Bug Fixes and Improvements The &#8220;blink&#8221; script continued to be problematic, so I removed the fancy one I grabbed from the Unity wiki and wrote my own very simple one. It works. I will release it CC-BY when I upload the source and build. I &#8230; <a class=\"moretag\" href=\"https:\/\/jacksontech.net\/index.php\/2016\/12\/vr-game-project-day-3-of-8\/\">more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[102,105,28,9,106],"tags":[110,111,108,49,112,109,107],"class_list":["post-627","post","type-post","status-publish","format-standard","hentry","category-game-dev","category-google-cardboard","category-personal","category-projects","category-vr","tag-eight-day-game-project-1","tag-game-dev","tag-google-cardboard","tag-personal","tag-projects","tag-unity","tag-vr"],"_links":{"self":[{"href":"https:\/\/jacksontech.net\/index.php\/wp-json\/wp\/v2\/posts\/627","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jacksontech.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jacksontech.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jacksontech.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jacksontech.net\/index.php\/wp-json\/wp\/v2\/comments?post=627"}],"version-history":[{"count":1,"href":"https:\/\/jacksontech.net\/index.php\/wp-json\/wp\/v2\/posts\/627\/revisions"}],"predecessor-version":[{"id":641,"href":"https:\/\/jacksontech.net\/index.php\/wp-json\/wp\/v2\/posts\/627\/revisions\/641"}],"wp:attachment":[{"href":"https:\/\/jacksontech.net\/index.php\/wp-json\/wp\/v2\/media?parent=627"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jacksontech.net\/index.php\/wp-json\/wp\/v2\/categories?post=627"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jacksontech.net\/index.php\/wp-json\/wp\/v2\/tags?post=627"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}