Minecraft(我的世界)中文论坛

标题: [模型]修改方块模型遇到问题,大神帮看看如何解决

作者: 104277777    时间: 2016-9-19 23:42
标题: [模型]修改方块模型遇到问题,大神帮看看如何解决
游戏版本:1.10.2
安装了optifine
修改的工业2模组的模型
首先上图
1.
此图是开了平滑光照100% 可以看到在地面上的火力发电机顶部没问题,在地面的火力发电机顶部是黑色的,如果多个放在一起就会像右边的3X3的那样有黑色晕影。但是下面的是末影接口的方块模型,他的顶部就没有任何问题。都是缩进0.25

2. 这是关闭平滑光照0%的结果,可以看到 蓝色方块上面的火力发电机顶部已经跟左边地面上的一样了右边也一样。

这就是我想问的,为何开启平滑光照就会变黑,但是其他模组的方块就不受影响。附上代码。
剔除面写于不写都一样,之前有写过也不管用,shade也写过也没用。为了省事,主要是测试都去掉了。

还有,请不要说删除optifine或者开光影,我想做的是任何玩家都可以使用的模型。
  1. {
  2. "__comment": "Designed by Peakxing with BDcraft Cubik PRO 0.96 Beta - http://bdcraft.net",
  3. "ambientocclusion": false,
  4. "parent": "block/cube",
  5. "textures": {
  6.     "particle": "ic2:blocks/generator/electric/generator_leftrightback",
  7.     "generator_bottom": "ic2:blocks/generator/electric/generator_bottom",
  8.     "generator_front": "ic2:blocks/generator/electric/generator_front",
  9.     "generator_leftrightback": "ic2:blocks/generator/electric/generator_leftrightback",
  10.     "generator_top": "ic2:blocks/generator/electric/generator_top"
  11. },
  12. "elements": [
  13. {
  14.     "from": [ 0, 15, 0 ],
  15.     "to": [ 16, 16, 1 ],
  16.     "faces": {
  17.         "down":  { "uv": [ 16, 1, 0, 0 ], "texture": "#generator_bottom" },
  18.         "up":    { "uv": [ 0, 0, 16, 1 ], "texture": "#generator_bottom" },
  19.         "north": { "uv": [ 0, 0, 16, 1 ], "texture": "#generator_bottom" },
  20.         "south": { "uv": [ 0, 0, 16, 1 ], "texture": "#generator_bottom" },
  21.         "west":  { "uv": [ 0, 0, 1, 1 ], "texture": "#generator_bottom" },
  22.         "east":  { "uv": [ 15, 0, 16, 1 ], "texture": "#generator_bottom" }
  23.     }
  24. },
  25. {
  26.     "from": [ 0, 0, 0 ],
  27.     "to": [ 16, 1, 1 ],
  28.     "faces": {
  29.         "down":  { "uv": [ 16, 1, 0, 0 ], "texture": "#generator_bottom" },
  30.         "up":    { "uv": [ 0, 0, 16, 1 ], "texture": "#generator_bottom" },
  31.         "north": { "uv": [ 0, 15, 16, 16 ], "texture": "#generator_bottom" },
  32.         "south": { "uv": [ 0, 15, 16, 16 ], "texture": "#generator_bottom" },
  33.         "west":  { "uv": [ 0, 15, 1, 16 ], "texture": "#generator_bottom" },
  34.         "east":  { "uv": [ 15, 15, 16, 16 ], "texture": "#generator_bottom" }
  35.     }
  36. },
  37. {
  38.     "from": [ 0, 0, 15 ],
  39.     "to": [ 16, 1, 16 ],
  40.     "faces": {
  41.         "down":  { "uv": [ 16, 16, 0, 15 ], "texture": "#generator_bottom" },
  42.         "up":    { "uv": [ 0, 15, 16, 16 ], "texture": "#generator_bottom" },
  43.         "north": { "uv": [ 0, 15, 16, 16 ], "texture": "#generator_bottom" },
  44.         "south": { "uv": [ 0, 15, 16, 16 ], "texture": "#generator_bottom" },
  45.         "west":  { "uv": [ 15, 15, 16, 16 ], "texture": "#generator_bottom" },
  46.         "east":  { "uv": [ 0, 15, 1, 16 ], "texture": "#generator_bottom" }
  47.     }
  48. },
  49. {
  50.     "from": [ 0, 15, 15 ],
  51.     "to": [ 16, 16, 16 ],
  52.     "faces": {
  53.         "down":  { "uv": [ 16, 16, 0, 15 ], "texture": "#generator_bottom" },
  54.         "up":    { "uv": [ 0, 15, 16, 16 ], "texture": "#generator_bottom" },
  55.         "north": { "uv": [ 0, 0, 16, 1 ], "texture": "#generator_bottom" },
  56.         "south": { "uv": [ 0, 0, 16, 1 ], "texture": "#generator_bottom" },
  57.         "west":  { "uv": [ 15, 0, 16, 1 ], "texture": "#generator_bottom" },
  58.         "east":  { "uv": [ 0, 0, 1, 1 ], "texture": "#generator_bottom" }
  59.     }
  60. },
  61. {
  62.     "from": [ 0, 15, 1 ],
  63.     "to": [ 1, 16, 15 ],
  64.     "faces": {
  65.         "down":  { "uv": [ 16, 15, 15, 1 ], "texture": "#generator_bottom" },
  66.         "up":    { "uv": [ 0, 1, 1, 15 ], "texture": "#generator_bottom" },
  67.         "north": { "uv": [ 15, 0, 16, 1 ], "texture": "#generator_bottom" },
  68.         "south": { "uv": [ 0, 0, 1, 1 ], "texture": "#generator_bottom" },
  69.         "west":  { "uv": [ 1, 0, 15, 1 ], "texture": "#generator_bottom" },
  70.         "east":  { "uv": [ 1, 0, 15, 1 ], "texture": "#generator_bottom" }
  71.     }
  72. },
  73. {
  74.     "from": [ 0, 0, 1 ],
  75.     "to": [ 1, 1, 15 ],
  76.     "faces": {
  77.         "down":  { "uv": [ 16, 15, 15, 1 ], "texture": "#generator_bottom" },
  78.         "up":    { "uv": [ 0, 1, 1, 15 ], "texture": "#generator_bottom" },
  79.         "north": { "uv": [ 15, 15, 16, 16 ], "texture": "#generator_bottom" },
  80.         "south": { "uv": [ 0, 15, 1, 16 ], "texture": "#generator_bottom" },
  81.         "west":  { "uv": [ 1, 15, 15, 16 ], "texture": "#generator_bottom" },
  82.         "east":  { "uv": [ 1, 15, 15, 16 ], "texture": "#generator_bottom" }
  83.     }
  84. },
  85. {
  86.     "from": [ 15, 15, 1 ],
  87.     "to": [ 16, 16, 15 ],
  88.     "faces": {
  89.         "down":  { "uv": [ 1, 15, 0, 1 ], "texture": "#generator_bottom" },
  90.         "up":    { "uv": [ 15, 1, 16, 15 ], "texture": "#generator_bottom" },
  91.         "north": { "uv": [ 0, 0, 1, 1 ], "texture": "#generator_bottom" },
  92.         "south": { "uv": [ 15, 0, 16, 1 ], "texture": "#generator_bottom" },
  93.         "west":  { "uv": [ 1, 0, 15, 1 ], "texture": "#generator_bottom" },
  94.         "east":  { "uv": [ 1, 0, 15, 1 ], "texture": "#generator_bottom" }
  95.     }
  96. },
  97. {
  98.     "from": [ 15, 0, 1 ],
  99.     "to": [ 16, 1, 15 ],
  100.     "faces": {
  101.         "down":  { "uv": [ 1, 15, 0, 1 ], "texture": "#generator_bottom" },
  102.         "up":    { "uv": [ 15, 1, 16, 15 ], "texture": "#generator_bottom" },
  103.         "north": { "uv": [ 0, 15, 1, 16 ], "texture": "#generator_bottom" },
  104.         "south": { "uv": [ 15, 15, 16, 16 ], "texture": "#generator_bottom" },
  105.         "west":  { "uv": [ 1, 15, 15, 16 ], "texture": "#generator_bottom" },
  106.         "east":  { "uv": [ 1, 15, 15, 16 ], "texture": "#generator_bottom" }
  107.     }
  108. },
  109. {
  110.     "from": [ 0, 1, 0 ],
  111.     "to": [ 1, 15, 1 ],
  112.     "faces": {
  113.         "down":  { "uv": [ 16, 1, 15, 0 ], "texture": "#generator_bottom" },
  114.         "up":    { "uv": [ 0, 0, 1, 1 ], "texture": "#generator_bottom" },
  115.         "north": { "uv": [ 15, 1, 16, 15 ], "texture": "#generator_bottom" },
  116.         "south": { "uv": [ 0, 1, 1, 15 ], "texture": "#generator_bottom" },
  117.         "west":  { "uv": [ 0, 1, 1, 15 ], "texture": "#generator_bottom" },
  118.         "east":  { "uv": [ 15, 1, 16, 15 ], "texture": "#generator_bottom" }
  119.     }
  120. },
  121. {
  122.     "from": [ 15, 1, 0 ],
  123.     "to": [ 16, 15, 1 ],
  124.     "faces": {
  125.         "down":  { "uv": [ 1, 1, 0, 0 ], "texture": "#generator_bottom" },
  126.         "up":    { "uv": [ 15, 0, 16, 1 ], "texture": "#generator_bottom" },
  127.         "north": { "uv": [ 0, 1, 1, 15 ], "texture": "#generator_bottom" },
  128.         "south": { "uv": [ 15, 1, 16, 15 ], "texture": "#generator_bottom" },
  129.         "west":  { "uv": [ 0, 1, 1, 15 ], "texture": "#generator_bottom" },
  130.         "east":  { "uv": [ 15, 1, 16, 15 ], "texture": "#generator_bottom" }
  131.     }
  132. },
  133. {
  134.     "from": [ 15, 1, 15 ],
  135.     "to": [ 16, 15, 16 ],
  136.     "faces": {
  137.         "down":  { "uv": [ 1, 16, 0, 15 ], "texture": "#generator_bottom" },
  138.         "up":    { "uv": [ 15, 15, 16, 16 ], "texture": "#generator_bottom" },
  139.         "north": { "uv": [ 0, 1, 1, 15 ], "texture": "#generator_bottom" },
  140.         "south": { "uv": [ 15, 1, 16, 15 ], "texture": "#generator_bottom" },
  141.         "west":  { "uv": [ 15, 1, 16, 15 ], "texture": "#generator_bottom" },
  142.         "east":  { "uv": [ 0, 1, 1, 15 ], "texture": "#generator_bottom" }
  143.     }
  144. },
  145. {
  146.     "from": [ 0, 1, 15 ],
  147.     "to": [ 1, 15, 16 ],
  148.     "faces": {
  149.         "down":  { "uv": [ 16, 16, 15, 15 ], "texture": "#generator_bottom" },
  150.         "up":    { "uv": [ 0, 15, 1, 16 ], "texture": "#generator_bottom" },
  151.         "north": { "uv": [ 15, 1, 16, 15 ], "texture": "#generator_bottom" },
  152.         "south": { "uv": [ 0, 1, 1, 15 ], "texture": "#generator_bottom" },
  153.         "west":  { "uv": [ 15, 1, 16, 15 ], "texture": "#generator_bottom" },
  154.         "east":  { "uv": [ 0, 1, 1, 15 ], "texture": "#generator_bottom" }
  155.     }
  156. },
  157. {
  158.     "from": [ 0.25, 0.25, 0.25 ],
  159.     "to": [ 15.75, 15.75, 15.75 ],
  160.     "faces": {
  161.         "down":  { "uv": [ 15.75, 15.75, 0.25, 0.25 ], "texture": "#generator_bottom" },
  162.         "up":    { "uv": [ 0.25, 0.25, 15.75, 15.75 ], "texture": "#generator_top" },
  163.         "north": { "uv": [ 0.25, 0.25, 15.75, 15.75 ], "texture": "#generator_front" },
  164.         "south": { "uv": [ 0.25, 0.25, 15.75, 15.75 ], "texture": "#generator_leftrightback" },
  165.         "west":  { "uv": [ 0.25, 0.25, 15.75, 15.75 ], "texture": "#generator_leftrightback" },
  166.         "east":  { "uv": [ 0.25, 0.25, 15.75, 15.75 ], "texture": "#generator_leftrightback" }
  167.     }
  168. }
  169. ]
  170. }
