Harleyoc1 / ChunkAnimator

Minecraft mod that animates the appearance of chunks.
MIT License
19 stars 3 forks source link

Feature request: add smooth chunk fade-in loading animation #6

Open iperrealistico opened 3 years ago

iperrealistico commented 3 years ago

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!

Harleyoc1 commented 3 years ago

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.

iperrealistico commented 3 years ago

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:

Harleyoc1 commented 3 years ago

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).

iperrealistico commented 3 years ago

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

Harleyoc1 commented 3 years ago

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.

koderian commented 3 years ago

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

iperrealistico commented 3 years ago

Hey man, any news on this? :)

Harleyoc1 commented 3 years ago

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.

TheKodeToad commented 3 years ago

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

Harleyoc1 commented 3 years ago

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.

iperrealistico commented 3 years ago

Any news so far? :)

Harleyoc1 commented 3 years ago

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.