SpiderPig Posted January 7 Share Posted January 7 Been working on streaming voxel terrain and I'm pretty happy with the results so far. Nearly completed the streamer class. Each tile below is a 1024x1024 r16 heightmap. The area in view is about 50km2. The red tiles are tiles I've removed from the dataset because each pixel in those maps are zero (below the water surface). The test data set I made is a grid of 120x120 tiles which was 14,400 heightmaps files. However after removing all the tiles that were of zero height it became about 5,600 tiles. About 10GB all up. Should be able to compress that in a zip but will need to do more testing yet... was giving mixed results. Simple to set up. void CreateStreamingVoxelTerrain() { voxel_brush = CreateVoxelBrush(); voxel_brush->SetSurfaceFunction(CalculateTerrainSurface); voxel_world = CreateVoxelWorld(world, 1024, 16.0f, 7); voxel_world->EnableStreaming(true, "Maps\\Data"); voxel_world->SetDimensions(490000.0f, 1617.0f, 490000.0f); voxel_world->FlipY(); voxel_world->AddBrush(voxel_brush); voxel_world->AddObserver(camera); voxel_world->DrawVoxelObjectBounds(); voxel_world->DrawPatchBounds(); voxel_world->DrawBounds(); } 3 Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted January 12 Author Share Posted January 12 Took a few days but I now have high res normal maps generated on the fly as patch's of real-world heightmap data are streamed in. Need to get multithreading working now as its a bit slow. Materials are painted based on slope in the shader. Still loads of work to do there too. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.