复制代码




作者: 六月奈    时间: 2016-9-19 23:45
你可以试试把末影接口的模型换成你自制的模型,进游戏看看效果如何
我总感觉Mod自带了一套渲染算法,就像是不受平滑光照影响的
作者: 六月奈    时间: 2016-9-19 23:46
补充一下,实在无法解决的话可以试试用视差贴图来代替模型效果
作者: 104277777    时间: 2016-9-20 00:01
Zero_Exact 发表于 2016-9-19 23:46
补充一下,实在无法解决的话可以试试用视差贴图来代替模型效果

我不会视差 这么晚还不睡。

我看了那个他有机械框架,但是我没发现他有组合在一起的代码,他里面也有受影响的方块。我特意看了一下。洗洗睡吧- -
作者: 乙烯_中国    时间: 2016-9-21 22:22
由于我毕竟是原版档,所以就纯粹的用原版实验了一下楼主所说的代码问题按我的猜想,这与是否是mod方块无关。与之相关的是,方块本身是否属于透明方块。
楼主不如去试试看火力发电机能不能被红石强充能之类的。按我的实验结果来看火力发电机应该是个透明方块。
这里附上原版实验图。用的是楼主给出的代码,考虑到楼主没给完整的贴图,我就涂了片绿色来测试。


这里的话右边那张图,黑色的是玻璃,不发黑的是沙子。这也是我做出这个推测的原因。
然后解决办法嘛,确实我是没有,左边不发黑的原因是我只修改了玻璃的贴图,没有修改模型。
其实总的来说就是透明方块不适合做这种内凹的模型,楼主不如想想别的路子。差不多是这样,希望能有点帮助吧。


