Archive 17/01/2023.

PBR materials are really dark

Angramme

I tried to apply some pbr materials to the box under the tree but for some reason the material appears REALLY DARK, I used the material from here: https://freepbr.com/materials/rocky-dirt/,
And my xml file looks like this:

<material>
<technique name=“Techniques/PBR/PBRDiffNormal.xml” quality=“1” />
<!–<technique name=“Techniques/Diff.xml” quality=“0” />–>
<texture unit=“diffuse” name=“Textures/dirt/albedo.png” />
<texture unit=“normal” name=“Textures/dirt/normal.png” />
<texture unit=“roughness” name=“Textures/dirt/roughness.png” />
<parameter name=“Metallic” value=“0”/>
</material>

I used just the albedo and normal for now
btw it looks the same witchout the roughness

Here are some screenshots:
before:
PNG
I used default Stone.xml material

after:
screen2
screen3
As you can see these are really dark!

What could be the problem? Is it something with render path? I tried adjusting the intensity of the light but no big effect on my material when other non-PBR materials are white!

Thanks for help in advance.

I3DB

Maybe you could get some of the provided pbr materials working, and then once comfortable with how it works start importing more.

The output you show looks like it didn’t work properly.

One of the feature samples uses pbr materials..

lezak
  1. Add gamma correction postproc to the render path;
  2. Set some cubemap as zone texture;
Modanung

I think you may be missing tangent information required by normal maps. When exporting from Blender this is simply a checkbox. I’m not sure how to add tangents to custom geometry, though.

Angramme

For now I’m just trying it on the box.mdl provided by Urho3D by default. I thing it has tangent information, but it might not have, will try just the albedo map to see the results, thanks for the suggestion.

Shouldn’t it work without it? Or is it required for PBR?

Is it black by default or something? is that why it’s dark?
Also how would I add the postproc and the cubemap? could you point me to some ressources ?

I3DB

You mean like in the sample code

I pointed out?

Sinoid

The actual color will depend on your GPU/drivers, it’s usually black though if nothing is set.

PBR is very very strongly dependent on having a Zone with a properly prefiltered cubemap present. Shouldn’t be 100% dependent though IIRC, just that without Zones setup correctly it turns into a nightmare to juggle light.

Ideally it’s an RGBA16 cubemap as well (also makes the tooling easier, the ideal CMFT output works then), which … Urho3D master still doesn’t support RGBA16 in DDS load so I’ll prep a pull-request to add that since it really isn’t optional to not have it today.

Angramme

Thank you for your reply! Good to know that:

And also looking forward to your pull request, it’s really nice of you taking your time to implement it, how can I see when it’s there btw? I’m not really familiar with GitHub

kidinashell

I know it has been a while, but I wanted to ask about the same thing. I’m not really sure how to work with convential materials combined with pbr materials in the same scene.

So far what I’ve found out is when I use a PBR Material the brightness of the lights has to be upped quite a bit to actually see the models. But when using both (convential and PBR) in one scene (two different meshes of course) either one will be too dark or too bright.
I’ve looked at the 42_PBRMaterials sample and there it is actually done that way: cranking the brightness up (even to 800) when I only need brightness of around 1 or 2 when using convential materials.

Here’s what I mean about the difference I mentioned:
Lights brightness around 50 (cranked up to see PBR material)
light_pbr_fin

Lights brightness kept at 1 (enough for conventional materials)
light_diffuse_fin

I use the following Techniques and Settings:

  • Editor render path: Forward.xml
  • PBRMaterial: PBRDiffNormal.xml
  • Conventional Material: DiffNormal.xml

Is it actually possible at the moment to have both in the same scene?

Eugene

TL;DR: You cannot xD
Unless you go and fix shaders… which may or may not be challenging.

It’s just one of many issues of PBR implementation in Urho, so I just consider it unfeasible.
I know when I can recommend classic rendering of Urho, but I cannot imagine recommending Urho PBR. Just assume that Urho does not support PBR.

kidinashell

Oh okay. That’s too bad. So no roughness/metallic maps for me? xD

SirNate0

I’ve never used PBR, so this is purely speculation, but I imagine the difference in lighting is effectively a units issue. If the PBR is expecting lumens or candela or something like that for the light strength, then I would expect you would need around 50 to have details visible, whereas the traditional lighting would just have 1 be normal full strength. The fix is probably just multiplying by 0.01 or something like that in the shader.