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
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.
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!