After I ask this question ,somebody tell me that what I want maybe is cubetexture(texturecube)? I am confuse that cubetexture is not designed for cubebox(hexahedron) only??!
Following are Initial question:
Recently,I came upon a unique way to get fluent 3D roaming experience on matterport’s Official network https://matterport.com/gallery/
I just want to know how did they do that because theire product is very fluent when swich the panorama picture.
After I roaming many times,I found that the panorama carrier they use is not box or sphere,but is the low quality model they show first!The evidence is that when switch the point,the object such as chair and table would have their own shadow(one chair have two image one stand up and the other one lie on the floorenter).With the object in panorama paste on their own correspond object and with depth information the roaming switch become more fluent (As for why they do not use the object directly ,I think because of the limited hardware,Many irregularity faces which get from scanning equipment cannot be use directlyenter )
And I want to use in my demo ,I have a group of six panorama which can paste on a boxGeometry perfectly,and I just want to paste them on model(low quality).but I stuck in project 360 degree.Yes I just find how to project one direction but I cannot project the remaining five.
var _p=BufferGeometry.attributes;
for (var i = 0; i < _p.position.count; i++){
var uvtempbeforeconvert= ( new THREE.Vector3(_p.position.array[3*i],_p.position.array[3*i+1],_p.position.array[3*i+2]) ).clone().applyMatrix4(houseObject.matrixWorld).project(camera1)
//use the worldvertices to get its screen coordinate
if(uvtempbeforeconvert.x<1&&uvtempbeforeconvert.x>-1 && uvtempbeforeconvert.y<1 &&uvtempbeforeconvert.y>-1) {
VerticesArray1.push(_p.position.array[3*i],_p.position.array[3*i+1],_p.position.array[3*i+2]);uvArray1.push(uvtempbeforeconvert.x*0.5+0.5,uvtempbeforeconvert.y*0.5+0.5);
//change the uvof vertices in right frustrum
Currently I can only calculate one direction.BUT I can‘t deal with the triangle faces which occupy two or more view frustum,like a face at the edge of the box.
How should I deal with this problem?Or I run in the FALSE direction at first?Which direction should i run in ?
Thanks in advance!