Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix and clarify skybox texture order documentation #14680

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

GreenXenith
Copy link
Member

@GreenXenith GreenXenith commented May 18, 2024

The order of skybox textures is currently listed as Y+ (top), Y- (bottom), X- (west), X+ (east), Z+ (north), Z- (south). Testing with simple T/B/W/E/N/S textures and comparing with F5 proves this is clearly not the case.

The original Irrlicht CSkyBoxSceneNode defines Z- as the "front" and a direction order of left/right/front/back, making the plane order X+/X-/Z-/Z+. The documentation was erroneously based on the direction order rather than the plane order.

Also, Irrlicht (now Minetest) aligns the top/bottom textures with the right (East) face (─━┼─), where most skybox textures are aligned with the front face (─┿──). I have clarified this accordingly.

Most people have probably used the order N/S/E/W, which effectively rotates the skybox such that the North texture is on the East face, which works fine as long as the texture doesn't need to be cardinally-aligned.

Aside: Don't make PRs when sleepy :D

@wsor4035 wsor4035 added @ Documentation Trivial The change is a trivial bug fix, documentation or maintenance change, as per the Git Guidelines labels May 18, 2024
Copy link
Contributor

@appgurueu appgurueu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can confirm that the order is wrong and your order is correct.

I find it a bit hard to follow your notes on alignment, just by reading alone:

  • What does it mean to be "aligned" with a plane? What I observe is that along the "shared axis" of the two planes, texture coordinates "align". I wonder whether there is a good way to put this into text.
  • What does "front-aligned" mean? Aligned with the Z+ plane? Or aligned with the Z- plane?

(Still this has my approval, since it is definitely an improvement on the current wrong docs. In the end, modders will probably end up experimenting until it looks right anyways if they can't follow the explanation; explaining visuals in text is a bit difficult.)

@GreenXenith
Copy link
Member Author

GreenXenith commented Jun 2, 2024

* What does it mean to be "aligned" with a plane? What I observe is that along the "shared axis" of the two planes, texture coordinates "align". I wonder whether there is a good way to put this into text.

"The top (+Y) and bottom (-Y) textures are oriented in-line with the +X (east) face. The top edge of the bottom texture and the bottom edge of the top texture touch the east face."

* What does "front-aligned" mean? Aligned with the Z+ plane? Or aligned with the Z- plane?

"Skybox textures expecting to be aligned with the north face ..."

Better, perhaps, @appgurueu? Will commit changes in a few hours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@ Documentation One approval ✅ ◻️ Trivial The change is a trivial bug fix, documentation or maintenance change, as per the Git Guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants