MachineMuse / MachineMusePowersuits

Minecraft mod, take 2
236 stars 105 forks source link

Chests go translucent with tinker table #768

Closed EzerArch closed 6 years ago

EzerArch commented 7 years ago

This is a very specific bug. This depends on the direction you are facing and block layout.

Chests will go translucent if:

2017-03-25_18 19 44 2017-03-25_18 19 57 2017-03-25_18 41 12

lehjr commented 7 years ago

o.0 I think I know what the issue is here. I'll check on this after I figure out the power issue. There's also a rendering bug with the power fist.

lehjr commented 7 years ago

This seems to be a vanilla rendering glitch. I recreated the tinker table model as a Wavefront model, where Minecraft handles ALL of the rendering, and the glitches are really bad. The first photo is all wavefront models, with a block render setting of BlockRenderLayer.TRANSLUCENT. At some angles, the top of the table disappears. The second photo is the effect bleeding into the actual Tinker Table model nearby despite there being no software changes to the model or block. The only fix would be a completely new model without any translucent layers.

2017-04-19_10 21 36 2017-04-19_10 35 13

lehjr commented 7 years ago

I found a really old Tinker Table, maybe the original. I might be able to retexture this a bit and use it without the screen on top and without the cube. The screen doesn't even use a texture, but it drawn with just opengl code and still has glitches. 2017-04-25_15 22 02

eyeonus commented 7 years ago

That thing is ugly.

Maybe it would be better to start from scratch, and just not have the floating green thing.

eyeonus commented 7 years ago

Maybe it has something to do with the model being larger than a block?

lehjr commented 7 years ago

It seems to be an issue with mixing alpha blending and solids in the same block.

eyeonus commented 7 years ago

Mmm. That makes sense.

lehjr commented 7 years ago

Even the wavefront model where Minecraft was handling the rendering had issues.

Starting from scratch would be better if I really had an idea what direction to go in. All I know is that it needs to be a model with no animations or transparencies. Anything else is going to do the same thing.

EzerArch commented 7 years ago

Interesting this glitch happens only in certain directions/potions. :S

eyeonus commented 7 years ago

Well, I have literally no artistic talent, so I can't help you there. Maybe just, in the meantime, remove the alpha stuff?

lehjr commented 7 years ago

On the directional glitch... even when Minecraft handles the rendering in the Wavefront model, the chests are actually blocked by the screens in some directions but not others just as the top of the tinker table glitches out at different angles.

Turning off the alpha is just as ugly as the other model.

eyeonus commented 7 years ago

No, no, I meant removing the alpha bits.

lehjr commented 7 years ago

yeah removing the alpha bits makes it render like it does with graphics set to fast, where the screens are solid green

eyeonus commented 7 years ago

Okay, I'm obviously not being clear. Not remove alpha from the things that have alpha.

Remove the things that have alpha.

lehjr commented 7 years ago

2017-04-25_20 55 32

lehjr commented 7 years ago

You can't remove the bits without reworking the model. Half the model uses transparencies.

eyeonus commented 7 years ago

Yes, that screenshot is precisely what I didn't mean.

Well, yeah, but reworking it is kind of a given though, isn't it?

lehjr commented 7 years ago

But that's the thing. Reworking it is replacing more than half of it. That's why I was looking at something simple. With simple models, users can replace them with resource packs.

eyeonus commented 7 years ago

It was just an idea. I figured just deleting the parts that were causing the glitches would be the easiest thing to do, at least until you figure out what you really want.

lehjr commented 7 years ago

The problem is that it's the top 3 screens, the cube the green part in the middle and the upper table, and maybe the 3 "tanks". That leaves the base, part of the upper table, and the "wire" parts.

lehjr commented 7 years ago

This is what it looks like with the problem parts removed screenshot from 2017-04-25 21-16-29

eyeonus commented 7 years ago

I did not know that was a screen. I actually thought it was just the top of the table.

Maybe put that one back but without transparency.

Otherwise, I'd say it looks alright.

Definitely better than gray-and-blue-crafting-table-with-green-floaties.

lehjr commented 7 years ago

The green parts where the screens. Hmm, I'll have to taker a stab at the textures tomorrow. But I think can fill in that green part in the middle with an opaque color and fill the cube green. The screens will have to stay gone.

