<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Cyril Hong on Medium]]></title>
        <description><![CDATA[Stories by Cyril Hong on Medium]]></description>
        <link>https://medium.com/@cyrilhong?source=rss-df282d1cee87------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*DuC_t678nEei0pkj.</url>
            <title>Stories by Cyril Hong on Medium</title>
            <link>https://medium.com/@cyrilhong?source=rss-df282d1cee87------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 10:27:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@cyrilhong/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[在A-frame中導入自己的3D Model]]></title>
            <link>https://medium.com/@cyrilhong/%E5%9C%A8a-frame%E4%B8%AD%E5%B0%8E%E5%85%A5%E8%87%AA%E5%B7%B1%E7%9A%843d-model-9b921fde3ca0?source=rss-df282d1cee87------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b921fde3ca0</guid>
            <category><![CDATA[a-frame]]></category>
            <category><![CDATA[gltf]]></category>
            <category><![CDATA[sketchfab]]></category>
            <category><![CDATA[3d-models]]></category>
            <category><![CDATA[export-model]]></category>
            <dc:creator><![CDATA[Cyril Hong]]></dc:creator>
            <pubDate>Wed, 31 Jan 2018 10:00:11 GMT</pubDate>
            <atom:updated>2018-01-31T10:00:11.223Z</atom:updated>
            <content:encoded><![CDATA[<p>在A-frame這個工具中遇到了許多奇怪且無法解釋的glTF相容問題，寫一篇文解救遇到此問題的人。</p><p>使用工具有：</p><ol><li><a href="https://github.com/">github-page</a>（放專案的地方）</li><li><a href="https://www.sketchup.com/">Sketchup</a> （製作3D Model）</li><li><a href="https://extensions.sketchup.com/en/content/gltf-exporter">glTF Export</a>（輸出標準glTF 2.0的模型）</li></ol><p>在A-Frame 學院的12.3章節中，教材有提到：</p><blockquote>加入 3D 模型 — 上傳 3D 模型</blockquote><blockquote>如果你自己建了個 3D 模型，由於當中牽扯許多相互參照的素材或檔案，想要丟上 CDN 來使用可能有點麻煩。 目前我們發現最簡單的方法是直接把東西丟進 GitHub repo、將該 repo 的 master 分支發布為 GitHub Pages， 接著使用 rawgit.com 來存取。或者，也可以選擇丟上 Amazon S3。日後這一頁會加上其他相關資訊。</blockquote><p>好，在官方推薦的標準glTF 3D模型下載平台中，推薦了<a href="https://sketchfab.com/models?sort_by=-likeCount">Sketchfab</a>，我們試著下載一個模型並且放在專案裡</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zrwbkXHTfR9yAbDt5yMeFg.png" /></figure><p>比如說拿這個頭來比喻</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UuvxgzdnILZ5kHL3iHfWGg.png" /></figure><p>放到專案資料夾中</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*IHH8Hu5031F7YAncbS50wQ.png" /></figure><p>在index.html裡放入剛剛的骷髏頭</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EZYTTutgbMIBqJJxu7YZ7g.png" /></figure><p>Guess what?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rNEQE_-uc1wBK8_LChG_xA.png" /></figure><p>得到了一片空白跟鬼才看得懂的error message</p><p>經過多次測試，證實從sketchfab下載的glTF跟A-Frame是不相容的，唯一的解法是：從sketchfab下載原始檔（Obj或是其他檔案類型），丟進Sketchup，再用外掛<a href="https://extensions.sketchup.com/en/content/gltf-exporter">glTF Export</a>輸出成glTF，就能成功。</p><p>還有一點很重要，確認你的aframe是7.1以後的版本</p><h4>&lt;script src=”<a href="https://aframe.io/releases/0.7.1/aframe.min.js">https://aframe.io/releases/0.7.1/aframe.min.js</a>&quot;&gt;&lt;/script&gt;</h4><p>以下是從sketchfab抓的模型</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dLtFNt21sWwxk1SsGIbfnA.png" /></figure><p>從Sketchup warehouse抓的也可以</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YnzxbgcZV0fjKWiDN5wTDA.png" /></figure><p>大致上從Sketchup轉存出來的glTF效果都不錯，不用考慮obj綁貼圖材質上傳到空間後的種種錯誤（有的model會掉材質:(），一個檔案處理所有的事。</p><p>有閒再來研究glTF 1.0跟2.0的差別。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b921fde3ca0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>