Do you see any error messages on the command-line?
Were you using simplepbr before you updated?
Please note that you cannot enable both simplepbr and setShaderAuto on the same model. Only one of them can take effect, because they apply different shaders to your objects.
Known pipe types:
CocoaGraphicsPipe
(all display modules loaded.)
:display:gsg:glgsg(warning): Shader created-shader produced the following warnings:
WARNING: Could not find vertex shader attribute 'p3d_Color' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'vertex' to match BindAttributeLocation request.
WARNING: Could not find vertex shader attribute 'p3d_Normal' to match BindAttributeLocation request.
WARNING: Could not find fragment shader output 'p3d_FragData' to match FragDataBinding request.
Process finished with exit code 0
Yes
I have just tried commenting out simplepbr.init(use_normal_maps=True) and I got a dark environment, I uncommented simplepbr and commented self.render.setShaderAuto() and I got the entire environment black except for the player model, might need to add more lighting after these results.
EDIT: Plus when I commented out these lines individually I don’t get message above in the terminal.
I have reinstalled Panda3D 1.10.8, reinstalled simplepbr (0.7 to make sure) and I am on the latest OS (I am on a Mac and graphic drivers are part of the OS).
Any other potential solutions to this? Should I downgrade back to 1.10.7 if still no luck?
Looking at your code you seem to instantiate at least ShowBase twice, MyApp inherits from ShowBase, but also your Water object is. I don’t think that’s a good idea.
If you want to see the effect of your normal map, you need a directional or point light. However, as far as I can see you only have an ambient light.
I would say you are using an undefined behaviour (or a bug) that has been fixed in 1.10.8.
I have removed the ShowBase parameter from the water object and that was the only object to inherit showbase other than MyApp, and I also added a directional light to the scene, no luck.
I’ve just updated the project on GitHub, would you mind having another look at the code?
Oh, hang on, I feel silly for not checking this first. It actually looks like water.bam doesn’t have binormals and tangents generated for it. You need those to be present on your model if you want to apply normal mapping.
I used egg-trans to add binormals and tangents to the file, yet it still seems that it doesn’t work.
I used the command egg-trans -tbnall water.egg >newwater.egg after converting water.bam to water.egg using bam2egg, should I have used something else for egg-trans?
Plus, if this is useful, I no longer get those error messages I mentioned earlier.
I have updated the GitHub page with the new .egg file.
I tried loading in another model onto the scene (with binormals and tangents) and still seem to get a really flat-looking surface.
I tried running the bump mapping sample program and it says I don’t have supported video cards, which I find strange due to the fact that it used to work perfectly previously on the same machine. (I’m using a 2018 MacBook Pro)
@eldee if you have the time and don’t mind, could you please try running the bump mapping sample on your machine and see if it works?
Weird, I ran the bump-mapping sample and it warned me that “Video driver reports that Cg shaders are not supported” I don’t run the sample everyday but I’m pretty sure I didn’t encounter this in the past.
If I modify the code to ignore the warning, there is no bump mapping applied on the room walls.