Godot Vertex Shader Documentation

in #utopian-io6 years ago

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:

Heightmap made with noise (much more interesting):

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:

Links

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

GitHub Proof of Authorship

Sort:  

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.

Vote for Utopian Witness!

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, 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.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

I really appreciate that! I hope to contribute lots more of similar quality.

Congratulations @clayjohn! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :

Award for the total payout received

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:
SteemitBoard World Cup Contest - Quarter Finals - Day 2


Participate in the SteemitBoard World Cup Contest!
Collect World Cup badges and win free SBD
Support the Gold Sponsors of the contest: @good-karma and @lukestokes


Do you like SteemitBoard's project? Then Vote for its witness and get one more award!

Congratulations @clayjohn! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:
SteemitBoard World Cup Contest - The results, the winners and the prizes

Do you like SteemitBoard's project? Then Vote for its witness and get one more award!

Coin Marketplace

STEEM 0.16
TRX 0.13
JST 0.027
BTC 57916.39
ETH 2552.77
USDT 1.00
SBD 2.42