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

dev-v3 #1412

Merged
merged 116 commits into from
Aug 1, 2024
Merged

dev-v3 #1412

merged 116 commits into from
Aug 1, 2024

Conversation

0b5vr
Copy link
Contributor

@0b5vr 0b5vr commented May 24, 2024

This is the development branch of the next major version.

- The type parameter of `THREE.Object3D` is no longer required (used to be `THREE.Object3D<THREE.Event>`
- `THREE.UniformsUtils.merge` now has more appropriate typing which breaks the existing code, workarounded with `as any`
Starting from r155, the light unit is set to physically based one by default.
We need to multiply the directional light intensity by PI because of this change.

See: mrdoob/three.js#26392
also removed an impossible compat code path
Built the MToon shader using NodeMaterial feature

I had to add `three/examples/jsm/nodes/Nodes.js` to rollup's `external` config. Is the solution legit?

We have a problem on the current `@types/three`, I had to patch-package. Some of them are already addressed as PR on `three-ts-types` repo

I applied temporary changes to several example html files, this should be reverted before merge
`parameters` have `depthWrite = false` when it's transparent, we have to overwrite this
It seems model normal was multiplied by 100 in UniGLTF 1.27, 1.28. Low confidence
also emit a warning if the model contains vertex colors
The outline was too bright when the outlineLightingMix is zero
This prevents opaque / cutout materials to go white
…LightingMix factor is 1

it should be multiplied by (1.0 / PI)
outline didn't respect alpha when outlineLightingMixFactor is not 1
outlineWidthMode is not required when it's not outline pass

also add comma
We should have the parametric rim result to a temporary variable
WebGPURenderer creates shader variants for each skeleton uuid
so we want to unify skeletons as much as possible
If there is a superset skeleton, reuse it
This reverts commit 33fc057.

boneInverse might be different between skeletons
and the new method does not work well with such cases.
The `Type of property 'cache' circularly references itself in mapped type` still persists
The error disappears once I bump TypeScript to v5.1.3 or above
revert several examples back to WebGL

`three/examples/jsm/*` now referred by `three/addons/*`; see `tsconfig.json` and `rollup.config.js`

`RotateUV` doesn't work properly with UV Animation Mask Texture on r162. Spin using a handmade rotation matrix instead
tested using VRMC_materials_mtoon_UV_Animation_Test.vrm
This is an option to decrease initial rendering time when the model has many materials
If you want to use three-vrm on WebGPU, use `MToonNodeMaterialLoaderPlugin` by specifying the loader in the option of `VRMLoaderPlugin`.
See the `webgpu-dnd.html` example for details

BREAKING: MToonMaterialLoaderPlugin might put materials other than MToonMaterial (namely, MToonNodeMaterial in this case) to `gltf.userData.vrmMToonMaterials`.
This shouldn't affect many users since the interface of MToonNodeMaterial is almost identical to MToonMaterial
yue4u and others added 27 commits July 1, 2024 15:43
Errors can happen before instantiate MToonNodeMaterial
…ward-compatibility

fix: seperate nodes entry for backward compatibility
Specify more appropriate Three.js version in peerDependencies
feat: add resetValues to VRMExpressionManager
clarify that the certain code sections are ommitted

Add links to the actual working example code

The link to three.js build and GLTFLoader was broken, fixed this
… and its option `experimentalSameBoneCounts`
examples: sameBoneCounts -> experimentalSameBoneCounts
import WebGPU / NodeMaterial stuff from `three/webgpu`
See: mrdoob/three.js#28650

Three.js r167 is not released yet!
I tested the behavior by using `yarn link` on `three` and `@types/three`

importmaps for Three.js in webgpu examples are temporarily replaced to node_modules, please change them back before merging

Some codes inside MToonNodeMaterial emit type errors because of recent @types/three changes
I'm asking Methuselar96 why the change is made
See: three-types/three-ts-types#1023 (comment)
package.json, readme, examples

the build is failing
BREAKING feature: preparing for Three.js r167
@0b5vr 0b5vr marked this pull request as ready for review August 1, 2024 08:09
@0b5vr 0b5vr merged commit a60e55e into dev Aug 1, 2024
6 checks passed
@0b5vr 0b5vr deleted the dev-v3 branch August 1, 2024 08:10
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.

None yet

3 participants