this post was submitted on 25 Sep 2023
11 points (100.0% liked)

Game Development

3430 readers
7 users here now

Welcome to the game development community! This is a place to talk about and post anything related to the field of game development.

Community Wiki

founded 1 year ago
MODERATORS
 

I'm working on a simulation toy, and I want to model wind on my world/levels.

I'm currently using playrho (a box2d fork) with gravity set to 0 to model a top down view.

I assume the wind will be represented as a vector field. But I'm unsure what method to use to get this field.

Could someone point me in the right direction? Should I be looking at the navier-stokes equation? Does anybody know of any relevant tutorials?

Thanks in advance!

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 year ago* (last edited 1 year ago)

Adding to the other ideas here.

You could use a simpler analytical approach by overlapping a bunch of perlin noise functions. I've used this for pushing around gpu side particles and it looks sweet.

Yet another one is to go with a bunch of spheres that move around the level using whatever logic you want. They could even bounce off walls in their own physics world or collision layer. You can overlap their influences. I've used this for animating tree wind and it looked amazing. You can easily simulate gusts.

You can think of this as a simple way to localize influence.

You could even use a whole lot of them and combine them with perlin noise to define their volumes, which works a lot like volumetric clouds.

Happy to help further.