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

Better texture atlas handling for periodic_table.png #69

Open
Lolothepro opened this issue Jun 27, 2024 · 9 comments
Open

Better texture atlas handling for periodic_table.png #69

Lolothepro opened this issue Jun 27, 2024 · 9 comments

Comments

@Lolothepro
Copy link

This texture takes up a lot of space for nothing, and it's really weird to load a texture like that. It might be better to have another method for loading this texture.

https://github.com/SmashingMods/ChemLib/blob/1.20.1/src/main/resources/assets/chemlib/textures/item/periodic_table.png

  1. You could create your own atlas for each element, and then render them individually (and create tiles for the background)
    or
  2. Loading it into a dedicated texture
@Dark-Arcana
Copy link
Collaborator

I don't understand why this is an issue. Seems somewhat pedantic? I see your conversation about it in NeoForge but I didn't actually port the mod over to Neo yet.

What actual gain is there to be made by altering this texture?

@Lolothepro
Copy link
Author

A texture like that costs a lot of VRAM, and it's better to load lots of small textures than one big one like that.
Also, doing this causes problems for translating the mod.

@Dark-Arcana
Copy link
Collaborator

I understand. The large texture should be loaded in another way to reduce vram usage. Honestly, it's extremely low priority because it's not actually causing a problem. But I'm not going to break the texture into a bunch of smaller pieces to make it easier for translating.

@Geolykt
Copy link

Geolykt commented Jun 27, 2024

Though to be honest I wouldn't like to be the person that segments the large texture into a bunch of tiny ones - even though I reckon the vast majority can be handled with ninepatches (though the background would be a tenpatch). The most difficult thing here would be to handle the arrows.

But I'm not the person to be willing to do that work just yet - there's already enough for me to do

@Lolothepro
Copy link
Author

First, you can simply downscale the texture, and then do the work later?

@Dark-Arcana
Copy link
Collaborator

Yeah I am not willing to do that. You have to balance development time with the actual benefit provided by the outcome. I see very little benefit from this.

@Dark-Arcana
Copy link
Collaborator

First, you can simply downscale the texture, and then do the work later?

Why would I downscale the texture? We went with a higher resolution to make it look nice. If I reduced the resolution, it wouldn't look as good.

@Dark-Arcana
Copy link
Collaborator

I am planning on updating / porting my mods for 1.21 when I get time in the coming weeks. I can consider looking at this texture to see how small I can make it before it looses detail. I can also load the texture differently. It's a screen and shouldn't be in the atlas with blocks and items. I'm fine with doing that, but I won't cut the image into smaller pieces.

@douira
Copy link

douira commented Jun 27, 2024

The high resolution wastes a lot of texture space, and it can lead to bugs with block rendering when the atlas gets too big.

Maybe using a pixelated symbol, or a striped effect on the element's boxes would convey the same information? It would also be more in line with the pixelated art style of the game and mod.

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

4 participants