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

Brighter renders #26

Open
destruc7i0n opened this issue Mar 5, 2021 · 4 comments
Open

Brighter renders #26

destruc7i0n opened this issue Mar 5, 2021 · 4 comments
Assignees
Labels
bug Something isn't working in progress

Comments

@destruc7i0n
Copy link

destruc7i0n commented Mar 5, 2021

Hello! I was wondering if it is possible (with option or alike?) to make the renders brighter, like how they appear in the player's inventory?

Inventory Render
image image

I'm running on a Mac, Fabric 1.16.5.

For context, I run a website for generating the vanilla crafting recipe JSON files. I've been looking to migrate the textures I had since before the texture update and found this repo. While most textures look great, the dimmer textures are slightly harder to recognize.

Old Rendered with BlockRenderer
image image
@AterAnimAvis AterAnimAvis added the bug Something isn't working label Mar 5, 2021
@AterAnimAvis AterAnimAvis self-assigned this Mar 5, 2021
@AterAnimAvis
Copy link
Owner

AterAnimAvis commented Mar 5, 2021

I consider the slime block/stained glass differences as a bug, it seems to effect all blocks with transparency (your other differences (in brightness) seem to be due to the texture changes). BlockRenderer tries to provide as close to actual in game as it can (The Animated Render is limited on the number of colours the gif format supports per frame).

I'm actually using the same methods as the inventory render so it's weird, I'm probably not setting the alpha state for GL right. I'll see if I can diagnose and fix this.

(From quick testing polished_andersite is byte accurate to an ingame image I captured whereas the slime_block is off by a fair margin)

This effects both Forge & Fabric

The feature request to brighten other textures would probably be best as an external post processing step.
Allowing post processing to be done/triggered in game is something I do wish to support in 2.0 with third party plugins being able to provide steps such as brightening, trimming or optimising of the produced images.

@destruc7i0n
Copy link
Author

Ah, I had specifically meant the ones with transparency, probably should have worded that better... Great to hear about the plans for 2.0 and third-party plugin support, definitely will look into that then!

@AterAnimAvis
Copy link
Owner

No problem, I usually have trouble wtih clearness / wording things as well.

Unfortunately from a quick poke the GLState looks like it's the same, I'll have to re-setup my OpenGL debugging tools to take a deeper look.
I'm fairly busy atm but hope to get a chance to take a deeper dive into this at the weekend.

@AterAnimAvis
Copy link
Owner

Apologies for the delay, been busy, and OpenGL Debugging tools suck (crash, crash, crash)

Current progress update:

  • InGame Appearance of the renders are the same as the originals (i.e. OpenGL state is right)
  • Changing the clear color to from (0 ,0, 0, 0) to (1, 1, 1, 0) makes the exported renders seem "brighter"
  • Exports still don't seem completely right
  • Debugged the internal data flow upto the PNG writing and everything seems stable.

Might be the PNG writer / writing or my wrapper doing something funky or might just be a difference of how OpenGL/Minecraft does Alpha overlaying at that point (src, 1 - src).

I will continue working on this to see if I can narrow down the cause further.

AterAnimAvis added a commit that referenced this issue May 27, 2021
- All Image data upto the STBWrapper is correct.
- TODO: Further Testing

Signed-off-by: AterAnimAvis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in progress
Projects
None yet
Development

No branches or pull requests

2 participants