Jump to content

Push Apart inside object


imago
Go to solution Solved by HappyPolygon,

Recommended Posts

Hi Guys!

I try to do simple setup for balls inside sphere. But I dont want ball hit sphere wall and also dont overlap each other. So I create Plain Effector (uniform scale -1)and Push Apart Effector. And that doesnt work. My first question is why Cloner doesnt respect hierarchy? (looks like Push Apart is always after all effectors). Secound question how to do it? 🙂
image.thumb.png.b0d145a60d8d19792bcd0010a5c0a27a.png
I attached scene

Balls.c4d

Link to comment
  • Customer
  • Solution

1) The PushApart Effector has a constant Radius applied to all clones. This means it wont behave as expected on clones with variable size.

2) The Cloner does respect the hierarchy. The order of execution is from top-to-bottom. If you reverse the hierarchy you'll see a different result.

 

3) The PushApart Effector cannot be used to pack objects close to each other unless they are all the same size. I'm not sure why the devs did not implement a variable radius depending the size of the clone. It could be that the sphere packing algorithm is very slow. Or because there is an other way to do it.

My way of doing it is to use a dynamics simulation. Once the simulation starts, each ball will try to escape the interior of any other object it intersects with. This can lead to very violent "explotions" though. So to remedy that I increase the Linear Damping to 100% under the Force tab of the dynamics tag.

 

The objects will sort themselves out in just a few frames.

 

Take a look at the new project

Balls fixed.c4d

Link to comment
1 hour ago, bentraje said:


Nice example. Though admittedly terribly slow on the viewport.
Just wondering, is there a way to have that object represented in the object outliner as a geo.
Basically a scene geo rather than a deformer modifier ?

 

 

You can change the viewport mode to basic shading in nodes and get much better performance.

Now, regarding your question, are you looking for a version which is present in object manager?

Link to comment

@Hrvoje

RE: basic shading
Yep you are right. It's much more responsive.

RE: version which is present in object manager
Yep yep. Much the same way as node materials. They represent one node material and they have their own respective scene nodes.
Something like that but as geo in the object outliner (but not as a modifier. like an actual object where if you press make editable, you can then hand edit them).

Link to comment
9 minutes ago, Hrvoje said:

You can convert the nodes setup by going edit / current scene state to classic, or alternatively, you can copy whole setup into object group capsule and then ti will sit in object manager.

Ah just tried to the object group capsule.
It works but it is so slow even if set as a basic fast shading.

Is there some sort of penalty on using the object group capsule?

You can check the file I used below:

object_group.c4d

Link to comment
×
×
  • Create New...

Copyright Core 4D © 2023 Powered by Invision Community