SandArt on unity

Hi.I`m trying to make a sand art like these videos on unity.
http://www.youtube.com/watch?v=FMPMDNq6NR4
http://www.youtube.com/watch?v=Yruv3Pj_rqg
As you can see,It is useless to make many sphere objects and atach physical treatment.I think ther is an another way to reproduce these systems.Can sombody help me to complete this project?

Thank you.

I’d say normal mapping and mesh deformation.

And you’re correct, you definitely do not want to do physical simulation per sand particle.

So,do I have to make a large Plane object and movement when mouse clicked?

I’m not sure you could replicate the type of thing they have with standard tools in Unity. I’m sure it could be done, but would require a fair amount of work and knowledge. They are doing some sort of physics simulation, their site says it is a custom solution, which would make sense. It’s pretty slick actually. It does appear to be a per particle sim, or really close with some grouping or something. Which wouldn’t be to bad, as it is pretty limited interaction and really only 2d with a little z-sorting. It’s actually pretty fun to play with.

Watching that first one, they’ve clearly recorded the position of each cluster of not-sand. (Instead of moving sand, you’re actually move the lack of sand. It’s weird, but produces an effect that’s close enough.) You can tell that because at the end, when they come back from the gallery, everything moves around in little clumps for a bit before settling back into the picture.

I would create a few textures in Photoshop that are just cloudy black things with clear backgrounds, and make a texture atlas of them. Then I’d write some code to instantiate planes with their UV coords randomly set to one of the textures in the atlas. You can size the plane according to the setting from the menu.

As the user drags their finger, keep instantiating new planes with textures. If they brush their fingers across, have the planes move in that direction, slow down, and stop.

Possibly. On the app, the effect is pretty slick, if you move it quickly, the grains fly over the others, and you see what appear to be individual grains that you can track. Also, there is a fixed quantity (and a max). I would love to know what they are doing, it appears to be a mix of things.

But that’s just icing. You can do 99.99% of it just with height-based mesh deformation. There’s well understood physics equations that describe how granular bodies (not sure the appropriate term… but sand and dirt and so on) move, rest and settle, which will account for all particles touching the ground. Then all you need to do is have a bunch of extra particles that represent anything that splashes up as a result of the movement. Those you do individually or in small groups, but there’ll only be maybe a few thousand of those so you can handle it pretty easily.

Lets put it this way: if an individual grain is not moving or is moving with the grains around it then it needs only be represented as a part of a shared mass, of which only the surface is relevant. With the way that the app shown is designed the number of grains that don’t fall into that category is extremely limited - for instance, you can’t grab a clump of sand and throw it straight up in the air.

That would make sense, individual grains really only make up the top layer. Though, I am guessing that there probably isn’t any mesh work going on at all, most likely image manipulation to appear 3d. Especially since it can “convert” photos into sand art very quickly.

Though you can’t throw a clump up, there add pour and drag en masse and shake the screen to move many or all at once, and push around with many fingers at once. Whatever combination of techniques/trickery going on, it has nice level of polish.

I initially didn’t think there was mesh work and assumed it was all nice normals work, but they move the camera and orbit the sandpit. (I’ve been looking at the second video, btw. The first didn’t really grab my attention too much.)

Pouring, dragging en-masse and shaking the screen still result in the vast, vast majority of effected particles moving in the same direction, so most of the work can be done on the aggregate level rather than on individual particles. Pouring could also largely be canned or have special treatment.

But I agree, it looks pretty darn neat. I’m certainly not knocking it.

I`m not sure how to use mapping and mesh deformation,but is it like this video?
http://www.youtube.com/watch?v=ubA-eW4D0TE&list=PLvQNhrDV520jvGCWppobbOiEFO7ueEWLw&feature=mh_lolz

I’d just get a big terrain, get a sandy texture and mess with the heightmap/splatmap in realtime