Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong material display when using PBR in egg file #828

jpgemble opened this issue Jan 3, 2020 · 1 comment

Wrong material display when using PBR in egg file #828

jpgemble opened this issue Jan 3, 2020 · 1 comment


Copy link

@jpgemble jpgemble commented Jan 3, 2020

When using the metallic scalar in egg material, the ambient light is forced to white when loading bam file (or cache).

In the file you'll find:

  • a python Panda3D simple project that shows the issue
  • simplest_NOT_WORKING.egg: an egg file that shows the issue
  • simplest_WORKING.egg: an egg file that shows how to use a workaround (not using PBR)

To reproduce the bug, rename simplest_NOT_WORKING.egg to simplest.egg and execute
The first time it works: a black form is displayed (it uses egg file), but next times it doesn't work: a white form is displayed (it uses cache bam file).
The expected behavior is to always show a black form.

I believe that, to solve the issue, the set_base_color method should be used in place of the _base_color property assignment in the Material class fillin method of the src/gobj/material.cxx file.
But I've not coded nor tested this fix.

@rdb rdb added the bug label Jan 3, 2020
@rdb rdb added this to the 1.10.5 milestone Jan 3, 2020
@rdb rdb self-assigned this Jan 3, 2020

This comment has been minimized.

Copy link

@rdb rdb commented Jan 4, 2020

Thanks for reporting and for pointing us at the right fix! I'll check in a fix shortly, which will be part of the upcoming 1.10.5 release.

@rdb rdb closed this in 0e1b524 Jan 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.