Showing the changes to interface/src/VoxelSystem.cpp (1 of 1 file). Show all
Unified · Split
| @@ -1815,13 +1815,8 @@ void VoxelSystem::hideOutOfView() { · 1814 unmodified lines | |||
| 1815 | 1815 | ||
| 1816 | const bool wantViewFrustumDebugging = false; // change to true for additional debugging | 1816 | const bool wantViewFrustumDebugging = false; // change to true for additional debugging |
| 1817 | if (wantViewFrustumDebugging) { | 1817 | if (wantViewFrustumDebugging) { |
| 1818 | printf("\n\n----------thisViewFrustum----------\n"); | ||
| 1819 | args.thisViewFrustum.printDebugDetails(); | 1818 | args.thisViewFrustum.printDebugDetails(); |
| 1820 | 1819 | if (_culledOnce) { | |
| 1821 | if (!_culledOnce) { | ||
| 1822 | printf("\n\n----------NOT YET CULLED !!!!----------\n"); | ||
| 1823 | } else { | ||
| 1824 | printf("\n\n----------lastViewFrustum----------\n"); | ||
| 1825 | args.lastViewFrustum.printDebugDetails(); | 1820 | args.lastViewFrustum.printDebugDetails(); |
| 1826 | } | 1821 | } |
| 1827 | } | 1822 | } |
| @@ -1836,35 +1831,14 @@ void VoxelSystem::hideOutOfView() { · 8 unmodified lines | |||
| 1836 | // | 1831 | // |
| 1837 | // 1) This might work well for rotating, but what about moving forward? | 1832 | // 1) This might work well for rotating, but what about moving forward? |
| 1838 | // in the move forward case, you'll get new voxel details, but those | 1833 | // in the move forward case, you'll get new voxel details, but those |
| 1839 | // new voxels will be in the last view... does that work? | 1834 | // new voxels will be in the last view... does that work? This works |
| 1835 | // ok for now because voxel server resends them and so they get redisplayed, | ||
| 1836 | // but this will not work if we update the voxel server to send less data. | ||
| 1840 | // | 1837 | // |
| 1841 | // 2) what about voxels coming in from the network that are OUTSIDE of the view | 1838 | // 2) what about voxels coming in from the network that are OUTSIDE of the view |
| 1842 | // frustum... they don't get hidden... and so we can't assume they are correctly | 1839 | // frustum... they don't get hidden... and so we can't assume they are correctly |
| 1843 | // hidden... we could solve this with checking in view on voxelUpdated... | 1840 | // hidden... we could solve this with checking in view on voxelUpdated... |
| 1844 | // | 1841 | // |
| 1845 | // 3) this seems to mostly work for a few minutes, then it starts to break after some period of time?? | ||
| 1846 | // and is it related to what appears to be the view changing even when stationary...??? | ||
| 1847 | // | ||
| 1848 | // 4) if something goes wrong it stays wrong? unless new packets come from network... why aren't those redrawing... | ||
| 1849 | // | ||
| 1850 | // consider doing false colorization... | ||
| 1851 | // | ||
| 1852 | // What if we kept track of which voxels were visible, and iterated them in an array instead of in the tree? | ||
| 1853 | // would that be faster? seems like it wouldn't be. | ||
| 1854 | |||
| 1855 | // | ||
| 1856 | // What's working well now.... | ||
| 1857 | // Fast Voxel Pipeline + normal Remove Out Of View... | ||
| 1858 | // this fails when you spin around, it will just have a big blank spot... | ||
| 1859 | // you also see flashes of white/no voxels in areas you've already been | ||
| 1860 | // | ||
| 1861 | // When you add Don't Remove Out of View voxels... | ||
| 1862 | // works OK... but... it loads up too many voxels... | ||
| 1863 | // and frame rate drops... | ||
| 1864 | // | ||
| 1865 | // We'd like to add in hide/show... but things break... See above. | ||
| 1866 | // this is the problem... SOLVE this problem... | ||
| 1867 | |||
| 1868 | _tree->recurseTreeWithOperation(hideOutOfViewOperation,(void*)&args); | 1842 | _tree->recurseTreeWithOperation(hideOutOfViewOperation,(void*)&args); |
| 1869 | _lastCulledViewFrustum = args.thisViewFrustum; // save last stable | 1843 | _lastCulledViewFrustum = args.thisViewFrustum; // save last stable |
| 1870 | _culledOnce = true; | 1844 | _culledOnce = true; |
| @@ -1874,7 +1848,6 @@ void VoxelSystem::hideOutOfView() { · 3 unmodified lines | |||
| 1874 | setupNewVoxelsForDrawingSingleNode(DONT_BAIL_EARLY); | 1848 | setupNewVoxelsForDrawingSingleNode(DONT_BAIL_EARLY); |
| 1875 | } | 1849 | } |
| 1876 | 1850 | ||
| 1877 | |||
| 1878 | if (showDebugDetails) { | 1851 | if (showDebugDetails) { |
| 1879 | qDebug("hideOutOfView() scanned=%ld removed=%ld inside=%ld intersect=%ld outside=%ld\n", | 1852 | qDebug("hideOutOfView() scanned=%ld removed=%ld inside=%ld intersect=%ld outside=%ld\n", |
| 1880 | args.nodesScanned, args.nodesRemoved, args.nodesInside, | 1853 | args.nodesScanned, args.nodesRemoved, args.nodesInside, |