Advertisement

Question about Diffuse textures and lighting/shadows

Started by November 05, 2023 11:27 PM
3 comments, last by JoeJ 1 year, 1 month ago

Hey Forums!

Since I'm a game modder i use existing assets for personal use. Now i've come across a question…

I read that a diffuse is "essentially" an albedo + lighting/shadows. Now if my assets come from another game should i keep them (the diffuse) or separate the shadows from the textures and create an albedo? (or is that only done with photogrammetry?)

Also if i use AI generated face textures and images of faces from stock photo websites i should remove lighting/shadows then and create an Albedo correct?

Kind regards and thanks for any help! 🙂

It depends on what content the engine expects to be in the texture. If the engine is advanced enough to have per-pixel dynamic lighting and normal maps, then you would probably want an albedo texture (i.e. color without any lighting), so that lighting can be applied at runtime by the engine.

If the engine is old and has no way to apply dynamic lighting, then it's likely that it expects some lighting in the texture, e.g. ambient occlusion and baked-in normal-based lighting (e.g. like emboss filter in photoshop).

In both cases there could also be light maps, which store the scene-specific static lighting. Light maps usually use a separate UV parameterization, different than that used for regular textures.

Advertisement

Ah ok, is there a way to convert between them? (e.g Diffuse to pbr and pbr to diffuse?) Also how do i identify lighting in a diffuse?

Also regarding the AI thing is this the correct lighting to use to make an albedo? (image is just an example from gta)

Newgamemodder said:
Ah ok, is there a way to convert between them? (e.g Diffuse to pbr and pbr to diffuse?)

Not really, since the standard PBS material defintion covers more than just color. It also specifies roughness and metalness at least, but also eventually normals, subsurface scattering, etc.
But there surely are some tools which try to make a guess, similar to how there are tools to auto generate bump/normal mas from images. Results may often be good enough, but in some cases manual tuning would be required.
I would also look at NVidia Remix. They should have this problem here, so likely they have related tools and converters.
AI could certainly help here, but i guess it's very difficult to gather training data.

Newgamemodder said:
Also how do i identify lighting in a diffuse?

If you want to remove lighting information form an image, that's a hard problem, and actually a generalization of the above.
The problem is common in photgrammetry, where we want to turn lit photos into unlit textures. Lighting has to be removed so we can relight the scene.
I know Unity has such a delighting tool, and it's open source. It works by estimating the environment from the scanned, textured model. And then they subtract the environment contribution from the textures.
To do this, the material properties PBS tries to specify must be known, ideally. But that's hardly possible, so i guess they just assume the material is Lambert diffuse everywhere (opaque rough non metal material without sharp reflections, e.g. concrete or rock).

Newgamemodder said:
is this the correct lighting to use to make an albedo? (image is just an example from gta)

Yes. Looks like albedo without any baked lighting in it.

This topic is closed to new replies.

Advertisement