66
53
0
See More by wonderwhy-ER
Recommended for you
Featured in collections
Popular in the last 24 hoursSee all
Collision Resolution Study 1.1
13.1K Views|1 Today
© 2010 - 2019 wonderwhy-ER
Well not that I am completely satisfied with performance of collision detection I am off to collecting various collision resolution schemes and other stuff that comes with them (simulation integration schemes).

How to use
Just click, hold and move mouse to spawn balls, rollover components to see hints about them

Schemes I used here

Firstly my older code that dates back to my experiments with Ball World [link] back in 2007
Back then it was too slow to see how unstable it gets sometimes.

Second scheme is Position Verlet, very simple and more stable then my code, still easily goes crazy at around of 1k or more balls. You can see nice Java example here [link]

I plan to add more schemes in future.

So far it seems that in such cases it is physics stability that becomes a bottleneck and not the performance :) Hmm hmm :) Also as I am lazy and it is a testing builds it contains a some of unnecessary code like system energy calculation that eats up performance. So it's not at its best in that sense.

Update
Small change, tried adding other model but so far failed,
aside from that thought that it would be good to see how unsatisfied situation is. So added coloring to balls that shows how much penetrations by other balls they experience this frame. For Verlet it also represents how much energy is emitted by them this frame to push out those other balls :)
Image size
1200x750px 43.8 KB
See More by wonderwhy-ER
Recommended for you
Featured in collections
Popular in the last 24 hoursSee all
anonymous's avatar
Join the community to add your comment. Already a deviant? Sign In
Comments
AddiePancakes's avatar
AddiePancakes|Hobbyist General Artist
FIRE  I'm on fire! 
Reply  ·  
InfestedMatt03's avatar
InfestedMatt03|Student Digital Artist
i turned it down to 0 balls

it crashed :/
Reply  ·  
InfestedMatt03's avatar
InfestedMatt03|Student Digital Artist
100 Gravity: ...
Reply  ·  
IRAwarrior's avatar
IRAwarrior|Hobbyist General Artist
Gravity: 0.3 + Amount of balls: 800 = Boiling effect!
Reply  ·  
crazyferretfun's avatar
crazyferretfun|Hobbyist Traditional Artist
fun
Reply  ·  
Igloo-Australia's avatar
50K balls 0 gravity and computer and game are still alive o.o
Reply  ·  
wonderwhy-ER's avatar
Yeah, I did crazy stuff there :D
Reply  ·  
vkremennaya's avatar
vkremennaya|Student General Artist
SO... MANY... BALLS... oh wow it got stuck after 50k. XD
Reply  ·  
wonderwhy-ER's avatar
Hehe, thanks. And for :+fav:'s too :)
Reply  ·  
vkremennaya's avatar
vkremennaya|Student General Artist
XD np. Keep up the great work!!! I find hours of enjoyment on the little flashes :3
Reply  ·  
wonderwhy-ER's avatar
Hehe :D Thanks :)
Reply  ·  
vbcnxm's avatar
heh, it crashed with 1772 balls at 0 gravity
Reply  ·  
wonderwhy-ER's avatar
Heh :) Browser crashed?
Reply  ·  
vbcnxm's avatar
no, not quite, only the game/test did, I was still able to browse around
Reply  ·  
wonderwhy-ER's avatar
Ouh, which browser do you use?
Reply  ·  
HeliacWolf's avatar
HeliacWolf|Professional Digital Artist
АВфыаы ааа это такая забавная игрушка *____* супер 8D
Reply  ·  
wonderwhy-ER's avatar
Спасибо :) С наступающим новым годом тебя, побольше тебе вдохновения и творчества :)
Reply  ·  
HeliacWolf's avatar
HeliacWolf|Professional Digital Artist
И тебя тоже с наступающим)) *_______*
Reply  ·  
wonderwhy-ER's avatar
Как празднуешь? С друзьями? С родственниками?
Reply  ·  
AlexaSharlOt's avatar
Awesome balls :D lol
Reply  ·  
wonderwhy-ER's avatar
In real world conversation I would be confused from such phrase I guess :rofl:
But thank you :rofl:
Reply  ·  
theCheeseGrater's avatar
theCheeseGrater|Hobbyist Digital Artist
This was fun to play with :D I have a new and shiney computer.... i managed to run this with 4000 balls which filled up the entire screen completely. The verlet algorithm produced an nice even distribution where as your old algorithm produced awesome looking metaball things :P it started loosing fps at about 7000 balls though this still only registered as 10% on my cpu. also it would seem as though it mainly uses only one of my 8 threads and only slightly uses 3 others. So i wonder what the limiting factor is then? RAM speed maybe? If action script ever supports the use of 8 threads you could do some amazing things with flash :O

anyway... well done :P :thumbsup:
Reply  ·  
wonderwhy-ER's avatar
Heh, 8 core PC? That's big :D
Well using multiple CPU's is tricky, if every banner maker will be able to do it it can be pretty dangerous. I actually was testing some stuff with clipboard and managed to hang my PC trying to save something like few milliards of symbols in to the clipboard, froze it so much that even ctrl+alt+delete failed to show :D Imagine what noombs can do being able to spawn threads as much as they like.

10% and drop in FPS... Hmm... Half of the problem here is rendering, but I wonder why it is 10% usage only. Still impressive how much you CPU can handle :)

Have you seen/read my last journal? Have you seen Adobe Max session?
Reply  ·  
theCheeseGrater's avatar
theCheeseGrater|Hobbyist Digital Artist
true true... banner adverts able to max out my intel 960 is a bit scary :S
Reply  ·  
anonymous's avatar
Join the community to add your comment. Already a deviant? Sign In
© 2019 DeviantArt
All Rights reserved