{"id":394,"date":"2018-11-07T22:11:02","date_gmt":"2018-11-08T04:11:02","guid":{"rendered":"http:\/\/www.chroniclesoftright.com\/blog\/?p=394"},"modified":"2018-11-07T22:11:02","modified_gmt":"2018-11-08T04:11:02","slug":"file-conversions","status":"publish","type":"post","link":"https:\/\/www.chroniclesoftright.com\/blog\/2018\/11\/07\/file-conversions\/","title":{"rendered":"File conversions"},"content":{"rendered":"<p>I have now converted all of the art assets for Penrith Forest into glTF files.\u00a0 Before I had a mix of .json, .fbx, and .gltf\/.glb files.\u00a0 While I was doing this I created collider meshes for all the assets that needed them.\u00a0 I also added in the ability to load double sided meshes.\u00a0 By default meshes created by <a href=\"http:\/\/threejs.org\" target=\"_blank\" rel=\"noopener\">THREE<\/a> are one-sided.\u00a0 This is an optimization that prevents WebGL from drawing triangles that are facing away from the viewer on the assumption that these triangles will probably get drawn over anyway.\u00a0 This works fine for most things but for very small, simple objects like grass and flower petals I need the material to be visible from any angle.\u00a0 This is accomplished by simple putting the word &#8220;(Double)&#8221; anywhere in the material name in <a href=\"http:\/\/blender.org\" target=\"_blank\" rel=\"noopener\">Blender<\/a>.\u00a0 This name gets exported and the object loading code looks at the name of each material getting loaded, and if it contains &#8220;(Double)&#8221; it sets that material to double sided.\u00a0 This only has to be done once, when the asset is loaded, so it shouldn&#8217;t have any real effect on performance and will allow me to make all kinds of foliage as simple planes.<\/p>\n<p>The next thing I need to do is clean up and confirm\/re-implement the terrain editing and painting code.\u00a0 I had this working at one point, but I&#8217;ve changed quite a bit over the last several week so I&#8217;m guessing it&#8217;s at least partially broken.\u00a0 Once this is fully working again, I&#8217;ll put some time into the design and layout of Penrith Forest.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have now converted all of the art assets for Penrith Forest into glTF files.\u00a0 Before I had a mix of .json, .fbx, and .gltf\/.glb files.\u00a0 While I was doing this I created collider meshes for all the assets that needed them.\u00a0 I also added in the ability to load double sided meshes.\u00a0 By default&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,6],"tags":[],"class_list":["post-394","post","type-post","status-publish","format-standard","hentry","category-planning-and-development","category-world-editor"],"_links":{"self":[{"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/posts\/394","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/comments?post=394"}],"version-history":[{"count":1,"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/posts\/394\/revisions"}],"predecessor-version":[{"id":395,"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/posts\/394\/revisions\/395"}],"wp:attachment":[{"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/media?parent=394"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/categories?post=394"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/tags?post=394"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}