Fun With Particle Shapes

I really liked Yoggy’s particle intro shapes for the Shockwave version of MegaPixel. I thought it would be fun to do my own test of the concept:

This takes in an image and moves the particles to form the shape. I’ll post the code if anyone’s interested; it’s really not that complex.

http://www.flashbangstudios.com/tests/particle_shapes/

37449--1401--$particle_shapes_840.jpg

Wow, that’s pretty neet!

Yea- thats cool…Always keen to see how things are coded!
AC

Oh my god. That is insane.
I guess you are generating particles based on the texture? Spawning one particle per pixel based on alpha?

Looks very cool!
I guess making a transparant particle collision shape, and injecting particles in it, wouldn’t do the job? :slight_smile:

.kaaJ

That’s really amazing! I’d love to see how you did it.

i love the stuff folks do with unity! that’s really cool, mathew. that’d be great if you’d put it on the wiki. i can see a ton of uses for it.

and yeah, yoggy, the yogware logo’s cool!

very cool ; )

Wicked! This inspires lots of ideas. :smile:

-Jon

That is really really cool! I actually didn’t use image based stuff, I just traced the edges of letters in blender, filled them in, subdivided a bunch and then did remove doubles to insure the same vertex desity all over.

I thought about using image based stuff but never actually did it. Looks cool :slight_smile:

Very very cool, nice work!

:: drools for particles ::

Nice work Matthew!

Precisely! That’s my exact technique, actually. I use a Hashtable to record the desired end position for the particle index (because I’m only emitting on opaque pixels I can’t easily correlate particle index to pixel position later).

I’ll clean up the code (C#) and post it soon–I’m horribly busy with meetings and crap today.

Not that it matters. But i think using a builtin array with indices per particle, returning the index into the pixel would be a lot faster than a hashtable lookup. It would also save space, since it would be allocated tightly.

For crying out loud, go buy yourself something man! That is awesome! Great of you to share the code as well.

-Jeremy

That’s wonderful!

I should do that yeah–it was just laziness on my part. I don’t know how many opaque pixels there are in the texture until I’ve looped it, so I just hacked in a lookup rather than a CountOpaquePixels() function or something.

Here is the sample project and just the .cs file by itself. It’s a bit sloppy and narrow in scope; but with a little hacking you could make it more extensible. Consider it proof of concept!

37538–1406–$particleshape_146.cs (3.68 KB)
37538–1407–$particle_shapes_156.zip (270 KB)

Very cool.

Looks like you even had time to optimize to use vectors before posting. At least I didn’t spot the hash table.

Thanks for sharing.

Yeah, I changed that right before uploading.