create account

Godot Documentation: Animating Thousands of Objects by clayjohn

View this thread on: hive.blogpeakd.comecency.com
· @clayjohn ·
$36.14
Godot Documentation: Animating Thousands of Objects
#### Repository
https://github.com/godot/godot-docs

http://docs.godotengine.org/en/latest/_static/docs_logo.png

#### Details
This contribution is made out of two brand new tutorials that walk the user through ways of animating and controlling thousands of objects in Godot. The inspiration came from the game ABZU, which has thousands of fish beautifully animated. 

By the end of the tutorial the reader is able to animate a fish like the one below:

http://docs.godotengine.org/en/latest/_images/all_motions_mask.gif

The unique thing about this animation is that it is done in the vertex shader rather than with bones and a skeleton. A skeleton is the go to form of animation, but it requires every bone for every object to be updated on the CPU. With vertex animation, the animation is calculated on the fly by the GPU and is thus much faster. The only limitation is that you have to make your animation in code rather than using animation software.

Using this method you are able to have thousands of fish on-screen at once all animated, even on low end hardware:

[Here](https://i.imgur.com/wxTVKQQ.gif) is an example of a scene captured on a low-end chromebook (the gif is too large to embed in the post).

The biggest difference I see this tutorial making is to expose users unfamiliar with rendering to an easy method to squeeze high-end performance out of low end-hardware. Using this tutorial you could easily animate thousands of objects on a mid-range smartphone. On a gaming computer you can easily animate tens of thousands of objects (or even hundreds of thousands, depending on the complexity of the mesh). Hopefully as users pick up on this tutorial we will see the creation of more complex scenes in Godot. 

#### Components
Each tutorial focuses on one type of node that can be used for drawing thousands of objects efficiently. The first uses the [MultiMesh](http://docs.godotengine.org/en/latest/classes/class_multimesh.html) and the second uses [Particles](http://docs.godotengine.org/en/latest/classes/class_particles.html).

MultiMeshes are typically used for drawing thousands of static objects, such as trees or grass. However, using vertex animation, you can animate the objects for little cost. MultiMeshes are a great way to squeeze performance out of low-end hardware. Currently, there are no tutorials in the official docs on how to use them, accordingly lots of users did not know that they exist, or even if they did, they do not know how to use it. Now, however, we should see them used more and more. 

Particles are usually used for VFX like explosions or trails behind objects. However, they take advantage of static instancing (which uses the GPU to draw the same object thousands of times very efficiently) and transform feedback (which uses the GPU to compute movement of objects. More tutorials can be added on particles because they are such a useful and powerful concept in game programming. Hopefully this tutorial serves as a good, practical introduction for new users. 

#### Links
[Part 1: Animating thousands of fish with MeshInstance](http://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/animating_thousands_of_fish.html)
[Part 2: Controlling thousands of fish with Particles](http://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/controlling_thousands_of_fish.html)

#### GitHub Proof of Authorship
- GitHub Account: https://github.com/clayjohn
- Pull Request: https://github.com/godotengine/godot-docs/pull/2184
- In order to get everything in the tutorial working I also fixed the following bugs: https://github.com/godotengine/godot/pull/25725, https://github.com/godotengine/godot/pull/25623
And I filled in the class reference for [MultiMesh](https://github.com/godotengine/godot/pull/25728)
πŸ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 96 others
properties (23)
authorclayjohn
permlinkgodot-documentation-animating-thousands-of-objects
categoryutopian-io
json_metadata{"tags":["utopian-io","documentation","godot","gamedev","gaming"],"image":["http://docs.godotengine.org/en/latest/_static/docs_logo.png","http://docs.godotengine.org/en/latest/_images/all_motions_mask.gif"],"links":["https://github.com/godot/godot-docs","https://i.imgur.com/wxTVKQQ.gif","http://docs.godotengine.org/en/latest/classes/class_multimesh.html","http://docs.godotengine.org/en/latest/classes/class_particles.html","http://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/animating_thousands_of_fish.html","http://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/controlling_thousands_of_fish.html","https://github.com/clayjohn","https://github.com/godotengine/godot-docs/pull/2184","https://github.com/godotengine/godot/pull/25725","https://github.com/godotengine/godot/pull/25623","https://github.com/godotengine/godot/pull/25728"],"app":"steemit/0.1","format":"markdown"}
created2019-02-18 18:35:18
last_update2019-02-18 18:35:18
depth0
children9
last_payout2019-02-25 18:35:18
cashout_time1969-12-31 23:59:59
total_payout_value27.398 HBD
curator_payout_value8.737 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,779
author_reputation12,492,798,894,700
root_title"Godot Documentation: Animating Thousands of Objects"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id80,058,641
net_rshares69,939,633,644,267
author_curate_reward""
vote details (160)
@ajayyy ·
Very cool, thanks for all your work on the Godot documentation. This is how you get more people using the product, with more ways to learn!
πŸ‘  
properties (23)
authorajayyy
permlinkre-clayjohn-godot-documentation-animating-thousands-of-objects-20190219t024614064z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2019-02-19 02:46:15
last_update2019-02-19 02:46:15
depth1
children1
last_payout2019-02-26 02:46:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length139
author_reputation29,025,741,762,621
root_title"Godot Documentation: Animating Thousands of Objects"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id80,074,473
net_rshares4,647,104,633
author_curate_reward""
vote details (1)
@clayjohn ·
Thanks! I appreciate the comment! It's always nice for Godot to get a little more exposure.
properties (22)
authorclayjohn
permlinkre-ajayyy-re-clayjohn-godot-documentation-animating-thousands-of-objects-20190219t063102203z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2019-02-19 06:31:03
last_update2019-02-19 06:31:03
depth2
children0
last_payout2019-02-26 06:31:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length91
author_reputation12,492,798,894,700
root_title"Godot Documentation: Animating Thousands of Objects"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id80,080,627
net_rshares0
@ms10398 ·
$10.08
Hello @clayjohn,

It is another great documentation by you which is really great to see.

I have staff picked the contribution.

Sorry for the late review as I was busy with some personal stuff.

I really love the time you are spending on the project in order to improve the documentation of it.

Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/guidelines), as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, [click here](https://review.utopian.io/result/4/2-1-2-1-1-1-2-).

---- 
Need help? Chat with us on [Discord](https://discord.gg/uTyJkNm).

[[utopian-moderator]](https://join.utopian.io/)
πŸ‘  , , , , , , , , , , , , , , , ,
properties (23)
authorms10398
permlinkre-clayjohn-godot-documentation-animating-thousands-of-objects-20190222t155929929z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"users":["clayjohn"],"links":["https://join.utopian.io/guidelines","https://review.utopian.io/result/4/2-1-2-1-1-1-2-","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"}
created2019-02-22 15:59:30
last_update2019-02-22 15:59:30
depth1
children2
last_payout2019-03-01 15:59:30
cashout_time1969-12-31 23:59:59
total_payout_value7.640 HBD
curator_payout_value2.435 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length745
author_reputation27,572,487,973,390
root_title"Godot Documentation: Animating Thousands of Objects"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id80,244,826
net_rshares18,472,170,031,506
author_curate_reward""
vote details (17)
@clayjohn ·
Thank you! I am very proud of this one.
properties (22)
authorclayjohn
permlinkre-ms10398-re-clayjohn-godot-documentation-animating-thousands-of-objects-20190222t192108066z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2019-02-22 19:21:09
last_update2019-02-22 19:21:09
depth2
children0
last_payout2019-03-01 19:21:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length39
author_reputation12,492,798,894,700
root_title"Godot Documentation: Animating Thousands of Objects"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id80,253,583
net_rshares0
@utopian-io ·
Thank you for your review, @ms10398! Keep up the good work!
properties (22)
authorutopian-io
permlinkre-re-clayjohn-godot-documentation-animating-thousands-of-objects-20190222t155929929z-20190224t180729z
categoryutopian-io
json_metadata"{"app": "beem/0.20.17"}"
created2019-02-24 18:07:30
last_update2019-02-24 18:07:30
depth2
children0
last_payout2019-03-03 18:07:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length59
author_reputation152,955,367,999,756
root_title"Godot Documentation: Animating Thousands of Objects"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id80,337,324
net_rshares0
@steem-ua ·
#### Hi @clayjohn!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
**Feel free to join our [@steem-ua Discord server](https://discord.gg/KpBNYGz)**
πŸ‘  
properties (23)
authorsteem-ua
permlinkre-godot-documentation-animating-thousands-of-objects-20190222t180812z
categoryutopian-io
json_metadata"{"app": "beem/0.20.18"}"
created2019-02-22 18:08:15
last_update2019-02-22 18:08:15
depth1
children0
last_payout2019-03-01 18:08:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length287
author_reputation23,214,230,978,060
root_title"Godot Documentation: Animating Thousands of Objects"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id80,250,544
net_rshares6,116,128,380
author_curate_reward""
vote details (1)
@trufflepig ·
**Congratulations!** Your post has been selected as a daily Steemit truffle! It is listed on **rank 21** of all contributions awarded today. You can find the [TOP DAILY TRUFFLE PICKS HERE.](https://steemit.com/@trufflepig/daily-truffle-picks-2019-02-19) 
    
I upvoted your contribution because to my mind your post is at least **2 SBD** worth and should receive **74 votes**. It's now up to the lovely Steemit community to make this come true.

I am `TrufflePig`, an Artificial Intelligence Bot that helps minnows and content curators using Machine Learning. If you are curious how I select content, [you can find an explanation here!](https://steemit.com/steemit/@trufflepig/weekly-truffle-updates-2019-07)
    
Have a nice day and sincerely yours,
![trufflepig](https://raw.githubusercontent.com/SmokinCaterpillar/TrufflePig/master/img/trufflepig17_small.png)
*`TrufflePig`*
    
properties (22)
authortrufflepig
permlinkre-godot-documentation-animating-thousands-of-objects-20190219t163704
categoryutopian-io
json_metadata""
created2019-02-19 16:37:06
last_update2019-02-19 16:37:06
depth1
children0
last_payout2019-02-26 16:37:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length883
author_reputation21,266,577,867,113
root_title"Godot Documentation: Animating Thousands of Objects"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id80,105,388
net_rshares0
@utopian-io ·
Hey, @clayjohn!

**Thanks for contributing on Utopian**.
Congratulations! Your contribution was Staff Picked to receive a maximum vote for the documentation category on Utopian for being of significant value to the project and the open source community.

We’re already looking forward to your next contribution!

**Get higher incentives and support Utopian.io!**
 Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via [SteemPlus](https://chrome.google.com/webstore/detail/steemplus/mjbkjgcplmaneajhcbegoffkedeankaj?hl=en) or [Steeditor](https://steeditor.app)).

**Want to chat? Join us on Discord https://discord.gg/h52nFrV.**

<a href='https://steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
properties (22)
authorutopian-io
permlinkre-godot-documentation-animating-thousands-of-objects-20190222t225207z
categoryutopian-io
json_metadata"{"app": "beem/0.20.17"}"
created2019-02-22 22:52:09
last_update2019-02-22 22:52:09
depth1
children0
last_payout2019-03-01 22:52:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length788
author_reputation152,955,367,999,756
root_title"Godot Documentation: Animating Thousands of Objects"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id80,260,455
net_rshares0
@wod-game ·
Congratulations @clayjohn! Your post received a small up-vote from @wod-game as little gift. <br> We are a small group of people who want to create the next big Video game for Steem. <br> Want to know more about us? <br> Steem: @wod-game <br> Discord: [Click here!](https://discord.gg/crb6Pu6) <br><br> Have a nice Day!
πŸ‘  
properties (23)
authorwod-game
permlink20190219t022603011z
categoryutopian-io
json_metadata{"tags":["gaming"]}
created2019-02-19 02:26:03
last_update2019-02-19 02:26:03
depth1
children0
last_payout2019-02-26 02:26:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length319
author_reputation311,777,258,182
root_title"Godot Documentation: Animating Thousands of Objects"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id80,073,784
net_rshares4,836,601,221
author_curate_reward""
vote details (1)