NeoTech

NeoTech

2M Downloads

Odd texture issue with Mob Stand

Thutmose opened this issue ยท 9 comments

commented

I tried sticking some pokemobs onto the mob stand, and sometimes they end up with completely black texture/models

image

Here is a line of models, the one on the left (-x most) is black:
image

When I disable that one (remove the net)

image

commented

I have also noticed that the one missing a texture is textured for the first little while after I log in, and it then loses the texture shortly.

Edit: with pokemobs, the left most mob is black, but with zombies, it shows a lighting glitch, so it might be something in the lighting calls for the model being rendered.

image

commented

That seems to at least make it consistant.

Night
image

Day
image

Not sure why the pokemob ones have funny lighting like that.

Looking really close, the colour is there, just seems to be very dark.

image

Edit: It could be an issue with my rendering code, if you have any ideas as to what, please let me know. They otherwise render fine in the world at least.

Edit 2:
They are not black when the game first loads, the same behavior as it had before, they flash lit for a second or so, then turn black. - edited textured -> lit

commented

here is my entity renderer code: https://github.com/Thutmose/Pokecube/blob/master/Pokecube%20Core/src/main/java/pokecube/modelloader/client/custom/RenderAdvancedPokemobModel.java

And one of the two model renderers is this (this one and the tabula one both render black):
https://github.com/Thutmose/Pokecube/blob/master/Pokecube%20Core/src/main/java/pokecube/modelloader/client/custom/DefaultIModelRenderer.java

which calls this model object to render:
https://github.com/Thutmose/Pokecube/blob/master/Pokecube%20Core/src/main/java/pokecube/modelloader/client/custom/x3d/X3dObject.java

That tries to do some material properties in GL, which I have not noticed any effects of, as I assume minecraft lighting doesn't support it, my other renderer doesn't call those, and it also renders black.

That version (build #160) seems to have the same dark lighting, it very well could be something I am not setting. Tomorrow I can see about getting neotech + bookshelf into my dev environment and I can see if I can find what isn't being set. I will probably get to work looking for causes when I get back on in about 12 hours.

commented

Can you provide me a link to your code that renders them? We don't mess with anything before rendering, we only handler rotation and scale. It may be that when you render as an entity, some attributes are already set that aren't for when tile entities are rendered (when this is being called)

commented

Actually, try this build first. Had one line that was lost when we were doing some changes. If this doesn't fix it, I can't see how it could be on our end http://teambrmodding.com:8080/job/NeoTech/160/

commented

so, I downloaded build 161-dev, the latest bookshelf dev, stuck them in the mods folder for my development environment, and it all works fine, but 161 in the obfuscated environment was still black, so I am not sure what to test/look for in my render code for fixing it :(

Image from dev environment, outside dev environ looks same as previous screenshots:
image

commented

I'm not sure what your issue is. For now, i'm closing this. After we do another official release, we will look and see if the issue persists as we are doing lots of work at the moment. If you find more issues comment back here

commented

I found the cause of the problem, and fixed it on my end.

It was caused by the entity trying to set the brightness itself, based on the current location, seems that method wasn't needed where I had it, and when I removed it it fixed this lighting issue. I have no idea why that did not cause an issue in the development environment as well though.

image