-
[SOLVED][1.8] Light bugs with models (face-dependent brightness and black faces)
It's not what LexManos is thinking >< https://github.com/MinecraftForge/MinecraftForge/issues/2019 Ha yes... I could also. Which symptoms ? It's seems really logical to me : - Only appends on "forge registered" blocks => problem in registration... - Black faces in the block itself -> The block face take the lighting of the block that this face is facing (Ex: north block for a north facing block), but if this face is obstructed, this takes the light of the block itself (0 in this case). But if you set "useNeighborBrightness = true" it takes the bigest light value from the six adjacent blocks. - Black faces on others -> again, the block face take the lighting of the block that this face is facing. Here 0, but if you set "useNeighborBrightness = true", it's not 0 anymore. P.S.: No matter, Now I'm having some fun with my block :
-
[SOLVED][1.8] Light bugs with models (face-dependent brightness and black faces)
Problem solved ! In the Block.registerBlocks() method, I found this : My brain directly pop out that "useNeighborBrightness" should be true for my block, but this thing here is not applied to my block because my block is registered after the vanilla registration. So I tried to do "useNeighborBrightness = true" in my block class (by chance, useNeighborBrightness is a protected field), and IT WORKS ! Look at this beautiful blocks <3 : https://raw.githubusercontent.com/Zyfarok/Stairs-Test/master/bug_solved.png[/img] I pushed "Stairs-Test" to allow you to see the simple "this.useNeighborBrightness = true;" That's cool that there is a solution, but I think this is a bug and I will explain this in my issue to allow them to correct this. (if they also consider this as a bug) Thanks for your help TGG, and also thanks for your "MinecraftByExample" tutorials =)
-
[SOLVED][1.8] Light bugs with models (face-dependent brightness and black faces)
Okay... I will check this out... But If it's too complex it's maybe better to keep using some IBakedModel (Maybe an IModel wich return some IFlexibleBakedModel would be better than my ISmartBlockModel ?) I will try with slabs... I will edit this when done. No it's permanent. When there is a block in front of the face, there is automatically the dark lighting. Yes I think that's an ambient occlusion / fancy lighting issue, but that's only for the registered block and this point is really weird... If I need to I will try to track down... =/
-
[SOLVED][1.8] Light bugs with models (face-dependent brightness and black faces)
Thx for your help for the JSON, I think I will go back to this format. For the triangles Yes but how to do triangles in a json file ? I've seen a resource-pack json model using vertex but this resource-pack doesn't work anymore on 1.8 (it does before) Yes and that's the real problem now ! EDIT : If no-one find out from where the bug comes, it's maybe a Forge bug... So I tried to report the issue : https://github.com/MinecraftForge/MinecraftForge/issues/2019 And my problem for the triangles in json is still there ! (I will create a new post for that if the lighting bug is solved)
-
[SOLVED][1.8] Light bugs with models (face-dependent brightness and black faces)
Hi, - For the First bug that you call "direction-dependent lighting", I use this to create my bakedQuad : So I suppose that I need to change the "color" value to black and change the "tintIndex" for each different faces ? (Creating the shade manually) EDIT : Ho maybe I should bring a fix tintIndex and generate the color as the FaceBakery.getFaceShadeColor(facing) does... - For the second bug : See the "StairsTestBlock" definition : I didn't change any isOpaqueCube(), isFullCube() definitions ! And nether the block bounds... Last thing, Why did I choose ISmartBlockModel ? Because : - I wanted to create a generic block that I can register with different textures without creating tons of json files. And I was thinking that using ISmartBlockModel would help (but now I'm not sure) - I don't know how to create triangles with the current json files. There is probably a way but I don't know how... - I'm a noob
-
[SOLVED][1.8] Light bugs with models (face-dependent brightness and black faces)
Hello there ! I'm trying to create some "slope" block (45° slope) which work exactly like stairs... I'm a beginner so it was hard but I arrived to this result (using BakedQuads in a ISmartBlockModel) : (Do not look at the bedrock texture, it's temporary) In first view, it looks good, But in fact it's not really good : - [solved] The first point/bug is that the brightness of the faces is always 100% (it should be 80% on north/south faces, 60% on east/west faces and 50% on the bottom) : - [Not Solved] The second point/bug is that there is false lighting on itself and also on other blocks : I don't understand because my block is extending "BlockStairs" so it has the exact same properties, and I also tryed to change every possible parameters in the model. A "solution" to the second point is to set the "lightOpacity" to 0, but it's not really what I want and the vanilla stairs doesn't need it ! To go further I tryed to create an exact copy of the vanilla stairs using the same model json file here : https://github.com/Zyfarok/Stairs-Test and I don't understand why but the result is different than the vanilla stairs (the second point/bug isn't fixed, but the first seems to be gone) : So please help me to find were is the problem ! How do I create my slope model to have a correct rendering ? (without using lightOpacity or TileEntitySpecialRender) What did I do wrong ? Or maybe it's a Minecraft or Forge bug ? (Edit : I think the second point can't be a Minecraft bug, because it does not appear on vanilla blocks. It does only appear on Forge registered blocks) You can find the code of the slope (using ISmartBlockModel) and the code of the stairs (using the vanilla existing json model file) here : https://github.com/Zyfarok/Stairs-Test If you want more images : Thank for your help, and sorry for my bad English, I'm just a simple French student. P.S.: All my screenshots are done in "brightness : Moody" (Minimum but default brightness settings)
IPS spam blocked by CleanTalk.