#gWater 2D

1 messages · Page 1 of 1 (latest)

sick quail
#

Now that's interesting.

#

It makes me wonder how optimized it could be made

#

@brazen mica did some performance benchmarking around particles using multiple tables for each particle and referencing them by a common index across those tables and the results were pretty noteworthy

#

I wonder if that same technique, and others, could be used to make this run faster

#

At this timescale, any speed-up could potentially make a large difference in the total processing time

#

Also, consider using IVideoWriter to more directly output the rendered frames

brazen mica
somber onyx
#

in the video I followed along with, each particle is tracked in a grid the size of the particles "smoothing radius" and only neighboring particles in a 3x3 grid around it are tested

#

if that makes sense

#

idk if that's similar to the optimization you're interested in. I implemented it already but I think Lua is just slow compared to C#

#

this is the video I followed along with, the math goes over my head

somber onyx
somber onyx
sick quail
#

Nested tables are bad for performance

somber onyx
#

ok, a major part of the performance loss was because I forgot to implement the grid optimization when calculating the density 🤦

somber onyx
brazen mica
#

I gave up trying to do complex simulations in gmod, can't also use multithreading so that takes a good chunk away of what could be possible

somber onyx
#

im only doing this for the experience, I want to move away from gmod but so far it's the only thing I know well

#

I don't want to have to familiarize myself with an engine or new language to try this stuff

brazen mica
#

i get that, however you will eventually realize the limitations 😛

#

and yeah gmod is a good playing field to try stuff

somber onyx
brazen mica
sick quail
#

Can you make the particles impart force on the cube?

#

It would be cool to have them slosh around and move the cube like liquids do in containers