1 / 11

XSPH Fluid Plugin

XSPH Fluid Plugin. F070370 1 50703790 14 潘哲融. Goals And Achievements. Design a fluid plugin fit for both game and research 。 Reach Real-time performance on average hardware 。 Fully utilize Programmable Pipeline and Cuda on modern hardware 。 No cpu participation , no gpu-cpu data transfer 。

emelda
Télécharger la présentation

XSPH Fluid Plugin

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. XSPH Fluid Plugin F0703701 5070379014 潘哲融

  2. Goals And Achievements Design a fluid plugin fit for both game and research。 Reach Real-time performance on average hardware。 Fully utilize Programmable Pipeline and Cuda on modern hardware。 No cpu participation,no gpu-cpu data transfer。 Convenient OGL/D3D integration。 No overhead integrating OGL/D3D。 Dynamic fluid/boundary addition/deletion。 Boundary throw mesh file voxelization。 Very fast voxelization schema utilizing GPU rasterization and Cuda。 On time vertex process in most cases。 Both CPU/GPU version fully optimized。 Stable Simulation by implementing various adjustment on simulation algorithm。 Lightening fast collision detection while still memory friendly。

  3. Outline • The System Structure • Collision Detection Algorithm • Hardware Data Structure And Stream • Fluid Simulation • Voxelization Schema

  4. Collision Detection • Limitation And Assumption: • Only limited world size。 • Not continuous collision detection。 • Naïve Implementation: • Use a grid and every particle put in it on one frame • √:fastest in distribution and search。 • ×:memory intensive O(n*m)where n is particle count and m is grid count。

  5. Collision Detection • A Simple Improvement: • Use a linked-list to represent particles。 • √:Much more memory friendly。 • ×:Not Suitable For Simd Architecture Or Cuda Process。 • Our Method: • Memory consumption same as above。 • A little slower than first implementation。

  6. Collision Detection • Our Method: • First tag particle 1~n。 • Calculate grid for every particle and the hash val。 • Perform Key-Value bucket radix-sort which is very fast on cuda。 • Find for each hash the particles in it。 • After simulation frame update,resort particle to 1~n • Only overhead is radix-sort,we have been confirmed that for one billion data,a GTX 480 can handle in less than a second。

  7. Data Structure And Data Stream • Data are mainly particle attribute structure。 • We design the structure by the following principle: • Particle position as the first member so that the continuous memory space can be used as opengl vbo or d3d vertex stream。 • The whole structure and every member is 128bit aligned for cuda and sse。 • Every data memory has its gpu/cpu version and they work separatly unless user reset。

  8. Data Structure And Data Stream • We consider the data stream in gpu case when voxelization is involved。 • On every frame in opengl case: • First voxel data is read from mesh。 • Voxelizer parse the mesh and voxel into gl texture。 • For every texture a PBO is created and mapped to cuda memory。 • Cuda output to another cuda memory as particle cache。 • The above memory cache is mapped to opengl vbo and rendered afterwards。

  9. Fluid Simulation • Basic Algor On: • PDF - Predictive-Corrective Incompressible SPH • Implement Pressure Correction On: • Simulating Free Surface Flows with SPH • Implement Sound Correction On: • Load Balanced Parallel Simulation of Particle-Fluid DEM-SPH ... • Leapfrog Schema For Updation。

  10. Voxelization Schema • Our Method: • Shader Based Skinned Mesh Updation。 • Shader Pass Voxelization Using Slicemap: • Fast Scene Voxelisation. • Cuda pass voxelization filling: • Every Cuda process manage a fragment in slice map。traversal throw every bit,for a bit inside the model,add a boundery particle in particle cache。 • Use Logic-Op to handle the case when start and end of a segment falls into the same grid。 • Watertight required in this schema。

  11. THANK YOU!

More Related