I am working on a game trying to use
PBRLighting in Intellij using
3.3.2-stable. When I applied a texture to a material it always looked gray. I can see the characteristics like pits and bumps and light does not reflect so I know the maps I’m using like normal, roughness etc seem to be applying. It just appears that the
BaseColorMap doesnt seem to be applied to show the color.
So I tried switching to the SDK
3.3.2-stable-sdkpreview1 to see if I have a better result. First I created a base gradle game and created a new material and this is what I see.
So I created a new maven game and tried creating a material there. When I use regular
Lighting it looks as I would expect.
But when I switch it to
PBRLighting I see the same thing that I did in Intellij.
I have 2 problems.
- Why am I not seeing the same result between
- Why is a new material in a new base gradle project, with no changes except a new material, not showing the material properties?
I am unsure about your second question, but in regards to the first one:
PBRLighting will never render 100% accurately in the material editor’s preview, since PBR requires a light probe in the scene to simulate indirect lighting. So the proper way to preview the material would be to apply it to a model, and then view the model in the scene composer with a light probe.
To go into a bit more detail, the graying effect may be more or less noticible depending on the roughness value and metallic value of a PBR material, because these values are used to tell the shader how much of a pixel’s baseColor should be effected by the lighting - for example, a metallic value of 1.0 means that the baseColorMaps color will render darker than it appears in a regular image viewer, and thus most of the models color will come from the lightprobe since it is ‘metal’, which will give the illusion that the model has no color when there is no light probe. Low roughness values will also be more saturated, but will display reflections more clear. But the PBR articles in the wiki would probably do a better job explaining all of these details than I could in a single post.
@oxplay2 beat me to linking that video which is the best place to start for PBR, but there are also these 3 articles about PBR in the wiki that may be helpful in addition to the video.
When I create a new game and use the Base Gradle Template. I first created a gradle game, added a material but there are no options for textures and the material def drop down to change between them is empty. The 2nd and 3rd screen shot are from a maven game. The first one is from a gradle game.