create account

Godot Vertex Shader Documentation by clayjohn

View this thread on: hive.blogpeakd.comecency.com
· @clayjohn ·
$108.13
Godot Vertex Shader Documentation
#### Repository
https://github.com/godotengine/godot-docs

#### Details
As an open source project Godot has a lot of trouble keeping its documentation fresh and relevant. This is likely because most people interested in open source projects are programmers and all they want to do is program. This is all the more true with a game engine as it attracts mostly people who want to make games, not people who want to work on tools. This situation leaves Godot in a place where much of the documentation has been around for awhile, and while it is still good, it becomes a little outdated. This PR replaces a section of the documentation to focus on using the vertex shader to displace vertices in a mesh, something that many new users would like to know more about. 

The new documentation explains how to create a mesh within Godot and then create and apply a shader material to it. Then it explains how to write and use a vertex shader to displace the vertices to create a new heightmap. This is very useful for creating a lot of different effects. 

One important part of this contribution is that it includes a code implementation of fbm-noise. fbm-noise is something that is used a lot for graphics stuff in gamedev but many new programmers struggle to implement it. So having an implementation in the official documentation should help many new users. 

Heightmap made with sin and cosine: 
http://docs.godotengine.org/en/latest/_images/vertex_displacement_cos_amplitude.png

Heightmap made with noise (much more interesting):
http://docs.godotengine.org/en/latest/_images/vertex_displacement_noise1.png


#### Components
This documentation teaches new users how to:
- Create and subdivide a Plane Mesh
- Create and assign a material to a Mesh
- Write a Shader that displaces the vertices of a Mesh
- Pass values (Uniforms) into a Shader to update the Mesh in realtime
- Approximate normals from a height function
- Use a light with a custom material


#### Difference
This tutorial replaces one titled "Mesh generation with heightmap at shaders". The old tutorial required the user to use Gimp and Blender to make a plane and a heightmap. The new tutorial removes those requirements and instead goes more into depth on how to use a Vertex shader.


At the end of the tutorial the user should end up with something like this:

http://docs.godotengine.org/en/latest/_images/vertex_displacement_normal_detailed1.png

#### Links
http://docs.godotengine.org/en/latest/tutorials/3d/vertex_displacement_with_shaders.html

#### GitHub Proof of Authorship
- GitHub Account: https://github.com/clayjohn
- Pull Request: https://github.com/godotengine/godot-docs/pull/1540
πŸ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 29 others
πŸ‘Ž  , , , , ,
properties (23)
authorclayjohn
permlinkgodot-vertex-shader-documentation
categoryutopian-io
json_metadata{"tags":["utopian-io","documentation","gamedev","godot"],"image":["http://docs.godotengine.org/en/latest/_images/vertex_displacement_cos_amplitude.png","http://docs.godotengine.org/en/latest/_images/vertex_displacement_noise1.png","http://docs.godotengine.org/en/latest/_images/vertex_displacement_normal_detailed1.png"],"links":["https://github.com/godotengine/godot-docs","http://docs.godotengine.org/en/latest/tutorials/3d/vertex_displacement_with_shaders.html","https://github.com/clayjohn","https://github.com/godotengine/godot-docs/pull/1540"],"app":"steemit/0.1","format":"markdown"}
created2018-07-01 01:39:48
last_update2018-07-01 01:39:48
depth0
children5
last_payout2018-07-08 01:39:48
cashout_time1969-12-31 23:59:59
total_payout_value81.758 HBD
curator_payout_value26.371 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,664
author_reputation12,492,798,894,700
root_title"Godot Vertex Shader Documentation"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id62,936,044
net_rshares45,978,255,963,668
author_curate_reward""
vote details (99)
@ms10398 ·
$0.03
Hello @clayjohn,

I am staff picking this contribution. I am really happy seeing a great contribution in documentation category.

I am looking forward to more awesome contribution from you in future.

Thank you!!

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/2211122).

