Hey all, today i was playing some neat Minecraft as always, and i noticed how Minecraft turns their 2D textures of some items into a 3D object.
Image 1
Image 2
as you can see above, the sword in ‘image 2’ is kinda 3D. And i’m wondering if its possible to recreate this feature in Roblox.
(its most likely not, but i did see @Maximum_ADHD’s Place called ‘PNG Loader’ which takes an image of a PNG format, and loads its into the world as a bunch of parts)
also when i say 2D to 3D, i mean like kinda streching the image to kinda made it look 3D, the same way how minecraft does it. So not completely 3D, but still kinda 3D.
2 Likes
Put simply, no this is not feasible.
Minecraft is able to pull this off because they use pixel art for their decals, and voxels(3D pixels) for their 3D objects. Therefore it is very simple for them to create exact replicas between 2D and 3D.
If you are talking specifically about the transfer between pixels to voxels, where the voxels only have a depth of 1 voxel, then yes there could be something made that auto-converts this kind of thing. If you’re talking about say, a flat image of a sphere, there is no way to automatically convert that to a sphere without something overly complex, when it’s simply easier to just manually spawn in a sphere.
2 Likes
CloneTrooper1019 achieved this affect PNG Loader - Roblox
meaning that it is possible. Also when i say ‘3D’ i mean kinda streching the image to make it look like cardboard
2 Likes
Sure CloneTrooper achieved the effect, but if I put a png of a Minecraft diamond sword in, it doesn’t have the output of the 3D model of the Minecraft diamond sword. The output in game has issues as shown,
Also note that I said this was not feasible, not that it was not possible. It is much easier to model these things yourself. Again, unless you have very strict rules that the decals and models follow, such as the decals are all pixel art, the models are all Voxels, and only 1 voxel in depth, it will end up just being easier to model what you want.
3 Likes
Im currently using a built in program on my computer called ‘3D Builder’ where i can put an image into the program, and it will import it as a kinda cardboardy 3D object. But what if i wanted the player to be able to upload texture packs with out having to model the item? (otherwise players will have to make the MESH and the DECAL, just to make their own custom item)
1 Like
Want to expand on this, Pretty certain he has a website API that gives him pixel data in return from the image and it is done outside of Roblox. And Roblox just renders the pixels with a height value. I achieved similar results but not as automatic.
The actual resolution is quite low and this uses an EXTREME amount of parts. I had an improved version but I lost the code for that.
3 Likes
After looking at how 3D builder works, they basically take the flat image and add depth to it.
This could be possible in Roblox, you would definitely need to have some extensive knowledge in this field or do a lot of learning, but it’s possible. This follows strict rules for every case, which is something that I said is necessary earlier.
The issue with this though, is that if someone posted a picture of a sphere, they would simply be given a cylinder, rather than the sphere.
So again, if you have strict rules for every case that don’t involve predicting 3D shape, and simply involve manipulation of the information known from the image, then yes it is something that is possible.
1 Like
Yeah, i also wont be using high res sprites. the max ill be using for my game is like 32x32 pixels.
1 Like
The sphere thing will not be a problem cause ill be using pixel sprites where their resolution will be 16x16 pixels or 32x32 pixels at the most
1 Like
If you have strict rules for both the image and the 3D models, which is seems you at least do for the images, then all that’s left is for you to do some research on image APIs and how to manipulate that information to yield a result on Roblox.
1 Like
Right, I’ll see if I can figure out if theres a way to add depth to images. Also I’m not the most experienced scripter and I do not know a lot about APIs. Soooo wish me luck.
1 Like
Alright, so what I am assuming he is doing is something like this.
It’s quite simple when put down to paper but it requires some outside work. I am 99% certain there is nothing in Roblox that will allow you to achieve this without doing something like this. My example is quite bad sorry about that. But you send the url to a webserver, The server downloads the image and makes it into pixel data. Which could look like 255,255,255,5|0,0,0,5
This being 2 pixels one with the RGB 255 255 255 and the other one with 0 0 0. The last number is the height value.
3 Likes
How would I achieve this scripting wise? as I said to the last guy, I’m not a very experienced scripter, and I could use some help with this sorta stuff. I’ve never manipulated with APIs or things out side of roblox before
1 Like
When I made my “pixel renderer” I used python and did everything manually. I had to run a script on my computer which gave me a .txt file of the pixel data which I then put into roblox and there I had a script which read the file and “drew” the image. Are you trying to achieve one time images or some sort of player imported images? If you just want 3d pixel art swords etc I would just go for the manual option that I went for. Otherwise you will need to do a lot of extra work.
1 Like
Basically trying to automate this kinda stuff. Basically the same way how you would do it on CloneTrooper1019’s place. I’ll look it up at we point.
1 Like
Just asking, For what though? Will a player be able to import a image and others will be able to see it?
1 Like
The game will be single player, so it can be completely client side.
1 Like
And if I make the game multiplayer, then Im sure it won’t be difficult to replicate
1 Like
Ah I am more concerned about that violating roblox TOS.
1 Like
Maybe we could make it so it only allows decals, so you take a decal ID. Find the image url of that decal. And then import it to the game
1 Like