Being able to change ColorMap in Surface Appearance during runtime despite the API saying you can't

Happens in: both studio and in-game (since you cannot edit manually in-game it’s not reproducible there)
First encountered: 10th October
Reproducible without plugins: Yes.

External Media

Reproduction steps:
Frequency: 100% of the time
Reproduction steps:

  1. Pick a classic shirt off of the marketplace and copy the Asset ID
  2. Create a mesh part (if one doesn’t exist)
  3. Delete the Surface Appearance inside the mesh part (if one e
  4. Paste the shirt ID into the Color Map property of the Surface Appearance
    ColorMap.rbxl (56.0 KB)
    I was attempting to make custom body parts with classic clothing support but I’ve encountered the issue where TextureId doesn’t overlap ColorMap and you cannot change ColorMap with scripts although the engine is 100% capable of doing it.
8 Likes

We’ve filed a ticket into our internal database for this issue, and we will update you when we have further information!

Thanks for the report!

2 Likes

It might then be expected that all properties of SurfaceAppearance then can be modifiable by scripts: however I suspect that some properties like NormalMap require some pre compute, which might not be possible at runtime

2 Likes

Anything news regarding this issue?

Hey, are there any news regarding this?

Also as a good solution you could either allow A: Color maps to be changed with scripts during runtime B: Make TextureId overwrite ColorMap if there is no ColorMap present (currently it uses the part’s color as the texture and absolutely ignores TextureId if the ColorMap is missing)

1 Like

Getting in touch with the engineers

3 Likes

Alright, thank you, my players have been waiting for this feature for months and keep asking me where it is. I don’t want to release it with premade clothing only so I’ll wait for the fix. Is there any chance that it will appear in the next 5 patches?

Could you consider making this a feature request? This seems like intended behavior as SurfaceAppearance overrides all the visuals of the mesh part.

1 Like

I don’t have the permissions required to type in there sadly

1 Like

@Pan_Shyrikys

Sorry, it’s not very clear from your repro steps what is the issue? Could you clarify a bit more please?
Are you changing the ColorMap from scripts and expect and error? If so please provide a placefile with a script and steps to reproduce.

Thanks!

1 Like

The API says that you cannot change any of the SurfaceAppearance properties with a script due to lack of security permission and if you do it manually with something like a color map the engine doesn’t update it, although if you do everything in the repro steps it will update the map. My proposition is to ideally either make A: if no ColorMap is present it will instead of the TextureId first instead of BasePart.Color. B: Make ColorMaps changeable with scripts (although you would have to perform this glitch in order to even use it). Option A in my opinion should’ve been the default behavior since in a lot of cases you want a ColorMap/TextureId used with a SurfaceAppearance which is currently impossible to do with any of the tools provided by the engine

1 Like

The post itself explains the reproduction steps for the glitch in Option B

1 Like

“The current thread cannot write ‘ColorMap’ (lacking capability Plugin)”

while we wait, is there any different approach?

If there was I probably wouldn’t have created this bug report in the first place, I tried every single instance that could plaster an image onto a mesh but only decal overwrites surface appearance and you cant use uv maps in decals, so it didn’t work. Any other method just doesnt let a texture overwrite the colormap property. It would be great if this was a thing since for example 3D muscles with normal maps with avatar clothing could be done, you can do it without the normal map part but you would have to sacrifice tons of performance, to the point where the player would have over 100 THOUSAND triangles if its R15 and roughly 60 thousand on R6, neither of which is ideal. With the use of normal maps it drops down to roughly 7000-8000 triangles with a good looking mesh, the number depends on the mesh’s complexity and the topology.
image-48-2
(image wasnt done via avatar clothing but rather manually setting the colormap property beforehand)

i also had to force myself manually setting the colormap property while in studio just like what you did

Any movement on this? The repo steps are just create a SurfaceAppearance, change the ColorMap at runtime

I have recently encountered this myself. It is flat stated in the API documentation that those properties of SurfaceAppearance cannot be accessed by scripts. Why I don’t know. I did make a feature request about this awhile back to at least allow read access from scripts so games that use automatic asset Id aggregation programs to gather asset Ids for use in ContentProvider:PreloadAsync() can pickup those asset Ids and have the client preload them.

You can view the feature request here: Allow read access to texture properties in SurfaceAppearance and MaterialVariant

EDIT:

@neutrinostack I was looking at the documentation and it shows that those properties are now read only. But now when I tried it in a script, it throws an error. I also checked MaterialVariant and it was changed too.

So someone changed the documentation to say that this is read only by scripts now, but it wasn’t changed in the engine. Go figure.

1 Like

Is there any update regarding this? Its ridiculous that something like this hasnt been sorted out yet.

“The current thread cannot write ‘ColorMap’ (lacking capability Plugin)”

This is the bane of my existence

1 Like