Symmetry Doesn't Work - Bug - I have a fix
Astraica opened this issue ยท 5 comments
Hi! I bet you've noticed that Symmetry doesn't work at all, the pattern gets all messed up, but after looking at the code and testing it out for myself, all that needs to be done is to change it from using the DOWN face, to the UP face :D However the sides are still a bit off in this case, it's just the rotation of the sides that's the issue.
To fix that, I have made a model specifically for repeat ctm symmetry. If it just needs to have the correct rotations on the sides, this model will help give you that :D Or you can just use this model somehow or redistribute it :)
Anyway, here's the model:
blue_ice.json
I used the blue Ice CTM I just made to test it out :) With the UP face used instead of down, it works so well!
I'm also currently working with TimeTravelBeard on a CTM model fix for POM on CTM textures! :D It's only a few days since he's released his work and I'm the first RP artist to contact him about it buuut, this is AMAZING! With this fix I just provided to you along with his models and shader patch, we'll have perfect CTM! :D
From discussions on Discord (that happened a while ago) this turned out a request for a feature that seemed impossible to implement due to geometry itself.
I don't understand what isn't working. By symmetry, do you mean the symmetry
property? Which method
are you using with symmetry
? Which symmetry
value are you using? Where does Direction.DOWN
need to be changed to Direction.UP
in the code? What exactly is incorrect about the texture rotation? Is Continuity's behavior consistent with OptiFine's behavior? What is the blue ice model for and what am I supposed to do with it?
My apologies, I thought you would know what I was talking about, I blame my headache. Also: This took about an hour or so to write and gather all of the screenshots, my pack contains many 2k textures with POM and PBR so shaders are also used and it takes time for over 4GB of graphics to load ;P It's just been updated to 2k, the largest size was 1k but, yeah anyway X3
I am a professional resource pack artist, I've been making TRON: Digitized as a resource pack and now 2 mods (a third is in the making currently), since 2019. I hand-make most of my textures and do Old/Seus PBR for my pbr version on my textures.
The current version I am working with of your mod is: continuity-3.0.0-beta.3+1.20.1
However, to see how to correct the odd behavior of repeat CTM with symmetry=all, I needed to download and research your 1.19.2 code.
Here is the data:
Symmetry can only be used on Repeat CTM.
The Symmetry method normally used is "none", which calculates every face of each block in the world to see what texture out of the repeat ctm to use upon each face. However, I need "symmetry=all" for my repeat CTM as it uses the same texture all over the block. However it calculates this from the BOTTOM face, not the TOP, which messes up the calculation somehow and in my example below, you will see how.
This fix is also needed for any repeat CTM to look right professionally.
Here is what repeat CTM looks like with "symmetry=none":
Here is what it looks like with "symmetry=all":
And here is what it looks like with "symmetry=all" with my fix:
Even with the single word change in code from DOWN to UP, the sides of the block of the CTM were not correctly UV mapped as they need to be turned to display the texture in combination with the UP face texture correctly AND to correctly match each corresponding texture on the side of the block beside it.
That is why my model is there, for the WEST, NORTH, EAST, SOUTH sides of the block UV maps for their rotations to work properly with "symmetry=all" CTM even with the code fix.
Here is a screenshot of the code in the 1.19.2 version that is downloadable from your GitHub that needed to be changed. The UP was DOWN. So it needs to be UP as seen here. I have it highlighted just to be sure you see it :)
I had originally ran into this problem with Optifine, however, they were very adamant about not fixing it. As I had just updated my pack, this still irked me, however with your code being available, I was able to test and find a solution :D I know much about how CTM works, but not everything. I do hope this helps :)
Here is a 3 year or so old picture of what repeat ctm looked like with Optifine, symmetry=all didn't even change a thing with it when I had tried it even back then. >.<
What you're looking for are the sides of the glowing white floor blocks. Notice how they do not match up with the top faces?
This has been an issue for a long time with me, so I would be deeply grateful to you if you worked this fix into your mod :D You'd certainly surpass Optifine a lot if you did so :D
Thanks for the explanation; it is very helpful. I will need to do my own testing to determine what a good way to fix this would be. Alternate models should not be necessary to have this work correctly. You may want to join my Discord server so it is easier for you to test experimental builds that may fix this, once I am ready to make those.