Remove channel texture problem

when we remove the channel texture, it doesn’t work with opacity, noraml and roughness channel, but it works with albedo channel.
is it some bug in the viewer.api

Hi,

I’m not sure I get what do you mean by remove, Do you have a code sample ?

you can use Viewer API - Examples - Sketchfab and fork it on jsfiddle to make a simple reproduction of the bug, it would help understanding the problem at hand.

hi, i set 2 kinds of materials we call them A and B.
A has albedo,normal these 2 channel texture.
B has albedo texture and normal channel open without texture.
i chose A at first it works. when i click B, B shows it’s albedo texture and A’s normal texture.
it means A’s normal texture isn’t be removed.

i use api.resetexture(zj,item) fro cleanning the last texture.

Theres’s no reset texture in sketchfab api: Viewer API - Functions - Sketchfab

here’s a sample that does it https://jsfiddle.net/sketchfab/mtn3v729/

( My guess is that you need to explicitely disable/enable channels like in the sample above )

1 2 3
hi there, as the pic i upload, when i switch texture , the right effect can not shows.
the first one texture has albedo channel pic and normal channel without pic but channel open and factor =0.5
the secend one texture has albedo channel pic and normal channel pic.
when i swith the texture, the secend one texture will remain normal channel pic for the first one
texture because the normal channel open without pic.
i use api.resetexture(zj,item) fro cleanning the last texture.
it works for every one which has successor , but if not ,the effection will remain.

( I moved the other post here, please keep all post related to a bug/pmroblem in one thread )

disable/enable channels is one way but it doesn’t good way for opacity metalness roughness.
because some time we just change the factor of them but upload texture for the material.
in different materials , if the channel has texture , it will work. i need to remove the channels texture completely before the next material on it

I would love a jsfidlle showing exactly what doesn’t work, because I don’t get what’s different from the sample linked (the code on the diffuse that switch between red and texture.)


i use this reset , is it doesn’t fit the new viewer.api

Ok, sorry I didn’t get it earlier, this isn’t Sketchfab’s “viewer api” from , it’s from @shaderbytes’s “viewer api utility”.