TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Fun with compute shaders and fluid dynamics

141 点作者 TsukiZombina超过 6 年前

8 条评论

goldenkey超过 6 年前
The idea to put input energy via the mouse is nifty. Nice work!<p>I dont think vertex buffers are the ideal storage mechanism for lattice methods. I used Cuda to rasterize a plain buffer but I have two GPUs, the one doing the sim wasn&#x27;t the one rendering. Its better this way if you are looking to run the sim 1000s of cycles per sec, but only render 60 fps. Theres a lot of extra data that could be eliminated by simply using a linear block of memory versus a vertex buffer. Depending on the goals for the sim, efficient rendering should be a lesser priority than efficient simulation speed.<p>Here are two very similar frameworks I made for exploring parallelizable lattice sims:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;churchofthought&#x2F;HexagonalComplexAutomata" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;churchofthought&#x2F;HexagonalComplexAutomata</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;churchofthought&#x2F;ScatterLife" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;churchofthought&#x2F;ScatterLife</a> (Note: the video is of a skewed version due to hexagonal lattice coords - this is fixed in the latest commits)<p>To OP, you may enjoy the study of transformation between Cellular Automata and Partial Differential Eqs.<p>The PDF below is a gem, a good introduction to the techniques that will allow you to take any reasonable PDEs and produce CAs that produce equivalent dynamics:<p>Cellular Automata, PDEs, and Pattern Formation <a href="https:&#x2F;&#x2F;drive.google.com&#x2F;file&#x2F;d&#x2F;13cT_BU8LAaUK4KTYFfhVSpCVCmrWCkDA&#x2F;view?usp=drivesdk" rel="nofollow">https:&#x2F;&#x2F;drive.google.com&#x2F;file&#x2F;d&#x2F;13cT_BU8LAaUK4KTYFfhVSpCVCmr...</a>
评论 #18872236 未加载
tehsauce超过 6 年前
Love the use of compute shaders and interactivity! If anyone&#x27;s interested, here&#x27;s a very concise high-fidelity (3D with a volumetric renderer) fluid simulation I implemented in cuda. No frills (600 LOC), but pretty pictures! <a href="https:&#x2F;&#x2F;github.com&#x2F;PWhiddy&#x2F;Fat-Clouds&#x2F;blob&#x2F;master&#x2F;README.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;PWhiddy&#x2F;Fat-Clouds&#x2F;blob&#x2F;master&#x2F;README.md</a>
评论 #18872275 未加载
pcwalton超过 6 年前
Here&#x27;s another classic article about fluids on the GPU: <a href="http:&#x2F;&#x2F;developer.download.nvidia.com&#x2F;books&#x2F;HTML&#x2F;gpugems&#x2F;gpugems_ch38.html" rel="nofollow">http:&#x2F;&#x2F;developer.download.nvidia.com&#x2F;books&#x2F;HTML&#x2F;gpugems&#x2F;gpug...</a><p>It&#x27;s significantly older, but it&#x27;s still good and it goes into the details for those (like me) who don&#x27;t have a background in fluid dynamics. I had a lot of fun implementing it on the side a while back.
评论 #18877288 未加载
Agentlien超过 6 年前
This really brought back memories and put a smile on my face. My Master&#x27;s thesis was writing a fluid simulation on the GPU, also using OpenGL (with all work done in GLSL fragment shaders) and also restricting simulation to 2D (because I was specifically simulating fluid running across a surface).<p>The most interesting thing to me was how much this article resonated with my own experiences in GPU-based particle simulation. I instead went for a particle-based method and had to make do with the state of GPU hardware and drivers as they were back in 2011. But despite the difference in computational model and all the differences stemming from the evolution of GPUs and compute shaders, the main struggles are still the same: discretization and parallelization.
saagarjha超过 6 年前
Is there a reason the article is linked to #fnref3? I&#x27;m not seeing anything in particular there that is being called out.
LeanderK超过 6 年前
It&#x27;s always a fun moment when you realize he&#x27;s at the same university and might be sitting next to you right now. Especially because it&#x27;s a rare occurence to see the KIT here. It makes you appreciate your education more (and also a bit humble...).
scitamehtam超过 6 年前
Wow, great to see this classic from my dynamics days,<p>(∂t​+ξ⋅∂x​+ρF​⋅∂ξ​)f=Ω(f)(=∂x​f⋅dtdx​+∂ξ​f⋅dtdξ​+∂t​f)<p>Brings back many great memories.
vectorEQ超过 6 年前
this is a really awsome article to get going with this stuff, thanks a lot!!