eyeonus commented 7 years ago

No, the thing I'm taking about isn't green. It's mostly black with a couple blue rectangles.

On Apr 25, 2017 19:24, "lehjr" notifications@github.com wrote:

The green parts where the screens. Hmm, I'll have to taker a stab at the textures tomorrow. But I think can fill in that green part in the middle with an opaque color and fill the cube green. The screens will have to stay gone.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/MachineMuse/MachineMusePowersuits/issues/768#issuecomment-297210957, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpz4Dp93Ol3pq6Mo6lBEnUJPN-m2mDzks5rzpzGgaJpZM4MpOaL .

lehjr commented 7 years ago

Yeah, but that has a transparency as well around the sides.

eyeonus commented 7 years ago

Right, yes, I figured it did, that's why I said to leave that one, but without transparency.

Or, if it's easier, move that texture to the top of the table where the weird X thing is.

lehjr commented 7 years ago

Texture areas don't rescale well for model base models. I'm working on coloring in some areas of the texture.

lehjr commented 7 years ago

screenshot from 2017-04-25 21-38-03

lehjr commented 7 years ago

Needs a bit more work on the gray area in the middle but it's better than it was.

eyeonus commented 7 years ago

Looks alright to me. Did you mess with the meshes or edit the texture?

lehjr commented 7 years ago

edited the texture

lehjr commented 7 years ago

Still have to turn off the alpha stuff in the code though

eyeonus commented 7 years ago

tinkertable_tx-alt Damn. So did I. Duplication of effort is teh lose.

eyeonus commented 7 years ago

How do you get Minecraft to do that, btw? The whole model loader thing?

Also, regarding the, um, stump, I never noticed it as a player, so if you made it the same color green, just not transparent, I doubt many people would even notice.

lehjr commented 7 years ago

In this case, it's still a model base model, so just comment out RenderState.blendingOn(); https://github.com/MachineMuse/MachineMusePowersuits/blob/1.10.2-Java/src/main/java/net/machinemuse/powersuits/client/render/block/TinkerTableModel.java#L188

and RenderState.blendingOff();

lehjr commented 7 years ago

and the parts to get rid of get commented out, like the 3 screens.

eyeonus commented 7 years ago

What? No, I mean the thing you did to Minecraft. In your last screenshot, the program that is running that you took a screenshot of, according to the window title, is Minecraft 1.8.

lehjr commented 7 years ago

Oh, that. That's Tabula for 1.8.

eyeonus commented 7 years ago

Oooohhh. And here I thought Minecraft had a secret developer's mode.

lehjr commented 7 years ago

I wish

lehjr commented 7 years ago

Should I ditch the spinning cube? If I get rid of it, I can change to a JSON model and users can override with their own model if they want.

eyeonus commented 7 years ago

I kind of like the cube. Can you still go JSON if it isn't spinning?

eyeonus commented 7 years ago

Because if not, go ahead and ditch it.

lehjr commented 7 years ago

The spinning cube is done in the model renderer which is done in the ModelBase model. The spinning cube isn't easily implemented with JSON models. It's not impossible, but I have no idea how to do it. It's not well documented. The JSON models are a completely different kind of model though. I could just include a second Tinker Table model as an alternative that can be replaced.

eyeonus commented 7 years ago

How hard is it to render a not-spinning spinning cube in JSON?

lehjr commented 7 years ago

Rendering a static model ( non-animated ) is easy, to a point. Rotations are kind of limited on the parts though.

eyeonus commented 7 years ago

Um, I found this thing, which apparently makes it easy to create an animated JSON model and export the JSON code once you're done.

http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-tools/2715476-block-models-json-model-animator

Maybe, if you want to, you can take a look at it? Unless you /REALLY/ want animations in the model, I wouldn't bother.

lehjr commented 7 years ago

Well that certainly is Interesting. Hmm. I'll have to see if I use that.

eyeonus commented 7 years ago

While I'm at it, I also found this video tutorial on making animated JSON models in Minecraft: https://www.youtube.com/watch?v=HrNWnQO4aeg

lehjr commented 7 years ago

Thanks. I changed the texture a bit more for now. The model type change will have to wait until after the first beta. For now the issue of rendering glitches should be more or less done and I can focus on the alpha issue list.

2017-04-26_08 48 21