godot-docs icon indicating copy to clipboard operation
godot-docs copied to clipboard

"Using the ArrayMesh": better UV and indices explanation, and/or example code without indices

Open BevanFindlay opened this issue 3 years ago • 2 comments

Your Godot version: 3.5.stable.official

Issue description: I am trying to get my head around using ArrayMesh, but find the documentation is a little lacking in a couple of areas, specifically around explaining UVs and indices.

The tutorial says "We won't use [array index] in this tutorial." but it then goes on to give a sphere creation example that does use indices. This means that, as a newbie to understanding this, I don't have a good example on how to create a shape without using indices and I also don't have indices explained. i.e. either I try and implement code that hasn't been explained, or I try and create what has been explained without an example to work from.

The class description page also does not really explain what indices are or how you would use them - maybe it could be improved by use of an example of indices in use?

Also, neither page tells me what to set the UVs to. I understand the basic concept that these are the texture coordinates, but not how this should relate to the surface of my object or why they are 2D coordinates not 3D (I realise this mostly comes down to my own lack of understanding on the subjects, but that's why I am reading a tutorial). I think it would be better if either the tutorial is written from the perspective of someone with no understanding of the underlying concepts, or it links to a good generic walkthrough of those topics (I haven't found one, otherwise I'd provide a suggestion).

Maybe provide an example of how to set up UVs, normals, and indices for a simple shape (e.g. a two-triangle plane)? Code examples for this would be helpful.

URL to the documentation page (if already existing): https://docs.godotengine.org/en/stable/tutorials/3d/procedural_geometry/arraymesh.html

Also: https://docs.godotengine.org/en/stable/classes/class_arraymesh.html

BevanFindlay avatar Sep 10 '22 21:09 BevanFindlay

It sounds like you may benefit from another tutorial that explains the mesh format itself. As those questions don't appear to be ArrayMesh specific.

The ArrayMesh tutorial is written for people who already understand what a mesh is (including the components of the mesh), but want to understand how to procedurally create a mesh in code (instead of in modelling software like blender).

For the target audience, explaining in detail what UVs are or what indices are makes the tutorial less helpful. My preference is to keep the ArrayMesh tutorial focussed on using the ArrayMesh specifically and then to have a separate tutorial that explains basic concepts of meshes including UVs, Normals, indices, etc.

clayjohn avatar Sep 11 '22 00:09 clayjohn

If the tutorial has prerequisite knowledge, it should say so, and link to something that covers those topics.

The point about it saying it will not use indices then using them for the example should be addressed too (either/both explain about how to use indices and/or provide a code example without indices).

BevanFindlay avatar Sep 11 '22 07:09 BevanFindlay