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$
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$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.