Decals take-up full Parts with SpecialMesh

A bug I think I found when adding decals to parts with SpecialMeshs. It wraps fully around the object instead of on the specified face!

image
Front Decal in a Part /w a SpecialMesh

Reproduction

  1. Create a Part.
  2. Insert a SpecialMesh inside the Part.
  3. Set the MeshType to FileMesh and set the MeshId to anything you want. (eg: rbxassetid://7430071038)
  4. Add a Decal to the Part with any Texture.
  5. It wraps around…

BugWithDecalAndMesh.rbxl (55.3 KB)

1 Like

Not an engine bug. Not an engine bug. NOT AN ENGINE BUG!

This is intentional! Decals form the texture ID for a special mesh. If you want to use a decal on a mesh then use a meshpart.

This feature is actually EXTREMELY handy as SpecialMesh texture ID can’t display alpha maps, which is annoying sometimes and there, THIS comes in handy as decals allow alpha maps.

1 Like

It’s not a bug.
If you add a Decal to a SpecialMesh it’s always acted this way. SpecialMeshes use a Texture that wraps around the mesh with whatever image you use.

Try using a MeshPart that’s that same shape (plenty of them in the toolbox) then decals apply to individual faces instead of wrapping around.

EDIT, got distracted halfway through posting and @K4ttt_i beat me to it.

Muahahaha! I win!

1 Like

How would I add decals then? You cant create MeshParts via a script…

ya how?

why would you need to create a meshpart via a script… (IM NOT A SCRIPTER) couldn’t u just do… Instance.New Mesh n then like set the mesh ID or something?

Saddly, no as stated here:

Note that this property currently cannot be changed by scripts as the collision model of the mesh cannot be recomputed during runtime. Developers should not rely on this behavior as it may change in the future. Those looking for a custom mesh object that can be updated during runtime should use SpecialMesh.

So you must use SpecialMesh or fiddle around with AssetService witch messes up my game. :disappointed_relieved:

**EDIT: ** Also Mesh image you see inside of parts are actually just SpecialMeshes

You can create the MeshParts in studio and put them in ReplicatedStorage, and when you need to create a MeshPart with specified mesh, just clone the MeshPart with the Geometry you want.

Sadly my script needs to create meshes on the fly…

Thanks for the quick response tho :wink:

Should I remove the [ENGINE BUG] label at the beginning and move it to scripting support?

It’s not even a bug. It’s a feature.

Since the decals wrap around the whole special mesh. just make a decal that takes up only so much space.

The image is by another user and not mine so I wont work… (I’m moving this into a new thread)