# How would I convert studs to pixels?

1. I’m trying to make a decal for custom trailer for game.

2. The issue is that I don’t know how to convert studs to pixels, so I could get the perfect size.

3. I have tried size times 28 (1stud=28cm, don’t know if it’s correct) then I converted to centimeters and then I divided the answer by 15 because it was too big. The decal still looked low quality tho, which I not what I want.

I am trying to convert these values to pixels:
Mogel Trailer
Side:
H: 10.524
W: 49.545

Front:
H: 10.524
W: 9.8

Rear:
H: 10.54
W: 9.8

Wielton Trailer:
Side same, front same

Rear half door:
H: 10.54
W: 4.865

Box Trailer:
Side:
H: 10.59
W: 54.739

Front:
H: 10.608
W: 8.694

Rear half door:
H: 10.59
W: 4.915

Sorry for a lot of sizes but is there anyone who could help me make the perfect size of decal in pixels for the trailers?

Sorry if this is the wrong topic category.

4 Likes

There isn’t really a conversion for this. You could technically put a giant decal on a really small object, and you’d just have a really detailed-looking small object. A smallish decal could look fine on an object that is always seen from far away. It’s more of a “if it looks right, it’s right” kind of thing.

You can calculate a ratio to use based on what you think looks good:

1. Take a decal you’ve already made and apply it to a Part.
2. Scale the Part until the decal looks good from about the distance you’d want the decal on your truck to look good (it’s an image map, so it will always look pixelated if you get close enough).
3. Note the sizes of your Part and your image. If it’s a square decal on a cube part then you’ve made things easier on yourself.
4. Divide the x or y size (in pixels) of the image by the corresponding side length (in studs) of the Part. e.g. (256 image pixels in y) / (10 Part studs in y) = 25.6 pixels per stud
5. Then multiply that value you got in step 4 by however many studs you need to cover. e.g. 49.545 * 25.6 = 1268.352 (or about 1268 pixels to cover the width of a Mogel trailer–if 25.6 was the per stud value you thought looked good for that).

That said, I think the size limit for an uploaded image is 1024x1024 pixels. If you’re trying for something that will stretch across the side of a truck that players might be standing near, then it wouldn’t be unreasonable to want to use the biggest maps Roblox will support. You might even need to split your logo (or whatever is on the decal) into more than one image and use more than one decal side-by-side to get the look you want (mapped to invisible panels floating slightly away from the truck, maybe). If you need the graphic to be really large, then it might be better to create some or all of the graphic using geometry instead of decals (in 3D). Lots of big texture maps can eat up space and cause memory/performance issues in your game. That isn’t as big an issue if it’s a showcase.

4 Likes

Thank you very much for this answer. You definitely helped me a lot, especially with the ratio calculation which I will try. But I have a question. Is putting a decal on the trailer worse than putting parts on the trailer, like letters and stripes? Will it affect the performance more than parts? Let’s just say that like 15 people will use the trailer at the same time around the map.

1 Like

So, mobile devices in particular have a somewhat limited storage capacity for texture maps. If your game uses a lot of decals/textures, then you’ll have to start compromising at some point. If you have a modestly sized world with mainly colored parts and a few nice big decals for effect, then you shouldn’t have an issue. With something like stripes across the truck, you’d probably get nicer results with just using a part; the edges would be sharper. Using parts will always have an advantage in terms of sharpness since even high-res images will look pixelated when you get close enough.

It’s easy to get derailed by worrying about all the more or less efficient ways of doing this or that. In general, lots of big images can be a strain on some systems. Replacing some of those images with geometry where possible can help. Lots of tiny bits of geometry in a small space can also be an issue and using a decal instead can help. Making a custom model in something like Blender can allow you to create efficiently constructed geometry that utilizes small textures. That can be a best of both worlds but involves some extra hassle if you don’t already know how to use another 3D app. There are countless creative ways to mix and match techniques to get something that looks nice and works well, but if using big decals gives you the look you’re after, then I’d run with that. When your map gets big and performance is suffering, then we can look at which models/decals are the best candidates for change

1 Like

I am very thankful for your long answer. Because of you, now I know what to do! Thank you very much for your time! I hope you have a nice day!

1 Like