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

Creating a new bsdf_256_256.bin #151

Open
Contrail97 opened this issue Dec 17, 2023 · 5 comments
Open

Creating a new bsdf_256_256.bin #151

Contrail97 opened this issue Dec 17, 2023 · 5 comments

Comments

@Contrail97
Copy link

Hi there! I need to create a new envmap from the .hdr file I just downloaded, but I can't convert the .hdr file into .bin format, is there a code or paper for such things?

@jmunkberg
Copy link
Collaborator

Hello @Contrail97 ,

You can just replace the .hdr file in the config, no need to recompute the bsdf_256_256.bin file.

The bin file represents a lookup table for two terms in the split-sum shading model, tabulated based on cos(theta) and roughness, and is independent of the environment map. Please refer to "Real Shading in Unreal Engine 4", page 5-7 for details. https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf

The included bin file has been sufficient for all our tests, but if you want to recompute it, there is code for that in the document above, see float2 IntegrateBRDF( float Roughness, float NoV ) on page 7.

I hope this helps!

@Contrail97
Copy link
Author

Hello @Contrail97 ,

You can just replace the .hdr file in the config, no need to recompute the bsdf_256_256.bin file.

The bin file represents a lookup table for two terms in the split-sum shading model, tabulated based on cos(theta) and roughness, and is independent of the environment map. Please refer to "Real Shading in Unreal Engine 4", page 5-7 for details. https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf

The included bin file has been sufficient for all our tests, but if you want to recompute it, there is code for that in the document above, see float2 IntegrateBRDF( float Roughness, float NoV ) on page 7.

I hope this helps!

Now I understand, This reply helps me a lot, Thanks!

@zhao-yiqun
Copy link

zhao-yiqun commented Jan 11, 2024

Hello @Contrail97 ,

You can just replace the .hdr file in the config, no need to recompute the bsdf_256_256.bin file.

The bin file represents a lookup table for two terms in the split-sum shading model, tabulated based on cos(theta) and roughness, and is independent of the environment map. Please refer to "Real Shading in Unreal Engine 4", page 5-7 for details. https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf

The included bin file has been sufficient for all our tests, but if you want to recompute it, there is code for that in the document above, see float2 IntegrateBRDF( float Roughness, float NoV ) on page 7.

I hope this helps!

Hi @jmunkberg

I understand that this bsdf_256_256.bin is independent of the environment map. However, I notice that in the original pdf this is pre-computed for BRDF( IntegrateBRDF). However, in this paper and the implementation, the used lighting model is BSDF(bidirectional scattering distribution function). I wonder whether this will make some difference to the file?

Thanks in advance.

@jmunkberg
Copy link
Collaborator

Hello @zhao-yiqun ,

The lookup table represents an integration of the specular BSDF (or BRDF) of the GGX model, which is the same specular BSDF that is used in the nvdiffrec shading model.

Note that the nvdiffrec code does not handle (proper specular) transmission, only specular reflection so in our case the BSDF == BRDF. Does this answer your question?

@zhao-yiqun
Copy link

zhao-yiqun commented Jan 12, 2024

Thank you @jmunkberg , now I understand that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants