I want to be able to take the position/color of each pixel on the screen. Alternatively, I want to know how to capture the color of every pixel on a ViewportFrame. Is there any way to do any of these things?
There’s no way to do this in Roblox, but you can try setting up an external web connection to do this for you
Do you know any web application/service that I could use?
None that I know, sorry. But I have seen some projects in #resources:community-tutorials that used this method. I’ll update my reply if I can find them again
You really couldn’t. You would need to have your players also download an external software.
why do this whats the point what do you need it for
I want to create a custom shader, full of certain things. Sort of like a custom rendering engine. Since roblox has the built in 3d aspect, I assumed adding certain things would be sort of easy.
Yeah that’s what I’m trying to avoid. Which is why I asked the question in the first place.
I haven’t been able to replicate this myself yet. However, I believe you can get the viewport’s camera and make the mouse’s position into the screen and then ray cast.
local unitRay = Camera:ScreenPointToRay(mouseLocation.X, mouseLocation.Y);
local myRaycast = myWorldModel:Raycast(unitRay.Origin, unitRay.Direction * 5);
A world model should be inside the viewport frame so that it can be raycasted.
Then you check if there is a hit and if so change the color to that part’s color. If there is none then set it to the background
Everyone will say to raycast, however that limits you to not having decals (or really pixelly ones) and textures have to be custom. Not only that, but you would only be able to really get 50x50 resolution and you would have to make it only update at 10 fps for game performance to still work. If it only needs to cover a 100x100 pixel (or scaled, you cant really tell the difference at 200x200) portion of the screen I would recommend using @boatbomber uigradient module. If not, you could use @Ethanthegrand14 method where you get a white blurry circle that is png then represent that as a pixel. That lets you cover the whole screen but it forces you to not have any decals basically as it is too pixelly. To store the decals you need to process them into a datastore by getting the r, g and b channels of the image and store the rgb values bitpacked together (4 pixels per number) then load it in when the player joins the game. For the custom textures you need to use some sort of repeating yet customizable pattern generator such as perlin noise.
oh and dont talk to me about mesh parts or accesories lol
sometimes you gotta accept failure as i dont think this can be possible