NME material reflections

Hi all,

I am using NME material on t-shirt model, it does not reflect any light, how can i fix that?
DisableLighting property is false, so it is something else, here is link to my nme material (I removed some textures because of size):

Thnx

Summoning @PatrickRyan !
Do you have an example or an idea of what you want to achieve?

1 Like

Note that you only display the diffuseDir component. You should probably use the lighting output instead.

1 Like

@acero, I will back up with @Evgeni_Popov said about using the lighting output from the PBRMetallicRoughness block. This is the easiest way to wire to the FragmentOut since it has combined all contributions for diffuse and specular components and has been converted to gamma space which the FragmentOut expects by default. However, if you want to do anything to the contributions individually before combining them, you will want to add the direct and indirect components of both diffuse and specular before adding them together for the final contribution. Note that the color space of each component output is in linear space so that you can do mathmatical operations on them immediately from the output so you will need to convert to gamma space as a final step. This can easily be done by using the convert to gamma property on the FragmentOut block.

Using this method will allow you to do whatever operation you like on each component like add a glow for example. In your attached shader above, since you are only using the diffuse direct component, you won’t see any lighting on your material if you don’t have direct lights in your scene like a point light or a directional light. If you only have indirect sources like an environment IBL, those come from the indirect components.

If you want the simplest output from the PBR nodes, definitely use the lighting output but know that @Evgeni_Popov gave us complete control over each component coming out of the PBRMetallicRoughness block so that we have flexibility in adding effects to the output. Just remember that the color space will need to be managed if using the individual components.

2 Likes

Yes, that was it, thnx :slight_smile:

Thank you @PatrickRyan for clarifications, for now I will go lighting route. :slight_smile: