Ah, nevermind–I’ve just noticed in the spec that “use_normal_maps” defaults to “False”! If I set it instead to “True”, I get normals as expected!
I still don’t get emission that I see, but that’s not important to me right now.
I’m leaving the original post below, both for transparency and in case others have similar problems.
I’m experimenting with “simplepbr”, and have made a little bit of progress thus far, I think. Specifically, I have a simple model rendering, and showing the effects, I believe, of both metallicity and roughness.
However, for some reason I don’t seem to be getting the effects of normals or emission.
Note that if I enable the auto-shader I do get normals, so the normal-map would seem to be functional, and the model would seem to have tangents and binormals.
I’ve followed the spec given here, I believe: the first texture is colour, the second is metallic-roughness, the third is normal-map, and the final texture is emission.
The test-model is a simple cube with some basic testing-textures; these files should be attached below:
pbrTest.zip (613.5 KB)
This is the result that I get with simplepbr:
Note that colour and metallicity-roughness appear to be present, but normals and emission don’t.
And here is the result that I get with the auto-shader:
Note that normals appear to be present, and that the emission-texture (which provides the red circle) is at least shown on the surface.
And finally, here is my testing-program at time of writing:
from direct.showbase.ShowBase import ShowBase from panda3d.core import PandaNode, NodePath, DirectionalLight from panda3d import __version__ as pandaVersion print (pandaVersion) import sys print (sys.version) import simplepbr class Game(ShowBase): def __init__(self): ShowBase.__init__(self) simplepbr.init() self.accept("escape", base.userExit) self.updateTask = taskMgr.add(self.update, "update") self.model = loader.loadModel("pbrTest") self.model.reparentTo(render) self.model.setY(5) light = DirectionalLight("mew") light.setColor((1, 1, 1, 1)) lightNP = render.attachNewNode(light) lightNP.setHpr(5, -5, 0) render.setLight(lightNP) def update(self, task): dt = globalClock.getDt() self.model.setH(self.model, dt*17) return task.cont app = Game() app.run()
All that said, it is possible that the issue lies with my machine–I’ve had some problems with the rendering of PBR materials before, I think.
So, am I doing something wrong here?