View unanswered posts | View active topics It is currently Mon May 06, 2024 8:31 pm



Reply to topic  [ 111 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 8  Next
 Hydrodynamic Challenge! 
Author Message
User avatar

Joined: Mon Jun 04, 2007 5:55 am
Posts: 1627
Location: Ohio
Reply with quote
Post Re: Hydrodynamic Challenge!
zalo wrote:
Ah, but if you wanted to implement a deformable system like the one in Blast Miner into CC,
then you should implement it like it was implemented in Blast Miner.

For the deforming Simulation Part, you should still have that square grid, but have CC terrain inside the grid.
For the surface of the ground, the terrain would only fill up part of a square on the deforming grid.
For the mass of each square on the grid, it would measure the number of pixels in that square.

It would be a lot less computationally expensive than having infinitely detailed deforming objects.

Also, Vector Graphics are based on points. Control Points. They don't have any simulation advantages except
for they mess up really a lot when you bend the control points the wrong way. They are terrible for deforming
objects because either they mess up and fill the screen and glitch, or they look really cheesy.

Anyway, straight lines look pretty good: http://kotsoft.googlepages.com/blob.html


I dont want giant squares of water. the only way that level of 'deformation' works, is if each square was smaller than a pixel. and also, THE WORLD IS NOT ALL 90 DEGREE ANGLES!

Squares and circles are not the basis of anything, I intended vector graphics as simply point to point, all you have to do is add more and more points to add definition IE More lines, Just like 3d graphics (See polygon).


Use points to define an area, of any shape. I'm aiming for realistic physics not "ooh pretty"


Tue Mar 17, 2009 11:33 pm
Profile YIM WWW

Joined: Sat Feb 03, 2007 7:11 pm
Posts: 1496
Reply with quote
Post Re: Hydrodynamic Challenge!
There was also another method he told me of.

It involved a grid of cells, and the more particles closer together in a specific cell, the more pressure the cell would have.

The code then gets a density gradient of 5 cells (Top, left, Right, Down, and Middle) and determines
which direction is the lowest pressure.

It then the code give particles a force and the particles move from higher pressure to lower pressure.

This is what they call Smoothed Particle Hydrodynamics. The particles aren't directly interacting with each other,
but through the cells and pressure.... I think.

Also, I was referring to Cortex Command Terrain, not water, when I said that. It only bends along that grid, but it is hardly noticeable.

Did you mean a soft body that can break apart and recombine when you wanted water?


Tue Mar 17, 2009 11:47 pm
Profile WWW
User avatar

Joined: Fri May 11, 2007 4:30 pm
Posts: 1040
Location: England
Reply with quote
Post Re: Hydrodynamic Challenge!
so, tim's working on it, anyone else? (I'm just starting, going to try my extremely easy method


Wed Mar 18, 2009 12:10 am
Profile
User avatar

Joined: Sun May 18, 2008 8:30 am
Posts: 732
Reply with quote
Post Re: Hydrodynamic Challenge!
Cortex Command is in a pseudo 3D environment, so water should only splash a little when jumped into and not be completely displaced.


Wed Mar 18, 2009 12:12 am
Profile
User avatar

Joined: Sun Apr 15, 2007 5:56 am
Posts: 1191
Location: outside the shithole called the University in the Forest
Reply with quote
Post Re: Hydrodynamic Challenge!
Wait, so you're talking about water repelling other water particles, right?
But don't water molecules attract to other water molecules, thus the high adhesion?
Or does that cause issues due to CC not working like real life?


Wed Mar 18, 2009 1:13 am
Profile

Joined: Wed Mar 18, 2009 1:15 am
Posts: 6
Reply with quote
Post Re: Hydrodynamic Challenge!
i don't think surface tension will be a big deal. surface tension acts at a pretty small level and in CC's scale, it wouldn't be important to simulate it. but it would be simple to add if needed.


Wed Mar 18, 2009 1:19 am
Profile
User avatar

Joined: Fri Apr 27, 2007 4:55 pm
Posts: 1178
Location: America!
Reply with quote
Post Re: Hydrodynamic Challenge!
The Fat Sand Rat wrote:
Wait, so you're talking about water repelling other water particles, right?
But don't water molecules attract to other water molecules, thus the high adhesion?
Or does that cause issues due to CC not working like real life?


Water molecules only attract each other on the very small level. From this pixel to meter level, the "particles", which are really like a cubic inch of water, are going to slide over each other.

The problem with doing stuff like a deformable mesh, is that it will be very hard to actually display it. With Lua, we don't really have any working drawing functions, and so the only way to display something would be to set the position of all the particles, which would end up using the same, if not more, resources than just moving each particle as an individual particle anyways.


Wed Mar 18, 2009 2:16 am
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: Hydrodynamic Challenge!
still, all we need is a grid of stuff that deforms realistically that we can tie friction to.
we can work out how to get a nice graphical effect later. im stumped as to why your first demo didnt work though tim, and just slowed everything.
also, we obviously arent going to do this on a per-pixel level, are we?


Wed Mar 18, 2009 7:07 am
Profile WWW
User avatar

Joined: Fri Apr 27, 2007 4:55 pm
Posts: 1178
Location: America!
Reply with quote
Post Re: Hydrodynamic Challenge!
Geti wrote:
still, all we need is a grid of stuff that deforms realistically that we can tie friction to.
we can work out how to get a nice graphical effect later. im stumped as to why your first demo didnt work though tim, and just slowed everything.
also, we obviously arent going to do this on a per-pixel level, are we?


My stuff doesn't work because I wrote it planning to go back and fix it. Right now it is basically pseudocode. I'll work on it this weekend.

I commend you all on great plans of deformable meshes and such, but results is what counts, yo.
I shall be very pleasantly surprised if you code in working meshes in CC's Lua.


Thu Mar 19, 2009 7:21 am
Profile
User avatar

Joined: Mon Jun 04, 2007 5:55 am
Posts: 1627
Location: Ohio
Reply with quote
Post Re: Hydrodynamic Challenge!
Lord Tim wrote:
Geti wrote:
still, all we need is a grid of stuff that deforms realistically that we can tie friction to.
we can work out how to get a nice graphical effect later. im stumped as to why your first demo didnt work though tim, and just slowed everything.
also, we obviously arent going to do this on a per-pixel level, are we?


My stuff doesn't work because I wrote it planning to go back and fix it. Right now it is basically pseudocode. I'll work on it this weekend.

I commend you all on great plans of deformable meshes and such, but results is what counts, yo.
I shall be very pleasantly surprised if you code in working meshes in CC's Lua.


so deformable vector-based areas actually have a name?

I could probably do some detailed visuals on what I mean, so It's not just my very un-understandable babelling , but rather something detailed, visible, and understandable. If you are interested, just say so, and i'll get on it.


Thu Mar 19, 2009 8:51 am
Profile YIM WWW
User avatar

Joined: Fri Jan 26, 2007 3:22 am
Posts: 1451
Reply with quote
Post Re: Hydrodynamic Challenge!
This is the only way I see any kind of water really working. Like soured milk more than actual water. If a particle etc is within a radius of the water particle, repel. Of course the radius in which a particle repels could be reduced until a suitable medium is found. A water sprite can be attached to each particle.

Otherwise it'd just be plain laggy.



Image


But this proposition is disappointing and there'd really be no point in making it as it wouldn't be as good as real water.

But real water doesn't seem like it's going to happen unless it gets hardcoded in.


Thu Mar 19, 2009 10:05 pm
Profile
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post Re: Hydrodynamic Challenge!
If we can get deformable vectors it'll work a lot better than that, but as the engine currently is, yeah, Daman has the only way.
Problem is that will still lag once you get a decent size of water. The repulsion radius would probably work the same as the attraction radius I used in Orbit lands, and if that's the case, any more than about 25 particles is pretty bad. On my shitbox of a computer, at least.


Thu Mar 19, 2009 10:22 pm
Profile WWW

Joined: Sat Feb 03, 2007 7:11 pm
Posts: 1496
Reply with quote
Post Re: Hydrodynamic Challenge!
Daman, you are only half right.

http://kotsoft.googlepages.com/Water2.html

Sure it does sort of resemble the colloidal suspension of condensed butterfat globules in water, but it works well enough for our purposes.

And using my Fraps counter, I get 450-490 FPS on that little application.

'course, it's optimized and CC isn't.

Also, TLB, what's your computer like?


Fri Mar 20, 2009 12:19 am
Profile WWW
User avatar

Joined: Mon Jun 04, 2007 5:55 am
Posts: 1627
Location: Ohio
Reply with quote
Post Re: Hydrodynamic Challenge!
Daman, in the method I'd defined, you know you could do liquids, as defining the area (shape) of the body of water, and then define high and low pressure areas in it, and allow it to warp itself. water would logically re-seal itself as well, so even if you drop something it int, it will sink, and get sealed up.


Just thought i'd point that out. figure, to do this justice, we have to have multiple methods.


Fri Mar 20, 2009 1:57 am
Profile YIM WWW
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post Re: Hydrodynamic Challenge!
My computer has one gigabyte of RAM and a 2.3 Ghz single-core processor. It's horrible. Unfortunately, a lot of the people playing Cortex Command probably have a similar computer - it's basically your low-grade computer currently.
The application you just put up there simulating that effect lags like crazy for me. Every half second it stops and starts again a half second later. It comes out in chunks of movement for me.
Of course, water is entirely possible in Cortex Command, and most people on the forums will be able to use it, but the casual audience will likely experience a lot of lag.
That said, keep working at this, it'll certainly be interesting. Once Lua script for every object comes out it'll probably help a bit.


Fri Mar 20, 2009 2:11 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 111 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 8  Next

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.052s | 15 Queries | GZIP : Off ]