setUVOffset not working with normal maps

Hello all,

I’m trying to offset the UVs of a normal map in the Viewer API using setUVOffset() but it appears to just remove the normal map immediately when called. It works fine when set to the AlbedoPBR channel.

I’ve forked the UV Transforms example provided by Sketchfab and all I’ve changed is the model ID to a simple cube I’ve uploaded and in the updateOffset() function I’ve changed the channel from ‘AlbedoPBR’ to ‘NormalMap’.

You can view the JSFiddle here, notice how the normal map disappears as soon as you use the OffsetX or OffsetY sliders - https://jsfiddle.net/17vsg5az/2/

Am I using this function incorrectly?

Thanks.

1 Like

It looks like you’ve run in to a bug here. Our 3D team will look at this, but won’t have time until next week.

Hi Bart,

Thanks for your reply and confirming this is a bug. It’s a shame as we’re launching our Sketchfab powered app this week so will have to delay this feature until it’s been fixed on Sketchfabs end.

I look forward to hopefully hearing something next week, thanks again.

Seems like it’s not specific to setUVOffset - using any of those functions on that channel removes the texture completely by the looks of it.

1 Like

Ah I haven’t checked the other functions but out of curiosity I’ve modified the scene to add a test Ambient Occlusion map and that also disappears when set to the AOPBR channel through setUVOffset.

It might be worth checking the functions against all channels to see if any more have this behaviour?