View Single Post
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2019-07-06, 19:38

I think I might have figured out a way to squeeze some improved performance out of the horrible item frames. 🤔

The standard item frame has 22 faces. This is how it's able to give the appearance of a raised border and inset interior. This is actually already somewhat optimized, and the model takes advantage of intersecting some of those faces. However, what if I were to simplify the geometry of the item frame not to have that raised border? That would reduce each item frame to 6 faces.

(Side note: Minecraft does automatically cull back faces. So, it's only ever really rendering about half of the possible faces.)

So, I took that wall o' frames I made earlier, put items in all of them, and revised my test results.

21x11x1 stone wall with 0 item frames → 1000+ fps https://i.imgur.com/170sWSw.jpg
21x11x1 stone wall with 241 item frames → 48 fps https://i.imgur.com/WsO30UT.jpg
21x11x1 stone wall with 241 item frames with items → 38 fps https://i.imgur.com/nGQjPbm.jpg
21x11x1 stone wall with 241 item frames with items, simplified model → 68 fps https://i.imgur.com/SrpJsJO.jpg

Still not great, but it's certainly better!

That last image is just a prototype model where I removed all the faces except for the bottom 6-sided "edge". Before I add anything like this to my resource pack, I'll make a custom texture and model that approximates the look of the old item frame. I'm working on this now and will hopefully get it updated for the server this evening.

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote