ChunkAnimator icon indicating copy to clipboard operation
ChunkAnimator copied to clipboard

Feature request: add smooth chunk fade-in loading animation

Open iperrealistico opened this issue 4 years ago • 12 comments

First of all: thanks for keeping this awesome mod updated. That's what a lot of people was asking :)

My feature request is: add a smooth fade-in effect, to allow chunks to smoothly load fading in like it happens on Bedrock Edition. Subtle, but a great enhancement for the game. This, coupled with a good shaderpack, would allow us to have an awesome experience!

iperrealistico avatar Feb 21 '21 23:02 iperrealistico

When I heard Bedrock had a chunk fade-in I thought someone might ask, I’ll take a look at adding it into the next update.

Harleyoc1 avatar Feb 22 '21 09:02 Harleyoc1

Yeah, mojang likes to polish that damn Bedrock version on this tiny details. At the end it all makes a lot of difference tho. Something similar already happens on java when using sodium + lithium on fabric but:

  • it's not a fade in, it's simply a lot more faster and with a more delicate fog around the borders
  • it's fabric only, so big rip to shaders

iperrealistico avatar Feb 22 '21 11:02 iperrealistico

Unfortunately this won’t be in the next update (which is today), but I wanted to say that I still plan on implementing it. I did have a brief look at it but it seems rendering a “render chunk” with a different opacity is slightly beyond my knowledge of Minecraft’s rendering system at the moment, so will take some more work.

Also yep, Mojang certainly favour the Bedrock version (I’m sure that's not because they can use it to charge people for customisation).

Harleyoc1 avatar Feb 23 '21 18:02 Harleyoc1

Patiently waiting here! That's something Java deserves and you would be the first one bringing it to the game 😆

with a different opacity is slightly beyond my knowledge of Minecraft’s rendering system

Well, I have zero idea on the functions that you can use to manipulate that kind of stuff, guess there isn't just a setOpacity lol

iperrealistico avatar Feb 23 '21 19:02 iperrealistico

Nope, the current chunk animations are simple enough because there’s a translate method that you can use to move a "MatrixStack", however the MatrixStack doesn’t apply colours (there’s an alpha property to colour) so I’ll need to work out how to do that properly to the entire render section of the chunk. I have some ideas of things I could try, but it’s probably smarter to learn a bit more about how the rendering works first.

Harleyoc1 avatar Feb 23 '21 20:02 Harleyoc1

I just thought of how Bedrock kinda has this. This would be a awesome feature. +1 for me!

koderian avatar Mar 01 '21 17:03 koderian

Hey man, any news on this? :)

iperrealistico avatar Apr 30 '21 18:04 iperrealistico

Hey man, any news on this? :)

Hey, sorry for the lack of progress. I do still plan on implementing this when I get the chance to look into it further - which if I'm honest will be a month, at minimum.

Porting existing code to different versions turned out to be the easy part for this mod, since that was mostly just finding out where to move the code injections. What I found from a bit of trial and error before was that I'll need a deeper understanding of both OpenGL rendering in general and Minecraft's chunk rendering system to realise this feature.

Harleyoc1 avatar Apr 30 '21 18:04 Harleyoc1

This may help: https://github.com/Johni0702/fade-in-chunks, but it is for Fabric, not Forge.

TheKodeToad avatar May 03 '21 08:05 TheKodeToad

Thanks for pointing this out. Porting this to Forge (under Chunk Animator) is certainly something I can do.

However, looking into it in more detail this mod requires Sodium. May need even more change to work with Vanilla.

Harleyoc1 avatar May 03 '21 10:05 Harleyoc1

Any news so far? :)

iperrealistico avatar Jun 20 '21 21:06 iperrealistico

Unfortunately not. As ever I've been busy with other projects and... well... life. I did make some progress recently in that I switched the current coremod transformers to use Mixin (on the 1.16.5-mixin branch) - which will make it much easier to implement this.

Furthermore, I feel my other modding-related projects have given me a better understanding of rendering than when I last looked at this. I won't set any deadlines for this since I don't want to disappoint, but I should have some more time in early July to take another look at this.

Harleyoc1 avatar Jun 21 '21 17:06 Harleyoc1