marbles in glass: harder than i thought

Placing the marbles inside of a glass (like a wine glass) has proven somewhat challenging. It is hard to see where to place them so they logically fill the space and do not intersect other geometry,

I thought of using particles and collision, but it seemed like too much work for a simple thing…

Anyone done that before? Appreciate any comments.

you can fill a volume with objects in BGE

looks for volume fill

should come with a sample file

happy 2.5

thanks, and, two questions:

this works in 2.49?

So the BGE is a good tool for general modelling? I never used it because I don’t do games…

well yes it’s for 2,49 buti guess it should also work in 2.5

and that does what you ask for the model is done with blender but using some of the BGE features

salutations

When you are doing “physical things” in Blender, the physics-simulation features are quite useful. Those features are often regarded as being “synonymous with” BGE, but in fact they’re not: the output of a physics-simulation can be “baked” to a set of IPOs for use in an animation.

So, you can “fill the glass with marbles,” trying it out in real-time in BGE (at 60 fps or whatever), then bake to produce IPOs (at the selected animation-speed, e.g. 25 fps).

You might simply be interested in “where the marbles wind up,” e.g. when creating a static picture. You can do that, too.

thanks so much…i played with it and it works great…not hard to use at all.

one thing i cannot figure out is that when you have a bunch of objects, they spray outwards and don’t all fall into the glass and I cannot yet figure out which setting controls that.

Is that in the same panel?

thanks again

i think i figured it out. if you copy the object while in logic mode, it flies apart, but when you duplicate before, it works as if they are just two different objects and they fall together as separate objects. If you have a lot of objects, makes for a lot of copying…but it works

i’m not a big BGE user so
can you upload a sample file to show what you did
and explain how to

other peoples might find it usefull also

Thanks

I just put a bunch of marbles that are rigid bodies with bounds set to convex-hull or triangle mesh above the glass, then I run the simulation while having the option to save the game data to IPOs. When I hit p, the marbles fall into the glass and settle down. Then I exit game mode by hitting esc. Then I move to a frame where the marbles have settled. Finally, I delete the IPOs so that the marbles just stay there no matter the frame. Peace

ok…i was using ‘cylinder’ and not ‘convex-hull’ but the same thing happens when you make a lot of duplicates, only in a different way. the marbles shoot upwards when the duplicates are all ‘convex-hull’ and sideways when they are all ‘cylinder’. don’t know about triangle mesh as I was using a uv-sphere, but i think it is the same.

Ricky Blender - I will post a short tutorial when I can, but don’t have time right now as I am at work.

cheers

A basic example of balls in a glass
From the Game menu at the top of the blender window select “Record game physics to ipo”.
Press P to run the animation long enough for the balls to settle, then Esc
Go to the frame with the balls position you want, add materials to the glass and balls, then render.
balls.blend (81.1 KB)

Richard

Couple of questions for you.

  1. Why did you use ‘triangle mesh’ for bounds (since the balls are made of quads)
  2. Did you do all of the balls one at a time by hand? (gets pretty time consuming…)

Thanks!

Not sure if the bound makes much of a difference. You could even try sphere but you may get some overlapping objects. Make one sphere, set all its physics settings then duplicate with Shift+D. This also copies all its physics settings. You can then select these two, duplicate again, select all four and duplicate again and so on.

Richard