Skip to content

OpenPBR subsurface slab#17848

Draft
MiiBond wants to merge 57 commits intoBabylonJS:masterfrom
MiiBond:mbond/openpbr-subsurface
Draft

OpenPBR subsurface slab#17848
MiiBond wants to merge 57 commits intoBabylonJS:masterfrom
MiiBond:mbond/openpbr-subsurface

Conversation

@MiiBond
Copy link
Contributor

@MiiBond MiiBond commented Feb 6, 2026

This PR adds support to the OpenPBRMaterial for the subsurface slab as well as thin-walled material support.

[https://playground.babylonjs.com/?snapshot=refs/pull/17848/merge#PJ5JXH#2](Test Playground)

This PR also adds support for a screen-space SSS rendering for densely-scattering materials. To enable it, you currently need to have a GeometryBufferRenderer on the scene with the following turned on:
enableIrradiance = true
enableScreenspaceDepth = true
generateIrradianceWithScatterMask = true

I added the irradiance rendering to the geometry buffer because this is needed for the SSS (along with the screenspace depth). If you don't enable these, dense scattering will still be approximated but in a less convincing way.

Questions:

  1. Should the GeometryBufferRenderer be automatically created and setup from the OpenPBRMaterial? It's an extra step to get ideal rendering.
  2. I didn't add direct lights to the irradiance output of the GeometryBufferRenderer yet. It should be for SSS to work with direct lights.
Screenshot 2026-02-20 at 3 27 46 PM

@sebavan sebavan requested a review from Popov72 February 6, 2026 22:15
@Popov72
Copy link
Contributor

Popov72 commented Feb 7, 2026

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 7, 2026

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 7, 2026

Snapshot stored with reference name:
refs/pull/17848/merge

Test environment:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/17848/merge/index.html

To test a playground add it to the URL, for example:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/17848/merge/index.html#WGZLGJ#4600

Links to test your changes to core in the published versions of the Babylon tools (does not contain changes you made to the tools themselves):

https://playground.babylonjs.com/?snapshot=refs/pull/17848/merge
https://sandbox.babylonjs.com/?snapshot=refs/pull/17848/merge
https://gui.babylonjs.com/?snapshot=refs/pull/17848/merge
https://nme.babylonjs.com/?snapshot=refs/pull/17848/merge

To test the snapshot in the playground with a playground ID add it after the snapshot query string:

https://playground.babylonjs.com/?snapshot=refs/pull/17848/merge#BCU1XR#0

If you made changes to the sandbox or playground in this PR, additional comments will be generated soon containing links to the dev versions of those tools.

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 7, 2026

You have changed file(s) that made possible changes to the sandbox.
You can test the sandbox snapshot here:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/SANDBOX/refs/pull/17848/merge/

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 7, 2026

You have made possible changes to the playground.
You can test the snapshot here:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/17848/merge/

The snapshot playground with the CDN snapshot (only when available):

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/17848/merge/?snapshot=refs/pull/17848/merge

Note that neither Babylon scenes nor textures are uploaded to the snapshot directory, so some playgrounds won't work correctly.

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 7, 2026

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 7, 2026

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 7, 2026

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 7, 2026

@Popov72
Copy link
Contributor

Popov72 commented Feb 9, 2026

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 9, 2026

You have changed file(s) that made possible changes to the sandbox.
You can test the sandbox snapshot here:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/SANDBOX/refs/pull/17848/merge/

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 9, 2026

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 9, 2026

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 9, 2026

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 9, 2026

@thomlucc thomlucc added this to the 10.0 milestone Feb 10, 2026
@Popov72
Copy link
Contributor

Popov72 commented Feb 10, 2026

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 10, 2026

You have made possible changes to the playground.
You can test the snapshot here:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/17848/merge/

The snapshot playground with the CDN snapshot (only when available):

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/17848/merge/?snapshot=refs/pull/17848/merge

Note that neither Babylon scenes nor textures are uploaded to the snapshot directory, so some playgrounds won't work correctly.

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 10, 2026

You have changed file(s) that made possible changes to the sandbox.
You can test the sandbox snapshot here:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/SANDBOX/refs/pull/17848/merge/

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 10, 2026

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 10, 2026

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 10, 2026

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 10, 2026

@Popov72
Copy link
Contributor

Popov72 commented Mar 4, 2026

/azp run

@azure-pipelines
Copy link

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@Popov72
Copy link
Contributor

Popov72 commented Mar 4, 2026

/azp run

@azure-pipelines
Copy link

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@sebavan
Copy link
Member

sebavan commented Mar 4, 2026

/azp run

@azure-pipelines
Copy link

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@Popov72
Copy link
Contributor

Popov72 commented Mar 4, 2026

@MiiBond Note that we can't run the CI because of a merge conflict.

(comment from Raanan): "accept all incoming and run npm install, otherwise it will take him a long long time."

@Popov72
Copy link
Contributor

Popov72 commented Mar 7, 2026

/azp run

@azure-pipelines
Copy link

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@Popov72
Copy link
Contributor

Popov72 commented Mar 10, 2026

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@sebavan
Copy link
Member

sebavan commented Mar 13, 2026

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@sebavan
Copy link
Member

sebavan commented Mar 13, 2026

marking as draft to prevent accidental merge before the release

@sebavan sebavan marked this pull request as draft March 13, 2026 22:20
@bjsplat
Copy link
Collaborator

bjsplat commented Mar 13, 2026

Building or testing the sandbox has failed.

If the tests failed, results can be found here:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/SANDBOX/refs/pull/17848/merge/testResults/

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 13, 2026

Building or testing the playground has failed.

If the tests failed, results can be found here:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/17848/merge/testResults/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants