Unity-Technologies / Animation-Instancing

This technique is designed to instance Characters(SkinnedMeshRender).
Other
1.63k stars 296 forks source link

URP Support #104

Open everalan10 opened 3 years ago

everalan10 commented 3 years ago

Hi, could you update this project for URP and HDRP? Maybe another project to suggest. Great job!

wanghao7631 commented 3 years ago

AnimationInstancingLitURP.zip 我改了一下urp的Lit的shader,不知道能不能帮助你

styliann-eth commented 3 years ago

Hi there,

Did you have success with wanghao7631's suggestion?

TheWhiteRice commented 3 years ago

Does @wanghao7631 solution work, for the URP shader in Unity 2020.3.0f1?

Kalificus commented 3 years ago

I get this error: Shader error in 'AnimationInstancing/Lit': 'InitializeStandardLitSurfaceData': output parameter 'outSurfaceData' not completely initialized at Assets/ShaderLibrary/LitInput.hlsl(73) (on d3d11)

cailuming commented 3 years ago

I have rewrite it to support urp , and works well .

DaFeuk commented 3 years ago

I can confirm @wanghao7631 solution does work.

Fix for the error:

Shader error in 'AnimationInstancing/Lit': 'InitializeStandardLitSurfaceData': output parameter 'outSurfaceData' not completely initialized at Assets/ShaderLibrary/LitInput.hlsl(73) (on d3d11)

Open the LitInput.hlsl file and in the "InitializeStandardLitSurfaceData" void add "ZERO_INITIALIZE(SurfaceData, outSurfaceData);" at the start.

The only issue I am having now is the shadows do not work correctly I am only getting a constant T-Pose shadow.

Any help is greatly appreciated.

Rizkommam111 commented 3 years ago

I have rewrite it to support urp , and works well .

Can you show me how?

cailuming commented 3 years ago

Offcourse yes ,enjoy Scripts.zip

cailuming commented 3 years ago

Shader.zip And here is the skinned shader, support track blending

mahdiwarrior commented 2 years ago

Shader.zip And here is the skinned shader, support track blending

HI please help how to use it

cailuming commented 2 years ago

@mahdiwarrior the same as offical , I just edited a little bit

stevenwanhk commented 1 year ago

@cailuming Any idea how it can work with singles pass instanced in VR? It now only renders on left eye. Thank you.

cailuming commented 1 year ago

@cailuming Any idea how it can work with singles pass instanced in VR? It now only renders on left eye. Thank you.

I'm sorry for not familiar with VR,but maybe you can make a copy of the transforms combined with another eye's perspective projection matrix. Then merge all of them to one buffer,hope it helps.

mogh7 commented 1 year ago

Hi, could you update this project for HDRP?

zoelbastianbach commented 1 year ago

I use it with URP 14.0.8 and Entities Graphics 1.0.11, no error but also no mesh was rendered... lol... it seems it need some tweak when using it with entities graphics...

styliann-eth commented 1 year ago

Hi guys,

I thought I'd mention it in case - the below Unity Asset Store asset does a good job with URP: https://assetstore.unity.com/packages/tools/animation/mesh-animator-animate-massive-crowds-26009

[no affiliation with Mesh Animator, I simply use it in my game]

Inspyro commented 9 months ago

@DaFeuk You need to adjust the shadow pass as follows image

(the includes should match the forward pass above)