You can get a lot higher resolution and videos to the point where they last for minutes at a time by using this method + texture atlasing. The real gem is trying to figure out the best way to store them so that you can have them be in datastore.
Over my research the past year I found that a mix of bit packing, base64 encoding, as well as serialization, was the best way to make the storage small for RGB images. There is a better way than RichText, and it is to take advantage of caching. For GUIs youād just use something like a lookup table for the colors whereas if you wanted to take the parts approach, you layout in your world a pallet of color cubes then change their CFrame on call (by using a CFrame cache). There are problems with both methods, GUIs can only go so high as they are inefficient as youāll need to create constant UIGradients whereas with parts it is very efficient in terms of CPU usage, but you will use loads of memory with the sheer amount of parts in the cache.
That is why there are basically two methods for images for stuff like art games in Roblox, and because most users want it for an art game, where they can extrapolate it to a surface GUI and still run for mobile users, it is why most people tend to use the UIGradient exploit.
Yep. I sure did. Image processing on this has been around for a month and a bit now, but I honestly donāt think anyone even knows that it existed. half of the capabilities of this module isnāt even know! Maybe my thread on this thing doesnāt say or show enough.
I honestly donāt think it will make that big of a difference in performance since we are still colouring different parts of the ui objects. If anything, and honestly, I believe the rendering process for richtext colours is probably more expensive than just changing frame colours or UI gradients which are probably less expensive in rendering.
I hate to say it, but we will most likely never be getting any real time rendering for any custom canvas with a resolution that high. I would like to point out that the main performance problems are the pixel calculations. Not the actual frames with gradients.
Wow, now thatās a high quality image for CanvasDraw
Now secondly, the actual method for storing pixel data of images on SaveObjects has been heavily optimised thanks to string compression methods.
Before, SaveObjects used to be able to get as big as 120KB!! Now thatās a really big file size for an instance in your game. But now, SaveObjects have become 80-95% smaller!
Now you can have as many SaveObjects in your place as you want without having to worry about file size!
WARNING:
If you are using SaveObjects in your place that were made before this update, then you will need to delete them and re-import new SaveObjects as the old SaveObjects will not work with CanvasDraw 2.3.0 and above.
You will also need to update the CanvasDraw Image Importer plugin as well.
huh i realized loading a 1 minute video that has a 144p resolution takes a long time to load into roblox for some reasonā¦ I wish it was a bitā¦ fasterā¦ If i remember correctly, it took longer than 30 minutes to load in the video.
Oh i do not recommend whole videos. Firstly it will take awhile to do import hundreds of PNGs at that high of a resolution. Also you will start to experience some framerate drop when doing videos more than 128p.
Aside from that, i tried making it as fast as possible for importing images without causing lag.
Honestly 90p to 128p is my best preferred resolution, but itās the frame count i like to keep below 100. Also I try to keep the framerate for videos at around 30 FPS or less. Cause simply switching pictures with larger resolution causes slight lag. But it pretty minimal and is overall pretty optimised
Fixed circle not filling with the fill parameter set to true in the DrawCircle() function
This update contains a fix for a bug for the DrawCircle() function that was caused by an update that changed the way how pixels were represented.
In versions 2.0.0 to 2.3.0, the fill parameter for DrawCircle() did not work at all, which will always an outline circle when ever drawn. Thankfully this has been fixed!
CanvasDraw.DrawCircle(
Vector2.new(50, 50), -- The point on the canvas where you want to place the circle
5, -- The radius of the circle in pixels
Color3.new(1, 0, 0), -- The colour for the circle (red in this case)
true -- Fill the shape (now works again :D)
)
This update contains a brand new and a much more fast and accurate algorithm for drawing circles. Before, DrawCricle used to leave imperfect circles with weird results at certain radiuses. This has now been fixed!
Fixed up and made the thread and API reference better
This thread has been updated to be a little bit smaller and more straight to the point without filling up the post with useless or repetitive information.
The API reference thread for CanvasDraw has also been updated as well.
Hereās my solution, First things first, I have a code that takes in videos and turns them into different pixel packets (a json file filled with pixel color data).
What happens next is that ill make it store all of the packets into folders or values. Once loaded, ill use CanvasDraw to get those pixels, turn them into images and scroll through them to make up a videoā¦
Whatās preventing you from using CanvasDrawās method for images?
CanvasDraw already does this with its image functions and it is quite efficient too since its all cached data from the Image importer plugin.
Unless your problem is the speed of importing images with my plugin, otherwise CanvasDrawās method is already fast enough for GIFs and small videos.
CancasDraw also uses a single instance (an empty folder in this case) to store an image as a compressed string with attributes. So thatās only a few kilobytes of data for an image instance thats like 256x256p in a roblox place that CanvasDraw can load, and then draw.
CanvasDraw.CreateCanvas(CanvasFrame, Vector2.new(256, 256))
local SaveObject = script.Noob -- That folder instance that stores image data as compressed string values
-- Covert the compressed ImageData strings into a cache of readable values for CanvasDraw
local ImageData = CanvasDraw.GetImageDataFromSaveObject(script.Noob)
-- Draw the image to the canvas
CanvasDraw.DrawImage(ImageData)
Yeah CanvasDraw doesnt work for videos longer than 1 minuteā¦ However the best fix is to split the video into bits and store it into foldersā¦ problem is figuring out how to scroll through them.
other way is the way i originally proposed.
But ur right, i can just use the image import system.
Hello Developers! so im Trying to get Livestreams from youtube inside roblox how could this be done?
if anyone can create such a system for me contact me: Ms.Videoproductions_Ltd#5345
i really would like to use this to play recaps of my events on screens