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

dsview & ds input[DO NOT MERGE] #15322

Open
wants to merge 41 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
a8eb030
fix install failed with android studio (#15251)
bofeng-song Jun 1, 2023
175d8a4
change the return type of submodel.passes to shared_ptr (#15267)
PatriceJiang Jun 1, 2023
98d6152
fix : Avoid warning triggered by skin configuration on editor restore…
dogeFu Jun 1, 2023
1fc559c
fix inspector paste component value bug (#15271)
arsen2010 Jun 1, 2023
258ebba
[Bug] feat: inspector/fbx/mountAllAnimationsOnPrefab default value is…
dogodo-cc Jun 1, 2023
07f3ded
Optimize skin with post-process pipeline (#15189)
troublemaker52025 Jun 1, 2023
f596589
Marionette/PoseGraph: disallow empty states in PoseNodeStateMachine (…
shrinktofit Jun 2, 2023
f9f379d
Marionette/PoseGraph: fix that a pose node can be connected multi tim…
shrinktofit Jun 2, 2023
db625b6
add reset function to call when start play (#15217)
zxx43 Jun 2, 2023
63fe38f
reset delegate value when cleanup scriptengine (#15281)
PatriceJiang Jun 2, 2023
0d1f5d0
[ci skip][AUTO]: Automated code generating update: 16753619b7d3149f44…
cocos-robot Jun 2, 2023
e83ac6a
fix fog in legacy and surface shader (#15293)
jk20012001 Jun 2, 2023
0c2d340
[fix] physx Character Controller filter bug (#15291)
lealzhan Jun 2, 2023
3433939
Fix harmonyos platform compilation failure. (#15262)
qiuguohua Jun 2, 2023
8d9bd2e
detect all subfolders (#15297)
PatriceJiang Jun 2, 2023
b996489
Marionette: adjust additive animation rule (#15296)
shrinktofit Jun 2, 2023
a841f82
add setMaterialProperty function for skyboxInfo (#15284)
xubing0906 Jun 2, 2023
836d2a0
fixed fsr param not saved (#15301)
2youyou2 Jun 2, 2023
f01671f
[fix] physx misuses bullet variable (#15255)
lealzhan Jun 2, 2023
1b7a33a
fixed fsr input size (#15304)
2youyou2 Jun 2, 2023
b5cb733
performance optimization for onMacroPatchesStateChanged function (#15…
troublemaker52025 Jun 2, 2023
28d675e
The globalStandardSkin setting is placed on the meshRenderer componen…
troublemaker52025 Jun 2, 2023
5b4ad73
sync ds view
hana-alice May 30, 2023
4578486
dsview input
hana-alice May 31, 2023
5dbd0f2
input layout
hana-alice Jun 1, 2023
e6aa7c7
rpinfo update
hana-alice Jun 1, 2023
881cb2d
ds usage
hana-alice Jun 1, 2023
59dcce5
layout fix
Jun 1, 2023
f5b6ae2
layout fix
hana-alice Jun 2, 2023
acde5c9
ds layout
hana-alice Jun 2, 2023
df164b8
metal ds input
hana-alice Jun 4, 2023
12fa8fb
lint
hana-alice Jun 4, 2023
fef2128
mtl ds input
hana-alice Jun 4, 2023
0e039ab
ds view on mac
hana-alice Jun 5, 2023
77ca032
resource mount/unmount visitor
hana-alice Jun 5, 2023
e427985
name register
hana-alice Jun 5, 2023
cb579db
ds input / view by slotName
hana-alice Jun 6, 2023
f31d3fa
metal ds input
hana-alice Jun 6, 2023
dfde971
gles update
hana-alice Jun 6, 2023
1ffbe23
update slotName1
Jun 6, 2023
274ed07
remove find descriptor id
Jun 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .github/workflows/native-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@ name: <Native> Generate Code
on:
pull_request_target:
types: [closed]
# pull_request:
paths:
- 'templates/**'
- 'native/**'
- 'cocos/**'
- 'package.json'
- '.github/workflows/native-bindings.yml'

jobs:
autogen-code:
Expand Down
10 changes: 9 additions & 1 deletion EngineErrorMap.md
Original file line number Diff line number Diff line change
Expand Up @@ -3367,4 +3367,12 @@ node '%s' doesn't have any ModelRenderer component, this component will not work

### 16302

There is no reflection probe in the scene or no probe is near the current object. No reflection probe will take effect on this object. Please create a new reflection probe or move existing ones closer.
There is no reflection probe in the scene or no probe is near the current object. No reflection probe will take effect on this object. Please create a new reflection probe or move existing ones closer.

### 16303

Skin material needs floating-point render target, please check ENABLE_FLOAT_OUTPUT define in Project Settings--Macro

### 16304

Skin material may need more accurate calculations, please select a head model of standard size, check the isGlobalStandardSkinObject option in the MeshRender component.
37 changes: 35 additions & 2 deletions cocos/3d/framework/mesh-renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,9 @@ export class MeshRenderer extends ModelRenderer {
@serializable
protected _reflectionProbeBlendWeight = 0;

@serializable
protected _enabledGlobalStandardSkinObject = false;

protected _reflectionProbeDataMap: Texture2D | null = null;

// @serializable
Expand Down Expand Up @@ -482,6 +485,29 @@ export class MeshRenderer extends ModelRenderer {
this._enableMorph = value;
}

/**
* @en local shadow normal bias for real time lighting.
* @zh 实时光照下模型局部的阴影法线偏移。
*/
@type(CCBoolean)
@tooltip('i18n:model.standard_skin_model')
@disallowAnimation
get isGlobalStandardSkinObject () {
return this._enabledGlobalStandardSkinObject;
}

set isGlobalStandardSkinObject (val) {
cclegacy.director.root.pipeline.pipelineSceneData.standardSkinModel = val ? this : null;
this._enabledGlobalStandardSkinObject = val;
}

/**
* @engineInternal
*/
public clearGlobalStandardSkinObjectFlag () {
this._enabledGlobalStandardSkinObject = false;
}

protected _modelType: typeof scene.Model;

protected _model: scene.Model | null = null;
Expand Down Expand Up @@ -876,7 +902,7 @@ export class MeshRenderer extends ModelRenderer {
if (!mainLight) { return; }
const visibility = mainLight.visibility;
if (!mainLight.node) { return; }

if (mainLight.node.mobility === MobilityMode.Static) {
let forceClose = false;
if (this.bakeSettings.texture && !this.node.scene.globals.disableLightmap) {
Expand All @@ -885,7 +911,7 @@ export class MeshRenderer extends ModelRenderer {
if (this.node.scene.globals.lightProbeInfo.data
&& this.node.scene.globals.lightProbeInfo.data.hasCoefficients()
&& this._model.useLightProbe) {
forceClose = true;
forceClose = true;
}

this.onUpdateReceiveDirLight(visibility, forceClose);
Expand Down Expand Up @@ -1009,6 +1035,7 @@ export class MeshRenderer extends ModelRenderer {
protected _onMaterialModified (idx: number, material: Material | null) {
if (!this._model || !this._model.inited) { return; }
this._onRebuildPSO(idx, material || this._getBuiltinMaterial());
this._updateStandardSkin();
}

/**
Expand Down Expand Up @@ -1225,6 +1252,12 @@ export class MeshRenderer extends ModelRenderer {
private _uploadSubMeshShapesWeights (subMeshIndex: number) {
this._morphInstance?.setWeights(subMeshIndex, this._subMeshShapesWeights[subMeshIndex]);
}

private _updateStandardSkin () {
if (this._enabledGlobalStandardSkinObject) {
cclegacy.director.root.pipeline.pipelineSceneData.standardSkinModel = this;
}
}
}

export declare namespace MeshRenderer {
Expand Down
2 changes: 1 addition & 1 deletion cocos/3d/lights/directional-light-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { scene } from '../../render-scene';
import { cclegacy, clamp, warnID, CCBoolean, CCFloat, _decorator, settings, Settings, CCInteger } from '../../core';
import { Camera, PCFType, Shadows, ShadowType, CSMOptimizationMode, CSMLevel } from '../../render-scene/scene';
import { Root } from '../../root';
import { MeshRenderer } from '../framework';
import { MeshRenderer } from '../framework/mesh-renderer';
import { director } from '../../game/director';
import { rangeMin } from '../../core/data/decorators';

Expand Down
14 changes: 13 additions & 1 deletion cocos/animation/animation-clip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,17 @@ export class AnimationClip extends Asset {
this._exoticAnimation = value;
}

/**
* Gets if this animation clip contains additive animation.
* @experimental
*/
get isAdditive_experimental () {
return this._additiveSettings.enabled;
}

/**
* Accesses the additive animation settings.
* @internal
*/
get [additiveSettingsTag] () {
return this._additiveSettings;
Expand Down Expand Up @@ -1009,7 +1018,10 @@ export class AnimationClip extends Asset {
@ccclass('cc.AnimationClipAdditiveSettings')
class AdditiveSettings {
@serializable
base: AnimationClip | null = null;
public enabled = false;

@serializable
public refClip: AnimationClip | null = null;
}

export { AdditiveSettings as AnimationClipAdditiveSettings };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ import { DEBUG } from 'internal:constants';
import { error, Quat, RealCurve, Vec3, warnID } from '../../core';
import { assertIsTrue } from '../../core/data/utils/asserts';
import { Node } from '../../scene-graph/node';
import { AnimationClip, exoticAnimationTag } from '../animation-clip';
import { additiveSettingsTag, AnimationClip, exoticAnimationTag } from '../animation-clip';
import { AuxiliaryCurveEntry } from '../auxiliary-curve-entry';
import { AuxiliaryCurveHandle, TransformHandle } from '../core/animation-handle';
import { Pose } from '../core/pose';
import { calculateDeltaPose, Pose } from '../core/pose';
import { createEvalSymbol } from '../define';
import { ExoticTrsAGEvaluation } from '../exotic-animation/exotic-animation';
import { isTrsPropertyName, normalizedFollowTag, Track, TrackBinding, trackBindingTag, TrackEval } from '../tracks/track';
import { UntypedTrack } from '../tracks/untyped-track';
import { AnimationGraphEvaluationContext } from './animation-graph-context';

/**
* This module contains utilities to marry animation clip with animation graph.
Expand Down Expand Up @@ -317,7 +318,32 @@ class AuxiliaryCurveEvaluation {
/**
* Describes the evaluation of a animation clip in sense of animation graph.
*/
export class AnimationClipAGEvaluation {
export interface AnimationClipAGEvaluation {
/**
* Destroys all the track evaluations and exotic animation evaluation.
*/
destroy(): void;

/**
* Evaluates.
* @param time The time.
* @param context The evaluation context.
*/
evaluate(time: number, context: AnimationGraphEvaluationContext): Pose;
}

export function createAnimationAGEvaluation (
clip: AnimationClip,
context: AnimationClipGraphBindingContext,
): AnimationClipAGEvaluation {
if (clip.isAdditive_experimental) {
return new AnimationClipAGEvaluationAdditive(clip, context);
} else {
return new AnimationClipAGEvaluationRegular(clip, context);
}
}

class AnimationClipAGEvaluationRegular implements AnimationClipAGEvaluation {
constructor (
clip: AnimationClip,
context: AnimationClipGraphBindingContext,
Expand Down Expand Up @@ -372,9 +398,6 @@ export class AnimationClipAGEvaluation {
this._auxiliaryCurveEvaluations = auxiliaryCurveEvaluations;
}

/**
* Destroys all the track evaluations and exotic animation evaluation.
*/
public destroy () {
this._exoticAnimationEvaluation?.destroy();

Expand All @@ -387,19 +410,14 @@ export class AnimationClipAGEvaluation {
}
}

/**
* Evaluates.
* @param time The time.
* @param context The evaluation context.
*/
public evaluate (time: number, context: AnimationClipGraphEvaluationContext) {
public evaluate (time: number, context: AnimationGraphEvaluationContext) {
const {
_trackEvaluations: trackEvaluations,
_exoticAnimationEvaluation: exoticAnimationEvaluation,
_auxiliaryCurveEvaluations: auxiliaryCurveEvaluations,
} = this;

const pose = context;
const pose = context.pushDefaultedPose();

const nTrackEvaluations = trackEvaluations.length;
for (let iNodeEvaluation = 0; iNodeEvaluation < nTrackEvaluations; ++iNodeEvaluation) {
Expand All @@ -412,8 +430,10 @@ export class AnimationClipAGEvaluation {

const nAuxiliaryCurveEvaluations = auxiliaryCurveEvaluations.length;
for (let iAuxiliaryCurveEvaluation = 0; iAuxiliaryCurveEvaluation < nAuxiliaryCurveEvaluations; ++iAuxiliaryCurveEvaluation) {
auxiliaryCurveEvaluations[iAuxiliaryCurveEvaluation].evaluate(time, context);
auxiliaryCurveEvaluations[iAuxiliaryCurveEvaluation].evaluate(time, pose);
}

return pose;
}

private _trackEvaluations: AGTrackEvaluation<any>[] = [];
Expand All @@ -422,3 +442,48 @@ export class AnimationClipAGEvaluation {

private _auxiliaryCurveEvaluations: AuxiliaryCurveEvaluation[] = [];
}

class AnimationClipAGEvaluationAdditive implements AnimationClipAGEvaluation {
constructor (
clip: AnimationClip,
context: AnimationClipGraphBindingContext,
) {
this._clipEval = new AnimationClipAGEvaluationRegular(clip, context);
const refClip = clip[additiveSettingsTag].refClip;
if (refClip && refClip !== clip) {
this._refClipEval = new AnimationClipAGEvaluationRegular(refClip, context);
}
}

public destroy () {
this._clipEval.destroy();
this._refClipEval?.destroy();
}

/**
* Evaluates.
* @param time The time.
* @param context The evaluation context.
*/
public evaluate (time: number, context: AnimationGraphEvaluationContext) {
// Evaluate this clip.
const pose = this._clipEval.evaluate(time, context);

let refPose: Pose;
if (this._refClipEval) {
const refClipTime = 0.0; // TODO: ref clip may specify a time?
refPose = this._refClipEval.evaluate(refClipTime, context);
} else {
// If the ref clip is not specified,
// The effect is as if the ref pose is the 0 time of original clip.
refPose = this._clipEval.evaluate(0.0, context);
}
calculateDeltaPose(pose, refPose);
context.popPose();

return pose;
}

private _clipEval: AnimationClipAGEvaluationRegular;
private _refClipEval: AnimationClipAGEvaluationRegular | undefined;
}
Loading