Converting a decal/image into parts

I decided that I wanted to create a script that converts pixels on a decal to parts. I realized this idea was easier said than done after doing hours of research without any avail. I’ve tried using HTTPService and RayCasting for this, but yet to any avail.
Heres a visualization of what im trying to accomplish:
Decal:
image
Intended Result:
image

What solutions have you tried so far? Did you look for solutions on the Developer Hub?
YES, I have for many hours tried to look for solutions on the devforum and have tried using APIs and Raycasting methods just to find a pixel on a decal. Frankly, I’m not that advanced of a programmer and it’s hard for me to recycle code from complex APIs.

If you have any ideas for what I can do, or if you have any information, please share.

3 Likes

HttpService is your only option, you will need to retrieve data using GetAsync or RequestAsync.

1 Like

Ok, I tried using RequestAsync to retrieve data from pastebin but ran into another problem: When I returned the array and decoded it, I got an empty table instead of a group of rgb values.
image
image

2 Likes

You need to put JSON in a table to encode it. I’m not sure what you’re doing here.

I used an image elevation map to create a landscape in Roblox. Previously, I processed the image through a python script, writing all the pixels in a list (in gray and in color). After that, I copied and translated it into a table in a Lua script. And then, I just ran through each pixel and indicated the height from the gray list and the color from the color list.

Generating a location map from parts pixel by pixel taking values from the table.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.