0
$\begingroup$

Hello hello Blender community!

This is the first question I'm posting, similar ones have been asked before but I was unable to get something working from the answers/comments on the questions most similar to mine. I'll try to include a bit of detail so that it's clear what I'm looking for and hopefully I won't be too hard to help. Thanks for your time.

I'd really like to create a scene in which I have a swarm of rats running down an alley. Currently, they're modeled by a Boid particle system. In order to make them respond to the environment, I want them to collide with scene objects in a realistic way (for now, I'm not worried about climbing or anything fancy).

In my alleyway scene, there is a staircase and I would like the boid-rats to scamper between the stairs and the wall opposite them. However, the collision distance is quite large - pictured below:

Rats crawling through the space between the wall and the staircase

An example of the issue can be seen looking at the rat near the center of the image who is close to the corner of the stairs. This rat could have run by the stairs but was knocked to the side by this large collision distance. The rats tend to bounce around until they eventually fit through the small gap. Poor rats.

My hope is that there's a way to get tighter collision modeling with the Boid particle system, however, it could be I'm trying to solve the wrong problem. Though Boids seem to fit the swarm part well, perhaps a different approach is better. I'm open to anything :)

One other approach I've tried is adding rigid body physics to the objects and setting small collision margins, but I'm still getting the large collision distance. I believe I updated the animation correctly but maybe something wasn't properly baked (if that solution should work). I also tried topping out the damping on the collision objects to see if they were causing the intense bouncing, but it doesn't appear to be so.

Another example of this is how, if I place my emitter in the middle of a plane with a collider, rats are spawned equally distant from the plane on either side. To me, this suggests they're being forced out to the minimum collision distance, which I currently don't believe I can change since the objects are not soft-bodies. In the picture, the emitter and boid-rats are secondary selection and the Follow Leader target is primary.

Boid rats appearing equidistant from plane

I'm going to attach the scene in case it would be helpful to see! I created everything in v2.80 but tested it in v2.81 in case anything would be different but all is the same as before. Please let me know if you have any ideas and thanks again for your time!

Edit: Here is the .blend file

$\endgroup$

2 Answers 2

0
$\begingroup$

I will go ahead and post this as it works well enough for my use case, though it feels like there's a better solution:

I was able to get the simulation to work if I drastically increased the scale of the whole model - so that even if what earlier felt like a large collision distance remained the same, it would still be relatively small compared to the path the rats would travel through.

If somebody has a better solution I would gladly accept it in place of this one! I would prefer to keep the units life-size as they were before.

Current below: it appears that the relative collision distance from the stairs is the same compared to the images above. On the right of the image, there are still some bouncy rats but I can perhaps add a forcefield to direct them so I'm not too worried about that.

enter image description here

$\endgroup$
0
$\begingroup$

I was having the very same trouble today in one of my productions! Eventyally I figured out that my problem was the particle system's render "scale" setting. Don't know if this would apply to your case too, though.

Below is a quick example of the problem I had: enter image description here

The icosphere object is scaled down to 0.2, and the particle scale is set to 1, and I'm using the "object scale" option, which results in a big gap between the particles and the collider cube.

There's 2 possible solutions: either scaling the icosphere up and decreasing the particle "scale" setting, or unchecking the "object scale" and then setting the correct scale with the particle "scale" option.

$\endgroup$
1
  • $\begingroup$ Hi Aleksi, thanks for the response. I will give this a try soon! I don't recall if I gave that a shot before but if it works for you then it's worth testing :) I believe that my original rat object was quite a bit larger than a regular rat, so the model was scaled down a bit, then I used a scale of 1 on the particle emitter. If the original rat size was being used (for the particle size), then for sure it would have been too big. Thanks for answering! If it works for me I'll mark as correct. $\endgroup$
    – aidankmcl
    Commented Dec 3, 2019 at 13:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .