Statistics | We have 1675 registered users The newest registered user is dejo123
Our users have posted a total of 30851 messages in 1411 subjects
|
Who is online? | In total there are 4 users online :: 0 Registered, 0 Hidden and 4 Guests :: 1 Bot None Most users ever online was 443 on Sun Mar 17, 2013 5:41 pm |
Latest topics | » THIS FORUM IS NOW OBSOLETE by NickTheNick Sat Sep 26, 2015 10:26 pm
» To all the people who come here looking for thrive. by NickTheNick Sat Sep 26, 2015 10:22 pm
» Build Error Code::Blocks / CMake by crovea Tue Jul 28, 2015 5:28 pm
» Hello! I can translate in japanese by tjwhale Thu Jul 02, 2015 7:23 pm
» On Leave (Offline thread) by NickTheNick Wed Jul 01, 2015 12:20 am
» Devblog #14: A Brave New Forum by NickTheNick Mon Jun 29, 2015 4:49 am
» Application for Programmer by crovea Fri Jun 26, 2015 11:14 am
» Re-Reapplication by The Creator Thu Jun 25, 2015 10:57 pm
» Application (programming) by crovea Tue Jun 23, 2015 8:00 am
» Achieving Sapience by MitochondriaBox Sun Jun 21, 2015 7:03 pm
» Microbe Stage GDD by tjwhale Sat Jun 20, 2015 3:44 pm
» Application for Programmer/ Theorist by tjwhale Wed Jun 17, 2015 9:56 am
» Application for a 3D Modeler. by Kaiju4u Wed Jun 10, 2015 11:16 am
» Presentation by Othithu Tue Jun 02, 2015 10:38 am
» Application of Sorts by crovea Sun May 31, 2015 5:06 pm
» want to contribute by Renzope Sun May 31, 2015 12:58 pm
» Music List Thread (Post New Themes Here) by Oliveriver Thu May 28, 2015 1:06 pm
» Application: English-Spanish translator by Renzope Tue May 26, 2015 1:53 pm
» Want to be promoter or project manager by TheBudderBros Sun May 24, 2015 9:00 pm
» A new round of Forum Revamps! by Oliveriver Wed May 20, 2015 11:32 am
|
|
| [Microbe] Implementing compound and agent clouds | |
| | |
Author | Message |
---|
Nimbal Programming Team lead
Posts : 258 Reputation : 24 Join date : 2013-03-17 Age : 40 Location : Ratingen, Germany
| Subject: Re: [Microbe] Implementing compound and agent clouds Tue Jun 18, 2013 12:53 pm | |
| Using a hex-grid instead of rectangular wouldn't gain us much (anything?), but will complicate the algorithms involved. For example, how would you discretize the differential equations for fluid movement on a hex-grid? For rectangular grids, it's straight-forward with x and y coordinates. For hexagons, I'm not even sure it's possible. | |
| | | ~sciocont Overall Team Lead
Posts : 3406 Reputation : 138 Join date : 2010-07-06
| Subject: Re: [Microbe] Implementing compound and agent clouds Tue Jun 18, 2013 1:15 pm | |
| - Nimbal wrote:
- Using a hex-grid instead of rectangular wouldn't gain us much (anything?), but will complicate the algorithms involved. For example, how would you discretize the differential equations for fluid movement on a hex-grid? For rectangular grids, it's straight-forward with x and y coordinates. For hexagons, I'm not even sure it's possible.
No, i was referring to using the hexgrid shape of a microbe to determine how it interacts with the environment- I'm well aware that using hexgrids for differential equations would be useless and at least mind-boggling. | |
| | | Nimbal Programming Team lead
Posts : 258 Reputation : 24 Join date : 2013-03-17 Age : 40 Location : Ratingen, Germany
| Subject: Re: [Microbe] Implementing compound and agent clouds Tue Jun 18, 2013 1:18 pm | |
| Oh, sorry. The actual resolution of the grid, how many particles (if any) we use, etc. will be easily tweakable later on. If we go with a pure gridbased method, 40px will be pretty coarse. As a supporting grid for a particle approach it might be fine, though. In the end, we'll probably want to use a non-uniform grid anyway, so the actual resolution won't matter much. | |
| | | Tritium Newcomer
Posts : 90 Reputation : 15 Join date : 2013-03-18 Age : 34
| Subject: Re: [Microbe] Implementing compound and agent clouds Tue Jun 18, 2013 2:15 pm | |
| Nimbal - Quote :
- Actually, your polygonal method is very close to SPH (which I really wouldn't call brute force, considering that grid based methods usually simulate just as many particles, only in a static way).
I also discovered an excellent series of articles about fluid simulation here, which discusses a whole other class of algorithms, based on "vortons". The video demonstrating the visual results of that algorithm shows a fantastic level of detail for bodies moving inside the fluid. I think that's exactly what we need. Now that was a mind-blowing video. I'm really far away from programming but this looked beautiful! | |
| | | Nimbal Programming Team lead
Posts : 258 Reputation : 24 Join date : 2013-03-17 Age : 40 Location : Ratingen, Germany
| Subject: Re: [Microbe] Implementing compound and agent clouds Mon Jul 08, 2013 2:04 pm | |
| Just as a small update, I've decided to put fluid dynamics on ice for now. I'll definitely revisit it once we have fleshed out the gameplay a bit more, because ultimately, it's a visual gimmick, not something that will influence gameplay in a dramatic way. For the first versions, I'd like the agents to be represented by small, discrete particles with the following behaviour:
- Simple movement: when spawned, they get an initial impulse. Due to viscosity, they will slow down over time and eventually stop.
- Simple collision: Agent particles do not collide with each other
- Limited lifetime: After a set amount of time, agent particles just disappear.
- Simple microbe interaction: when an agent particle touches a microbe that can interact with the agent, the particle disappears.
Implementing this kind of agent behaviour will give us an idea on how agents will fit in with the gameplay. Going from the simple movement described above to eye-candy fluid dynamics won't be too difficult. The fluid dynamics simulation will calculate the velocity field of the water the agents are swimming in. Then all we need to do is move the particles according to that velocity field. | |
| | | ~sciocont Overall Team Lead
Posts : 3406 Reputation : 138 Join date : 2010-07-06
| Subject: Re: [Microbe] Implementing compound and agent clouds Mon Jul 08, 2013 3:32 pm | |
| Thanks for the update. As I understand it then, you want to keep the discrete particle method for at least the first few iterations, with possible forays into other methods saved for when we have the time. Correct? | |
| | | moopli Developer
Posts : 318 Reputation : 56 Join date : 2013-09-30 Age : 29 Location : hanging from the chandelier
| Subject: Re: [Microbe] Implementing compound and agent clouds Sat Jun 14, 2014 10:30 am | |
| Methinks it's time to revive this thread. Why?
I'm seeing mention of SPH, LBM, and other true fluid-sim methods, which is nice because they work. However,they're all designed to provide realistic results in the macroscopic size regime. I noticed that someone was worried about what would happen if a microbe squirted some water into an agent cloud -- if we want to simulate the possibility, then it makes sense that we'll want a proper fluid sim.
However, and this is a big however, water doesn't squirt like that at microbe sizes. There's a reason it's known as the inertia-free size regime -- viscosity effects dominate so heavily that nothing can coast -- neither a microbe, or a bunch of water. Thus, we don't really need a fluid sim (yet) that is as fully-featured as SPH et al.
Instead, I've been touting recently the use of curl noise; since all we need is a divergence-free turbulence field -- or perhaps several, layered at different scales. Then, we just advect the density field for each compound through that noise field, using diffusion coefficients to scale the effect.
(For some perspective, glucose, with a diffusion coefficient of 5e-6 diffuses about 32 microns in one second, which is just about cell size)
Edit: Technically though, we wouldn't be using diffusion coefficients directly, but derive an "advection coefficient" of sorts, since we're scaling the speed along a wonky path, while the diffusion coefficient is calculated in terms of straight-line speed; so we use the diffusion equation.
Last edited by moopli on Sat Jun 14, 2014 10:37 am; edited 1 time in total (Reason for editing : for correctness) | |
| | | ~sciocont Overall Team Lead
Posts : 3406 Reputation : 138 Join date : 2010-07-06
| Subject: Re: [Microbe] Implementing compound and agent clouds Mon Jun 16, 2014 7:19 pm | |
| You're right in that we weren't properly understanding our reference scale in previous discussions of fluid dynamics integration, and implementing it more realistically along the lines you suggested looks like it would not only prove more realistic, but also be less difficult. The webpage for diffusion coefficients you linked is great, since that should help us a lot in balancing diffusion times in the game.
How exactly were you imagining this all to work? Are the compounds discrete particles, zones of concentration, or something else? What are the effects, if any, of the fluid environment on cell movement?
Beyond those questions, there's also the problem of playability. If we make the environment too noisy, movement becomes frustrating, so we may have to make the environment flow a bit more than is really scientifically accurate. | |
| | | moopli Developer
Posts : 318 Reputation : 56 Join date : 2013-09-30 Age : 29 Location : hanging from the chandelier
| Subject: Re: [Microbe] Implementing compound and agent clouds Mon Jun 16, 2014 7:27 pm | |
| I was thinking we'd have two layers of curl noise -- one high-frequency, for making pretty-looking compound diffusion, and one low-frequency, for moving microbes and other large things around. Compounds, stored as concentration grids, are moved by both layers, while the larger stuff ignores the high-freq layer. As for scientific accuracy, we're actually pushing turbulence a little too low on the size scale to be perfectly accurate. So the low-frequency noise layer can approximate the scientifically accurate minimum vortex size (probably on the smaller end), as that way we can have a drifting player microbe change direction often enough to make currents noticeable (vortex size about half a screen at smallest); while the high-frequency layer is just a graphics decision -- it looks prettier than brownian motion.
Last edited by moopli on Mon Jun 16, 2014 7:34 pm; edited 2 times in total (Reason for editing : added note on scientific accuracy) | |
| | | ~sciocont Overall Team Lead
Posts : 3406 Reputation : 138 Join date : 2010-07-06
| Subject: Re: [Microbe] Implementing compound and agent clouds Mon Jun 16, 2014 8:27 pm | |
| - moopli wrote:
- I was thinking we'd have two layers of curl noise -- one high-frequency, for making pretty-looking compound diffusion, and one low-frequency, for moving microbes and other large things around. Compounds, stored as concentration grids, are moved by both layers, while the larger stuff ignores the high-freq layer. As for scientific accuracy, we're actually pushing turbulence a little too low on the size scale to be perfectly accurate. So the low-frequency noise layer can approximate the scientifically accurate minimum vortex size (probably on the smaller end), as that way we can have a drifting player microbe change direction often enough to make currents noticeable (vortex size about half a screen at smallest); while the high-frequency layer is just a graphics decision -- it looks prettier than brownian motion.
Is the concentration grid global or based on a global grid? (a concentration grid underlying the entire map) Also, the two layers is a good idea. Do they interact directly or do only concentrations see effects from both large and small grids? | |
| | | moopli Developer
Posts : 318 Reputation : 56 Join date : 2013-09-30 Age : 29 Location : hanging from the chandelier
| Subject: Re: [Microbe] Implementing compound and agent clouds Mon Jun 16, 2014 8:41 pm | |
| The only input to either curl noise field is a scalar noise function -- ie, they don't affect each other, nothing affects them, the system is not actually dynamic, it just works well enough for our needs since the high-frequency noise is too high-frequency to apply any coherent force to large things, and everything is too small to cause any noticeable effect on the flow of the water. So yes, only concentrations are affected by both grids -- unless we come up with anything else super-tiny that we should treat similarly for prettiness' sake. Edit: - ~scio wrote:
- Is the concentration grid global or based on a global grid? (a concentration grid underlying the entire map)
Assuming first global meant to say local: there is no "entire map", the world is functionally infinite, as stuff will get deleted once you go far enough away and will be regenerated, probably differently, if you return. The concentration grid will extend over the entire area that is currently being simulated, which isn't gonna be too inefficient, as I've been looking into ways to make this work quickly.
Last edited by moopli on Mon Jun 16, 2014 8:45 pm; edited 1 time in total (Reason for editing : forgot something) | |
| | | ~sciocont Overall Team Lead
Posts : 3406 Reputation : 138 Join date : 2010-07-06
| Subject: Re: [Microbe] Implementing compound and agent clouds Mon Jun 16, 2014 8:58 pm | |
| That's what I wanted to know. | |
| | | Sponsored content
| Subject: Re: [Microbe] Implementing compound and agent clouds | |
| |
| | | | [Microbe] Implementing compound and agent clouds | |
|
Similar topics | |
|
| Permissions in this forum: | You cannot reply to topics in this forum
| |
| |
| |