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

Rendered in Reverse #16

Open
proferabg opened this issue Jan 16, 2022 · 2 comments
Open

Rendered in Reverse #16

proferabg opened this issue Jan 16, 2022 · 2 comments

Comments

@proferabg
Copy link

proferabg commented Jan 16, 2022

Versions

SchematicWebViewer - 4.2.0
Minecraft - 1.18.1
WorldEdit-Bukkit - 7.2.8

Issue

Schematics renedered with SchematicWebViewer are reversed.

How to Reproduce

Create Structure, Save as Schematic, Render with SchematicWebViewer.

The Code I Used

Schematic (Base64)
H4sIAAAAAAAA/5VT32vUQBCeZu9Xkl6rKIjok+CDcC++CvdgtWChxaLVWo8S9jaTy3JJNuzOeVf/d9HZ+9HcFYW6kIed78v3zczORBB+VjmWkrQSEJ3LAonwTC4A4DCC7jog4EmpK1RWZvQm1bI0VZqMC6OmzNsT8KpBs5mtpMJRJpWuJkNnZpQPCk3DTBYOr5m/L+Bhwx9jalc6QsDTJm7kNCnMZCQX2g1v/H9dAVcNbjFNKqQcbTK2Wk0TR1Jbt+ubyyIbkqkHLpc1Dh1ZqSc5DeaS0LL6BNMmrwMB141+aZy7YVFT4V8NKmM3BmNDZMp7efQFnO7W+E/V+6YdCzhsJCeFdI6j4U4zC/87P9gMk7kxBeORgFGDz+WC26lmlChT19zS3axQOvrvUgMBz7eeWVuVe/N09aI/PaUl4GVDUdL+4CzqWVlPdbXxnqMjz+0JeHZX7nY+Fp7REfB4qxGmaEYUBLxoIM5bc5VpsjNjS402M7tf0TptKl9DAJ1TrCaUQyuC3hmSTCVJAeHl8ccsc0jffvPZul/duX/n6y9gmQ/oW+WXJX7PErce8esuhEc+Tx9mzwewF4hWu9PthVEs9vsHIfSX+HFFmjS6yO9cAL13xkwvdImsAeLcuGWZDMHqCKYc8TKuKCG0TwhLt4R6EJyk20u4XtoA+hvRC0OS5ySC+BMqXaP74jDlhkD7Uqe+HTF0VhWubf15y98j+APwW9a+VAQAAA==
Schematic with Additional Blocks (Base64)
H4sIAAAAAAAA/5VUTW/TQBCdZvNlp2kaQEIITkgckHLhipQDhUpUakUEhbZElbWxx/EqttfanZCUPw+z+XKCQCQj2dLOPL/3PDu7PnhfwgQzSSoU4A9kikR4JecA8MiHxioh4GmmcgyNjOltpGSm8ygYpTqcMO5IwOuyGk9NLkMcxjJU+bhv9ZSSXqqoH8vU4j3jjwV0S/wII7PkEQKelXktJ0Gqx0M5V7b/4L5rCLgr6wajIEdK0AQjo8JJYEkqY3d1E5nGfdJFzyaywL4lI9U4od5MEhpmH2NU+joRcF/yZ9raBybVOf5VINdmLTDSRDrbS6Mt4HL3H//Juq/t1kG2t/pygO1TAZ1SY5xKaznr7WxY6j7noZhiMNM65bovoF3W2QXnOgKGZW4m57yN4ZSCUBcFb+WuWZSWDvZaEfBia7yUCRNnKFpO0k8HqQp4VUJCaX6wi2KaFROVr7VnaMlhmwKe/0m3mcu5Q9QF3O49l472sP3tCniy1XudlicPBLwsS0yjuIlRsHN0FhZrjGx8Q2OVzl2LKlC/xHxMCVR9aF4hyUiSFODdnH+KY4t0uzzXm/XdL46t9XenDkzzEZ1zqAlofWCKjUbrTQO8M+fTpRk7gKOKqNbqjabnt8Rx+6SzidPObvx33eVX14P2gv88J0UKre8sV6D5XuvJtcqQPYAYaLtoE5dgGYIhZ3xHLSEe1C4IM7soNaFyEW3fTau7rALtNem1Jsmj7UPrM4aqQPvVYuQaUbtRkWtnC+rLDq1kXbzj5zH8Bi8t0e9rBQAA
JS Code
  renderSchematic(document.querySelector("#schem"), data, {
      size: 500,
      orbit: false,
      renderArrow: false,
      renderBars: false,
      corsBypassUrl: CORS_ANYWHERE,
      backgroundColor: "#000000"
  });

Pictures

In Game

In Game 1
In Game 2
In Game 3
In Game 4
Additional Blocks
In Game 5

SchematicWebViewer

SchematicWebViewer 1
SchematicWebViewer 2
SchematicWebViewer 3
Additional Blocks
SchematicWebViewer 4

@proferabg proferabg changed the title Rendered with Wrong Orientations Rendered in Reverse Jan 16, 2022
@octylFractal
Copy link
Member

This technically isn't a rendering bug, but the schematic loading code; I think. The textures themselves are the correct way around (the pumpkin is an easy way to see this).

Unrelated, I think there is a bug in rendering stairs because the textures for the moss stair don't match up at all.

@me4502
Copy link
Member

me4502 commented Nov 12, 2022

This isn't related to the schematic loading, it's all correct - I believe the issue here is that the world space used by BabylonJS and other 3D libraries doesn't actually match the world space of Minecraft, as it uses an inverted axis. Would have to dive deep into BabylonJS to see if the actual world space can be modified, or to update absolutely everything (including all models etc) that might refer to directions

I've tried just flipping the direction that the blocks are applied, but all blocks with direction-specific rotation such as torches, fences, etc will end up attached to the wrong blocks on the north/south axis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants