#Updating a 3d array every frame, how to do it with bevy

7 messages · Page 1 of 1 (latest)

sudden saddle
#

I am currently working on some marching cubes, I have a working project where I can render a 3d world using marching cubes and some noise.
But I am facing some performances issues where I have to manually go through my entire 3d array to recreate the mesh and it is taking too much time.
I think I will make chunks and update small parts of my world later but still, do you know if it possible to do some things with bevy?

wheat compass
#

Could use a quadtree, octree, kdtree, etc. You just need some data structure that lets you query points more efficiently than checking every single point.

sudden saddle
#

yes that's what I was thinking, but imagine I want to simulate water on the entire world, I would have to check for almost every point and update them. But still, a tree could help if there is not a lot of it, thanks for your answer 🙂

#

The features I would want are removing/placing point from player pov, liquid simulation, and possibly making part of the world fall if separated from the ground

wheat compass
#

for example, you don't need to simulate hot temps in an ocean on the other side of the world to trigger a storm where the player is. My advice is to guestimate over simulate when you can.

sudden saddle
#

yeah you're right that's often the best choice, still a bit sad, because that would be cool to simulate something on an entire planet for example