作者: 104277777    时间: 2016-9-22 18:00
乙烯_中国 发表于 2016-9-21 22:22
由于我毕竟是原版档,所以就纯粹的用原版实验了一下楼主所说的代码问题按我的猜想,这与是否是mod方块无关 ...

不好意思我的描述可能存在误导,我只是说模型,不关mod的问题。

我还真没考虑到透明方块的问题。晚上我回去试试吧。但是我又不太懂,透明方块和非透明方块再json里面是否有明确的表示。这个从来没看过。如果有明确的表示或者说明是否可以把透明方块换成非透明方块来解决这个问题。

是否也跟shade和剔除面之类的有关?
作者: 104277777    时间: 2016-9-22 23:38
乙烯_中国 发表于 2016-9-21 22:22
由于我毕竟是原版档,所以就纯粹的用原版实验了一下楼主所说的代码问题按我的猜想,这与是否是mod方块无关 ...

如你所说。火力发电机无法被红石充能。可以被充能的方块我也没实验。我也修改了原版,的熔炉,并不存在顶部变黑情况。(我制作的火力发电机模型变黑情况只存在于开启optifine的平滑光照,如果关闭就没有问题)所以我现在也不知道这个问题到底是跟optifine作者反馈,还是跟ic2的作者反馈了。。或者跟mojang反馈。。迷茫了。我的IC2模型全微立体化方案宣告流产。
作者: 104277777    时间: 2016-9-22 23:39
乙烯_中国 发表于 2016-9-21 22:22
由于我毕竟是原版档,所以就纯粹的用原版实验了一下楼主所说的代码问题按我的猜想,这与是否是mod方块无关 ...

原版的耕地与路径方块也存在变黑情况。
作者: 乙烯_中国    时间: 2016-9-23 06:58
首先我看到你这几个回复,我配张图给你

感受宁静
此外根据测试结果,不凹下去的地方不会变黑,所以你就画成黑色底色,然后别的一些部件凸起刚好到表面不就好了,对于现状做些变通是常有的事。