QodotPlugin / Qodot

Quake .map support for Godot 4.2
MIT License
646 stars 53 forks source link

Add albedo support for auto pbr materials #151

Closed mode777 closed 8 months ago

mode777 commented 8 months ago

This adds albedo map support for auto-pbr materials. By default if you have a map e.g. textures/my_material/my_material_albedo.png it will be used instead of the previous textures/my_material.png. The later will still be needed and will be used by Trenchbroom. This way it is possible to use different textures (e.g. scaled versions) for Trenchbroom and Godot. If you don't add a albedo map, the behaviour will be the same as before

Before

image

After

image

This implements #150

RhapsodyInGeek commented 8 months ago

What if you don't have a dedicated albedo texture? Will it fall back to military-panel.png? I didn't see in your changes where it would do that.

mode777 commented 8 months ago

What if you don't have a dedicated albedo texture? Will it fall back to military-panel.png? I didn't see in your changes where it would do that.

Exactly, as demonstrated in the Screenshots. Basically the non-suffixed Version is always loaded first and is then overridden if an albedo exists

RhapsodyInGeek commented 8 months ago

Ah, the screenshots just say "Before" and "After". Remembering now it also sets the albedo with the base texture prior to setting the PBR so if it doesn't replace it with the new albedo it just remains the same.

Looks good!