version 2.5.0
This commit is contained in:
8
com.htc.upm.vive.openxr/Runtime/Models/Hand/2.5.meta
Normal file
8
com.htc.upm.vive.openxr/Runtime/Models/Hand/2.5.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 92041f31dc9416b48a2029c48c6b6ffc
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
2990
com.htc.upm.vive.openxr/Runtime/Models/Hand/2.5/Lefthand.fbx
Normal file
2990
com.htc.upm.vive.openxr/Runtime/Models/Hand/2.5/Lefthand.fbx
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,111 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 55e3f88cac20c634690f1452306eb523
|
||||
ModelImporter:
|
||||
serializedVersion: 21300
|
||||
internalIDToNameTable: []
|
||||
externalObjects:
|
||||
- first:
|
||||
type: UnityEngine:Material
|
||||
assembly: UnityEngine.CoreModule
|
||||
name: Default_Material
|
||||
second: {fileID: 2100000, guid: dc999998687fce943a2d62982cf3bb17, type: 2}
|
||||
materials:
|
||||
materialImportMode: 2
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 1
|
||||
motionNodeName:
|
||||
rigImportErrors:
|
||||
rigImportWarnings:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
importConstraints: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
nodeNameCollisionStrategy: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 1
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 4
|
||||
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
|
||||
blendShapeNormalImportMode: 1
|
||||
normalSmoothingSource: 0
|
||||
referencedClips: []
|
||||
importAnimation: 1
|
||||
humanDescription:
|
||||
serializedVersion: 3
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
globalScale: 1
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
autoGenerateAvatarMappingIfUnspecified: 1
|
||||
animationType: 2
|
||||
humanoidOversampling: 1
|
||||
avatarSetup: 0
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bb909cdbffc4cdc40887c53baeb6db76
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,50 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Hand
|
||||
m_Shader: {fileID: 4800000, guid: 1fe62d92a6498bd41994b44944d6b552, type: 3}
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 0
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _AlphaText:
|
||||
m_Texture: {fileID: 2800000, guid: 76d4d2bc58547df45ab8ef0ed359a9f4, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _texcoord:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _texcoord3:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _Gradient_Blur: 0.2854134
|
||||
- _Gradient_level: 0.5225084
|
||||
- _Opacity: 0.45
|
||||
- _OutlineThickness: 0.001
|
||||
- __dirty: 1
|
||||
- _line_opacity: 0.5
|
||||
m_Colors:
|
||||
- _ConColorA: {r: 0.1058824, g: 0.6901961, b: 0.9019608, a: 0}
|
||||
- _ConColorB: {r: 1, g: 1, b: 1, a: 0}
|
||||
- _ConGraColorA: {r: 1, g: 1, b: 1, a: 0}
|
||||
- _ConGraColorB: {r: 1, g: 1, b: 1, a: 0}
|
||||
- _GraColorA: {r: 1, g: 1, b: 1, a: 0}
|
||||
- _GraColorB: {r: 1, g: 1, b: 1, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dc999998687fce943a2d62982cf3bb17
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
2989
com.htc.upm.vive.openxr/Runtime/Models/Hand/2.5/Righthand.fbx
Normal file
2989
com.htc.upm.vive.openxr/Runtime/Models/Hand/2.5/Righthand.fbx
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,111 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5c9af3a1eed9bfd4884f627bc8417ae6
|
||||
ModelImporter:
|
||||
serializedVersion: 21300
|
||||
internalIDToNameTable: []
|
||||
externalObjects:
|
||||
- first:
|
||||
type: UnityEngine:Material
|
||||
assembly: UnityEngine.CoreModule
|
||||
name: Default_Material
|
||||
second: {fileID: 2100000, guid: dc999998687fce943a2d62982cf3bb17, type: 2}
|
||||
materials:
|
||||
materialImportMode: 2
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 1
|
||||
motionNodeName:
|
||||
rigImportErrors:
|
||||
rigImportWarnings:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
importConstraints: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
nodeNameCollisionStrategy: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 1
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 4
|
||||
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
|
||||
blendShapeNormalImportMode: 1
|
||||
normalSmoothingSource: 0
|
||||
referencedClips: []
|
||||
importAnimation: 1
|
||||
humanDescription:
|
||||
serializedVersion: 3
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
globalScale: 1
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
autoGenerateAvatarMappingIfUnspecified: 1
|
||||
animationType: 2
|
||||
humanoidOversampling: 1
|
||||
avatarSetup: 0
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6541b1cca7e65874aa164f80c6f23143
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,116 @@
|
||||
// Made with Amplify Shader Editor
|
||||
Shader "Wave/Essence/Hand/Model"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[HDR]_GraColorA("GradianColorA", Color) = (0.1058824,0.6901961,0.9019608,0)
|
||||
[HDR]_GraColorB("GradianColorB", Color) = (1,1,1,0)
|
||||
[HDR]_ConGraColorA("ContourColorA", Color) = (0.1058824,0.6901961,0.9019608,0)
|
||||
[HDR]_ConGraColorB("ContourColorB", Color) = (1,1,1,0)
|
||||
_Gradient_Blur("Gradient_Blur", Range(0 , 1)) = 0.2854134
|
||||
_Gradient_level("Gradient_level", Range(0 , 1)) = 0.5225084
|
||||
_Opacity("Opacity", Range(0 , 1)) = 0.45
|
||||
_line_opacity("line_opacity", Range(0 , 1)) = 0.5
|
||||
_OutlineThickness("OutlineThickness", Range(0 , 0.002)) = 0.001
|
||||
_AlphaText("AlphaText", 2D) = "white" {}
|
||||
[HideInInspector] _texcoord3("", 2D) = "white" {}
|
||||
[HideInInspector] _texcoord("", 2D) = "white" {}
|
||||
[HideInInspector] __dirty("", Int) = 1
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Pass
|
||||
{
|
||||
ColorMask 0
|
||||
ZWrite On
|
||||
}
|
||||
|
||||
Tags{ "RenderType" = "Transparent" "Queue" = "Transparent+0"}
|
||||
Cull Front
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma surface outlineSurf Outline nofog alpha:fade keepalpha noshadow noambient novertexlights nolightmap nodynlightmap nodirlightmap nometa noforwardadd vertex:outlineVertexDataFunc
|
||||
|
||||
|
||||
|
||||
|
||||
struct Input
|
||||
{
|
||||
float2 uv3_texcoord3;
|
||||
float2 uv_texcoord;
|
||||
};
|
||||
uniform float _OutlineThickness;
|
||||
uniform float4 _ConGraColorA;
|
||||
uniform float4 _ConGraColorB;
|
||||
uniform float _Gradient_level;
|
||||
uniform float _Gradient_Blur;
|
||||
uniform float _line_opacity;
|
||||
uniform sampler2D _AlphaText;
|
||||
|
||||
void outlineVertexDataFunc(inout appdata_full v, out Input o)
|
||||
{
|
||||
UNITY_INITIALIZE_OUTPUT(Input, o);
|
||||
float outlineVar = _OutlineThickness;
|
||||
v.vertex.xyz += (v.normal * outlineVar);
|
||||
}
|
||||
inline half4 LightingOutline(SurfaceOutput s, half3 lightDir, half atten) { return half4 (0,0,0, s.Alpha); }
|
||||
void outlineSurf(Input i, inout SurfaceOutput o)
|
||||
{
|
||||
float clampResult114 = clamp((_Gradient_level + ((_Gradient_level - i.uv3_texcoord3.y) / _Gradient_Blur)) , 0.0 , 1.0);
|
||||
float4 lerpResult100 = lerp(_ConGraColorA, _ConGraColorB, clampResult114);
|
||||
float4 tex2DNode92 = tex2D(_AlphaText, i.uv_texcoord);
|
||||
o.Emission = lerpResult100.rgb;
|
||||
o.Alpha = (_line_opacity * tex2DNode92).r;
|
||||
}
|
||||
ENDCG
|
||||
|
||||
|
||||
Tags{ "RenderType" = "Transparent" "Queue" = "Transparent+0" "IgnoreProjector" = "True" "IsEmissive" = "true" }
|
||||
Cull Back
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma surface surf Unlit keepalpha noshadow vertex:vertexDataFunc
|
||||
struct Input
|
||||
{
|
||||
float2 uv3_texcoord3;
|
||||
float2 uv_texcoord;
|
||||
};
|
||||
|
||||
uniform float4 _GraColorA;
|
||||
uniform float4 _GraColorB;
|
||||
uniform float _Gradient_level;
|
||||
uniform float _Gradient_Blur;
|
||||
uniform float _Opacity;
|
||||
uniform sampler2D _AlphaText;
|
||||
|
||||
void vertexDataFunc(inout appdata_full v, out Input o)
|
||||
{
|
||||
UNITY_INITIALIZE_OUTPUT(Input, o);
|
||||
v.vertex.xyz += 0;
|
||||
}
|
||||
|
||||
inline half4 LightingUnlit(SurfaceOutput s, half3 lightDir, half atten)
|
||||
{
|
||||
return half4 (0, 0, 0, s.Alpha);
|
||||
}
|
||||
|
||||
void surf(Input i , inout SurfaceOutput o)
|
||||
{
|
||||
float clampResult114 = clamp((_Gradient_level + ((_Gradient_level - i.uv3_texcoord3.y) / _Gradient_Blur)) , 0.0 , 1.0);
|
||||
float4 lerpResult100 = lerp(_GraColorA , _GraColorB , clampResult114);
|
||||
o.Emission = lerpResult100.rgb;
|
||||
float4 color104 = IsGammaSpace() ? float4(0,0,0,0) : float4(0,0,0,0);
|
||||
float4 color102 = IsGammaSpace() ? float4(1,1,1,0) : float4(1,1,1,0);
|
||||
float smoothstepResult103 = smoothstep(-0.05 , 1.0 , i.uv3_texcoord3.y);
|
||||
float4 lerpResult105 = lerp(color104 , color102 , smoothstepResult103);
|
||||
float4 tex2DNode92 = tex2D(_AlphaText, i.uv_texcoord);
|
||||
o.Alpha = (lerpResult105 * _Opacity * tex2DNode92).r;
|
||||
}
|
||||
|
||||
ENDCG
|
||||
}
|
||||
CustomEditor "ASEMaterialInspector"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1fe62d92a6498bd41994b44944d6b552
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f4acb42845551fe4b92933e1858633ad
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 318 KiB |
@@ -0,0 +1,135 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 76d4d2bc58547df45ab8ef0ed359a9f4
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
cookieLightType: 1
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 512
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
136
com.htc.upm.vive.openxr/Runtime/Models/Hand/HandModelActions.cs
Normal file
136
com.htc.upm.vive.openxr/Runtime/Models/Hand/HandModelActions.cs
Normal file
@@ -0,0 +1,136 @@
|
||||
// Copyright HTC Corporation All Rights Reserved.
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
using VIVE.OpenXR.Hand;
|
||||
|
||||
namespace VIVE.OpenXR.Models
|
||||
{
|
||||
public class HandModelActions : MonoBehaviour
|
||||
{
|
||||
#region Log
|
||||
const string LOG_TAG = "VIVE.OpenXR.Models.HandModelActions";
|
||||
StringBuilder m_sb = null;
|
||||
StringBuilder sb
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_sb == null) { m_sb = new StringBuilder(); }
|
||||
return m_sb;
|
||||
}
|
||||
}
|
||||
void DEBUG(StringBuilder msg) { Debug.LogFormat("{0} {1}", LOG_TAG, msg); }
|
||||
void ERROR(StringBuilder msg) { Debug.LogErrorFormat("{0} {1}", LOG_TAG, msg); }
|
||||
#endregion
|
||||
|
||||
#region Inspector
|
||||
[SerializeField] private bool m_IsLeft = false;
|
||||
|
||||
[SerializeField] private GameObject m_Wrist = null;
|
||||
[SerializeField] private GameObject m_Palm = null;
|
||||
|
||||
[SerializeField] private GameObject m_Thumb_Metacarpal = null;
|
||||
[SerializeField] private GameObject m_Thumb_Proximal = null;
|
||||
[SerializeField] private GameObject m_Thumb_Distal = null;
|
||||
[SerializeField] private GameObject m_Thumb_Tip = null;
|
||||
|
||||
[SerializeField] private GameObject m_Index_Metacarpal = null;
|
||||
[SerializeField] private GameObject m_Index_Proximal = null;
|
||||
[SerializeField] private GameObject m_Index_Intermediate = null;
|
||||
[SerializeField] private GameObject m_Index_Distal = null;
|
||||
[SerializeField] private GameObject m_Index_Tip = null;
|
||||
|
||||
[SerializeField] private GameObject m_Middle_Metacarpal = null;
|
||||
[SerializeField] private GameObject m_Middle_Proximal = null;
|
||||
[SerializeField] private GameObject m_Middle_Intermediate = null;
|
||||
[SerializeField] private GameObject m_Middle_Distal = null;
|
||||
[SerializeField] private GameObject m_Middle_Tip = null;
|
||||
|
||||
[SerializeField] private GameObject m_Ring_Metacarpal = null;
|
||||
[SerializeField] private GameObject m_Ring_Proximal = null;
|
||||
[SerializeField] private GameObject m_Ring_Intermediate = null;
|
||||
[SerializeField] private GameObject m_Ring_Distal = null;
|
||||
[SerializeField] private GameObject m_Ring_Tip = null;
|
||||
|
||||
[SerializeField] private GameObject m_Little_Metacarpal = null;
|
||||
[SerializeField] private GameObject m_Little_Proximal = null;
|
||||
[SerializeField] private GameObject m_Little_Intermediate = null;
|
||||
[SerializeField] private GameObject m_Little_Distal = null;
|
||||
[SerializeField] private GameObject m_Little_Tip = null;
|
||||
|
||||
[HideInInspector]
|
||||
public bool ForceHidden = false;
|
||||
#endregion
|
||||
|
||||
private SkinnedMeshRenderer skinMeshRenderer = null;
|
||||
private void Awake()
|
||||
{
|
||||
skinMeshRenderer = GetComponentInChildren<SkinnedMeshRenderer>();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (skinMeshRenderer == null) { return; }
|
||||
|
||||
if (!XR_EXT_hand_tracking.Interop.GetJointLocations(m_IsLeft, out XrHandJointLocationEXT[] handJointLocation))
|
||||
{
|
||||
skinMeshRenderer.enabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
skinMeshRenderer.enabled = !ForceHidden;
|
||||
|
||||
UpdateJointPosition(handJointLocation[(int)XrHandJointEXT.XR_HAND_JOINT_WRIST_EXT], ref m_Wrist);
|
||||
|
||||
UpdateJointRotation(handJointLocation[(int)XrHandJointEXT.XR_HAND_JOINT_WRIST_EXT], ref m_Wrist);
|
||||
UpdateJointRotation(handJointLocation[(int)XrHandJointEXT.XR_HAND_JOINT_PALM_EXT], ref m_Palm);
|
||||
|
||||
UpdateJointRotation(handJointLocation[(int)XrHandJointEXT.XR_HAND_JOINT_THUMB_METACARPAL_EXT], ref m_Thumb_Metacarpal);
|
||||
UpdateJointRotation(handJointLocation[(int)XrHandJointEXT.XR_HAND_JOINT_THUMB_PROXIMAL_EXT], ref m_Thumb_Proximal);
|
||||
UpdateJointRotation(handJointLocation[(int)XrHandJointEXT.XR_HAND_JOINT_THUMB_DISTAL_EXT], ref m_Thumb_Distal);
|
||||
UpdateJointRotation(handJointLocation[(int)XrHandJointEXT.XR_HAND_JOINT_THUMB_TIP_EXT], ref m_Thumb_Tip);
|
||||
|
||||
UpdateJointRotation(handJointLocation[(int)XrHandJointEXT.XR_HAND_JOINT_INDEX_METACARPAL_EXT], ref m_Index_Metacarpal);
|
||||
UpdateJointRotation(handJointLocation[(int)XrHandJointEXT.XR_HAND_JOINT_INDEX_PROXIMAL_EXT], ref m_Index_Proximal);
|
||||
UpdateJointRotation(handJointLocation[(int)XrHandJointEXT.XR_HAND_JOINT_INDEX_INTERMEDIATE_EXT], ref m_Index_Intermediate);
|
||||
UpdateJointRotation(handJointLocation[(int)XrHandJointEXT.XR_HAND_JOINT_INDEX_DISTAL_EXT], ref m_Index_Distal);
|
||||
UpdateJointRotation(handJointLocation[(int)XrHandJointEXT.XR_HAND_JOINT_INDEX_TIP_EXT], ref m_Index_Tip);
|
||||
|
||||
UpdateJointRotation(handJointLocation[(int)XrHandJointEXT.XR_HAND_JOINT_MIDDLE_METACARPAL_EXT], ref m_Middle_Metacarpal);
|
||||
UpdateJointRotation(handJointLocation[(int)XrHandJointEXT.XR_HAND_JOINT_MIDDLE_PROXIMAL_EXT], ref m_Middle_Proximal);
|
||||
UpdateJointRotation(handJointLocation[(int)XrHandJointEXT.XR_HAND_JOINT_MIDDLE_INTERMEDIATE_EXT], ref m_Middle_Intermediate);
|
||||
UpdateJointRotation(handJointLocation[(int)XrHandJointEXT.XR_HAND_JOINT_MIDDLE_DISTAL_EXT], ref m_Middle_Distal);
|
||||
UpdateJointRotation(handJointLocation[(int)XrHandJointEXT.XR_HAND_JOINT_MIDDLE_TIP_EXT], ref m_Middle_Tip);
|
||||
|
||||
UpdateJointRotation(handJointLocation[(int)XrHandJointEXT.XR_HAND_JOINT_RING_METACARPAL_EXT], ref m_Ring_Metacarpal);
|
||||
UpdateJointRotation(handJointLocation[(int)XrHandJointEXT.XR_HAND_JOINT_RING_PROXIMAL_EXT], ref m_Ring_Proximal);
|
||||
UpdateJointRotation(handJointLocation[(int)XrHandJointEXT.XR_HAND_JOINT_RING_INTERMEDIATE_EXT], ref m_Ring_Intermediate);
|
||||
UpdateJointRotation(handJointLocation[(int)XrHandJointEXT.XR_HAND_JOINT_RING_DISTAL_EXT], ref m_Ring_Distal);
|
||||
UpdateJointRotation(handJointLocation[(int)XrHandJointEXT.XR_HAND_JOINT_RING_TIP_EXT], ref m_Ring_Tip);
|
||||
|
||||
UpdateJointRotation(handJointLocation[(int)XrHandJointEXT.XR_HAND_JOINT_LITTLE_METACARPAL_EXT], ref m_Little_Metacarpal);
|
||||
UpdateJointRotation(handJointLocation[(int)XrHandJointEXT.XR_HAND_JOINT_LITTLE_PROXIMAL_EXT], ref m_Little_Proximal);
|
||||
UpdateJointRotation(handJointLocation[(int)XrHandJointEXT.XR_HAND_JOINT_LITTLE_INTERMEDIATE_EXT], ref m_Little_Intermediate);
|
||||
UpdateJointRotation(handJointLocation[(int)XrHandJointEXT.XR_HAND_JOINT_LITTLE_DISTAL_EXT], ref m_Little_Distal);
|
||||
UpdateJointRotation(handJointLocation[(int)XrHandJointEXT.XR_HAND_JOINT_LITTLE_TIP_EXT], ref m_Little_Tip);
|
||||
}
|
||||
|
||||
private void UpdateJointPosition(XrHandJointLocationEXT pose, ref GameObject joint)
|
||||
{
|
||||
if (((UInt64)pose.locationFlags & (UInt64)XrSpaceLocationFlags.XR_SPACE_LOCATION_POSITION_TRACKED_BIT) != 0)
|
||||
{
|
||||
Vector3 pos = OpenXRHelper.ToUnityVector(pose.pose.position);
|
||||
m_Wrist.transform.localPosition = pos;
|
||||
}
|
||||
}
|
||||
private void UpdateJointRotation(XrHandJointLocationEXT pose, ref GameObject joint)
|
||||
{
|
||||
if (((UInt64)pose.locationFlags & (UInt64)XrSpaceLocationFlags.XR_SPACE_LOCATION_ORIENTATION_TRACKED_BIT) != 0)
|
||||
{
|
||||
Quaternion rot = OpenXRHelper.ToUnityQuaternion(pose.pose.orientation);
|
||||
joint.transform.rotation = rot;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 916de3f5e8e977e4bb28c81a7b35921a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user