Thorinair Posted April 8, 2017 Posted April 8, 2017 Hello! I have spent whole today trying to find a solution to something like this, googling, looking at this forum, everything... I came here hoping that someone might be able to help me. I used to maintain a mod called HEXCraft in 1.7.10. Probably the most important feature of this mod were the glow effects of almost all blocks. I used to achieve this by rendering in two separate passes using ISimpleBlockRenderingHandler: one pass for the inner glow texture, and one pass for the outer texture with normal shading. I am currently porting this mod to 1.10.2, and virtually everything has changed to the point that I am rewriting the whole mod ground-up. I've spent most of the day trying to figure out how to achieve the glow effect again. I've read about the existence of IBakedModel and ISmartBlockModel, but I've not been able to find any straight tutorials on how to use them correctly, especially for something like this... Here is how the effect used to look like: http://dl.celestek.xyz/thorinair/Minecraft/2017-04-08_17.59.06.png Some more screenshots of the glow on various blocks are here on my Wiki: http://wiki.celestek.xyz/index.php?title=HEXCraft And here is how it obviously looks now without the glow: http://dl.celestek.xyz/thorinair/Minecraft/2017-04-08_17.55.57.png Here is the original source code of the 1.7.10 version, specifically of the ISimpleBlockRenderingHandler for the glowing blocks: https://github.com/CelesTek-Team/HexCraft/blob/master/main/java/com/celestek/hexcraft/client/renderer/HexBlockRenderer.java And here is the whole source so far of the 1.10.2 version: https://github.com/CelesTek-Team/HexCraft/tree/1.10.2 Note that so far, only the basic items and the ore blocks are implemented, with the ore blocks not glowing. Most of the code are bits and pieces from Choonster's TestMod3 clumped together to make the basic stuff work (I haven't cleaned it up yet properly, but it should be understandable). I honestly don't know how to proceed to combine all of this and make a glowing effect. I tried to use the "shade": false for the model, but that is useless as this only works when the block emits light. These blocks should never emit actual light. Quote
Kokkie Posted April 8, 2017 Posted April 8, 2017 Why not update to 1.11.2? If you update you should go for the latest version. Quote Classes: 94 Lines of code: 12173 Other files: 206 Github repo: https://github.com/KokkieBeer/DeGeweldigeMod
Thorinair Posted April 8, 2017 Author Posted April 8, 2017 Most of the most important mods which HEXCraft interfaced with are still on 1.10.2 (and I don't see that changing too much), plus porting to 1.11.2 should be way easier than from 1.7.10 afterwards, so maintaining two versions is a high possibility from this point on. Quote
Kokkie Posted April 8, 2017 Posted April 8, 2017 You want to make your own block glow? So like glowstone but without emitting light? Quote Classes: 94 Lines of code: 12173 Other files: 206 Github repo: https://github.com/KokkieBeer/DeGeweldigeMod
Thorinair Posted April 8, 2017 Author Posted April 8, 2017 Exactly, but as I described in my OP, it is a bit more complicated than that. Check the screenshots for reference. The block has an internal glowing texture, and another texture on top of it which has normal shading, making it look like the glow is escaping from within the blocks. These textures are already on GitHub, for instance here are the two textures for the red ore block:hexorium_a_red.png hexorium_b_red.png The "a" texture is the inner texture which should glow, and the "b" texture wraps around it to make only the red parts appear as glowing. Quote
Matryoshika Posted April 8, 2017 Posted April 8, 2017 Similar threads, which should give you some pointers Quote Also previously known as eAndPi. "Pi, is there a station coming up where we can board your train of thought?" -Kronnn Published Mods: Underworld Handy links: Vic_'s Forge events Own WIP Tutorials.
Thorinair Posted April 8, 2017 Author Posted April 8, 2017 I've already seen both of those threads. Both don't answer the issue of the block not emitting light. Using the shade properity is useless in this situation. However, that example of IBakedModel does look nice and possibly usable. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.