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

Better BTDF #1668

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

Conversation

ConsueTerra
Copy link
Contributor

This pr is the first of a series to implement a better BTDF in chunky. This pr adds a linear lerping like in specular reflections in other to enable glossy reflections, a new material parameter called trasmissionRoughness which is set independently from roughness the UI parameter is Transmission smoothness. Fixes Issue #1591

Before (1 smoothness,1 transmission smoothness) After (1 smoothness,0.8 transmission smoothness)
image image

A scene example 80k SSP, the white glass has a transmission smoothness of 1, red glass of 0.75, blue glass of 0.5, notice the increase spread of the caustics (sun sampling is OFF)
image

This pr is a draft, there are 2 pending issues:

  • fix the bias caused from lerping b/w diffuse and specular (also present in reflections)
  • fix intersections with air, currently refracted rays don't intersect air and "exit" materials, this causes 1. incorrect refractions with air gap, 2. eliminated internal refection events. This problem was okay with pure specular reflections but is a serious concern when introducing roughness.

@ConsueTerra ConsueTerra changed the title Rransmission roughness Transmission roughness Nov 5, 2023
@ConsueTerra
Copy link
Contributor Author

I have included diffuse transmission as well,

Before ) After (0.3 transmission)
image image

This is only ray depth 5 so the effect is suble but you can see softer shadows on the leaves (some of the light bleeds to the back) and the shadows have a green tint. Even with a high Ray depth it was near impossible to light these forests scenes properly. The new parameter is additionalTransmission.0.3 is a good value for allowing back facing light without taking to much brightness from the front. Currently diffusion is split b/w refection and transmission, this is energy conserving on some block models but not others, probably due to how intersections currently work.

A look at ray depth 20, 72 samples (1600 by 1600)
forest-72

@ConsueTerra ConsueTerra changed the title Transmission roughness Better BTDF Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants