備忘錄_20160105(定位)
修改
回首頁
程式 2017-08-21 16:49:32 1503305372 100
用 Blender 3D 產生 360 立體照片
用 Blender 3D 產生 360 立體照片
- 開啟新專案
- 選用 Cycles Render
- 選取攝影機,在屬性視窗中,選取 Data 頁嵌
- 在 Lens 區塊,點選 Panoramic ,且Type選取 Equirectangular
- 輸出選擇 jpg,寬高比為2:1
- 建立模型與上色
- [F12]產生結果圖片
- 圖片另存新檔(*.jpg)
- 使用 Exif Fixer 填入 3D 訊息。圖片上傳到 Facebook 就可以 360 度旋轉
- 或是使用 Google Street 服務,讓照片可以 360 度旋轉。
若是用 google 街景服務的方式,請參考底下程式碼
<!DOCTYPE html>
<html>
<head>
<!-- Generated by street-sphere.appspot.com -->
<title>Photo Sphere Custom StreetView</title>
<meta charset="utf-8">
<script src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script>
function initPano() {
var panoOptions = {
pano: 'custom',
visible: true,
panoProvider: getCustomPanorama
};
var panorama = new google.maps.StreetViewPanorama(
document.getElementById('pano-canvas'), panoOptions);
}
function getCustomPanoramaTileUrl(pano, zoom, tileX, tileY) {
return 'your-photo.jpg';
}
function getCustomPanorama(pano, zoom, tileX, tileY) {
if (pano == 'custom') {
return {
location: {
pano: 'custom',
description: 'Custom Street View'
},
tiles: {
tileSize: new google.maps.Size( 1400 , 700 ),
worldSize: new google.maps.Size( 1400 , 700 ),
getTileUrl: getCustomPanoramaTileUrl
}
};
}
}
</script>
</head>
<body>
<div id="pano-canvas" style="height: 700px"></div>
<script
src="https://maps.googleapis.com/maps/api/js?signed_in=true&callback=initPano"
async defer>
</script>
</body>
</html>