{"id":79,"date":"2013-05-22T09:15:49","date_gmt":"2013-05-22T09:15:49","guid":{"rendered":"http:\/\/libretro.wordpress.com\/?p=79"},"modified":"2015-10-18T04:03:12","modified_gmt":"2015-10-18T04:03:12","slug":"libretro-gl-modelviewer","status":"publish","type":"post","link":"https:\/\/www.libretro.com\/index.php\/libretro-gl-modelviewer\/","title":{"rendered":"Libretro GL &#8211; Modelviewer"},"content":{"rendered":"<p><strong>By Squarepusher<\/strong><\/p>\n<p>As a showcase for libretro GL, maister made two quite nice libretro cores that should appeal to demo coders and traditional game developers alike.<\/p>\n<p><strong>Model Viewer<\/strong><\/p>\n<p>I encouraged Maister to do a libretro GL port of an old project he made a year ago (Model Viewer) as a showcase for libretro GL.<\/p>\n<p>The Model Viewer takes &#8216;Wavefront&#8217; object models as the &#8216;ROM&#8217;. it then displays these models inside a bare 3D environment.<\/p>\n<p>It is possible to adjust the camera and rotate the model, zoom it in\/out, etc.<\/p>\n<p>Right now it is still in a basic phase but you&#8217;ll find a great amount of models that you can find on sites like Deviant Art and Free 3D Models (http:\/\/thefree3dmodels.com\/) should already run unedited.<\/p>\n<p>NOTE: Models that depend on DDS textures (DirectDraw Surface) will appear in the Model Viewer as &#8216;flat shaded&#8217; for the moment since DDS support is currently a stub.<\/p>\n<p>Below I&#8217;ll showcase some models being rendered inside the Model Viewer. Search around for some of these models yourself (some key terms being &#8216;XNA Lara&#8217; and\/or &#8216;3D Studio Max&#8217;). If the model comes with an OBJ\/MTL file and a couple of PNG\/JPG\/TGA images it should more or less work barring some exceptions. (.mesh based models are not supported right now)<\/p>\n<figure id=\"attachment_80\" aria-describedby=\"caption-attachment-80\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/libretro.pchat.x10.mx\/wp-content\/uploads\/2013\/05\/modelviewer-vanille.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-80\" alt=\"The Final Fantasy XIII Vanille model mostly appears correctly in the Model viewer except for a few minor details\" src=\"http:\/\/libretro.pchat.x10.mx\/wp-content\/uploads\/2013\/05\/modelviewer-vanille.jpg?w=300\" width=\"300\" height=\"227\" srcset=\"https:\/\/www.libretro.com\/wp-content\/uploads\/2013\/05\/modelviewer-vanille.jpg 966w, https:\/\/www.libretro.com\/wp-content\/uploads\/2013\/05\/modelviewer-vanille-300x227.jpg 300w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-80\" class=\"wp-caption-text\">The Final Fantasy XIII Vanille model mostly appears correctly in the Model viewer except for a few minor details<\/figcaption><\/figure>\n<figure id=\"attachment_81\" aria-describedby=\"caption-attachment-81\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/libretro.pchat.x10.mx\/wp-content\/uploads\/2013\/05\/modelviewer-lightning-shaders.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-81\" alt=\"Here you see Lightning displayed in the Modelviewer with lots of shader passes applied. Most apparent shader here is the Waterpaint mudlord shader which gives the model a painterly look.\" src=\"http:\/\/libretro.pchat.x10.mx\/wp-content\/uploads\/2013\/05\/modelviewer-lightning-shaders.jpg?w=300\" width=\"300\" height=\"167\" srcset=\"https:\/\/www.libretro.com\/wp-content\/uploads\/2013\/05\/modelviewer-lightning-shaders.jpg 1916w, https:\/\/www.libretro.com\/wp-content\/uploads\/2013\/05\/modelviewer-lightning-shaders-300x167.jpg 300w, https:\/\/www.libretro.com\/wp-content\/uploads\/2013\/05\/modelviewer-lightning-shaders-1024x572.jpg 1024w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-81\" class=\"wp-caption-text\">Here you see Lightning displayed in the Modelviewer with lots of shader passes applied. Most apparent shader here is the Waterpaint mudlord shader which gives the model a painterly look.<\/figcaption><\/figure>\n<figure id=\"attachment_82\" aria-describedby=\"caption-attachment-82\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/libretro.pchat.x10.mx\/wp-content\/uploads\/2013\/05\/modelviewer-rikku.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-82\" alt=\"Modelviewer showin the Final Fantasy X-II Rikku model.\" src=\"http:\/\/libretro.pchat.x10.mx\/wp-content\/uploads\/2013\/05\/modelviewer-rikku.jpg?w=300\" width=\"300\" height=\"234\" srcset=\"https:\/\/www.libretro.com\/wp-content\/uploads\/2013\/05\/modelviewer-rikku.jpg 957w, https:\/\/www.libretro.com\/wp-content\/uploads\/2013\/05\/modelviewer-rikku-300x234.jpg 300w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-82\" class=\"wp-caption-text\">Modelviewer showing the Final Fantasy X-II Rikku model.<\/figcaption><\/figure>\n<figure id=\"attachment_83\" aria-describedby=\"caption-attachment-83\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/libretro.pchat.x10.mx\/wp-content\/uploads\/2013\/05\/modelviewer-bryan.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-83\" alt=\"Bryan Fury from Tekken Tag Tournament 1 - looks more or less like Bryan - some hue issues here and there.\" src=\"http:\/\/libretro.pchat.x10.mx\/wp-content\/uploads\/2013\/05\/modelviewer-bryan.jpg?w=300\" width=\"300\" height=\"222\" srcset=\"https:\/\/www.libretro.com\/wp-content\/uploads\/2013\/05\/modelviewer-bryan.jpg 963w, https:\/\/www.libretro.com\/wp-content\/uploads\/2013\/05\/modelviewer-bryan-300x222.jpg 300w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-83\" class=\"wp-caption-text\">Bryan Fury from Tekken Tag Tournament 1 &#8211; looks more or less like Bryan &#8211; some hue issues here and there.<\/figcaption><\/figure>\n<figure id=\"attachment_84\" aria-describedby=\"caption-attachment-84\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/libretro.pchat.x10.mx\/wp-content\/uploads\/2013\/05\/modelviewer-law-tekken6.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-84\" alt=\"Marshall Law model from Tekken 6\" src=\"http:\/\/libretro.pchat.x10.mx\/wp-content\/uploads\/2013\/05\/modelviewer-law-tekken6.jpg?w=300\" width=\"300\" height=\"232\" srcset=\"https:\/\/www.libretro.com\/wp-content\/uploads\/2013\/05\/modelviewer-law-tekken6.jpg 958w, https:\/\/www.libretro.com\/wp-content\/uploads\/2013\/05\/modelviewer-law-tekken6-300x232.jpg 300w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-84\" class=\"wp-caption-text\">Marshall Law model from Tekken 6<\/figcaption><\/figure>\n<p><strong>Platforms<\/strong><\/p>\n<p>Model Viewer right now runs on:<\/p>\n<ul>\n<li>PC (Windows\/UNIX\/OSX)<\/li>\n<li>Android<\/li>\n<li>iOS<\/li>\n<li>Blackberry QNX (BB10\/Playbook)<\/li>\n<\/ul>\n<p>The maximum supported internal resolution at which you can render the models depends on the platform you&#8217;re running Model Viewer on. On the mobile platforms we have consciously decided to set the maximum supported resolution at 1024&#215;768 &#8211; this should be the native resolution of the iPad 2\/iPad Mini and it is doubtful that even on a powerful tablet you&#8217;d have much need for 1080p internal resolution anyway.<\/p>\n<p>On PC 1920&#215;1600 is the maximum internal resolution at which you can render these models.<\/p>\n<p>Like all the non-GL based libretro cores, you can apply any amount of shaders that you want.<\/p>\n<p>Model links<\/p>\n<p>I&#8217;m not exactly sure how hard-ball game developers are when it comes to these models &#8211; but anyways, there is a lot of source material you can find on the Internet.<\/p>\n<p>Some places that supply them is DeviantArt (search for DeviantArt + XNALara-\u00c2\u00a0 that should show up a bunch).<\/p>\n<p>Another site that I\u00e2\u20ac\u2122ve found includes a lot of useful models is this one (<a href=\"http:\/\/thefree3dmodels.com\/\" rel=\"nofollow\">http:\/\/thefree3dmodels.com\/<\/a>). Make sure that when downloading a model form there, that it says \u00e2\u20ac\u02dcOBJ\u00e2\u20ac\u2122 or something similar. Models that are not in this format can\u00e2\u20ac\u2122t be expected to run right now.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By Squarepusher As a showcase for libretro GL, maister made two quite nice libretro cores that should appeal to demo coders and traditional game developers alike. Model Viewer I encouraged Maister to do a libretro GL port of an old project he made a year ago (Model Viewer) as a showcase for libretro GL. The [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[10,28,2,5],"tags":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.libretro.com\/index.php\/wp-json\/wp\/v2\/posts\/79"}],"collection":[{"href":"https:\/\/www.libretro.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.libretro.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.libretro.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.libretro.com\/index.php\/wp-json\/wp\/v2\/comments?post=79"}],"version-history":[{"count":1,"href":"https:\/\/www.libretro.com\/index.php\/wp-json\/wp\/v2\/posts\/79\/revisions"}],"predecessor-version":[{"id":263,"href":"https:\/\/www.libretro.com\/index.php\/wp-json\/wp\/v2\/posts\/79\/revisions\/263"}],"wp:attachment":[{"href":"https:\/\/www.libretro.com\/index.php\/wp-json\/wp\/v2\/media?parent=79"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.libretro.com\/index.php\/wp-json\/wp\/v2\/categories?post=79"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.libretro.com\/index.php\/wp-json\/wp\/v2\/tags?post=79"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}