Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added OpenPBR material and option to load using glTF#16773

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
MiiBond wants to merge24 commits intoBabylonJS:master
base:master
Choose a base branch
Loading
fromMiiBond:mbond/pbr2-test-wip

Conversation

MiiBond
Copy link
Contributor

No description provided.

@bjsplat
Copy link
Collaborator

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
Copy link
Collaborator

@bjsplat
Copy link
Collaborator

@bjsplat
Copy link
Collaborator

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.

@MiiBond
Copy link
ContributorAuthor

I've been playing with mixins to try to remove a lot of duplicate code from the materials. I figured, if we can do this, it'll make my life easier when working on PBR2. I started with using mixins for some defines like UV1, UV2, etc. and the image-processing defines. Then, I tried actually making the imageProcessing logic into a mixin. This removes a whole bunch of duplicated stuff.
Seepackages\dev\core\src\Materials\imageProcessing.ts
What do we think about this approach? It seems to work with typing but decorators don't work with anonymous class definitions so I had to apply them manually in the constructor.
If we're okay with this, I was thinking about trying to separate out some of the lighting logic (light map, reflection map, irradiance map, SH, etc.).
Ideally, it would be nice to have a bit more of a separation between the lighting and the material model.

@bjsplat
Copy link
Collaborator

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.

1 similar comment
@bjsplat
Copy link
Collaborator

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.

import type { ColorCurves } from "./colorCurves";

// Explicit re-export of types to help TypeScript resolve them in declaration files
export type { Observer } from "../Misc/observable";
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I was getting errors in thenpm run build:es6 involving../.. import paths in this mixin.
An AI tool came up with the solution of adding these explicit exports. I don't really understand it but it works. It should be checked by someone who understands issues like this.

@deltakoshdeltakosh changed the titleAdded PBR2 material and option to load using glTFAdded OpenPBR material and option to load using glTFJun 24, 2025
@bjsplat
Copy link
Collaborator

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.

@MiiBond
Copy link
ContributorAuthor

I've noticed another issue with my changes that I don't understand. When running a Playground in Typescript mode, I get an error about not being able to find the BABYLON namespace. Any ideas what I might have done to cause that?

@bjsplat
Copy link
Collaborator

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.

1 similar comment
@bjsplat
Copy link
Collaborator

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

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/16773/merge/testResults/

@bjsplat
Copy link
Collaborator

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/16773/merge/testResults/

@Popov72
Copy link
Contributor

Just so I understand correctly, for now, you have simply copied and pasted the existing PBR vertex/fragment shaders to create the OpenPBR shaders?

I don't know if you have discussed the rewrite with@sebavan, but in my opinion, we should start from scratch without any defines and implement what is necessary for OpenPBR in the cleanest way possible. We can then configure the code with a few defines when necessary (but we should end up with far fewer definitions than we have now).

@bjsplat
Copy link
Collaborator

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

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/16773/merge/testResults/

@bjsplat
Copy link
Collaborator

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/16773/merge/testResults/

@bjsplat
Copy link
Collaborator

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

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/16773/merge/testResults/

@bjsplat
Copy link
Collaborator

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/16773/merge/testResults/

@bjsplat
Copy link
Collaborator

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

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/16773/merge/testResults/

@bjsplat
Copy link
Collaborator

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/16773/merge/testResults/

@bjsplat
Copy link
Collaborator

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

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/16773/merge/testResults/

@bjsplat
Copy link
Collaborator

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/16773/merge/testResults/

* Base Weight is a multiplier on the diffuse and metal lobes.
* See OpenPBR's specs for base_weight
*/
public baseWeight: number;
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@sebavan Here's an example of how I'm defining properties now. Despite theeslint-disable-next-line, I still get complaints about_baseWeight not being used unless I include a reference somewhere. Right now, I'm referencing new properties in the constructor to get rid of the error.

@bjsplat
Copy link
Collaborator

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

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/16773/merge/testResults/

@bjsplat
Copy link
Collaborator

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/16773/merge/testResults/

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

@deltakoshdeltakoshdeltakosh left review comments

@Popov72Popov72Awaiting requested review from Popov72

@sebavansebavanAwaiting requested review from sebavan

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@MiiBond@bjsplat@Popov72@deltakosh@sebavan

[8]ページ先頭

©2009-2025 Movatter.jp