Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Envmap Fresnel Considerations and Phong Only Mode #15

Open
Jofoyo opened this issue Oct 17, 2024 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@Jofoyo
Copy link

Jofoyo commented Oct 17, 2024

Automatically apply $fresnelreflection for LightmappedGeneric and $envmapfresnel for VertexLitGeneric

$fresnelreflection Contrary to what the wiki says, this value works inversely, in all games that I've tried, not just Black Mesa. This version has no fresnel range consideration and seems to lerp between one minus $fresnelreflection and 1 at glancing angle.

$envmapfresnel This value works normally, and a value of 1 applies full fresnel.
Fresnel ranges are taken from $envmapfresnelminmaxexp if there is no bumpmap. Otherwise fresnel ranges are taken from $phongfresnelranges.

Using fresnel helps get rid of the "clearcoat" look that envmaps usually come with and is overall more photoreal.

Also please consider a phong only mode so that materials with high roughness low metalness don't waste memory and filesize with albedo alphas. Alternatively consider sampling images min and max envmap intensity and discarding automatically if there's not enough contrast to warrant the envmap.

@koerismo
Copy link
Owner

Fresnel and a model phong-only mode have been implemented in v2.0.6-beta. I think that the sampling idea sounds great, but I do not want to dictate that automatically, since texture artists tend to look for extremely fine-grain detail and may just assume that the program is not functioning as intended when it is replaced by a single value.

Maybe having it as an option would be nice, but that's going pretty far considering that most people use this program to port realistic materials which have lots of noise and minor detail.

@koerismo koerismo added the enhancement New feature or request label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants