PBR materials are really dark


#1

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:


I used default Stone.xml material

after:



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.


#2

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..


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

#4

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.


#5

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 ?


#6

You mean like in the sample code

I pointed out?


#7

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.


#8

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