I’m trying to create a projected texture (a projection of a source image) that can be interrupted by geometry and players (fig 1). My current approach is to take the image’s pixel brightness/color value, find the nearest surface, and then display that pixel on that surface. My issue is that I really don’t know how to get the brightness level of each pixel in a source image. How do I proceed?
I don’t actually think that there’s any way that you can sample pixels of a texture in roblox. You’d most likely need access to cuda via c++ and I highly doubt that roblox would give us that level of control since it would have massive security concerns. (Plus it would drive people away from just learning luau which roblox obviously doesn’t want)
Thanks for the reply. Image processing should really be a feature, as it would open up roblox materials to a whole trove of possibilities, like animated materials, projected textures/decals, etc.
As for this, if this was integrated and properly exposed to lua scripters, and done in an intuitive fashion, I don’t think many would be driven away.
Fair enough, I have always been wanting to write my own shaders but I don’t think there’s a safe way to do it unfortunately. Although I’d rather not have malicious devs having people join their game and doing whatever they please with other peoples machines.
u can request the binary of the image using http service maybe then code something for that,
EDIT: u can use a express node app using glitch.com express js, sharp js and axios arraybuffer npm package to return back the pixels of an image
Interesting solution. This does present some disadvantages, though. Namely the cost of hosting a web server, as well as maintenance. Ideally the best solution would be one that is within the engine context, not outside it. I will however mark this as the solution as it seems that there is no possible native implementation.
Technically yes, however replit doesn’t allow for projects to run perpetually (without a paid plan), and this is the kind of thing that does need to run 24 / 7 / 365