filling a 3d model with coins

Hi,

I need to fill a 3d model with coins, in other words I have to build a model entirely made out of coins.

I tried with scatter, area and volume option.

area:

volume (doesn’t seem to work very well… but this is what I need, the area option doesn’t fill the model)

Now I wondered if there are other ways of doing this, with options for collision detection because I need to do close ups too and no coins should intersect…

Thanks for any tips!

wouter

Reactor or simcloth - put them all inside an object and let them settle and drop - you should be able to do it with tiny collision tolerances. Pflow has a volume option in the position object operator so you can fill a volume up. It should give you more options about rotation and so on than the scatter object will but it might be a bit memory intensive - no dynamics either :confused:

Ok thanks! Played with the pflow position object, works quite well and the seperator value helps to get rid of intersections. In fact I need relatively large gaps between each coin to be able to fly trough it with a camera. So this seems to work well for me!

But then I have a new question. Is there a way to delete particles manually, some of them are in wrong positions. Or can I convert the whole coin model into seperate coins so I can delete them (maybe impossible since the final model will have a massive amount of coins…).

Thanks joconnel for the quick reply :slight_smile:

wouter

you can go in the modify panel of your pf source, under selection enable particle, and pick the particles you want to delete (this will create a selection set with all selected particles).
then go back to your flow, add a delete operator, and have it remove only selected particles.

Thanks, that works in a strange way. If I select 10 particles, they go away, but all the rest gets reorganised and as a result, some particles again end up in the region I just selected. Guess it’s due to the random positioning of the particles inside the volume. I have set everything to show 100% of the particles, so it’s not simply the viewport that doesn’t show all particles.

Is there a way to convert a particle system to a mesh?

weird, it works as it should here. each selected and deleted particle doesn’t affect the position of the other ones. in fact, if you clear them from the selection, they just pop up again exactly where they were.

on a second thought, I guess you might get something like that if the delete operator is not at the very bottom of your flow, or just above the display one, or below the rotation one anyway (if you’re using one).

It seems to be related to the “separation” option in the position object operator. If I turn that off, the removal indeed works as expected.

But the separation is pretty important to get rid of most of the intersecting coins…

I have a baking script here that’ll output to nulls and another script to swap the two - it’s only for max 8 at the moment though :confused:

Alternatively if they dont have to move, snapshot everything to a mesh and delete by element.

Not sure what you mean with the scripts :slight_smile: But I’m on max 9…

Ah snapshot, that’s what I meant :slight_smile: Think I will get there with a combination of pflow settings and then manual editing the snapshot!

thanks!

there are a few pflow to mesh scripts around. Do a search in google

You can simply use Mesher to create a Mesh of the flow and delete elements as desired.

Yeah I found a script on Bobo’s site I think.. it was a for a couple of version previous of max but works like a charm in max8-9.

If you want I can post it.

Haha… I had this very same problem a few months ago… a client wanted me to fill a giant glass christmas bauble with coins…

In the end I had to do about 25 coins at a time in reactor (to do them all caused reactor to pass out). Once the 25 coins have settled, collapse the mesh into one object, add another 25 coins, run reactor again (the collapsed mash now being a fixed object)… rinse and repeat a few hundred times… (a six-pack helps relieve the boardom… although so maxscript might have been a more productive approach.

Yeah but the coins should be placed further away from each other, and not rotated that much. Also it will be a statue made out of coins instead of a spherical or box like shape.

What is the difference between snapshot and a script to turn the pflow into a mesh?


Patrick, I would be interested in that coin metal material :slight_smile:

Also, is the head etc on the coin done with bump only?

Last time I tried I dont think snapshop worked at all. Hence the need for a script.

Ah, so you want them neatly stacked?

Depending on the way you want them stacked, you could try using a free plugin/script (cant remember what its called or where to find it, but scriptspot would be the place to start looking) that takes a model and slices it up to produce a series of splines at each slice. You could then use the spacing tool to evenly distribute the coins around the perimeter of each slice.
Then, for the interior coins, I guess you could try offsetting each spline by the radius of the coins, then converting to poly, then scatter the coins on the surface to the required density. This would give you a neat edge to the coin cloud, but getting the right look for the interior would be a bit more tricky.

The coin material, I think, was displaced, although I might have reverted to bump at the final push as displacement was taking too long to render… but try displacement first. Just make sure you keep the edge integrity. The metal is just a glossy reflection, but I think I excluded the coins from self reflection as again the render times were getting silly… Sorry I cant remember the settings too well, and I dont have the models to hand to check.

I used a scanned image of a coin in the diffuse slot, not at 100%, but enough to reduce the need for a physically accurate reflection setup. I didnt want the coins looking straight out of the mint either. The end result isnt exactly photoreal, so I wasnt too pleased with it… but it served its purpose at the time.

@re:FORM you sure you only went through 1 six pack?

good idea, to use a map in diffuse also. I also think displacement will be crazy!

First gotta make sure this project goes trough :slight_smile: