Deviant Login Shop
 Join deviantART for FREE Take the Tour
×



Details

Submitted on
August 6, 2010
Image Size
5.1 KB
Resolution
400×300
Link
Thumb
Embed

Stats

Views
7,708 (6 today)
Favourites
60 (who?)
Comments
20
Downloads
117
×
Controls:
Keys 1-3: Change material
Mouse: repel
Mouse & shift: attract


Based on the paper Particle based viscoelastic fluid simulation. Modified with a massive amount of help from kotsoft.

910 particles. Sorry if it's a little slow, there's a fair bit of calculation being done here. I recommend downloading it, try running it standalone.


Coming soon: viscoelasticity (lololol), right now I'm just limited to varying viscous fluids, I'm struggling to find an efficient way of managing elastic / plastic materials.
Then again, this thing is pretty bogged down as it is. I've started playing with C# and XNA, I might just switch this over.
Add a Comment:
 
:iconsravanind:
sravanind Featured By Owner Mar 8, 2014
Hi,

nice demo. can please share source code, if possible

thanks
Reply
:iconspectrobe4:
spectrobe4 Featured By Owner Jun 7, 2013
link to game please?
Reply
:iconjestin12:
jestin12 Featured By Owner Feb 17, 2013
put a frekin ragdoll
Reply
:iconorochirin:
OrochiRin Featured By Owner Oct 6, 2012   Digital Artist
this
is
not
a
joke!
carry
on
reading!
or
you
will
die,
even
if
you
only
looked
at
the
word
warning!


ONCE
THERE
WAS
A
LITTLE
GIRL
CALLED
CLARISSA,
SHE
WAS
10
YEARS
OLD
AND
SHE
LIVED
IN
A
MENTAL
HOSPITAL,
BEACUSE
SHE
KILLED
HER
MUM
AND
DAD.








SHE
GOT
SO
BAD
SHE
STARTED
TO
KILL
ALL
THE
STAFF
IN
THE
HOSPITAL
SO
THE
GOVERMENT
DECIDED
THAT
THE
BEST
IDEA
WAS
TO
GET
RID
OF
HER
SO
THEY
SET
UP
A
SPECIAL
ROOM
TO
KILL
HER,
AS
HUMANE
AS
POSSIBLE
BUT
IT
WENT
RONG
THE
MACHINE
THEY
WERE
USEING
WENT
WRONG.








AND
SHE
WAS
SAT
THERE
IN
AGONY
FOR
HOURS
UNTILL
SHE
FINALLY
DIED.








NOW
EVERY
WEEK
ON
THE
DAY
OF
HER
DEATH
SHE
RETURNS
TO THE
PERSON
THAT
READS
THIS
LETTER,
ON
A
MONDAY
NIGHT
AT
12:00
SHE
KREEPS
INTO
YOUR
ROOM
AND
KILLS
YOU,
BUT
SLOWLY
AND
PAINFULLY
SLOWLY
CUTTING
DIFFRENT
PARTS
OF
UR
BODY
THEN
WATCHES
YOU
BLEED
TO
DEATH
IF
YOU
DONT
SEND
THIS
TO
20
PEOPLE
BY
MIDNIGHT
SHELL
BE
COMEING
TO KILL
YOU!
SEND
IT
SO
SHE
HAS
ANOTHER
LOAD
OF
PEOPLE
TO
GET
AND
FORGETS
ABOUT
YOU
DONT
BELVE ME
HEY?

EXAMPLE
1:
JENNY
DIDNT BELIVE THIS AND DELETED IT WITHOUT EVEN READING THE WHOLE THING! A FEW DAYS LATER ON THE MONDAY NIGHT SHE WAS WOKEN UP BYE LOUDE FOOTSTEPS AND HEAVY BREETHING THERE WAS CLARISSA STANDING THERE WITH A HUGE KNIFE AND WELL JENNY IS HISTORY NOW.









EXAMPLE
2:
TOM
ONLY SENT IT TO 5 PEOPLE CUZ HE THOUGHT HED BE SAFE AND IT WAS PROBLY JUST A JOKE BUT OH HOW RONG WAS HE! HE DIED THE NEXT NIGHT ON MONDAY AND ILL TELL YA NOW IT WASNT PRETTY(JUST CUZ HE SENT FIVE HE DIDNT COMPLETE THE TASK)

EXAMPLE
3:
JOEANNA
SENT IT TO 19 PEOPLE SHE THOUGHT IT WAS CLOSE ENOUGH AND WOULD DO BUT SHE WAS WRONG SHE DIED THAT NIGHT ON A MONDAY AND ONCE AGAIN IT WASNT
Reply
:iconstarblazer2155:
StarBlazer2155 Featured By Owner Aug 13, 2013  Hobbyist Digital Artist
your stupid muther f$cker shut the f$ck up please shut the hell up I WILL KILL YOU TONIGHT IF YOU DONT SHUT THE HELL UP!!!!!!!!!!!
Reply
:iconapplebloom5555:
Applebloom5555 Featured By Owner Jul 19, 2013
:iconchainfailplz:
Reply
:iconhappypenguinrock:
happypenguinrock Featured By Owner May 16, 2013  Student Artist
IT'S. NOT. TRUE.
Reply
:iconrenivid:
reniviD Featured By Owner Jan 2, 2011
Happy New Year!
I am also experimenting with SPH at the moment but I have problems with the mouse interaction. I tried to add some pressure to those particles around the point where I clicked with the mouse, but this doens´t gives the desired results. Do you have any hint for me ?
Reply
:iconniallmeister:
Niallmeister Featured By Owner Jan 2, 2011
You're on the right track with the idea of force, I think it kind of depends on how you're integrating the equations of motion for the particles. I'm using leapfrog integration and I just add a simple repellant force to the particle based on the distance:

var mRadius = 150;
var mForce = 10;

var dx = mouseX-p.x;
var dy = mouseY-p.y;
var d = dx*dx+dy*dy;
if (d < mRadius*mRadius) {
var fx = dx/d;
var fy = dy/d;

p.fx -= fx*mForce;
p.fy -= fy*mForce;
}


fx and fy are the components of a force vector for calculating accelerations later on. Does that make things any clearer?
Reply
:iconrenivid:
reniviD Featured By Owner Jan 2, 2011
Thank You for the immediate answer, now everything is clear :-)
I've just tried it, and it works. I think my mistake was to consider just the particles in the direct neighborhood of the mouse (radius = h) and not all in a wider radius. Furthermore I just changed the pressure of those particles and not directly the force.
The nice thing is, you can get the "attract mode" just by changing the -= to a += ;-)

I also used the algorithms of the pvfs-paper but my implementation runs much slower than your program.
With 400 particles (and around 1100 springs) the speed is about 20 fps.
To find quickly all particles in a neighborhood of a particle I currently use a Hash Grid but I plan to replace it with a QuadTree trusting that it is faster.
Reply
Add a Comment: