Birds

Hi,

I have copied the Content/Birds folder to my Content/ folder, added a NavMeshBoundsVolume, Ground/Perch/SkyTargetPoint and one or two birds but I have a lot of these errors:

Blueprint Runtime Error: “Accessed None trying to read property CallFunc_Array_Get_Item”. Node: Branch Graph: EventGraph Function: Execute Ubergraph BTService Bird Shuffle Sky Target when Near Current Blueprint: BTService_Bird_Shuffle_SkyTarget_WhenNearCurrent

Could you please help?
Thanks a lot!

Also, I have a very large world (planet earth). Oviously I cannot create such a large NavMeshBoundsVolume. I would at least that birds could freely fly on a big area, maybe 10x10km. No obstacles, only terrain. Is it possible with that package? Thanks!

I managed to debug the BP and the StoreTargetsWithinThisRange variable was to low for my world. Is it any reason to this variable?

I managed to debug the BP and the StoreTargetsWithinThisRange variable was to low for my world. Is it any reason to this variable?

Yes there is an important reason for that variable. The Birds will only store targets within that range of their starting position. This is how say the Seagulls stay near the shore and the Pigeons will stay in town center. This was done so that the Birds will stay in the area that you place them in. You can set the variable to a huge number if you want all the Birds to all fly everywhere.

1 Like

We have a new Update for Birds!

In this new update for Birds we have quite a few quality of life improvements.

First of all we have sound and Bird calls with Bird call animations.
Speaking of animations, we have many new animations (27 new animations) including new flying animations. The Birds will now blend between 3 animations while flying based on the Pitch angle of the Bird. If the Bird is flying relatively level it will use a relaxed flying animation. If flying upward they will use a more intense flying animation to gain altitude. When flying in a downward direction the Birds will use a gliding animation.

The Perching system has been completely redesigned to be much more reliable.

Finally the Birds will now fly away from gunshots or any other sound you wish them to.

I hope you enjoy the update, also an important note the update is a 5.0 update.

3 Likes

I don’t hear the birds squawking. I see the animation play but in-game I don’t hear them. When I play the animation in the animation editor it works. I’m using a dedicated server.

I’ll look into this, what version are you using? is the audio out of synch or no audio at all?
How is it working in the demo level?

It works in the demo level but not in my levels. Also I’m using dedicated server/multiplayer with lot’s of sky targets and the birds get stuck in the air and they also look like they are trying to fly while on the ground. It doesn’t look right at all. I’m not sure what I’m doing wrong. I have perch, sky target, ground targets and have generated navigation path in the build menu.

here’s some short videos of the problems I’m seeing.

Birds not perching correctly:

Bird running into things and continues to fly:

Bird on ground flying in place:

:slight_smile:

An none will do the squawking. I have bird sound effect loop in the game playing if you hear birds.

I’m sorry, I thought you were just having audio issues- the problem is that Birds is not setup for multiplayer. That is why you are having issues.

Hi, I have an issue with the perch position. When the birds (tested only with crows so far) come along and sit down, they hover some cm above the designated point, some are higher above than others. X/Y positioning seems to be correct, but Z has a varying offset in most cases. I tried to lower the perch target points (moved along Z into the geo) and first it looked ok, but after some level testing they suddenly used the correct Z position and their claws were inside the geo they should sit on … Moved the targets up again … worked for a while and now they hover again … Really annoying and currently useless for me. I didn’t move the geos they should sit on and thus the perch target points have also not changed, besides testing their Z position. Do you have any idea, what that could be? Using 5.1

PerchTargetOffset

Answer corrected down 2 posts :slight_smile:

Changing this offset doesn’t do anything, at least not visually. I placed a PrintString in there to check the Z-value, it never fires. But I’m not a pro, maybe PrintString isn’t intended to fire here …
The more I tested, the more things confused me. So I created a new 5.1.1. project, empty world, just lighting and landscape given. Migrated the birds folder into that new project. Did a basic setup: Added a standard box as a post, removed colission mesh and to be safe deactivated colission. Added NavMeshVolume, put a perch target on top of the post, ground target on the landscape, sky targets, well, in the sky. Threw 4 crows in and that’s it. No params changed. The result is still the same. Crows that come to sit on the post hover some cm above it. Crows landing on the landscape do whatever they want: One of them looks ok, another one’s offset is negative at the same time:

Varying Offset

I’m sorry I forgot that the Perch on target was moved to a service.
Open the “Bird_BT” (behavior tree) in the AI folder. Find this area (see image) in the Behavior tree and select the “BT_Service_PerchOnPerchingLocation” node, you can change the perch offset on the right (see image). save and test.
Also the proper way to know that the perch target is in the corect location is drag it into your world above where you want it and hit the End key, so it drops directly down on collision. From there set the offset and test. the default offset is 45. For your situation in that upper image try somewhere in the 10-20 range. let me know if this helps.

I will try that tomorrow. Another problem occured: Perch spots get double occupied:

Double Perch

Second bird is landing when another one was already there for a while, at least 15s. Could you please give me a hint how to solve that too?

I recently played through Broken Pieces and was pleasantly surprised to discover that they used my Birds system in the game. The Birds are utilized in a few puzzles as well, which is always awesome, I love it when one of my assets can be used as part of gameplay. I am humbled and also quite proud of how much Birds contributed to the island feel of the game. Broken Pieces features Birds version 3.5 and is a great showcase for what Birds v3.5 offers.

1 Like

Nice plugin! I have a situation where a lot of birds are supposed to sit on a rock and only some should fly in the area of this rock. a few hundred meters away I have two more rocks with the same situation. Therefore I have a few questions:

1 is it possible to manipulate the flight duration and frequency of the birds / each bird?
2 can I select to which fly spot each bird flies or at least set a radius to which a Bird should fly to? Because my birds tend to always fly to the furthermost sky point (which is around another rock) instead of circling the closer spots.
3 when I start my game, all birds start flying in the same direction the same way. Is it possible to randomize this behavior more?
4 where can I select the LOD? The birds seem to always be in Max resolution. I’ve read abother comment about culling and will also implement that.

In this situation I would use a lot of Idle animations (drag the animations into the level) on the rock and a few NPC_Birds for flying around and landing on the rocks.

1- flight duration is set in the BehaviorTree

2- By default the Birds will use random targets but you can set the range of consideration. Open the Birds AI Controller.

3- Be sure you are setting up their starting condition. With a Bird selected in your level on the right viewport you can see its settings. you can set the Bird to begin the level walking, flying, or perched. Only one of the 3 should be selected. As far as flying the Birds should begin the level flying in the direction you face them.

4- The LOD settings are on the skeletal meshes. you are looking for the “LOD info” section that is where you can set the screen size for each LOD

I hope this info was helpful for you or anyone else who comes across similar questions. :slight_smile:

Hi, Jakob here!! The birds look amazing and I have implemented most of the things already. I only have one issue with the birds sitting down too far from the ground points (on places they are not supposed to go to) or landing way beneath the mesh I want them to sit on (I have a plane as ground floor which needs collision for navigation) 60m beneath the rock. They just use the landing animation until they land there. Is it possible to decide the range of the ground target or set the meshes they should sit on?

I have used navmeshbounds and built them and everything…
Check the screenshot to get an understanding of my scene.

Another issue I ran into is performance when I’m far away. How can I add Distance From Player (or camera?) in the Behavior tree? I only see distance from enemy… i want to disable the birds animations and computing if they are far away.

The meshes that they are landing on must have collision enabled. or you can add a little collision volume under every Perch Point. These Birds obey gravity and if nothing is blocking them they will fall through the Geometry. Also I believe you are using Ground Targets when you should be using Perch Targets. When you use a Perch Target the Birds will stay in place, when you use a Ground Target they will move around and I’m guessing fall off and through that rock.
The Distance to player check is something you would need to custom build yourself. I would advise a high level service that checks the distance to the player every 5 seconds or so and have that check set an “InRange?” Bool (use a get distance to player or camera) in the Blackboard. Then High up in the Behavior tree have a Blackboard Selector that when InRange? is true continue as normal. if InRange? is false then do nothing.
If none of this makes sense at least it will give you a good place to start Google searching.

Hi, I have an issue where when the bird leaves the perch it hovers slightly above the perch target flapping its wings, then freeze, jittering slightly in the air. What am I doing wrong? All I’ve edited is the perch time to 10s and flight duration to 10s because I want it to fly, return, repeat. The stay in sky bird works fine. So does the start and perch for the perching bird. Just back to the sky is not working properly. Thanks!