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

Improve reflection probes seams #321

Open
vorg opened this issue Nov 7, 2022 · 3 comments
Open

Improve reflection probes seams #321

vorg opened this issue Nov 7, 2022 · 3 comments
Labels
Projects
Milestone

Comments

@vorg
Copy link
Member

vorg commented Nov 7, 2022

Currently pex-renderer uses Octahedral maps for reflection probes as explained in Octahedral maps for PREM #8.

There is number of never addressed issues though:

  • the resolution of the reflection probe is not configurable and hardcoded at 2048 (1024 for "roughness 0" reflection)
  • a seem might be visible on the higher roughness levels
  • there are visible birth spots on high contrast HDRIs with single bright spot
@vorg
Copy link
Member Author

vorg commented Nov 7, 2022

About seams:

Engine Work: Global Illumination with Irradiance Probes
KOHZYP9

https://twitter.com/RealtimeVFXMike/status/1221525778359144450

EPO7OCmWsAIbOD-
EPO9b0OXkAEem0V

https://twitter.com/Dan87626237/status/1220048547103563777

EO57rzuWAAANkyV

https://twitter.com/val_sagrario/status/1231771907437010949?s=20

ERgiBH7XkAAWLTH

float2 Encode( float3 n )
{
n /=  dot(1, abs(n));
float2 wrap = ( 1.0 - abs( n.zx ) ) * ( n.xz >= 0.0 ? 1.0 : -1.0 );
n.xy = n.y >= 0.0 ? n.xz : wrap;
n.xy = n.xy * 0.5 + 0.5;
return n.xy;
}

Scaling Probe-Based Real-Time Dynamic Global Illumination for Production

Screenshot 2021-05-12 at 11 27 30

@vorg
Copy link
Member Author

vorg commented Nov 7, 2022

@dmnsgn here is what i mean by bright spots / fireflies. This might be from bugs in importance sampling or not enough blur. I think in current pex-renderer version i blur the original octahedral map into mipmap levels and sample from them but it's simple downsampling and not soft gaussian blur (not sure if that would be accurate). I do know ThreeJS blurs the reflection levels more.

855020014038114304-C92kHKEXkAAtVih

@vorg
Copy link
Member Author

vorg commented Nov 7, 2022

More recent "scratches" example of insufficient filtering.
Screenshot 2022-11-07 at 17 04 47

@dmnsgn dmnsgn added this to To do in 4.0.0 via automation Nov 9, 2022
@dmnsgn dmnsgn added this to the 4.0.0 milestone Nov 9, 2022
@dmnsgn dmnsgn moved this from To do to In progress in 4.0.0 Nov 9, 2022
@vorg vorg changed the title Improve reflection probes Improve reflection probes seams Nov 14, 2022
@vorg vorg moved this from In progress to To do in 4.0.0 Aug 30, 2023
@vorg vorg moved this from To do to In progress in 4.0.0 Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
4.0.0
  
In progress
Development

No branches or pull requests

2 participants