Skip to content

Conversation

@MiiBond
Copy link
Contributor

@MiiBond MiiBond commented Oct 31, 2025

This PR adds defines to assist with vertex pulling when the vertex buffers are interleaved.
I'm also including a fix by @Popov72 for IBL shadow voxelization when using bones.

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 31, 2025

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

bjsplat commented Oct 31, 2025

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 Oct 31, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 31, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 31, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 31, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 31, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 31, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 31, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 31, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 31, 2025

@deltakosh deltakosh requested a review from Popov72 November 1, 2025 00:15
@MiiBond MiiBond force-pushed the mbond/voxel-shadow-fixes branch from 1cee238 to ce4c445 Compare November 7, 2025 19:31
@MiiBond
Copy link
Contributor Author

MiiBond commented Nov 7, 2025

@Popov72 I've included your fix and also made once that fixes the voxelization when calling it repeatedly.

This allows the voxelization to work with all the animated assets that I've tried.
Though, I suspect an animated asset that moves a lot will pass outside the bounds of the voxelization since the bounds update doesn't take skinning into account.

@bjsplat
Copy link
Collaborator

bjsplat commented Nov 7, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Nov 7, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Nov 7, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Nov 7, 2025

@sebavan
Copy link
Member

sebavan commented Nov 19, 2025

@MiiBond fyi cause I think some of the comments went in late :-)

@MiiBond MiiBond force-pushed the mbond/voxel-shadow-fixes branch from ce4c445 to 33b07ed Compare November 21, 2025 20:57
@bjsplat
Copy link
Collaborator

bjsplat commented Nov 21, 2025

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.

@Popov72
Copy link
Contributor

Popov72 commented Nov 24, 2025

I didn't have time today, but I will review the PR tomorrow.

@bjsplat
Copy link
Collaborator

bjsplat commented Nov 24, 2025

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.

@Popov72
Copy link
Contributor

Popov72 commented Nov 25, 2025

You should remove package-lock.json from the PR.

@sebavan
Copy link
Member

sebavan commented Dec 8, 2025

cc @MiiBond for the last batch of comments :-)

@MiiBond MiiBond force-pushed the mbond/voxel-shadow-fixes branch from 437c627 to a23da70 Compare December 10, 2025 23:32
@bjsplat
Copy link
Collaborator

bjsplat commented Dec 10, 2025

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 Dec 11, 2025

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 Dec 11, 2025

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
Contributor Author

MiiBond commented Dec 11, 2025

I finally got back to this. I barely remember what I was doing in this code but I think I've fixed most of the issues. I can see the shadows animate now for skinned meshes and morph target meshes.

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 11, 2025

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 Dec 11, 2025

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

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

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

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/17376/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/17376/merge
https://sandbox.babylonjs.com/?snapshot=refs/pull/17376/merge
https://gui.babylonjs.com/?snapshot=refs/pull/17376/merge
https://nme.babylonjs.com/?snapshot=refs/pull/17376/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/17376/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 Dec 11, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 11, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 11, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 11, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 11, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 11, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 11, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 11, 2025

/**
* Interface representing metadata for vertex pulling
*/
export interface IVertexPullingMetadata {
Copy link
Member

Choose a reason for hiding this comment

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

Could we move everything related to Vertex Pulling in a vertexPullingHelper.functions.ts ?

}

const renderingMesh = subMesh ? subMesh.getRenderingMesh() : mesh;
if (renderingMesh && this.useVertexPulling) {
Copy link
Member

Choose a reason for hiding this comment

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

Can we use the same condition with the code adding the defines ?

@sebavan
Copy link
Member

sebavan commented Dec 15, 2025

cc @MiiBond for the last round of update and I ll merge it in. Thanks a lot for the fix interleaved buffer fix :-)

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

Successfully merging this pull request may close these issues.

4 participants