mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-26 23:19:02 +01:00
Fix OBJ materials
- Fix OBJ model materials to use correct Ka and Kd - Remove unnecessary material properties - Rename disableDiffuseMult to disableDiffuse - Fix curved track outlines rendering in spectator mode
This commit is contained in:
parent
c491dd8f13
commit
917c6041ba
19 changed files with 20 additions and 195 deletions
|
@ -56,7 +56,7 @@ public class DisplayLinkRenderer extends SafeTileEntityRenderer<DisplayLinkTileE
|
||||||
CachedBufferer.partial(AllBlockPartials.DISPLAY_LINK_GLOW, blockState)
|
CachedBufferer.partial(AllBlockPartials.DISPLAY_LINK_GLOW, blockState)
|
||||||
.light(LightTexture.FULL_BRIGHT)
|
.light(LightTexture.FULL_BRIGHT)
|
||||||
.color(color, color, color, 255)
|
.color(color, color, color, 255)
|
||||||
.disableDiffuseMult()
|
.disableDiffuse()
|
||||||
.renderInto(ms, buffer.getBuffer(RenderTypes.getAdditive()));
|
.renderInto(ms, buffer.getBuffer(RenderTypes.getAdditive()));
|
||||||
|
|
||||||
ms.popPose();
|
ms.popPose();
|
||||||
|
|
|
@ -168,7 +168,7 @@ public class NixieTubeRenderer extends SafeTileEntityRenderer<NixieTubeTileEntit
|
||||||
|
|
||||||
CachedBufferer.partial(AllBlockPartials.SIGNAL_WHITE_CUBE, blockState)
|
CachedBufferer.partial(AllBlockPartials.SIGNAL_WHITE_CUBE, blockState)
|
||||||
.light(0xf000f0)
|
.light(0xf000f0)
|
||||||
.disableDiffuseMult()
|
.disableDiffuse()
|
||||||
.scale(vert ? longSide : 1, vert ? 1 : longSide, 1)
|
.scale(vert ? longSide : 1, vert ? 1 : longSide, 1)
|
||||||
.renderInto(ms, buffer.getBuffer(RenderType.translucent()));
|
.renderInto(ms, buffer.getBuffer(RenderType.translucent()));
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ public class NixieTubeRenderer extends SafeTileEntityRenderer<NixieTubeTileEntit
|
||||||
: yellow ? AllBlockPartials.SIGNAL_YELLOW_GLOW : AllBlockPartials.SIGNAL_WHITE_GLOW,
|
: yellow ? AllBlockPartials.SIGNAL_YELLOW_GLOW : AllBlockPartials.SIGNAL_WHITE_GLOW,
|
||||||
blockState)
|
blockState)
|
||||||
.light(0xf000f0)
|
.light(0xf000f0)
|
||||||
.disableDiffuseMult()
|
.disableDiffuse()
|
||||||
.scale(vert ? longSideGlow : 2, vert ? 2 : longSideGlow, 2)
|
.scale(vert ? longSideGlow : 2, vert ? 2 : longSideGlow, 2)
|
||||||
.renderInto(ms, buffer.getBuffer(RenderTypes.getAdditive()));
|
.renderInto(ms, buffer.getBuffer(RenderTypes.getAdditive()));
|
||||||
}
|
}
|
||||||
|
@ -187,7 +187,7 @@ public class NixieTubeRenderer extends SafeTileEntityRenderer<NixieTubeTileEntit
|
||||||
.partial(first ? AllBlockPartials.SIGNAL_RED
|
.partial(first ? AllBlockPartials.SIGNAL_RED
|
||||||
: yellow ? AllBlockPartials.SIGNAL_YELLOW : AllBlockPartials.SIGNAL_WHITE, blockState)
|
: yellow ? AllBlockPartials.SIGNAL_YELLOW : AllBlockPartials.SIGNAL_WHITE, blockState)
|
||||||
.light(0xF000F0)
|
.light(0xF000F0)
|
||||||
.disableDiffuseMult()
|
.disableDiffuse()
|
||||||
.scale(1 + 1 / 16f)
|
.scale(1 + 1 / 16f)
|
||||||
.renderInto(ms, buffer.getBuffer(RenderTypes.getAdditive()));
|
.renderInto(ms, buffer.getBuffer(RenderTypes.getAdditive()));
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@ import net.minecraft.core.Direction;
|
||||||
import net.minecraft.core.Direction.Axis;
|
import net.minecraft.core.Direction.Axis;
|
||||||
import net.minecraft.util.Mth;
|
import net.minecraft.util.Mth;
|
||||||
import net.minecraft.world.entity.ai.attributes.AttributeInstance;
|
import net.minecraft.world.entity.ai.attributes.AttributeInstance;
|
||||||
|
import net.minecraft.world.level.GameType;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.phys.AABB;
|
import net.minecraft.world.phys.AABB;
|
||||||
import net.minecraft.world.phys.BlockHitResult;
|
import net.minecraft.world.phys.BlockHitResult;
|
||||||
|
@ -142,6 +143,10 @@ public class TrackBlockOutline {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void drawCurveSelection(PoseStack ms, MultiBufferSource buffer) {
|
public static void drawCurveSelection(PoseStack ms, MultiBufferSource buffer) {
|
||||||
|
Minecraft mc = Minecraft.getInstance();
|
||||||
|
if (mc.options.hideGui || mc.gameMode.getPlayerMode() == GameType.SPECTATOR)
|
||||||
|
return;
|
||||||
|
|
||||||
BezierPointSelection result = TrackBlockOutline.result;
|
BezierPointSelection result = TrackBlockOutline.result;
|
||||||
if (result == null)
|
if (result == null)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -337,7 +337,7 @@ public class SuperByteBuffer implements Transform<SuperByteBuffer>, TStack<Super
|
||||||
* from the final transformed normal vector. Useful for entity rendering, when
|
* from the final transformed normal vector. Useful for entity rendering, when
|
||||||
* diffuse is applied automatically later.
|
* diffuse is applied automatically later.
|
||||||
*/
|
*/
|
||||||
public SuperByteBuffer disableDiffuseMult() {
|
public SuperByteBuffer disableDiffuse() {
|
||||||
disableDiffuseMult = true;
|
disableDiffuseMult = true;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -438,7 +438,7 @@ public class SuperByteBuffer implements Transform<SuperByteBuffer>, TStack<Super
|
||||||
}
|
}
|
||||||
|
|
||||||
public SuperByteBuffer forEntityRender() {
|
public SuperByteBuffer forEntityRender() {
|
||||||
disableDiffuseMult();
|
disableDiffuse();
|
||||||
overlay();
|
overlay();
|
||||||
fullNormalTransform();
|
fullNormalTransform();
|
||||||
return this;
|
return this;
|
||||||
|
|
|
@ -2,13 +2,4 @@
|
||||||
# Material Count: 1
|
# Material Count: 1
|
||||||
|
|
||||||
newmtl m_0
|
newmtl m_0
|
||||||
Ns 250.000000
|
|
||||||
Ka 1.000000 1.000000 1.000000
|
|
||||||
Kd 0.800000 0.800000 0.800000
|
|
||||||
Ks 0.500000 0.500000 0.500000
|
|
||||||
Ke 0.000000 0.000000 0.000000
|
|
||||||
Ni 1.450000
|
|
||||||
d 1.000000
|
|
||||||
illum 2
|
|
||||||
map_Kd #0
|
map_Kd #0
|
||||||
map_d #0
|
|
||||||
|
|
|
@ -2,12 +2,5 @@
|
||||||
# Material Count: 1
|
# Material Count: 1
|
||||||
|
|
||||||
newmtl m_0
|
newmtl m_0
|
||||||
Ns 250.000000
|
|
||||||
Ka 1.000000 1.000000 1.000000
|
Ka 1.000000 1.000000 1.000000
|
||||||
Kd 0.800000 0.800000 0.800000
|
|
||||||
Ks 0.500000 0.500000 0.500000
|
|
||||||
Ke 0.000000 0.000000 0.000000
|
|
||||||
Ni 1.450000
|
|
||||||
d 1.000000
|
|
||||||
illum 2
|
|
||||||
map_Kd #0
|
map_Kd #0
|
||||||
|
|
|
@ -2,13 +2,5 @@
|
||||||
# Material Count: 1
|
# Material Count: 1
|
||||||
|
|
||||||
newmtl m_0
|
newmtl m_0
|
||||||
Ns 0.000000
|
|
||||||
Ka 1.000000 1.000000 1.000000
|
Ka 1.000000 1.000000 1.000000
|
||||||
Kd 0.800000 0.800000 0.800000
|
|
||||||
Ks 0.000000 0.000000 0.000000
|
|
||||||
Ke 0.000000 0.000000 0.000000
|
|
||||||
Ni 1.450000
|
|
||||||
d 1.000000
|
|
||||||
illum 1
|
|
||||||
map_Kd #0
|
map_Kd #0
|
||||||
map_d #0
|
|
||||||
|
|
|
@ -2,24 +2,8 @@
|
||||||
# Material Count: 2
|
# Material Count: 2
|
||||||
|
|
||||||
newmtl Blazier
|
newmtl Blazier
|
||||||
Ns 250.000000
|
|
||||||
Ka 1.000000 1.000000 1.000000
|
|
||||||
Kd 0.800000 0.800000 0.800000
|
|
||||||
Ks 0.500000 0.500000 0.500000
|
|
||||||
Ke 0.000000 0.000000 0.000000
|
|
||||||
Ni 1.450000
|
|
||||||
d 1.000000
|
|
||||||
illum 2
|
|
||||||
map_Kd #0
|
map_Kd #0
|
||||||
map_d #0
|
|
||||||
|
|
||||||
newmtl Campfire
|
newmtl Campfire
|
||||||
Ns 250.000000
|
|
||||||
Ka 1.000000 1.000000 1.000000
|
Ka 1.000000 1.000000 1.000000
|
||||||
Kd 0.800000 0.800000 0.800000
|
|
||||||
Ks 0.500000 0.500000 0.500000
|
|
||||||
Ke 0.000000 0.000000 0.000000
|
|
||||||
Ni 1.450000
|
|
||||||
d 1.000000
|
|
||||||
illum 2
|
|
||||||
map_Kd #1
|
map_Kd #1
|
||||||
|
|
|
@ -2,25 +2,8 @@
|
||||||
# Material Count: 2
|
# Material Count: 2
|
||||||
|
|
||||||
newmtl m_0
|
newmtl m_0
|
||||||
Ns 250.000000
|
|
||||||
Ka 1.000000 1.000000 1.000000
|
|
||||||
Kd 0.800000 0.800000 0.800000
|
|
||||||
Ks 0.500000 0.500000 0.500000
|
|
||||||
Ke 0.000000 0.000000 0.000000
|
|
||||||
Ni 1.450000
|
|
||||||
d 1.000000
|
|
||||||
illum 2
|
|
||||||
map_Kd #0
|
map_Kd #0
|
||||||
map_d #0
|
|
||||||
|
|
||||||
newmtl m_1
|
newmtl m_1
|
||||||
Ns 0.000000
|
|
||||||
Ka 1.000000 1.000000 1.000000
|
Ka 1.000000 1.000000 1.000000
|
||||||
Kd 0.800000 0.800000 0.800000
|
|
||||||
Ks 0.000000 0.000000 0.000000
|
|
||||||
Ke 0.000000 0.000000 0.000000
|
|
||||||
Ni 1.450000
|
|
||||||
d 1.000000
|
|
||||||
illum 1
|
|
||||||
map_Kd #1
|
map_Kd #1
|
||||||
map_d #1
|
|
||||||
|
|
|
@ -2,34 +2,10 @@
|
||||||
# Material Count: 3
|
# Material Count: 3
|
||||||
|
|
||||||
newmtl m_0
|
newmtl m_0
|
||||||
Ns 250.000000
|
|
||||||
Ka 1.000000 1.000000 1.000000
|
|
||||||
Kd 0.800000 0.800000 0.800000
|
|
||||||
Ks 0.500000 0.500000 0.500000
|
|
||||||
Ke 0.000000 0.000000 0.000000
|
|
||||||
Ni 1.450000
|
|
||||||
d 1.000000
|
|
||||||
illum 2
|
|
||||||
map_Kd #0
|
map_Kd #0
|
||||||
|
|
||||||
newmtl m_1
|
newmtl m_1
|
||||||
Ns 250.000000
|
|
||||||
Ka 1.000000 1.000000 1.000000
|
|
||||||
Kd 0.800000 0.800000 0.800000
|
|
||||||
Ks 0.500000 0.500000 0.500000
|
|
||||||
Ke 0.000000 0.000000 0.000000
|
|
||||||
Ni 1.450000
|
|
||||||
d 1.000000
|
|
||||||
illum 2
|
|
||||||
map_Kd #1
|
map_Kd #1
|
||||||
|
|
||||||
newmtl m_2
|
newmtl m_2
|
||||||
Ns 250.000000
|
|
||||||
Ka 1.000000 1.000000 1.000000
|
|
||||||
Kd 0.800000 0.800000 0.800000
|
|
||||||
Ks 0.500000 0.500000 0.500000
|
|
||||||
Ke 0.000000 0.000000 0.000000
|
|
||||||
Ni 1.450000
|
|
||||||
d 1.000000
|
|
||||||
illum 2
|
|
||||||
map_Kd #2
|
map_Kd #2
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
# Made in Blockbench 4.1.4
|
# Made in Blockbench 4.1.4
|
||||||
|
|
||||||
newmtl m_2
|
newmtl m_2
|
||||||
map_Kd #1
|
map_Kd #1
|
||||||
|
|
||||||
newmtl m_1_0
|
newmtl m_1_0
|
||||||
map_Kd #0
|
map_Kd #0
|
||||||
newmtl none
|
|
||||||
|
newmtl none
|
||||||
|
|
|
@ -2,45 +2,13 @@
|
||||||
# Material Count: 4
|
# Material Count: 4
|
||||||
|
|
||||||
newmtl Belts
|
newmtl Belts
|
||||||
Ns 0.000000
|
|
||||||
Ka 1.000000 1.000000 1.000000
|
|
||||||
Kd 0.800000 0.800000 0.800000
|
|
||||||
Ks 0.000000 0.000000 0.000000
|
|
||||||
Ke 0.000000 0.000000 0.000000
|
|
||||||
Ni 1.450000
|
|
||||||
d 1.000000
|
|
||||||
illum 1
|
|
||||||
map_Kd #belt
|
map_Kd #belt
|
||||||
|
|
||||||
newmtl Bogey_Body
|
newmtl Bogey_Body
|
||||||
Ns 225.000000
|
|
||||||
Ka 1.000000 1.000000 1.000000
|
|
||||||
Kd 0.800000 0.800000 0.800000
|
|
||||||
Ks 0.500000 0.500000 0.500000
|
|
||||||
Ke 0.000000 0.000000 0.000000
|
|
||||||
Ni 1.450000
|
|
||||||
d 1.000000
|
|
||||||
illum 2
|
|
||||||
map_Kd #bogey
|
map_Kd #bogey
|
||||||
|
|
||||||
newmtl Bogey_Piston
|
newmtl Bogey_Piston
|
||||||
Ns 225.000000
|
|
||||||
Ka 1.000000 1.000000 1.000000
|
|
||||||
Kd 0.800000 0.800000 0.800000
|
|
||||||
Ks 0.500000 0.500000 0.500000
|
|
||||||
Ke 0.000000 0.000000 0.000000
|
|
||||||
Ni 1.450000
|
|
||||||
d 1.000000
|
|
||||||
illum 2
|
|
||||||
map_Kd #piston
|
map_Kd #piston
|
||||||
|
|
||||||
newmtl wheel_Large
|
newmtl wheel_Large
|
||||||
Ns 0.000000
|
|
||||||
Ka 1.000000 1.000000 1.000000
|
|
||||||
Kd 0.800000 0.800000 0.800000
|
|
||||||
Ks 0.000000 0.000000 0.000000
|
|
||||||
Ke 0.000000 0.000000 0.000000
|
|
||||||
Ni 1.450000
|
|
||||||
d 1.000000
|
|
||||||
illum 1
|
|
||||||
map_Kd #wheel
|
map_Kd #wheel
|
||||||
|
|
|
@ -2,12 +2,4 @@
|
||||||
# Material Count: 1
|
# Material Count: 1
|
||||||
|
|
||||||
newmtl Bogey_Piston
|
newmtl Bogey_Piston
|
||||||
Ns 225.000000
|
|
||||||
Ka 1.000000 1.000000 1.000000
|
|
||||||
Kd 0.800000 0.800000 0.800000
|
|
||||||
Ks 0.500000 0.500000 0.500000
|
|
||||||
Ke 0.000000 0.000000 0.000000
|
|
||||||
Ni 1.450000
|
|
||||||
d 1.000000
|
|
||||||
illum 2
|
|
||||||
map_Kd #piston
|
map_Kd #piston
|
||||||
|
|
|
@ -2,12 +2,4 @@
|
||||||
# Material Count: 1
|
# Material Count: 1
|
||||||
|
|
||||||
newmtl wheel_Large
|
newmtl wheel_Large
|
||||||
Ns 0.000000
|
|
||||||
Ka 1.000000 1.000000 1.000000
|
|
||||||
Kd 0.800000 0.800000 0.800000
|
|
||||||
Ks 0.000000 0.000000 0.000000
|
|
||||||
Ke 0.000000 0.000000 0.000000
|
|
||||||
Ni 1.450000
|
|
||||||
d 1.000000
|
|
||||||
illum 1
|
|
||||||
map_Kd #wheel
|
map_Kd #wheel
|
||||||
|
|
|
@ -2,12 +2,4 @@
|
||||||
# Material Count: 1
|
# Material Count: 1
|
||||||
|
|
||||||
newmtl Bogey_Piston
|
newmtl Bogey_Piston
|
||||||
Ns 225.000000
|
|
||||||
Ka 1.000000 1.000000 1.000000
|
|
||||||
Kd 0.800000 0.800000 0.800000
|
|
||||||
Ks 0.500000 0.500000 0.500000
|
|
||||||
Ke 0.000000 0.000000 0.000000
|
|
||||||
Ni 1.450000
|
|
||||||
d 1.000000
|
|
||||||
illum 2
|
|
||||||
map_Kd #piston
|
map_Kd #piston
|
||||||
|
|
|
@ -2,34 +2,10 @@
|
||||||
# Material Count: 3
|
# Material Count: 3
|
||||||
|
|
||||||
newmtl Bogey_Body
|
newmtl Bogey_Body
|
||||||
Ns 225.000000
|
|
||||||
Ka 1.000000 1.000000 1.000000
|
|
||||||
Kd 0.800000 0.800000 0.800000
|
|
||||||
Ks 0.500000 0.500000 0.500000
|
|
||||||
Ke 0.000000 0.000000 0.000000
|
|
||||||
Ni 1.450000
|
|
||||||
d 1.000000
|
|
||||||
illum 2
|
|
||||||
map_Kd #bogey
|
map_Kd #bogey
|
||||||
|
|
||||||
newmtl Bogey_Body_2
|
newmtl Bogey_Body_2
|
||||||
Ns 225.000000
|
|
||||||
Ka 1.000000 1.000000 1.000000
|
|
||||||
Kd 0.800000 0.800000 0.800000
|
|
||||||
Ks 0.500000 0.500000 0.500000
|
|
||||||
Ke 0.000000 0.000000 0.000000
|
|
||||||
Ni 1.450000
|
|
||||||
d 1.000000
|
|
||||||
illum 2
|
|
||||||
map_Kd #bogey2
|
map_Kd #bogey2
|
||||||
|
|
||||||
newmtl wheel_Large
|
newmtl wheel_Large
|
||||||
Ns 0.000000
|
|
||||||
Ka 1.000000 1.000000 1.000000
|
|
||||||
Kd 0.800000 0.800000 0.800000
|
|
||||||
Ks 0.000000 0.000000 0.000000
|
|
||||||
Ke 0.000000 0.000000 0.000000
|
|
||||||
Ni 1.450000
|
|
||||||
d 1.000000
|
|
||||||
illum 1
|
|
||||||
map_Kd #wheel
|
map_Kd #wheel
|
||||||
|
|
|
@ -2,34 +2,10 @@
|
||||||
# Material Count: 3
|
# Material Count: 3
|
||||||
|
|
||||||
newmtl 00_Shaft
|
newmtl 00_Shaft
|
||||||
Ns 225.000000
|
|
||||||
Ka 1.000000 1.000000 1.000000
|
|
||||||
Kd 0.800000 0.800000 0.800000
|
|
||||||
Ks 0.500000 0.500000 0.500000
|
|
||||||
Ke 0.000000 0.000000 0.000000
|
|
||||||
Ni 1.450000
|
|
||||||
d 1.000000
|
|
||||||
illum 2
|
|
||||||
map_Kd #axis
|
map_Kd #axis
|
||||||
|
|
||||||
newmtl 00_Shaft_end
|
newmtl 00_Shaft_end
|
||||||
Ns 225.000000
|
|
||||||
Ka 1.000000 1.000000 1.000000
|
|
||||||
Kd 0.800000 0.800000 0.800000
|
|
||||||
Ks 0.500000 0.500000 0.500000
|
|
||||||
Ke 0.000000 0.000000 0.000000
|
|
||||||
Ni 1.450000
|
|
||||||
d 1.000000
|
|
||||||
illum 2
|
|
||||||
map_Kd #axis_top
|
map_Kd #axis_top
|
||||||
|
|
||||||
newmtl wheel_Large
|
newmtl wheel_Large
|
||||||
Ns 0.000000
|
|
||||||
Ka 1.000000 1.000000 1.000000
|
|
||||||
Kd 0.800000 0.800000 0.800000
|
|
||||||
Ks 0.000000 0.000000 0.000000
|
|
||||||
Ke 0.000000 0.000000 0.000000
|
|
||||||
Ni 1.450000
|
|
||||||
d 1.000000
|
|
||||||
illum 1
|
|
||||||
map_Kd #wheel
|
map_Kd #wheel
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
{
|
{
|
||||||
"parent": "block/block",
|
"parent": "block/block",
|
||||||
"ambientToFullbright": false,
|
|
||||||
"diffuseLighting": false,
|
|
||||||
"textures": {
|
"textures": {
|
||||||
"belt": "create:block/bogey/belt",
|
"belt": "create:block/bogey/belt",
|
||||||
"bogey": "create:block/bogey/frame",
|
"bogey": "create:block/bogey/frame",
|
||||||
|
|
|
@ -1,8 +1,12 @@
|
||||||
# Made in Blockbench 4.1.1
|
# Made in Blockbench 4.1.1
|
||||||
|
|
||||||
newmtl m_0
|
newmtl m_0
|
||||||
map_Kd #0
|
map_Kd #0
|
||||||
|
|
||||||
newmtl m_1
|
newmtl m_1
|
||||||
map_Kd #1
|
map_Kd #1
|
||||||
|
|
||||||
newmtl m_2
|
newmtl m_2
|
||||||
map_Kd #2
|
map_Kd #2
|
||||||
newmtl none
|
|
||||||
|
newmtl none
|
||||||
|
|
Loading…
Reference in a new issue