Draco18s / ReasonableRealism

For 1.10!
Other
17 stars 8 forks source link

[Harder Ores][Suggestion] Dynamic Textures #42

Open Shazuli opened 5 years ago

Shazuli commented 5 years ago

Hi

Right now, going on the models and code, depending on the block state adds a mask with holes in it which is applied on top of the ore to simulate it containing different amounts. My suggestion is to keep the idea with covering up the the metal pieces but only the pieces them self and use the background texture to that of adjacent blocks. That way it could blend in better with other ores as well as blend in better if it generated in other stone types. The cover pieces should also be dynamic and use textures of that of the texture it is imitating. I made a short gif of it with GIMP picture editor (as it it just a picture editor and in the gif I simply changed the visibility of the different layers. I couldn't really simulate it taking textures of the main background so I just added some placeholders):

tx

Another approach would be to take the background texture and poke hole in that for the amount of visible metal pieces. But that would leave it stuck in a 16x16 grid and can only work with a certain shape, so I'm leaning more to the first method.

Shazuli commented 5 years ago

Oh, and to save resources it could probably just use this method on one ore and have other of its kind close by applied with the same texture as the first one.

Draco18s commented 5 years ago

Sure, looks good so far.

fin600 commented 5 years ago

With this system could support for Better With Mod's HCStrata or Underground Biomes Construct be possible?

Draco18s commented 5 years ago

@fin600 I think Underground Biomes is not possible based on prior research: they do their modifications to worldgen too late for me to be able to go after them (iirc they implemented their own delayed chunk generator, similar to how COG works, but due to technical limitations on the ordering of events,† UB runs after COG). I don't know about HCStrata, as I am unfamiliar with it.

†There is no such thing as "I want to run absolutely positively last I don't care what anyone else says" option because if two people declare that option only one of them can win.

fin600 commented 5 years ago

There's an open issue about compatibility here on the latest fork. I'm more concerned about the theoretical compatibility with the stone backgrounds though, assuming the worldgen was fixed. They're also not the only mod that does some funky stuff to stonegen, like Mineralogy or BetterGeo, which I'm unsure of their current compatibility.

HCStrata uses a resource pack to add differently colored layered of stone of greater hardness to the world. It's not hard to recolor ore to accommodate the strata, but the way Harder Ores builds ore block textures has made them incompatible.

Draco18s commented 5 years ago

Yes, that could be problematic. However, if regular ores can be recolored to function correctly, then so are hard ores. Just that you'd recolor the overlays and not the ore textures themselves: https://github.com/Draco18s/ReasonableRealism/tree/1.12.1/src/main/resources/assets/harderores/textures/blocks/ore

Aang23 commented 5 years ago

Getting that to work with UBC could be possible, if needed an API could be implemented. I had quite a lot requests to supports your ores... So.

Draco18s commented 5 years ago

Hey @Aang23, I'd be happy to do what I can to make things work. I, however, don't have a lot of time and its been a while since I messed with RR in any significant capacity.

The blocks themselves are instances of BlockHardOreBase (there is one subclass, for diamonds and other rare-valuable types that depletes more quickly) and the state json points to a custom two-layer model. All 16 units worth of metadata are already in use (for the remaining ore quanta), so different stone texture typing would need to be new blocks. Hope that helps.