diff --git a/README.md b/README.md index ed1a1d0..7cd703a 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ About the splat file, please refer [antimatter15](https://github.com/antimatter1 - + diff --git a/dist/aframe-gaussian-splatting-component.min.js b/dist/aframe-gaussian-splatting-component.min.js index a57444b..3648ce8 100644 --- a/dist/aframe-gaussian-splatting-component.min.js +++ b/dist/aframe-gaussian-splatting-component.min.js @@ -45,8 +45,13 @@ AFRAME.registerComponent("gaussian_splatting",{schema:{src:{type:"string",defaul adjViewMatrix[2][1] *= -1.0; adjViewMatrix[3][1] *= -1.0; adjViewMatrix = inverse(adjViewMatrix); - mat4 modelMatrix_fixy = modelMatrix; + mat4 modelMatrix_fixy = inverse(modelMatrix); + modelMatrix_fixy[0][1] *= -1.0; + modelMatrix_fixy[1][0] *= -1.0; + modelMatrix_fixy[1][2] *= -1.0; + modelMatrix_fixy[2][1] *= -1.0; modelMatrix_fixy[3][1] *= -1.0; + modelMatrix_fixy = inverse(modelMatrix_fixy); mat4 modelView = adjViewMatrix * modelMatrix_fixy; vec4 camspace = modelView * center; diff --git a/dist/aframe-gaussian-splatting-component.min.js.map b/dist/aframe-gaussian-splatting-component.min.js.map index f5225a7..3aaaffc 100644 --- a/dist/aframe-gaussian-splatting-component.min.js.map +++ b/dist/aframe-gaussian-splatting-component.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["./index.js"],"names":["AFRAME","registerComponent","schema","src","type","default","init","this","el","sceneEl","renderer","setPixelRatio","fetch","data","then","blob","res","arrayBuffer","let","size","THREE","Vector2","focal","getSize","y","Math","tan","camera","components","fov","PI","u_buffer","Uint8Array","buffer","processPlyBuffer","vertexCount","floor","byteLength","f_buffer","Float32Array","matrices","console","log","centerAndScaleData","convAndColorData","Uint32Array","convAndColorData_uint8","convAndColorData_int16","Int16Array","i","quat","Quaternion","center","Vector3","scale","mtx","Matrix4","mtx_t","makeRotationFromQuaternion","transpose","clone","cov_indexes","premultiply","setPosition","max_value","j","length","abs","elements","destOffset","x","z","parseInt","centerAndScaleTexture","DataTexture","RGBA","FloatType","convAndColorTexture","needsUpdate","RGBAIntegerFormat","UnsignedIntType","camera_mtx","internalFormat","object3D","matrixWorld","view","splatIndexArray","sortSplats","splatIndexes","InstancedBufferAttribute","baseGeometry","setUsage","DynamicDrawUsage","BufferGeometry","positionsArray","positions","BufferAttribute","geometry","setAttribute","setXYZ","InstancedBufferGeometry","copy","instanceCount","material","ShaderMaterial","uniforms","viewport","value","vertexShader","fragmentShader","blending","CustomBlending","blendSrcAlpha","OneFactor","depthTest","depthWrite","transparent","window","addEventListener","mesh","Mesh","frustumCulled","add","worker","Worker","URL","createObjectURL","Blob","createWorker","toString","postMessage","sortFunction","onmessage","indexes","e","sortedIndexes","attributes","splatIndex","set","sortReady","tick","time","timeDelta","self","eval","maxDepth","Infinity","minDepth","depthList","sizeList","Int32Array","depth","depthInv","counts0","starts0","depthIndex","inputBuffer","ubuf","header","TextDecoder","decode","slice","header_end_index","indexOf","Error","exec","row_offset","offsets","types","prop","TYPE_MAP","double","int","uint","float","short","ushort","uchar","split","filter","k","startsWith","name","arrayType","replace","dataView","DataView","row","attrs","Proxy","get","target","opacity","sizeIndex","exp","scale_0","scale_1","scale_2","timeEnd","sort","b","a","ArrayBuffer","SH_C0","position","scales","rgba","Uint8ClampedArray","rot","qlen","sqrt","rot_0","rot_1","rot_2","rot_3","f_dc_0","f_dc_1","f_dc_2","red","green","blue"],"mappings":"AAAAA,OAAOC,kBAAkB,qBAAsB,CAC9CC,OAAQ,CACPC,IAAK,CAACC,KAAM,SAAUC,QAAS,aAAa,CAC7C,EACAC,KAAM,WACLC,KAAKC,GAAGC,QAAQC,SAASC,cAAc,CAAC,EAExCC,MAAML,KAAKM,KAAKV,GAAG,EAClBW,KAAK,MAAUD,KAAKE,KAAK,CAAC,EAC1BD,KAAK,KAASE,IAAIC,YAAY,CAAC,EAC/BH,KAAK,SACLI,IAAIC,KAAO,IAAIC,MAAMC,QAGfC,OAFNf,KAAKC,GAA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,OAAO,GAAK,IACZA,OAAO,GAAK,IAEZG,IAAI,GAAK,IACTA,IAAI,GAAK,EACTA,IAAI,GAAK,EACTA,IAAI,GAAK,GAGVJ,SAAS,GAAKhB,MAAMtH,EACpBsI,SAAS,GAAKhB,MAAMpK,EACpBoL,SAAS,GAAKhB,MAAMrH,EAEhBiG,MAAc,QAEjBsC,KAAK,GAAoC,KAA9B,IADLH,KAAQ,oBACWf,MAAM2B,QAC/BT,KAAK,GAAoC,KAA9B,GAAMH,KAAQf,MAAM4B,QAC/BV,KAAK,GAAoC,KAA9B,GAAMH,KAAQf,MAAM6B,UAE/BX,KAAK,GAAKlB,MAAM8B,IAChBZ,KAAK,GAAKlB,MAAM+B,MAChBb,KAAK,GAAKlB,MAAMgC,MAEbpD,MAAe,QAClBsC,KAAK,GAAM,GAAK,EAAIrL,KAAKyK,IAAI,CAACN,MAAMI,OAAO,GAAM,IAEjDc,KAAK,GAAK,GAEZ,CAEA,OADArK,QAAQ6J,QAAQ,cAAc,EACvBrK,MACR,CACD,CAAC"} \ No newline at end of file +{"version":3,"sources":["./index.js"],"names":["AFRAME","registerComponent","schema","src","type","default","init","this","el","sceneEl","renderer","setPixelRatio","fetch","data","then","blob","res","arrayBuffer","let","size","THREE","Vector2","focal","getSize","y","Math","tan","camera","components","fov","PI","u_buffer","Uint8Array","buffer","processPlyBuffer","vertexCount","floor","byteLength","f_buffer","Float32Array","matrices","console","log","centerAndScaleData","convAndColorData","Uint32Array","convAndColorData_uint8","convAndColorData_int16","Int16Array","i","quat","Quaternion","center","Vector3","scale","mtx","Matrix4","mtx_t","makeRotationFromQuaternion","transpose","clone","cov_indexes","premultiply","setPosition","max_value","j","length","abs","elements","destOffset","x","z","parseInt","centerAndScaleTexture","DataTexture","RGBA","FloatType","convAndColorTexture","needsUpdate","RGBAIntegerFormat","UnsignedIntType","camera_mtx","internalFormat","object3D","matrixWorld","view","splatIndexArray","sortSplats","splatIndexes","InstancedBufferAttribute","baseGeometry","setUsage","DynamicDrawUsage","BufferGeometry","positionsArray","positions","BufferAttribute","geometry","setAttribute","setXYZ","InstancedBufferGeometry","copy","instanceCount","material","ShaderMaterial","uniforms","viewport","value","vertexShader","fragmentShader","blending","CustomBlending","blendSrcAlpha","OneFactor","depthTest","depthWrite","transparent","window","addEventListener","mesh","Mesh","frustumCulled","add","worker","Worker","URL","createObjectURL","Blob","createWorker","toString","postMessage","sortFunction","onmessage","indexes","e","sortedIndexes","attributes","splatIndex","set","sortReady","tick","time","timeDelta","self","eval","maxDepth","Infinity","minDepth","depthList","sizeList","Int32Array","depth","depthInv","counts0","starts0","depthIndex","inputBuffer","ubuf","header","TextDecoder","decode","slice","header_end_index","indexOf","Error","exec","row_offset","offsets","types","prop","TYPE_MAP","double","int","uint","float","short","ushort","uchar","split","filter","k","startsWith","name","arrayType","replace","dataView","DataView","row","attrs","Proxy","get","target","opacity","sizeIndex","exp","scale_0","scale_1","scale_2","timeEnd","sort","b","a","ArrayBuffer","SH_C0","position","scales","rgba","Uint8ClampedArray","rot","qlen","sqrt","rot_0","rot_1","rot_2","rot_3","f_dc_0","f_dc_1","f_dc_2","red","green","blue"],"mappings":"AAAAA,OAAOC,kBAAkB,qBAAsB,CAC9CC,OAAQ,CACPC,IAAK,CAACC,KAAM,SAAUC,QAAS,aAAa,CAC7C,EACAC,KAAM,WACLC,KAAKC,GAAGC,QAAQC,SAASC,cAAc,CAAC,EAExCC,MAAML,KAAKM,KAAKV,GAAG,EAClBW,KAAK,MAAUD,KAAKE,KAAK,CAAC,EAC1BD,KAAK,KAASE,IAAIC,YAAY,CAAC,EAC/BH,KAAK,SACLI,IAAIC,KAAO,IAAIC,MAAMC,QAGfC,OAFNf,KAAKC,GAAGC,QAAQC,SAASa,QAAQJ,IAAI,EAEtBA,KAAKK,EAAI,EAAOC,KAAKC,IAAInB,KAAKC,GAAGC,QAAQkB,OAAOnB,GAAGoB,WAAWD,OAAOd,KAAKgB,IAAM,EAAMJ,KAAKK,GAAK,GAAK,GAEpHZ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L,SAAS,GAAKhB,MAAMrH,EAEhBiG,MAAc,QAEjBsC,KAAK,GAAoC,KAA9B,IADLH,KAAQ,oBACWf,MAAM2B,QAC/BT,KAAK,GAAoC,KAA9B,GAAMH,KAAQf,MAAM4B,QAC/BV,KAAK,GAAoC,KAA9B,GAAMH,KAAQf,MAAM6B,UAE/BX,KAAK,GAAKlB,MAAM8B,IAChBZ,KAAK,GAAKlB,MAAM+B,MAChBb,KAAK,GAAKlB,MAAMgC,MAEbpD,MAAe,QAClBsC,KAAK,GAAM,GAAK,EAAIrL,KAAKyK,IAAI,CAACN,MAAMI,OAAO,GAAM,IAEjDc,KAAK,GAAK,GAEZ,CAEA,OADArK,QAAQ6J,QAAQ,cAAc,EACvBrK,MACR,CACD,CAAC"} \ No newline at end of file diff --git a/index.html b/index.html index c639a22..9eeb895 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ - + diff --git a/index.js b/index.js index 1bd5ed0..8f75016 100644 --- a/index.js +++ b/index.js @@ -179,8 +179,13 @@ AFRAME.registerComponent("gaussian_splatting", { adjViewMatrix[2][1] *= -1.0; adjViewMatrix[3][1] *= -1.0; adjViewMatrix = inverse(adjViewMatrix); - mat4 modelMatrix_fixy = modelMatrix; + mat4 modelMatrix_fixy = inverse(modelMatrix); + modelMatrix_fixy[0][1] *= -1.0; + modelMatrix_fixy[1][0] *= -1.0; + modelMatrix_fixy[1][2] *= -1.0; + modelMatrix_fixy[2][1] *= -1.0; modelMatrix_fixy[3][1] *= -1.0; + modelMatrix_fixy = inverse(modelMatrix_fixy); mat4 modelView = adjViewMatrix * modelMatrix_fixy; vec4 camspace = modelView * center; diff --git a/package.json b/package.json index 4ff38e0..4960b83 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aframe-gaussian-splatting-component", - "version": "0.0.11", + "version": "0.0.12", "description": "This component is an A-Frame implementation of real-time rendering for '3D Gaussian Splatting for Real-Time Radiance Field Rendering'", "main": "index.js", "scripts": {