Yes, I am using simplepbr. I added a material and set priority to one using your code, and it still appears black. It even appears black when I do not use simplePBr. Do you have any idea what the issue might be?
Hmm… I’m guessing that the material for the model exists on a child-node of “self.trail” (due to the way that models are generally loaded in Panda, I believe). I wonder then whether the call to “setTexture” isn’t resulting in a new material being made on the parent-node that’s overriding what’s present on the child-node…
Ah, I was thinking that you would replace your own texture, not “pbr-fallback”. Still, the fact that even then you’re only seeing black is odd.
Could you perhaps put together a simple model and texture that demonstrates the problem, so that we can examine it ourselves and try to investigate what’s going on? Ideally something very simple–just a cube and a single-colour texture, for example.
Ah, I think that I might have an idea: Does your model have UV-coordinates?
My guess is that it doesn’t, and that what’s happening is that you’re seeing just one (sub-)pixel from each texture. In the case of the paper texture, that happens to be a white pixel; in the case of the transparent texture, that happens to be a black pixel.
I just had one more question about setting UV coordinates. I was able to get the texture to appear when I used setTexGen, however, I want to use the uv coordinates defined in my model. is there a way to do this? when I apply the texture in my exported model, it appears the way I want it to.
Generally speaking, I believe that it’s something that’s applied in the 3D modelling program.
If by this you mean within your 3D modelling program, then it may be that said package is using automatically-generated coordinates to do so–but these presumably are either not available to or not observed by the exporter.
So, it may be that more-explicitly-defined UV-mapping is called for. If you search online you should, I daresay, find tutorials regarding this for your modelling program!