Animation-Instancing icon indicating copy to clipboard operation
Animation-Instancing copied to clipboard

URP Support

Open everalan10 opened this issue 4 years ago • 17 comments
trafficstars

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

everalan10 avatar Mar 12 '21 02:03 everalan10

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

wanghao7631 avatar Mar 17 '21 03:03 wanghao7631

Hi there,

Did you have success with wanghao7631's suggestion?

styliann-eth avatar Mar 23 '21 13:03 styliann-eth

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

TheWhiteRice avatar Mar 30 '21 00:03 TheWhiteRice

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

Kalificus avatar Apr 06 '21 21:04 Kalificus

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

cailuming avatar Apr 12 '21 09:04 cailuming

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.

DaFeuk avatar Jul 07 '21 15:07 DaFeuk

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

Can you show me how?

Rizkommam111 avatar Jul 16 '21 07:07 Rizkommam111

Offcourse yes ,enjoy Scripts.zip

cailuming avatar Jul 16 '21 07:07 cailuming

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

cailuming avatar Jul 16 '21 07:07 cailuming

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

HI please help how to use it

mahdiwarrior avatar Aug 25 '21 20:08 mahdiwarrior

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

cailuming avatar Oct 08 '21 02:10 cailuming

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

stevenwanhk avatar Oct 12 '22 09:10 stevenwanhk

@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.

cailuming avatar Oct 13 '22 00:10 cailuming

Hi, could you update this project for HDRP?

mogh7 avatar Jun 16 '23 13:06 mogh7

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...

zoelbastianbach avatar Jul 09 '23 06:07 zoelbastianbach

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]

styliann-eth avatar Jul 17 '23 08:07 styliann-eth

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

(the includes should match the forward pass above)

Inspyro avatar Oct 10 '23 17:10 Inspyro