Jump to content

Recommended Posts

Posted

I have an item that has a different "model" based on its NBT. I had been rendering it manually, but for performance reasons I'd rather have a baked model that I can eventually cache than do a TESR every tick. The only problem is that when the item is rendered in the hand or really anywhere except in a gui, it is much darker than I would like. I don't claim to understand much of baked models, so I can't figure out why this would be the case. Using the item vertex format and applying normals to the vectors seems to change the brightness, but it is inconsistent and changes when I look around.

If anyone can help, that would be great.

Attached is how the item looks in the hand (ignoring the wrong offset, I just haven't gotten around to fixing it). It should be rendering white, but it is a fairly dark grey due to the brightness. In a gui, it correctly renders white.

 

I believe all of the relevant code is in this gist:

https://gist.github.com/nictogen/984d165ea2fefbfdbd3ca7c0f2666ebf

If not, the full codebase is available on github.

https://github.com/nictogen/Star-Tech/tree/master/src/main/java/com/nic/st

Screen Shot 2018-07-31 at 12.24.35 PM.png

Posted

I figured out that I can fix the issue by disabling the lighting before returning the baked quads, but that seems like a bad solution... If anyone knows the underlying reason for this I'd be grateful

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.