---- 
Need help? Write a ticket on https://support.utopian.io/. 
Chat with us on [Discord](https://discord.gg/uTyJkNm). 
[[utopian-moderator]](https://join.utopian.io/)
πŸ‘  
properties (23)
authorms10398
permlinkre-clayjohn-godot-vertex-shader-documentation-20180704t073544820z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"users":["clayjohn"],"links":["https://join.utopian.io/guidelines","https://review.utopian.io/result/4/2211122","https://support.utopian.io/","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"}
created2018-07-04 07:35:45
last_update2018-07-04 07:35:45
depth1
children1
last_payout2018-07-11 07:35:45
cashout_time1969-12-31 23:59:59
total_payout_value0.020 HBD
curator_payout_value0.006 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length703
author_reputation27,572,487,973,390
root_title"Godot Vertex Shader Documentation"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id63,350,626
net_rshares12,180,652,595
author_curate_reward""
vote details (1)
@clayjohn ·
$0.03
I really appreciate that! I hope to contribute lots more of similar quality.
πŸ‘  
properties (23)
authorclayjohn
permlinkre-ms10398-re-clayjohn-godot-vertex-shader-documentation-20180704t183047389z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-07-04 18:30:48
last_update2018-07-04 18:30:48
depth2
children0
last_payout2018-07-11 18:30:48
cashout_time1969-12-31 23:59:59
total_payout_value0.025 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length76
author_reputation12,492,798,894,700
root_title"Godot Vertex Shader Documentation"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id63,423,018
net_rshares11,911,466,902
author_curate_reward""
vote details (1)
@steemitboard ·
Congratulations @clayjohn! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :

[![](https://steemitimages.com/70x80/http://steemitboard.com/notifications/payout.png)](http://steemitboard.com/@clayjohn) Award for the total payout received

<sub>_Click on the badge to view your Board of Honor._</sub>
<sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub>



**Do not miss the last post from @steemitboard:**
[SteemitBoard World Cup Contest - Quarter Finals - Day 2](https://steemit.com/steemitboard/@steemitboard/steemitboard-world-cup-contest-quarter-finals-day-2)

---
**Participate in the [SteemitBoard World Cup Contest](https://steemit.com/steemitboard/@steemitboard/steemitboard-world-cup-contest-collect-badges-and-win-free-sbd)!**
Collect World Cup badges and win free SBD
Support the Gold Sponsors of the contest: [@good-karma](https://v2.steemconnect.com/sign/account-witness-vote?witness=good-karma&approve=1) and [@lukestokes](https://v2.steemconnect.com/sign/account-witness-vote?witness=lukestokes.mhth&approve=1)

---

> Do you like [SteemitBoard's project](https://steemit.com/@steemitboard)? Then **[Vote for its witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1)** and **get one more award**!
properties (22)
authorsteemitboard
permlinksteemitboard-notify-clayjohn-20180708t090242000z
categoryutopian-io
json_metadata{"image":["https://steemitboard.com/img/notify.png"]}
created2018-07-08 09:02:42
last_update2018-07-08 09:02:42
depth1
children0
last_payout2018-07-15 09:02:42
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_length1,351
author_reputation38,975,615,169,260
root_title"Godot Vertex Shader Documentation"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id63,873,326
net_rshares0
@steemitboard ·
Congratulations @clayjohn! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :

[![](https://steemitimages.com/70x80/http://steemitboard.com/notifications/votes.png)](http://steemitboard.com/@clayjohn) Award for the number of upvotes

<sub>_Click on the badge to view your Board of Honor._</sub>
<sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub>



**Do not miss the last post from @steemitboard:**
[SteemitBoard World Cup Contest - The results, the winners and the prizes](https://steemit.com/steemitboard/@steemitboard/steemitboard-world-cup-contest-the-results-and-prizes)

> Do you like [SteemitBoard's project](https://steemit.com/@steemitboard)? Then **[Vote for its witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1)** and **get one more award**!
properties (22)
authorsteemitboard
permlinksteemitboard-notify-clayjohn-20180719t133526000z
categoryutopian-io
json_metadata{"image":["https://steemitboard.com/img/notify.png"]}
created2018-07-19 13:35:24
last_update2018-07-19 13:35:24
depth1
children0
last_payout2018-07-26 13:35:24
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_length898
author_reputation38,975,615,169,260
root_title"Godot Vertex Shader Documentation"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id65,243,710
net_rshares0
@utopian-io ·
$0.03
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!

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

<a href='https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
πŸ‘  
properties (23)
authorutopian-io
permlinkre-godot-vertex-shader-documentation-20180704t074511z
categoryutopian-io
json_metadata"{"app": "beem/0.19.42"}"
created2018-07-04 07:45:12
last_update2018-07-04 07:45:12
depth1
children0
last_payout2018-07-11 07:45:12
cashout_time1969-12-31 23:59:59
total_payout_value0.022 HBD
curator_payout_value0.006 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length498
author_reputation152,955,367,999,756
root_title"Godot Vertex Shader Documentation"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id63,351,561
net_rshares12,382,541,864
author_curate_reward""
vote details (1)