0 votes

I already have a project doing this, but one side of the chunk is generated with inverted voxels. How to generate it correctly?

Godot version v3.3.2.stable.official
in Engine by (135 points)

1 Answer

0 votes

I haven't looked at your project yet, but I had the same problem a while back, and the reversed faces have to do with triangle creation order. The simple fix would be to just give them a material with the culling mode set to disabled, the hard mode would be changing the vertex order for the triangles (assuming you are creating voxels that way).

This might help:
https://en.wikipedia.org/wiki/Triangle_strip#:~:text=In%20OpenGL%2C%20the%20order%20in,that%20surface%20normals%20are%20consistent.&text=Draws%20a%20series%20of%20triangles,%2C%20v4%2C%20and%20so%20on.

(Also, this is the link which I found back when I had the same problem: https://www.reddit.com/r/godot/comments/8nax5l/surfacetool_normals_pointers_for_a_newbie/)

by (314 points)

thanks, but I decided to go through the tutorial on the unity first, and then remake the game for a godot.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.