stillprint.blogg.se

Minecraft how to make photo frame
Minecraft how to make photo frame











minecraft how to make photo frame
  1. #Minecraft how to make photo frame 1080p#
  2. #Minecraft how to make photo frame update#

#Minecraft how to make photo frame 1080p#

This relative position is only for each Item Frame though, so for a 1080p video you would end up with 120 Item Frames, each of those containing 128 Pixels. And then you also have 2B for the relative position. Meaning that if you have a video of 1920x1080, you would get >2Million Pixels =>2MB per Video Frame! If you now have a 1 minute Video with 20FPS and 1080p you would end up with almost 2,5GB. This does not sound that bad, until you realize, the MMC types have a size of 1B.

minecraft how to make photo frame

Filesīecause Real Time Rendering is not possible, I decided to save the files, since rendering is (as I mentioned several times) really hard work. I tried using a different algorithm (which also would not have made real time rendering possible), but this resulted in wrong colors, because there is a certain red shift we would need to calculate for the MMC. As much as I would have liked real time rendering (and displaying), it just does not work, because the function, which matches RGBA to MMC is on the lower end of the spectrum when talking about performance. Rendering a video is really hard work for the computer. This is a really interesting section, since we have a few problems regarding it: To provide Audio I created a little Discord Bot, which uses JDA (Java Discord API).

#Minecraft how to make photo frame update#

To now update them, we go through each Location, send a packet to destroy the frame that is currently there and then send a Packet for the new frame to show.Displaying those rendered frames is done using Packets -> Protocol.Last but not least we need to save the file, so that we can load it at a later point.Finally we also need to calculate the relative Positions of those Item Frames, so that the Video Frames are displayed correctly. The latter process of which takes a lot of processing power, which makes real time rendering not possible. And with render I mean we first split the images into 128*128 chunks (for the Item Frames), after which we need to match the RGBA colors of the PNG to Minecraft Map Colors (MMC). Then we read those images one by one and "render" them.(here it is important, that we make sure that the video only has 20fps) => this meant using ffmpeg (in the console) to split the video into its frames. To read videos, I used ffmpeg at the beginning (well a library for it), but since this library is >200MB I ended up using Images only for dev.First of all we know, that Minecraft works with 20 ticks/s, so I figured I will stick to one frame per tick, meaning to a total of 20 fps.The process to display videos in the Client is kinda tedious, so read carefully. It is also important to note, that this should not encourage anyone to watch or distribute pirated movies using Minecraft.

minecraft how to make photo frame

Note, that this is not usable for real life application, but rather as a proof of concept. This is done using Item Frames and some quick Maths. This is a Spigot Plugin, which lets you watch videos in vanilla Minecraft.













Minecraft how to make photo frame