ADD : 핸드 트래킹 테스트 스크립트 업데이트
This commit is contained in:
parent
60f45b26ab
commit
86ec8eada3
8
Assets/External/BioIK.meta
vendored
Normal file
8
Assets/External/BioIK.meta
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5922c52739f8e0346b7b85d9c293f538
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
299
Assets/External/BioIK/BioIK.cs
vendored
Normal file
299
Assets/External/BioIK/BioIK.cs
vendored
Normal file
@ -0,0 +1,299 @@
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace BioIK {
|
||||
|
||||
//[ExecuteInEditMode]
|
||||
[DisallowMultipleComponent]
|
||||
public class BioIK : MonoBehaviour {
|
||||
|
||||
//public bool SolveInEditMode = false;
|
||||
|
||||
[SerializeField] private bool UseThreading = true;
|
||||
|
||||
[SerializeField] private int Generations = 2;
|
||||
[SerializeField] private int PopulationSize = 50;
|
||||
[SerializeField] private int Elites = 2;
|
||||
|
||||
public float Smoothing = 0.5f;
|
||||
public float AnimationWeight = 0f;
|
||||
public float AnimationBlend = 0f;
|
||||
public MotionType MotionType = MotionType.Instantaneous;
|
||||
public float MaximumVelocity = 3f;
|
||||
public float MaximumAcceleration = 3f;
|
||||
|
||||
public List<BioSegment> Segments = new List<BioSegment>();
|
||||
|
||||
public BioSegment Root = null;
|
||||
public Evolution Evolution = null;
|
||||
public double[] Solution = null;
|
||||
|
||||
private bool Destroyed = false;
|
||||
|
||||
//Custom Inspector Helpers
|
||||
public BioSegment SelectedSegment = null;
|
||||
public Vector2 Scroll = Vector2.zero;
|
||||
|
||||
void Awake() {
|
||||
Refresh();
|
||||
}
|
||||
|
||||
void Start() {
|
||||
|
||||
}
|
||||
|
||||
void OnDestroy() {
|
||||
Destroyed = true;
|
||||
DeInitialise();
|
||||
Utility.Cleanup(transform);
|
||||
}
|
||||
|
||||
void OnEnable() {
|
||||
Initialise();
|
||||
}
|
||||
|
||||
void OnDisable() {
|
||||
DeInitialise();
|
||||
}
|
||||
|
||||
private void Initialise() {
|
||||
if(Evolution == null) {
|
||||
Evolution = new Evolution(new Model(this), PopulationSize, Elites, UseThreading);
|
||||
}
|
||||
}
|
||||
|
||||
private void DeInitialise() {
|
||||
if(Evolution != null) {
|
||||
Evolution.Kill();
|
||||
Evolution = null;
|
||||
}
|
||||
}
|
||||
|
||||
void Update() {
|
||||
PrecaptureAnimation(Root);
|
||||
}
|
||||
|
||||
void LateUpdate() {
|
||||
PostcaptureAnimation(Root);
|
||||
|
||||
UpdateData(Root);
|
||||
|
||||
for(int i=0; i<Solution.Length; i++) {
|
||||
Solution[i] = Evolution.GetModel().MotionPtrs[i].Motion.GetTargetValue(true);
|
||||
}
|
||||
Solution = Evolution.Optimise(Generations, Solution);
|
||||
|
||||
for(int i=0; i<Solution.Length; i++) {
|
||||
BioJoint.Motion motion = Evolution.GetModel().MotionPtrs[i].Motion;
|
||||
motion.SetTargetValue(Solution[i], true);
|
||||
/*
|
||||
if(motion.Joint.GetJointType() == JointType.Revolute) {
|
||||
motion.SetTargetValue((float)Solution[i]);
|
||||
} else if(motion.Joint.GetJointType() == JointType.Continuous) {
|
||||
motion.SetTargetValue(motion.GetTargetValue() + Mathf.Deg2Rad*Mathf.DeltaAngle(Mathf.Rad2Deg*motion.GetTargetValue(), Mathf.Rad2Deg*(float)Solution[i]));
|
||||
} else if(motion.Joint.GetJointType() == JointType.Prismatic) {
|
||||
motion.SetTargetValue((float)Solution[i]);
|
||||
} else if(motion.Joint.GetJointType() == JointType.Floating) {
|
||||
motion.SetTargetValue((float)Solution[i]);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
ProcessMotion(Root);
|
||||
}
|
||||
|
||||
public void SetThreading(bool enabled) {
|
||||
if(UseThreading != enabled) {
|
||||
UseThreading = enabled;
|
||||
if(Application.isPlaying) {
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool GetThreading() {
|
||||
return UseThreading;
|
||||
}
|
||||
|
||||
public void SetGenerations(int generations) {
|
||||
Generations = generations;
|
||||
}
|
||||
|
||||
public int GetGenerations() {
|
||||
return Generations;
|
||||
}
|
||||
|
||||
public void SetPopulationSize(int populationSize) {
|
||||
if(PopulationSize != populationSize) {
|
||||
PopulationSize = System.Math.Max(1, populationSize);
|
||||
Elites = System.Math.Min(populationSize, Elites);
|
||||
if(Application.isPlaying) {
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int GetPopulationSize() {
|
||||
return PopulationSize;
|
||||
}
|
||||
|
||||
public void SetElites(int elites) {
|
||||
if(Elites != elites) {
|
||||
Elites = System.Math.Max(1, elites);
|
||||
if(Application.isPlaying) {
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int GetElites() {
|
||||
return Elites;
|
||||
}
|
||||
|
||||
public void ResetPosture(BioSegment segment) {
|
||||
if(segment.Joint != null) {
|
||||
segment.Joint.X.SetTargetValue(0f);
|
||||
segment.Joint.Y.SetTargetValue(0f);
|
||||
segment.Joint.Z.SetTargetValue(0f);
|
||||
if(!Application.isPlaying) {
|
||||
segment.Joint.PrecaptureAnimation();
|
||||
segment.Joint.PostcaptureAnimation();
|
||||
segment.Joint.UpdateData();
|
||||
segment.Joint.ProcessMotion();
|
||||
}
|
||||
}
|
||||
for(int i=0; i<segment.Childs.Length; i++) {
|
||||
ResetPosture(segment.Childs[i]);
|
||||
}
|
||||
}
|
||||
|
||||
public BioSegment FindSegment(Transform t) {
|
||||
for(int i=0; i<Segments.Count; i++) {
|
||||
if(Segments[i].Transform == t) {
|
||||
return Segments[i];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public BioSegment FindSegment(string name) {
|
||||
for(int i=0; i<Segments.Count; i++) {
|
||||
if(Segments[i].Transform.name == name) {
|
||||
return Segments[i];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<BioSegment> GetChain(Transform start, Transform end) {
|
||||
BioSegment a = FindSegment(start);
|
||||
BioSegment b = FindSegment(end);
|
||||
if(a == null || b == null) {
|
||||
Debug.Log("Could not generate chain for given transforms");
|
||||
return null;
|
||||
}
|
||||
return GetChain(a, b);
|
||||
}
|
||||
|
||||
public List<BioSegment> GetChain(BioSegment start, BioSegment end) {
|
||||
List<BioSegment> chain = new List<BioSegment>();
|
||||
BioSegment segment = end;
|
||||
while(true) {
|
||||
chain.Add(segment);
|
||||
if(segment.Transform == transform || segment.Parent == null) {
|
||||
break;
|
||||
} else {
|
||||
segment = segment.Parent;
|
||||
}
|
||||
}
|
||||
chain.Reverse();
|
||||
return chain;
|
||||
}
|
||||
|
||||
public void UpdateData(BioSegment segment) {
|
||||
if(segment.Joint != null) {
|
||||
if(segment.Joint.enabled) {
|
||||
segment.Joint.UpdateData();
|
||||
}
|
||||
}
|
||||
for(int i=0; i<segment.Objectives.Length; i++) {
|
||||
if(segment.Objectives[i].enabled) {
|
||||
segment.Objectives[i].UpdateData();
|
||||
}
|
||||
}
|
||||
for(int i=0; i<segment.Childs.Length; i++) {
|
||||
UpdateData(segment.Childs[i]);
|
||||
}
|
||||
}
|
||||
|
||||
public void Refresh(bool evolution = true) {
|
||||
if(Destroyed) {
|
||||
return;
|
||||
}
|
||||
|
||||
for(int i=0; i<Segments.Count; i++) {
|
||||
if(Segments[i] == null) {
|
||||
Segments.RemoveAt(i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
Refresh(transform);
|
||||
Root = FindSegment(transform);
|
||||
|
||||
if(evolution && Application.isPlaying) {
|
||||
DeInitialise();
|
||||
Initialise();
|
||||
Solution = new double[Evolution.GetModel().GetDoF()];
|
||||
}
|
||||
}
|
||||
|
||||
private void Refresh(Transform t) {
|
||||
BioSegment segment = FindSegment(t);
|
||||
if(segment == null) {
|
||||
segment = Utility.AddBioSegment(this, t);
|
||||
Segments.Add(segment);
|
||||
}
|
||||
segment.Character = this;
|
||||
segment.RenewRelations();
|
||||
|
||||
for(int i=0; i<t.childCount; i++) {
|
||||
Refresh(t.GetChild(i));
|
||||
}
|
||||
}
|
||||
|
||||
private void PrecaptureAnimation(BioSegment segment) {
|
||||
if(segment.Joint != null) {
|
||||
if(segment.Joint.enabled) {
|
||||
segment.Joint.PrecaptureAnimation();
|
||||
}
|
||||
}
|
||||
for(int i=0; i<segment.Childs.Length; i++) {
|
||||
PrecaptureAnimation(segment.Childs[i]);
|
||||
}
|
||||
}
|
||||
|
||||
private void PostcaptureAnimation(BioSegment segment) {
|
||||
if(segment.Joint != null) {
|
||||
if(segment.Joint.enabled) {
|
||||
segment.Joint.PostcaptureAnimation();
|
||||
}
|
||||
}
|
||||
for(int i=0; i<segment.Childs.Length; i++) {
|
||||
PostcaptureAnimation(segment.Childs[i]);
|
||||
}
|
||||
}
|
||||
|
||||
private void ProcessMotion(BioSegment segment) {
|
||||
if(segment.Joint != null) {
|
||||
if(segment.Joint.enabled) {
|
||||
segment.Joint.ProcessMotion();
|
||||
}
|
||||
}
|
||||
for(int i=0; i<segment.Childs.Length; i++) {
|
||||
ProcessMotion(segment.Childs[i]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
19
Assets/External/BioIK/BioIK.cs.meta
vendored
Normal file
19
Assets/External/BioIK/BioIK.cs.meta
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 37cfd7ed5d69f41aaa4d87968caf6a78
|
||||
timeCreated: 1502284509
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/BioIK.cs
|
||||
uploadId: 199125
|
||||
9
Assets/External/BioIK/Demo.meta
vendored
Normal file
9
Assets/External/BioIK/Demo.meta
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2ad09cf69881e4edd8934667957565dc
|
||||
folderAsset: yes
|
||||
timeCreated: 1502284433
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/External/BioIK/Demo/Demo.unity
(Stored with Git LFS)
vendored
Normal file
BIN
Assets/External/BioIK/Demo/Demo.unity
(Stored with Git LFS)
vendored
Normal file
Binary file not shown.
15
Assets/External/BioIK/Demo/Demo.unity.meta
vendored
Normal file
15
Assets/External/BioIK/Demo/Demo.unity.meta
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cbe21be57d40940eda71257cd46c5a23
|
||||
timeCreated: 1502737624
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Demo/Demo.unity
|
||||
uploadId: 199125
|
||||
63
Assets/External/BioIK/Demo/DemoSettings.lighting
vendored
Normal file
63
Assets/External/BioIK/Demo/DemoSettings.lighting
vendored
Normal file
@ -0,0 +1,63 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!850595691 &4890085278179872738
|
||||
LightingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: DemoSettings
|
||||
serializedVersion: 8
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 1
|
||||
m_RealtimeEnvironmentLighting: 1
|
||||
m_BounceScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_UsingShadowmask: 0
|
||||
m_BakeBackend: 1
|
||||
m_LightmapMaxSize: 1024
|
||||
m_LightmapSizeFixed: 0
|
||||
m_UseMipmapLimits: 1
|
||||
m_BakeResolution: 40
|
||||
m_Padding: 2
|
||||
m_LightmapCompression: 3
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAO: 0
|
||||
m_MixedBakeMode: 1
|
||||
m_LightmapsBakeMode: 1
|
||||
m_FilterMode: 1
|
||||
m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ExportTrainingData: 0
|
||||
m_EnableWorkerProcessBaking: 1
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_RealtimeResolution: 2
|
||||
m_ForceWhiteAlbedo: 0
|
||||
m_ForceUpdates: 0
|
||||
m_PVRCulling: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVREnvironmentSampleCount: 512
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_PVRBounces: 2
|
||||
m_PVRMinBounces: 2
|
||||
m_PVREnvironmentImportanceSampling: 0
|
||||
m_PVRFilteringMode: 2
|
||||
m_PVRDenoiserTypeDirect: 0
|
||||
m_PVRDenoiserTypeIndirect: 0
|
||||
m_PVRDenoiserTypeAO: 0
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 1
|
||||
m_PVRFilteringGaussRadiusAO: 1
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_RespectSceneVisibilityWhenBakingGI: 0
|
||||
8
Assets/External/BioIK/Demo/DemoSettings.lighting.meta
vendored
Normal file
8
Assets/External/BioIK/Demo/DemoSettings.lighting.meta
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4eb949b68e34b5146817ccc86fc8c592
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 4890085278179872738
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/External/BioIK/Demo/Materials.meta
vendored
Normal file
9
Assets/External/BioIK/Demo/Materials.meta
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fc71db40b1c0e487c9ff8a7d6f313c97
|
||||
folderAsset: yes
|
||||
timeCreated: 1502735233
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
139
Assets/External/BioIK/Demo/Materials/Blue.mat
vendored
Normal file
139
Assets/External/BioIK/Demo/Materials/Blue.mat
vendored
Normal file
@ -0,0 +1,139 @@
|
||||
%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: Blue
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _EMISSION
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 1
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0, g: 0, b: 1, a: 1}
|
||||
- _Color: {r: 0, g: 0, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &6702484933130405944
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
15
Assets/External/BioIK/Demo/Materials/Blue.mat.meta
vendored
Normal file
15
Assets/External/BioIK/Demo/Materials/Blue.mat.meta
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7c6681777fc7f4e88928d9c8c2fc3079
|
||||
timeCreated: 1480727763
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Demo/Materials/Blue.mat
|
||||
uploadId: 199125
|
||||
139
Assets/External/BioIK/Demo/Materials/Box.mat
vendored
Normal file
139
Assets/External/BioIK/Demo/Materials/Box.mat
vendored
Normal file
@ -0,0 +1,139 @@
|
||||
%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: Box
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _EMISSION
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 1
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _Color: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &2496565233212094189
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
15
Assets/External/BioIK/Demo/Materials/Box.mat.meta
vendored
Normal file
15
Assets/External/BioIK/Demo/Materials/Box.mat.meta
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aaddeedceff8846e996faabd870e2a00
|
||||
timeCreated: 1471630807
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Demo/Materials/Box.mat
|
||||
uploadId: 199125
|
||||
138
Assets/External/BioIK/Demo/Materials/Green.mat
vendored
Normal file
138
Assets/External/BioIK/Demo/Materials/Green.mat
vendored
Normal file
@ -0,0 +1,138 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-4477308011339855941
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Green
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0, g: 1, b: 0, a: 1}
|
||||
- _Color: {r: 0, g: 1, b: 0, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
16
Assets/External/BioIK/Demo/Materials/Green.mat.meta
vendored
Normal file
16
Assets/External/BioIK/Demo/Materials/Green.mat.meta
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 351b018012d2d495fb861167ddd81104
|
||||
timeCreated: 1503240813
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Demo/Materials/Green.mat
|
||||
uploadId: 199125
|
||||
139
Assets/External/BioIK/Demo/Materials/Ground.mat
vendored
Normal file
139
Assets/External/BioIK/Demo/Materials/Ground.mat
vendored
Normal file
@ -0,0 +1,139 @@
|
||||
%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: Ground
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _EMISSION
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 1
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 2800000, guid: 9c0246158fcc74063aaeec82da301c35, type: 3}
|
||||
m_Scale: {x: 10, y: 10}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 0.1, y: 0.1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 10, y: 10}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 9c0246158fcc74063aaeec82da301c35, type: 3}
|
||||
m_Scale: {x: 10, y: 10}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &4067829689927121350
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
15
Assets/External/BioIK/Demo/Materials/Ground.mat.meta
vendored
Normal file
15
Assets/External/BioIK/Demo/Materials/Ground.mat.meta
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 20a95f932112144d487e08dd5a7df406
|
||||
timeCreated: 1471565824
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Demo/Materials/Ground.mat
|
||||
uploadId: 199125
|
||||
139
Assets/External/BioIK/Demo/Materials/Red.mat
vendored
Normal file
139
Assets/External/BioIK/Demo/Materials/Red.mat
vendored
Normal file
@ -0,0 +1,139 @@
|
||||
%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: Red
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _EMISSION
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 1
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 0, b: 0, a: 1}
|
||||
- _Color: {r: 1, g: 0, b: 0, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &18468904937737193
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
15
Assets/External/BioIK/Demo/Materials/Red.mat.meta
vendored
Normal file
15
Assets/External/BioIK/Demo/Materials/Red.mat.meta
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5b095952707d74e88850a69519007d71
|
||||
timeCreated: 1480727763
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Demo/Materials/Red.mat
|
||||
uploadId: 199125
|
||||
139
Assets/External/BioIK/Demo/Materials/Target.mat
vendored
Normal file
139
Assets/External/BioIK/Demo/Materials/Target.mat
vendored
Normal file
@ -0,0 +1,139 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-159376590605708132
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Target
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _EMISSION
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 0
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 0, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
15
Assets/External/BioIK/Demo/Materials/Target.mat.meta
vendored
Normal file
15
Assets/External/BioIK/Demo/Materials/Target.mat.meta
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2a9fe46eec12c4fe497ddf83c8a70755
|
||||
timeCreated: 1471565465
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Demo/Materials/Target.mat
|
||||
uploadId: 199125
|
||||
139
Assets/External/BioIK/Demo/Materials/Wall.mat
vendored
Normal file
139
Assets/External/BioIK/Demo/Materials/Wall.mat
vendored
Normal file
@ -0,0 +1,139 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-1507699315006799992
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Wall
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _EMISSION
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 1
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 2800000, guid: 9c0246158fcc74063aaeec82da301c35, type: 3}
|
||||
m_Scale: {x: 7.5, y: 7.5}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 0.13333334, y: 0.13333334}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 7.5, y: 7.5}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 9c0246158fcc74063aaeec82da301c35, type: 3}
|
||||
m_Scale: {x: 7.5, y: 7.5}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
15
Assets/External/BioIK/Demo/Materials/Wall.mat.meta
vendored
Normal file
15
Assets/External/BioIK/Demo/Materials/Wall.mat.meta
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bf0f56adee4ed46deb70295f2a24286a
|
||||
timeCreated: 1471565839
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Demo/Materials/Wall.mat
|
||||
uploadId: 199125
|
||||
9
Assets/External/BioIK/Demo/Meshes.meta
vendored
Normal file
9
Assets/External/BioIK/Demo/Meshes.meta
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 29c4e01d49a2b4e65967dd06b314ea37
|
||||
folderAsset: yes
|
||||
timeCreated: 1502737624
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/External/BioIK/Demo/Meshes/Cone.asset
(Stored with Git LFS)
vendored
Normal file
BIN
Assets/External/BioIK/Demo/Meshes/Cone.asset
(Stored with Git LFS)
vendored
Normal file
Binary file not shown.
15
Assets/External/BioIK/Demo/Meshes/Cone.asset.meta
vendored
Normal file
15
Assets/External/BioIK/Demo/Meshes/Cone.asset.meta
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4994c8104f91d48449ff7ec1b9cd1cc4
|
||||
timeCreated: 1480727627
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Demo/Meshes/Cone.asset
|
||||
uploadId: 199125
|
||||
9
Assets/External/BioIK/Demo/Prefabs.meta
vendored
Normal file
9
Assets/External/BioIK/Demo/Prefabs.meta
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 003b3e0db953e4beeb35f7dc02a4227d
|
||||
folderAsset: yes
|
||||
timeCreated: 1502737624
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/External/BioIK/Demo/Prefabs/Target.prefab
(Stored with Git LFS)
vendored
Normal file
BIN
Assets/External/BioIK/Demo/Prefabs/Target.prefab
(Stored with Git LFS)
vendored
Normal file
Binary file not shown.
15
Assets/External/BioIK/Demo/Prefabs/Target.prefab.meta
vendored
Normal file
15
Assets/External/BioIK/Demo/Prefabs/Target.prefab.meta
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e2a3d0c94d6e04041971e5be25796167
|
||||
timeCreated: 1480293094
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Demo/Prefabs/Target.prefab
|
||||
uploadId: 199125
|
||||
9
Assets/External/BioIK/Demo/Robot Kyle.meta
vendored
Normal file
9
Assets/External/BioIK/Demo/Robot Kyle.meta
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1fb9abac43035496eaca914e08d52ba6
|
||||
folderAsset: yes
|
||||
timeCreated: 1502315112
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
867
Assets/External/BioIK/Demo/Robot Kyle/Controller.controller
vendored
Normal file
867
Assets/External/BioIK/Demo/Robot Kyle/Controller.controller
vendored
Normal file
@ -0,0 +1,867 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!91 &9100000
|
||||
AnimatorController:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Controller
|
||||
serializedVersion: 5
|
||||
m_AnimatorParameters: []
|
||||
m_AnimatorLayers:
|
||||
- serializedVersion: 5
|
||||
m_Name: Base Layer
|
||||
m_StateMachine: {fileID: 110700000}
|
||||
m_Mask: {fileID: 0}
|
||||
m_Motions: []
|
||||
m_Behaviours: []
|
||||
m_BlendingMode: 0
|
||||
m_SyncedLayerIndex: -1
|
||||
m_DefaultWeight: 0
|
||||
m_IKPass: 0
|
||||
m_SyncedLayerAffectsTiming: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
--- !u!1102 &110200696
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Social_Happy_04
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 612, y: 48, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 3ba1e8ade46fbc24e901711abac0d82f, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110204465
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Social_Angry_02
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 384, y: -36, z: 0}
|
||||
m_IKOnFeet: 1
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: f8c612fe7e21b8b44af1adeb6004af21, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110204868
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Social_Happy_08
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 612, y: 240, z: 0}
|
||||
m_IKOnFeet: 1
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 5fc2d37978c43674b8f8d1858f4c58f9, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110204980
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Social_Happy_02
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 612, y: -48, z: 0}
|
||||
m_IKOnFeet: 1
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 1376a1e541993eb4faad130b19fe3349, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110212239
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Social_Angry_05
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 384, y: 144, z: 0}
|
||||
m_IKOnFeet: 1
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: fc2a257471602fc4580a47840fcf4574, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110213510
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Social_Negative_04
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 828, y: 48, z: 0}
|
||||
m_IKOnFeet: 1
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: c0f53b95fbb39844680360f8bdb5e747, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110229936
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Social_Negative_03
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 828, y: 0, z: 0}
|
||||
m_IKOnFeet: 1
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 650bd8dc79568e34fac0d41fc70a7bea, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110231282
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Social_Angry_04
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 384, y: 84, z: 0}
|
||||
m_IKOnFeet: 1
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 341e66933beb89d4d8d142f0662562b5, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110241396
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Social_Negative_01
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 828, y: -96, z: 0}
|
||||
m_IKOnFeet: 1
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: df9b724dea44b5c43b76273b2c54bb53, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110242108
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Social_Sorrow_01
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 1044, y: -96, z: 0}
|
||||
m_IKOnFeet: 1
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: c436f2f9206605948a1fa5f89c7d9b9d, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110243312
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Social_Happy_07
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 612, y: 192, z: 0}
|
||||
m_IKOnFeet: 1
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 7b7a260ab1652bf478de63dcd9aab6cc, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110243357
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Run
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 156, y: 24, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 0
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: c5ab459bb60b3d74da77168ea36f5874, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110244232
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Social_Sorrow_03
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 1044, y: 0, z: 0}
|
||||
m_IKOnFeet: 1
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: f2e00ef418d0b3b44b906fe41dc36394, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110258178
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: New State
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: -86, y: -30, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 0}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110260053
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Take 001
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 456, y: 71, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: cf6708d3012748a42ae5e413159f6f32, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110261588
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Social_Sorrow_02
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 1044, y: -48, z: 0}
|
||||
m_IKOnFeet: 1
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 50e2a73ba668df64596a0076b63393a8, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110262204
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Social_Negative_05
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 828, y: 96, z: 0}
|
||||
m_IKOnFeet: 1
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: ecea8d794b230a0448dd8b1214eff7e4, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110264067
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Social_Happy_05
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 612, y: 96, z: 0}
|
||||
m_IKOnFeet: 1
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 1811384224102e944930b0014ec58774, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110266798
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Social_Angry_01
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 384, y: -96, z: 0}
|
||||
m_IKOnFeet: 1
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 1d049537b194496428f41fa55f49a018, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110267801
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Social_Negative_06
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 828, y: 144, z: 0}
|
||||
m_IKOnFeet: 1
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 0858815466989f849b3ea06238d90d4b, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110268597
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Social_Happy_05
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 612, y: 96, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 1d69306c8f62fc7408bfa943811197c4, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110275471
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Social_Happy_09
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 612, y: 288, z: 0}
|
||||
m_IKOnFeet: 1
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 820f27d27ffe9b94ba0573c53c7bfc29, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110277912
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Social_Angry_01
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 396, y: -96, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: dc0382c32b10e4247b5975a9ad2c4f3c, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110278358
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Social_Negative_02
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 828, y: -48, z: 0}
|
||||
m_IKOnFeet: 1
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 138f55fa4753df346b2a139357640f81, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110285404
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Social_Happy_04
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 612, y: 48, z: 0}
|
||||
m_IKOnFeet: 1
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: dd270c2144c099043a0161bf73d7236e, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110290682
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Social_Happy_06
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 612, y: 144, z: 0}
|
||||
m_IKOnFeet: 1
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 02e31cea3bee55a408d97046174f54ab, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110290993
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Social_Happy_03
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 612, y: 0, z: 0}
|
||||
m_IKOnFeet: 1
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: b66a2c0780edea44a9e6dbd664269f12, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110296199
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Social_Angry_03
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 384, y: 24, z: 0}
|
||||
m_IKOnFeet: 1
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 3fcda2509e4386e4ead394c241943965, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110297746
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Social_Happy_01
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 612, y: -96, z: 0}
|
||||
m_IKOnFeet: 1
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 587c0dafd0c8f324a9d8317299ac747f, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &110298326
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Social_Angry_05
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 384, y: 48, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: f1b6b03e55fd18848b2ce7c12b7fdfcf, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1107 &110700000
|
||||
AnimatorStateMachine:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Base Layer
|
||||
m_ChildStates:
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 110243357}
|
||||
m_Position: {x: 156, y: 24, z: 0}
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions: []
|
||||
m_EntryTransitions: []
|
||||
m_StateMachineTransitions: {}
|
||||
m_StateMachineBehaviours: []
|
||||
m_AnyStatePosition: {x: -24, y: -84, z: 0}
|
||||
m_EntryPosition: {x: -84, y: 12, z: 0}
|
||||
m_ExitPosition: {x: 408, y: 24, z: 0}
|
||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||
m_DefaultState: {fileID: 110243357}
|
||||
--- !u!1107 &110778745
|
||||
AnimatorStateMachine:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: New Layer
|
||||
m_ChildStates: []
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions: []
|
||||
m_EntryTransitions: []
|
||||
m_StateMachineTransitions: {}
|
||||
m_StateMachineBehaviours: []
|
||||
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||
m_DefaultState: {fileID: 0}
|
||||
--- !u!1101 &1101000010547281686
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions: []
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 110237085}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.25
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.765625
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
13
Assets/External/BioIK/Demo/Robot Kyle/Controller.controller.meta
vendored
Normal file
13
Assets/External/BioIK/Demo/Robot Kyle/Controller.controller.meta
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b791f8ee6039c5846b642793dc7723cb
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Demo/Robot Kyle/Controller.controller
|
||||
uploadId: 199125
|
||||
9
Assets/External/BioIK/Demo/Robot Kyle/Materials.meta
vendored
Normal file
9
Assets/External/BioIK/Demo/Robot Kyle/Materials.meta
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 11c13c22964d44686a9fc4b5fa27c286
|
||||
folderAsset: yes
|
||||
timeCreated: 1471426258
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
140
Assets/External/BioIK/Demo/Robot Kyle/Materials/Robot_Color.mat
vendored
Normal file
140
Assets/External/BioIK/Demo/Robot Kyle/Materials/Robot_Color.mat
vendored
Normal file
@ -0,0 +1,140 @@
|
||||
%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: Robot_Color
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _EMISSION
|
||||
- _NORMALMAP
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 1
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 2800000, guid: 0a0e8af2869fa45f78e25460db578482, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 2800000, guid: 94c473c9137744d7eabd829f1150da8d, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 0a0e8af2869fa45f78e25460db578482, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 0.19607843}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 0.19607843}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &3081787255350301180
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
13
Assets/External/BioIK/Demo/Robot Kyle/Materials/Robot_Color.mat.meta
vendored
Normal file
13
Assets/External/BioIK/Demo/Robot Kyle/Materials/Robot_Color.mat.meta
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0aa851515cd3747d6b3b3e461199a2ed
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Demo/Robot Kyle/Materials/Robot_Color.mat
|
||||
uploadId: 199125
|
||||
9
Assets/External/BioIK/Demo/Robot Kyle/Model.meta
vendored
Normal file
9
Assets/External/BioIK/Demo/Robot Kyle/Model.meta
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a9d24ac05819145d8bf30028e1210234
|
||||
folderAsset: yes
|
||||
timeCreated: 1471426258
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/External/BioIK/Demo/Robot Kyle/Model/Robot Kyle.fbx
(Stored with Git LFS)
vendored
Normal file
BIN
Assets/External/BioIK/Demo/Robot Kyle/Model/Robot Kyle.fbx
(Stored with Git LFS)
vendored
Normal file
Binary file not shown.
829
Assets/External/BioIK/Demo/Robot Kyle/Model/Robot Kyle.fbx.meta
vendored
Normal file
829
Assets/External/BioIK/Demo/Robot Kyle/Model/Robot Kyle.fbx.meta
vendored
Normal file
@ -0,0 +1,829 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 320b1c2af77554f99a1658df4a6d3d5c
|
||||
ModelImporter:
|
||||
serializedVersion: 19
|
||||
fileIDToRecycleName:
|
||||
100000: Head
|
||||
100002: Hip
|
||||
100004: Left_Ankle_Joint_01
|
||||
100006: Left_Forearm_Joint_01
|
||||
100008: Left_Index_Finger_Joint_01a
|
||||
100010: Left_Index_Finger_Joint_01b
|
||||
100012: Left_Index_Finger_Joint_01c
|
||||
100014: Left_Knee_Joint_01
|
||||
100016: Left_Middle_Finger_Joint_01a
|
||||
100018: Left_Middle_Finger_Joint_01b
|
||||
100020: Left_Middle_Finger_Joint_01c
|
||||
100022: Left_Pinky_Finger_Joint_01a
|
||||
100024: Left_Pinky_Finger_Joint_01b
|
||||
100026: Left_Pinky_Finger_Joint_01c
|
||||
100028: Left_Ring_Finger_Joint_01a
|
||||
100030: Left_Ring_Finger_Joint_01b
|
||||
100032: Left_Ring_Finger_Joint_01c
|
||||
100034: Left_Shoulder_Joint_01
|
||||
100036: Left_Thigh_Joint_01
|
||||
100038: Left_Thumb_Joint_01a
|
||||
100040: Left_Thumb_Joint_01b
|
||||
100042: Left_Toe_Joint_01
|
||||
100044: Left_Upper_Arm_Joint_01
|
||||
100046: Left_Wrist_Joint_01
|
||||
100048: Neck
|
||||
100050: Ribs
|
||||
100052: Right_Ankle_Joint_01
|
||||
100054: Right_Forearm_Joint_01
|
||||
100056: Right_Index_Finger_Joint_01a
|
||||
100058: Right_Index_Finger_Joint_01b
|
||||
100060: Right_Index_Finger_Joint_01c
|
||||
100062: Right_Knee_Joint_01
|
||||
100064: Right_Middle_Finger_Joint_01a
|
||||
100066: Right_Middle_Finger_Joint_01b
|
||||
100068: Right_Middle_Finger_Joint_01c
|
||||
100070: Right_Pinky_Finger_Joint_01a
|
||||
100072: Right_Pinky_Finger_Joint_01b
|
||||
100074: Right_Pinky_Finger_Joint_01c
|
||||
100076: Right_Ring_Finger_Joint_01a
|
||||
100078: Right_Ring_Finger_Joint_01b
|
||||
100080: Right_Ring_Finger_Joint_01c
|
||||
100082: Right_Shoulder_Joint_01
|
||||
100084: Right_Thigh_Joint_01
|
||||
100086: Right_Thumb_Joint_01a
|
||||
100088: Right_Thumb_Joint_01b
|
||||
100090: Right_Toe_Joint_01
|
||||
100092: Right_Upper_Arm_Joint_01
|
||||
100094: Right_Wrist_Joint_01
|
||||
100096: //RootNode
|
||||
100098: Robot2
|
||||
100100: Root
|
||||
400000: Head
|
||||
400002: Hip
|
||||
400004: Left_Ankle_Joint_01
|
||||
400006: Left_Forearm_Joint_01
|
||||
400008: Left_Index_Finger_Joint_01a
|
||||
400010: Left_Index_Finger_Joint_01b
|
||||
400012: Left_Index_Finger_Joint_01c
|
||||
400014: Left_Knee_Joint_01
|
||||
400016: Left_Middle_Finger_Joint_01a
|
||||
400018: Left_Middle_Finger_Joint_01b
|
||||
400020: Left_Middle_Finger_Joint_01c
|
||||
400022: Left_Pinky_Finger_Joint_01a
|
||||
400024: Left_Pinky_Finger_Joint_01b
|
||||
400026: Left_Pinky_Finger_Joint_01c
|
||||
400028: Left_Ring_Finger_Joint_01a
|
||||
400030: Left_Ring_Finger_Joint_01b
|
||||
400032: Left_Ring_Finger_Joint_01c
|
||||
400034: Left_Shoulder_Joint_01
|
||||
400036: Left_Thigh_Joint_01
|
||||
400038: Left_Thumb_Joint_01a
|
||||
400040: Left_Thumb_Joint_01b
|
||||
400042: Left_Toe_Joint_01
|
||||
400044: Left_Upper_Arm_Joint_01
|
||||
400046: Left_Wrist_Joint_01
|
||||
400048: Neck
|
||||
400050: Ribs
|
||||
400052: Right_Ankle_Joint_01
|
||||
400054: Right_Forearm_Joint_01
|
||||
400056: Right_Index_Finger_Joint_01a
|
||||
400058: Right_Index_Finger_Joint_01b
|
||||
400060: Right_Index_Finger_Joint_01c
|
||||
400062: Right_Knee_Joint_01
|
||||
400064: Right_Middle_Finger_Joint_01a
|
||||
400066: Right_Middle_Finger_Joint_01b
|
||||
400068: Right_Middle_Finger_Joint_01c
|
||||
400070: Right_Pinky_Finger_Joint_01a
|
||||
400072: Right_Pinky_Finger_Joint_01b
|
||||
400074: Right_Pinky_Finger_Joint_01c
|
||||
400076: Right_Ring_Finger_Joint_01a
|
||||
400078: Right_Ring_Finger_Joint_01b
|
||||
400080: Right_Ring_Finger_Joint_01c
|
||||
400082: Right_Shoulder_Joint_01
|
||||
400084: Right_Thigh_Joint_01
|
||||
400086: Right_Thumb_Joint_01a
|
||||
400088: Right_Thumb_Joint_01b
|
||||
400090: Right_Toe_Joint_01
|
||||
400092: Right_Upper_Arm_Joint_01
|
||||
400094: Right_Wrist_Joint_01
|
||||
400096: //RootNode
|
||||
400098: Robot2
|
||||
400100: Root
|
||||
2300000: Robot2
|
||||
3300000: Robot2
|
||||
4300000: Robot2
|
||||
9500000: //RootNode
|
||||
11100000: //RootNode
|
||||
13700000: Robot2
|
||||
materials:
|
||||
importMaterials: 1
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
motionNodeName:
|
||||
rigImportErrors:
|
||||
rigImportWarnings:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
animationCompression: 3
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
clipAnimations: []
|
||||
isReadable: 1
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 0.01
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
importBlendShapes: 1
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
optimizeMeshForGPU: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 0
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 4
|
||||
importAnimation: 1
|
||||
copyAvatar: 0
|
||||
humanDescription:
|
||||
serializedVersion: 2
|
||||
human:
|
||||
- boneName: Root
|
||||
humanName: Hips
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Left_Thigh_Joint_01
|
||||
humanName: LeftUpperLeg
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Right_Thigh_Joint_01
|
||||
humanName: RightUpperLeg
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Left_Knee_Joint_01
|
||||
humanName: LeftLowerLeg
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Right_Knee_Joint_01
|
||||
humanName: RightLowerLeg
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Left_Ankle_Joint_01
|
||||
humanName: LeftFoot
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Right_Ankle_Joint_01
|
||||
humanName: RightFoot
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Ribs
|
||||
humanName: Spine
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Neck
|
||||
humanName: Neck
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Head
|
||||
humanName: Head
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Left_Shoulder_Joint_01
|
||||
humanName: LeftShoulder
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Right_Shoulder_Joint_01
|
||||
humanName: RightShoulder
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Left_Upper_Arm_Joint_01
|
||||
humanName: LeftUpperArm
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Right_Upper_Arm_Joint_01
|
||||
humanName: RightUpperArm
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Left_Forearm_Joint_01
|
||||
humanName: LeftLowerArm
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Right_Forearm_Joint_01
|
||||
humanName: RightLowerArm
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Left_Wrist_Joint_01
|
||||
humanName: LeftHand
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Right_Wrist_Joint_01
|
||||
humanName: RightHand
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Left_Toe_Joint_01
|
||||
humanName: LeftToes
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Right_Toe_Joint_01
|
||||
humanName: RightToes
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Left_Thumb_Joint_01a
|
||||
humanName: Left Thumb Proximal
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Left_Thumb_Joint_01b
|
||||
humanName: Left Thumb Intermediate
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Left_Index_Finger_Joint_01a
|
||||
humanName: Left Index Proximal
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Left_Index_Finger_Joint_01b
|
||||
humanName: Left Index Intermediate
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Left_Index_Finger_Joint_01c
|
||||
humanName: Left Index Distal
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Left_Middle_Finger_Joint_01a
|
||||
humanName: Left Middle Proximal
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Left_Middle_Finger_Joint_01b
|
||||
humanName: Left Middle Intermediate
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Left_Middle_Finger_Joint_01c
|
||||
humanName: Left Middle Distal
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Left_Ring_Finger_Joint_01a
|
||||
humanName: Left Ring Proximal
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Left_Ring_Finger_Joint_01b
|
||||
humanName: Left Ring Intermediate
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Left_Ring_Finger_Joint_01c
|
||||
humanName: Left Ring Distal
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Left_Pinky_Finger_Joint_01a
|
||||
humanName: Left Little Proximal
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Left_Pinky_Finger_Joint_01b
|
||||
humanName: Left Little Intermediate
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Left_Pinky_Finger_Joint_01c
|
||||
humanName: Left Little Distal
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Right_Thumb_Joint_01a
|
||||
humanName: Right Thumb Proximal
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Right_Thumb_Joint_01b
|
||||
humanName: Right Thumb Intermediate
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Right_Index_Finger_Joint_01a
|
||||
humanName: Right Index Proximal
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Right_Index_Finger_Joint_01b
|
||||
humanName: Right Index Intermediate
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Right_Index_Finger_Joint_01c
|
||||
humanName: Right Index Distal
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Right_Middle_Finger_Joint_01a
|
||||
humanName: Right Middle Proximal
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Right_Middle_Finger_Joint_01b
|
||||
humanName: Right Middle Intermediate
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Right_Middle_Finger_Joint_01c
|
||||
humanName: Right Middle Distal
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Right_Ring_Finger_Joint_01a
|
||||
humanName: Right Ring Proximal
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Right_Ring_Finger_Joint_01b
|
||||
humanName: Right Ring Intermediate
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Right_Ring_Finger_Joint_01c
|
||||
humanName: Right Ring Distal
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Right_Pinky_Finger_Joint_01a
|
||||
humanName: Right Little Proximal
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Right_Pinky_Finger_Joint_01b
|
||||
humanName: Right Little Intermediate
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
- boneName: Right_Pinky_Finger_Joint_01c
|
||||
humanName: Right Little Distal
|
||||
limit:
|
||||
min: {x: 0, y: 0, z: 0}
|
||||
max: {x: 0, y: 0, z: 0}
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
length: 0
|
||||
modified: 0
|
||||
skeleton:
|
||||
- name: Robot Kyle(Clone)
|
||||
parentName:
|
||||
position: {x: 0, y: 0, z: 0}
|
||||
rotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Robot2
|
||||
parentName: Robot Kyle(Clone)
|
||||
position: {x: -0, y: 0, z: 0}
|
||||
rotation: {x: 0, y: -0, z: -0, w: 1}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Root
|
||||
parentName: Robot Kyle(Clone)
|
||||
position: {x: -2.1878564e-33, y: 1.0628308, z: 0.035129853}
|
||||
rotation: {x: 0.47294456, y: -0.52566475, z: -0.47294456, w: 0.52566475}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Ribs
|
||||
parentName: Root
|
||||
position: {x: -0.08024527, y: 0.00062167255, z: -9.82317e-18}
|
||||
rotation: {x: 0, y: -0, z: -0.009375348, w: 0.9999561}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Neck
|
||||
parentName: Ribs
|
||||
position: {x: -0.39539942, y: 1.2878587e-16, z: -8.9015506e-17}
|
||||
rotation: {x: 0, y: -0, z: -0.15122359, w: 0.9884996}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Head
|
||||
parentName: Neck
|
||||
position: {x: -0.079593115, y: 0, z: -2.0962138e-17}
|
||||
rotation: {x: 0, y: -0, z: -0, w: 1}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Left_Shoulder_Joint_01
|
||||
parentName: Ribs
|
||||
position: {x: -0.24796544, y: -0.018968333, z: 0.13130726}
|
||||
rotation: {x: -0.41058227, y: 0.44783446, z: 0.53675634, w: 0.5854563}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Left_Upper_Arm_Joint_01
|
||||
parentName: Left_Shoulder_Joint_01
|
||||
position: {x: -0.06358527, y: 0, z: -3.1086245e-17}
|
||||
rotation: {x: 0.081057265, y: 0.122538865, z: 0.08575687, w: 0.9854237}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Left_Forearm_Joint_01
|
||||
parentName: Left_Upper_Arm_Joint_01
|
||||
position: {x: -0.2383711, y: 0.03532467, z: -0.0012605645}
|
||||
rotation: {x: -0.0022793487, y: -0.041071136, z: -0.52682143, w: 0.84898007}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Left_Wrist_Joint_01
|
||||
parentName: Left_Forearm_Joint_01
|
||||
position: {x: -0.17692582, y: -0.24830171, z: 0.04193508}
|
||||
rotation: {x: -0.0027681005, y: 0.008098092, z: 0.46268028, w: 0.88648397}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Left_Index_Finger_Joint_01a
|
||||
parentName: Left_Wrist_Joint_01
|
||||
position: {x: -0.07013222, y: 0.012475326, z: 0.025505245}
|
||||
rotation: {x: 0.0102327885, y: 0.006961243, z: -0.0086652385, w: 0.99988586}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Left_Index_Finger_Joint_01b
|
||||
parentName: Left_Index_Finger_Joint_01a
|
||||
position: {x: -0.04053395, y: -2.3314683e-17, z: 9.922638e-19}
|
||||
rotation: {x: 0.0007113588, y: 0.0004798609, z: 0.011196686, w: 0.999937}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Left_Index_Finger_Joint_01c
|
||||
parentName: Left_Index_Finger_Joint_01b
|
||||
position: {x: -0.02294514, y: -3.190986e-16, z: 9.775166e-18}
|
||||
rotation: {x: -0.011016605, y: -0.0002521592, z: -0.022881629, w: 0.9996775}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Left_Middle_Finger_Joint_01a
|
||||
parentName: Left_Wrist_Joint_01
|
||||
position: {x: -0.071809866, y: 0.012475326, z: 0.005054819}
|
||||
rotation: {x: 0.010241757, y: 0.0067218435, z: -0.008704112, w: 0.9998871}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Left_Middle_Finger_Joint_01b
|
||||
parentName: Left_Middle_Finger_Joint_01a
|
||||
position: {x: -0.044052828, y: 2.220446e-18, z: 1.3147821e-18}
|
||||
rotation: {x: 0.00064981356, y: 0.00044095775, z: 0.010304518, w: 0.9999466}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Left_Middle_Finger_Joint_01c
|
||||
parentName: Left_Middle_Finger_Joint_01b
|
||||
position: {x: -0.024933377, y: 1.4801235e-16, z: -4.9960034e-18}
|
||||
rotation: {x: -0.010956354, y: -0.00023076385, z: -0.021056168, w: 0.99971825}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Left_Ring_Finger_Joint_01a
|
||||
parentName: Left_Wrist_Joint_01
|
||||
position: {x: -0.072257206, y: 0.012475326, z: -0.014861824}
|
||||
rotation: {x: 0.010226074, y: 0.007131046, z: -0.008639378, w: 0.99988496}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Left_Ring_Finger_Joint_01b
|
||||
parentName: Left_Ring_Finger_Joint_01a
|
||||
position: {x: -0.038333587, y: -2.4980017e-18, z: 4.4126392e-18}
|
||||
rotation: {x: 0.0007561775, y: 0.00050791446, z: 0.011838988, w: 0.99992955}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Left_Ring_Finger_Joint_01c
|
||||
parentName: Left_Ring_Finger_Joint_01b
|
||||
position: {x: -0.021700656, y: -6.477451e-17, z: 8.274631e-18}
|
||||
rotation: {x: -0.011060424, y: -0.000267697, z: -0.024194574, w: 0.99964607}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Left_Pinky_Finger_Joint_01a
|
||||
parentName: Left_Wrist_Joint_01
|
||||
position: {x: -0.07212005, y: 0.012475326, z: -0.03323619}
|
||||
rotation: {x: 0.010191488, y: 0.007908018, z: -0.008532881, w: 0.99988043}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Left_Pinky_Finger_Joint_01b
|
||||
parentName: Left_Pinky_Finger_Joint_01a
|
||||
position: {x: -0.030515512, y: -3.1502578e-17, z: 2.4720094e-18}
|
||||
rotation: {x: 0.0009738356, y: 0.00064097386, z: 0.014862133, w: 0.9998889}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Left_Pinky_Finger_Joint_01c
|
||||
parentName: Left_Pinky_Finger_Joint_01b
|
||||
position: {x: -0.017283713, y: -3.8666223e-16, z: 1.5274239e-17}
|
||||
rotation: {x: -0.011272594, y: -0.00034267167, z: -0.030382684, w: 0.9994747}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Left_Thumb_Joint_01a
|
||||
parentName: Left_Wrist_Joint_01
|
||||
position: {x: -0.046887316, y: -0.004865311, z: 0.046988335}
|
||||
rotation: {x: 0.38158315, y: 0.3811849, z: -0.19772215, w: 0.8185343}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Left_Thumb_Joint_01b
|
||||
parentName: Left_Thumb_Joint_01a
|
||||
position: {x: -0.028778248, y: -0.0016480584, z: -0.002403863}
|
||||
rotation: {x: -0.42036253, y: -0.37180415, z: 0.08352769, w: 0.8234563}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Right_Shoulder_Joint_01
|
||||
parentName: Ribs
|
||||
position: {x: -0.24796993, y: -0.01896791, z: -0.13130699}
|
||||
rotation: {x: 0.44783446, y: 0.41058227, z: -0.5854563, w: 0.53675634}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Right_Upper_Arm_Joint_01
|
||||
parentName: Right_Shoulder_Joint_01
|
||||
position: {x: 0.063585564, y: 2.842171e-16, z: -0.000000039259945}
|
||||
rotation: {x: -0.062006928, y: 0.097105965, z: 0.020601885, w: 0.9931269}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Right_Forearm_Joint_01
|
||||
parentName: Right_Upper_Arm_Joint_01
|
||||
position: {x: 0.24062023, y: 0.0051437393, z: -0.012117967}
|
||||
rotation: {x: 0.78327316, y: 0.011671044, z: 0.0032698219, w: 0.6215595}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Right_Wrist_Joint_01
|
||||
parentName: Right_Forearm_Joint_01
|
||||
position: {x: 0.30588374, y: -0.03317292, z: 0.007066546}
|
||||
rotation: {x: -0.7051211, y: -0.0082418835, z: 0.012901615, w: 0.70892155}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Right_Index_Finger_Joint_01a
|
||||
parentName: Right_Wrist_Joint_01
|
||||
position: {x: 0.06940201, y: -0.013847475, z: -0.026764035}
|
||||
rotation: {x: 0.010311665, y: 0.015860721, z: -0.018616108, w: 0.99964774}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Right_Index_Finger_Joint_01b
|
||||
parentName: Right_Index_Finger_Joint_01a
|
||||
position: {x: 0.04053422, y: -0.0000009354332, z: 0.000000022560922}
|
||||
rotation: {x: 0.0007113588, y: 0.0004798609, z: 0.011196686, w: 0.999937}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Right_Index_Finger_Joint_01c
|
||||
parentName: Right_Index_Finger_Joint_01b
|
||||
position: {x: 0.022944802, y: -0.00000007977574, z: -0.00000007166869}
|
||||
rotation: {x: -0.011016605, y: -0.0002521592, z: -0.022881629, w: 0.9996775}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Right_Middle_Finger_Joint_01a
|
||||
parentName: Right_Wrist_Joint_01
|
||||
position: {x: 0.07144747, y: -0.013888802, z: -0.0063472134}
|
||||
rotation: {x: 0.010317507, y: 0.015625784, z: -0.01867199, w: 0.9996503}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Right_Middle_Finger_Joint_01b
|
||||
parentName: Right_Middle_Finger_Joint_01a
|
||||
position: {x: 0.044053018, y: 0.0000006337014, z: -0.000000019575731}
|
||||
rotation: {x: 0.00064981356, y: 0.00044095775, z: 0.010304518, w: 0.9999466}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Right_Middle_Finger_Joint_01c
|
||||
parentName: Right_Middle_Finger_Joint_01b
|
||||
position: {x: 0.024932733, y: -0.00000037860835, z: 0.000000067108736}
|
||||
rotation: {x: -0.010956354, y: -0.00023076385, z: -0.021056168, w: 0.99971825}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Right_Ring_Finger_Joint_01a
|
||||
parentName: Right_Wrist_Joint_01
|
||||
position: {x: 0.07225248, y: -0.0139042325, z: 0.013558211}
|
||||
rotation: {x: 0.010306568, y: 0.016033323, z: -0.018600041, w: 0.99964535}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Right_Ring_Finger_Joint_01b
|
||||
parentName: Right_Ring_Finger_Joint_01a
|
||||
position: {x: 0.03833457, y: -0.00000014894434, z: 0.000000029383655}
|
||||
rotation: {x: 0.0007561775, y: 0.00050791446, z: 0.011838988, w: 0.99992955}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Right_Ring_Finger_Joint_01c
|
||||
parentName: Right_Ring_Finger_Joint_01b
|
||||
position: {x: 0.02170031, y: 0.00000020217867, z: -0.00000009377064}
|
||||
rotation: {x: -0.011060424, y: -0.000267697, z: -0.024194574, w: 0.99964607}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Right_Pinky_Finger_Joint_01a
|
||||
parentName: Right_Wrist_Joint_01
|
||||
position: {x: 0.07244643, y: -0.013907843, z: 0.031932004}
|
||||
rotation: {x: 0.010280791, y: 0.016810553, z: -0.018492986, w: 0.9996348}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Right_Pinky_Finger_Joint_01b
|
||||
parentName: Right_Pinky_Finger_Joint_01a
|
||||
position: {x: 0.030516144, y: -0.0000000478116, z: 0.000000060660284}
|
||||
rotation: {x: 0.0009738356, y: 0.00064097386, z: 0.014862133, w: 0.9998889}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Right_Pinky_Finger_Joint_01c
|
||||
parentName: Right_Pinky_Finger_Joint_01b
|
||||
position: {x: 0.017282948, y: -0.00000019535615, z: 0.000000014650439}
|
||||
rotation: {x: -0.011272594, y: -0.00034267167, z: -0.030382684, w: 0.9994747}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Right_Thumb_Joint_01a
|
||||
parentName: Right_Wrist_Joint_01
|
||||
position: {x: 0.046120938, y: 0.0039559877, z: -0.04782508}
|
||||
rotation: {x: 0.38360545, y: 0.38477314, z: -0.20918508, w: 0.81304246}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Right_Thumb_Joint_01b
|
||||
parentName: Right_Thumb_Joint_01a
|
||||
position: {x: 0.028778402, y: 0.0016480286, z: 0.0024040877}
|
||||
rotation: {x: 0.12274438, y: -0.08501493, z: 0.3184496, w: 0.9361069}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Hip
|
||||
parentName: Root
|
||||
position: {x: 0.028992068, y: -0.0025938721, z: 1.22991095e-17}
|
||||
rotation: {x: 0.037740186, y: 0.9992876, z: 5.5119633e-17, w: 1.6300862e-16}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Left_Thigh_Joint_01
|
||||
parentName: Hip
|
||||
position: {x: -0.12213361, y: 0.011331997, z: -0.068905555}
|
||||
rotation: {x: 0.9957005, y: 0.09263137, z: 6.7376925e-17, w: 7.2423885e-16}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Left_Knee_Joint_01
|
||||
parentName: Left_Thigh_Joint_01
|
||||
position: {x: -0.3717338, y: -0.0019966115, z: 0.07303617}
|
||||
rotation: {x: 4.4401062e-16, y: 8.354493e-18, z: 0.018812645, w: 0.99982303}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Left_Ankle_Joint_01
|
||||
parentName: Left_Knee_Joint_01
|
||||
position: {x: -0.43405014, y: -8.4273525e-18, z: -8.746468e-18}
|
||||
rotation: {x: 0.86925447, y: 0.49436495, z: 3.027112e-17, w: 5.3226485e-17}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Left_Toe_Joint_01
|
||||
parentName: Left_Ankle_Joint_01
|
||||
position: {x: -0.13787192, y: -2.6645352e-17, z: 3.5527136e-17}
|
||||
rotation: {x: -0.22729197, y: -0.66958076, z: -0.22729197, w: 0.66958076}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Right_Thigh_Joint_01
|
||||
parentName: Hip
|
||||
position: {x: -0.1221335, y: 0.011331954, z: 0.0689056}
|
||||
rotation: {x: 0, y: 0, z: 0.9957005, w: -0.09263137}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Right_Knee_Joint_01
|
||||
parentName: Right_Thigh_Joint_01
|
||||
position: {x: 0.3717341, y: -0.001996706, z: 0.073036395}
|
||||
rotation: {x: 0, y: -0, z: -0.018812645, w: 0.99982303}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Right_Ankle_Joint_01
|
||||
parentName: Right_Knee_Joint_01
|
||||
position: {x: 0.43404976, y: 0.00000007899868, z: -1.7763568e-17}
|
||||
rotation: {x: 0, y: -0, z: -0.49436495, w: 0.86925447}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
- name: Right_Toe_Joint_01
|
||||
parentName: Right_Ankle_Joint_01
|
||||
position: {x: 0.13787201, y: 0.00000006441087, z: -3.5527136e-17}
|
||||
rotation: {x: 0.000000012219929, y: -0.000000004148106, z: -0.3214394, w: 0.94693017}
|
||||
scale: {x: 1, y: 1, z: 1}
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
rootMotionBoneName:
|
||||
rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 1
|
||||
skeletonHasParents: 0
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
animationType: 3
|
||||
humanoidOversampling: 1
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Demo/Robot Kyle/Model/Robot Kyle.fbx
|
||||
uploadId: 199125
|
||||
51434
Assets/External/BioIK/Demo/Robot Kyle/Run.anim
vendored
Normal file
51434
Assets/External/BioIK/Demo/Robot Kyle/Run.anim
vendored
Normal file
File diff suppressed because it is too large
Load Diff
13
Assets/External/BioIK/Demo/Robot Kyle/Run.anim.meta
vendored
Normal file
13
Assets/External/BioIK/Demo/Robot Kyle/Run.anim.meta
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c5ab459bb60b3d74da77168ea36f5874
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Demo/Robot Kyle/Run.anim
|
||||
uploadId: 199125
|
||||
9
Assets/External/BioIK/Demo/Robot Kyle/Textures.meta
vendored
Normal file
9
Assets/External/BioIK/Demo/Robot Kyle/Textures.meta
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 42c22bb0419e24a189c6b9259d7bb2ce
|
||||
folderAsset: yes
|
||||
timeCreated: 1471426258
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/External/BioIK/Demo/Robot Kyle/Textures/Robot_Color.tga
(Stored with Git LFS)
vendored
Normal file
BIN
Assets/External/BioIK/Demo/Robot Kyle/Textures/Robot_Color.tga
(Stored with Git LFS)
vendored
Normal file
Binary file not shown.
64
Assets/External/BioIK/Demo/Robot Kyle/Textures/Robot_Color.tga.meta
vendored
Normal file
64
Assets/External/BioIK/Demo/Robot Kyle/Textures/Robot_Color.tga.meta
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0a0e8af2869fa45f78e25460db578482
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 7
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 1024
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -1
|
||||
wrapMode: -1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: -1
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Demo/Robot Kyle/Textures/Robot_Color.tga
|
||||
uploadId: 199125
|
||||
BIN
Assets/External/BioIK/Demo/Robot Kyle/Textures/Robot_Normal.tga
(Stored with Git LFS)
vendored
Normal file
BIN
Assets/External/BioIK/Demo/Robot Kyle/Textures/Robot_Normal.tga
(Stored with Git LFS)
vendored
Normal file
Binary file not shown.
64
Assets/External/BioIK/Demo/Robot Kyle/Textures/Robot_Normal.tga.meta
vendored
Normal file
64
Assets/External/BioIK/Demo/Robot Kyle/Textures/Robot_Normal.tga.meta
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 94c473c9137744d7eabd829f1150da8d
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 1
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 7
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 1024
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -1
|
||||
wrapMode: -1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 1
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Demo/Robot Kyle/Textures/Robot_Normal.tga
|
||||
uploadId: 199125
|
||||
9
Assets/External/BioIK/Demo/Scripts.meta
vendored
Normal file
9
Assets/External/BioIK/Demo/Scripts.meta
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a57c3c30e16c14b0f8386cd2459c4153
|
||||
folderAsset: yes
|
||||
timeCreated: 1502737624
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
83
Assets/External/BioIK/Demo/Scripts/CameraController.cs
vendored
Normal file
83
Assets/External/BioIK/Demo/Scripts/CameraController.cs
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
public class CameraController : MonoBehaviour {
|
||||
|
||||
public float Velocity = 5f;
|
||||
public float AngularVelocity = 5f;
|
||||
public float ZoomVelocity = 10;
|
||||
|
||||
public float Sensitivity = 1f;
|
||||
|
||||
private Vector2 MousePosition;
|
||||
private Vector2 LastMousePosition;
|
||||
private Vector3 DeltaRotation;
|
||||
|
||||
private Quaternion ZeroRotation;
|
||||
|
||||
void Awake() {
|
||||
ZeroRotation = transform.rotation;
|
||||
}
|
||||
|
||||
void Start() {
|
||||
MousePosition = GetNormalizedMousePosition();
|
||||
LastMousePosition = GetNormalizedMousePosition();
|
||||
}
|
||||
|
||||
void LateUpdate() {
|
||||
MousePosition = GetNormalizedMousePosition();
|
||||
|
||||
|
||||
if(EventSystem.current != null) {
|
||||
if(!Input.GetKey(KeyCode.Mouse0)) {
|
||||
EventSystem.current.SetSelectedGameObject(null);
|
||||
}
|
||||
if(EventSystem.current.currentSelectedGameObject == null) {
|
||||
UpdateCamera();
|
||||
}
|
||||
} else {
|
||||
UpdateCamera();
|
||||
}
|
||||
|
||||
LastMousePosition = MousePosition;
|
||||
}
|
||||
|
||||
private void UpdateCamera() {
|
||||
//Translation
|
||||
Vector3 direction = Vector3.zero;
|
||||
if(Input.GetKey(KeyCode.A)) {
|
||||
direction.x -= 1f;
|
||||
}
|
||||
if(Input.GetKey(KeyCode.D)) {
|
||||
direction.x += 1f;
|
||||
}
|
||||
if(Input.GetKey(KeyCode.W)) {
|
||||
direction.z += 1f;
|
||||
}
|
||||
if(Input.GetKey(KeyCode.S)) {
|
||||
direction.z -= 1f;
|
||||
}
|
||||
transform.position += Velocity*Sensitivity*Time.deltaTime*(transform.rotation*direction);
|
||||
|
||||
//Zoom
|
||||
if(Input.mouseScrollDelta.y != 0) {
|
||||
transform.position += ZoomVelocity*Sensitivity*Time.deltaTime*Input.mouseScrollDelta.y*transform.forward;
|
||||
}
|
||||
|
||||
//Rotation
|
||||
MousePosition = GetNormalizedMousePosition();
|
||||
if(Input.GetMouseButton(0)) {
|
||||
DeltaRotation += 1000f*AngularVelocity*Sensitivity*Time.deltaTime*new Vector3(GetNormalizedDeltaMousePosition().x, GetNormalizedDeltaMousePosition().y, 0f);
|
||||
transform.rotation = ZeroRotation * Quaternion.Euler(-DeltaRotation.y, DeltaRotation.x, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
private Vector2 GetNormalizedMousePosition() {
|
||||
Vector2 ViewPortPosition = Camera.main.ScreenToViewportPoint(Input.mousePosition);
|
||||
return new Vector2(ViewPortPosition.x, ViewPortPosition.y);
|
||||
}
|
||||
|
||||
private Vector2 GetNormalizedDeltaMousePosition() {
|
||||
return MousePosition - LastMousePosition;
|
||||
}
|
||||
}
|
||||
19
Assets/External/BioIK/Demo/Scripts/CameraController.cs.meta
vendored
Normal file
19
Assets/External/BioIK/Demo/Scripts/CameraController.cs.meta
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ec5cd0ae42fe5415e8791ead88a7faa8
|
||||
timeCreated: 1480175642
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Demo/Scripts/CameraController.cs
|
||||
uploadId: 199125
|
||||
84
Assets/External/BioIK/Demo/Scripts/Demo.cs
vendored
Normal file
84
Assets/External/BioIK/Demo/Scripts/Demo.cs
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
public class Demo : MonoBehaviour {
|
||||
|
||||
public BioIK.BioIK[] Models;
|
||||
|
||||
public GameObject[] IgnoreRealistic;
|
||||
|
||||
public BioIK.MotionType MotionType = BioIK.MotionType.Instantaneous;
|
||||
|
||||
public Dropdown Dropdown;
|
||||
|
||||
private BioIK.BioIK ModelCharacter = null;
|
||||
private GameObject ModelGO = null;
|
||||
|
||||
void Start() {
|
||||
LoadModel(1);
|
||||
}
|
||||
|
||||
public void LoadModel(int index) {
|
||||
index -= 1;
|
||||
if(Models.Length > index) {
|
||||
if(ModelGO != null) {
|
||||
ModelGO.SetActive(false);
|
||||
}
|
||||
ModelCharacter = Models[index];
|
||||
ModelGO = ModelCharacter.transform.root.gameObject;
|
||||
ModelGO.SetActive(true);
|
||||
UpdateMotionType();
|
||||
}
|
||||
}
|
||||
|
||||
public bool Ignore(GameObject go) {
|
||||
for(int i=0; i<IgnoreRealistic.Length; i++) {
|
||||
if(IgnoreRealistic[i] == go) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void UpdateMotionType() {
|
||||
MotionType = Dropdown.value == 0 ? BioIK.MotionType.Instantaneous : BioIK.MotionType.Realistic;
|
||||
if(Ignore(ModelGO)) {
|
||||
ModelCharacter.MotionType = BioIK.MotionType.Instantaneous;
|
||||
} else {
|
||||
ModelCharacter.MotionType = MotionType;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
[CustomEditor(typeof(Demo))]
|
||||
public class DemoEditor : Editor {
|
||||
|
||||
public Demo Target;
|
||||
|
||||
void Awake() {
|
||||
Target = (Demo)target;
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI() {
|
||||
DrawDefaultInspector();
|
||||
|
||||
if(GUILayout.Button("Enable Threading")) {
|
||||
SetThreading(true);
|
||||
}
|
||||
if(GUILayout.Button("Disable Threading")) {
|
||||
SetThreading(false);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetThreading(bool value) {
|
||||
for(int i=0; i<Target.Models.Length; i++) {
|
||||
Target.Models[i].SetThreading(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
19
Assets/External/BioIK/Demo/Scripts/Demo.cs.meta
vendored
Normal file
19
Assets/External/BioIK/Demo/Scripts/Demo.cs.meta
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9a45b22ed52f640b5902bb18962454f0
|
||||
timeCreated: 1484965999
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Demo/Scripts/Demo.cs
|
||||
uploadId: 199125
|
||||
62
Assets/External/BioIK/Demo/Scripts/MouseDrag.cs
vendored
Normal file
62
Assets/External/BioIK/Demo/Scripts/MouseDrag.cs
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
public class MouseDrag : MonoBehaviour {
|
||||
|
||||
public static bool Translate = true;
|
||||
public static bool Rotate = false;
|
||||
|
||||
public bool InformEventSystem = true;
|
||||
|
||||
public float Sensitivity = 10f;
|
||||
|
||||
private Vector2 LastMousePosition;
|
||||
|
||||
void Awake() {
|
||||
|
||||
}
|
||||
|
||||
void Start() {
|
||||
LastMousePosition = GetNormalizedMousePosition();
|
||||
}
|
||||
|
||||
void Update() {
|
||||
if(Input.GetKeyDown(KeyCode.W)) {
|
||||
Translate = true;
|
||||
Rotate = false;
|
||||
}
|
||||
if(Input.GetKeyDown(KeyCode.E)) {
|
||||
Translate = false;
|
||||
Rotate = true;
|
||||
}
|
||||
LastMousePosition = GetNormalizedMousePosition();
|
||||
}
|
||||
|
||||
void OnMouseDrag() {
|
||||
if(InformEventSystem) {
|
||||
if(EventSystem.current != null) {
|
||||
EventSystem.current.SetSelectedGameObject(gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
if(Translate) {
|
||||
float distance_to_screen = Camera.main.WorldToScreenPoint(gameObject.transform.position).z;
|
||||
transform.position = Camera.main.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, distance_to_screen ));
|
||||
}
|
||||
|
||||
if(Rotate) {
|
||||
Vector2 deltaMousePosition = GetNormalizedDeltaMousePosition();
|
||||
transform.Rotate(Camera.main.transform.right, 1000f*Sensitivity*Time.deltaTime*deltaMousePosition.y, Space.World);
|
||||
transform.Rotate(Camera.main.transform.up, -1000f*Sensitivity*Time.deltaTime*deltaMousePosition.x, Space.World);
|
||||
}
|
||||
}
|
||||
|
||||
private Vector2 GetNormalizedMousePosition() {
|
||||
Vector2 ViewPortPosition = Camera.main.ScreenToViewportPoint(Input.mousePosition);
|
||||
return new Vector2(ViewPortPosition.x, ViewPortPosition.y);
|
||||
}
|
||||
|
||||
private Vector2 GetNormalizedDeltaMousePosition() {
|
||||
return GetNormalizedMousePosition() - LastMousePosition;
|
||||
}
|
||||
}
|
||||
19
Assets/External/BioIK/Demo/Scripts/MouseDrag.cs.meta
vendored
Normal file
19
Assets/External/BioIK/Demo/Scripts/MouseDrag.cs.meta
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 73b8ecaddbb6a4dd1b5ff0d96cce8ff2
|
||||
timeCreated: 1480175642
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Demo/Scripts/MouseDrag.cs
|
||||
uploadId: 199125
|
||||
13
Assets/External/BioIK/Demo/Scripts/Rotate.cs
vendored
Normal file
13
Assets/External/BioIK/Demo/Scripts/Rotate.cs
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Rotate : MonoBehaviour {
|
||||
|
||||
public float Speed = 100f;
|
||||
|
||||
void Update () {
|
||||
transform.rotation *= Quaternion.Euler(0f, -Speed*Time.deltaTime, 0f);
|
||||
}
|
||||
|
||||
}
|
||||
19
Assets/External/BioIK/Demo/Scripts/Rotate.cs.meta
vendored
Normal file
19
Assets/External/BioIK/Demo/Scripts/Rotate.cs.meta
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b3beb8362c00a430284276d3f715f4a9
|
||||
timeCreated: 1496005179
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Demo/Scripts/Rotate.cs
|
||||
uploadId: 199125
|
||||
9
Assets/External/BioIK/Demo/Textures.meta
vendored
Normal file
9
Assets/External/BioIK/Demo/Textures.meta
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 49eb1eabbfcdf41d9a063831805118d0
|
||||
folderAsset: yes
|
||||
timeCreated: 1502737624
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/External/BioIK/Demo/Textures/Steel.jpg
(Stored with Git LFS)
vendored
Normal file
BIN
Assets/External/BioIK/Demo/Textures/Steel.jpg
(Stored with Git LFS)
vendored
Normal file
Binary file not shown.
66
Assets/External/BioIK/Demo/Textures/Steel.jpg.meta
vendored
Normal file
66
Assets/External/BioIK/Demo/Textures/Steel.jpg.meta
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9c0246158fcc74063aaeec82da301c35
|
||||
timeCreated: 1471565781
|
||||
licenseType: Store
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 7
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -1
|
||||
wrapMode: -1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: -1
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Demo/Textures/Steel.jpg
|
||||
uploadId: 199125
|
||||
9
Assets/External/BioIK/Editor.meta
vendored
Normal file
9
Assets/External/BioIK/Editor.meta
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c9a05fcdd22734eef879bc52a8a90184
|
||||
folderAsset: yes
|
||||
timeCreated: 1502291676
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
840
Assets/External/BioIK/Editor/BioIKEditor.cs
vendored
Normal file
840
Assets/External/BioIK/Editor/BioIKEditor.cs
vendored
Normal file
@ -0,0 +1,840 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
namespace BioIK {
|
||||
[CustomEditor(typeof(BioIK))]
|
||||
public class BioIKEditor : Editor {
|
||||
|
||||
public BioIK Target;
|
||||
public Transform TargetTransform;
|
||||
|
||||
private Color Color1 = Color.white;
|
||||
//private Color Color2 = Color.black;
|
||||
private Color Color3 = new Color(0.6f, 0.6f, 0.6f, 1f);
|
||||
private Color Color4 = new Color(0.3f, 0.8f, 0.8f, 1f);
|
||||
private Color Color5 = new Color(1f, 0.7f, 0.3f, 1f);
|
||||
private Color Color6 = new Color(0.9f, 0.3f, 0.9f, 1f);
|
||||
private Color Color7 = new Color(1.0f, 0.3f, 0.3f, 1f);
|
||||
private Color Color8 = new Color(0.3f, 0.6f, 0.6f, 1f);
|
||||
private Color Color9 = new Color(0.4f, 0.9f, 0.4f, 1f);
|
||||
//private Color Color10 = new Color(1f, 0.5f, 1f, 1f);
|
||||
private Color Color11 = new Color(0.3f, 0.3f, 0.3f, 1f);
|
||||
//private Color Color12 = new Color(0.9f, 0.6f, 0.9f, 1f);
|
||||
private Color Color13 = new Color(0.5f, 0.5f, 0.5f, 1f);
|
||||
private Color Color14 = new Color(0.75f, 0.75f, 0.75f, 1f);
|
||||
|
||||
private bool ChosingObjectiveType = false;
|
||||
|
||||
private bool IsPlaying = false;
|
||||
private bool IsEnabled = false;
|
||||
|
||||
private int DoF;
|
||||
|
||||
void Awake() {
|
||||
EditorApplication.playmodeStateChanged += PlaymodeStateChanged;
|
||||
Target = (BioIK)target;
|
||||
TargetTransform = Target.transform;
|
||||
Target.Refresh(false);
|
||||
DoF = 0;
|
||||
//MakeVisible(TargetTransform);
|
||||
//MakeInvisible(TargetTransform);
|
||||
}
|
||||
|
||||
void OnEnable() {
|
||||
IsEnabled = true;
|
||||
}
|
||||
|
||||
void OnDisable() {
|
||||
IsEnabled = false;
|
||||
}
|
||||
|
||||
private void MakeVisible(Transform t) {
|
||||
if(t.GetComponent<BioSegment>()) {
|
||||
t.GetComponent<BioSegment>().hideFlags = HideFlags.None;
|
||||
}
|
||||
foreach(BioObjective o in t.GetComponents<BioObjective>()) {
|
||||
o.hideFlags = HideFlags.None;
|
||||
}
|
||||
if(t.GetComponent<BioJoint>()) {
|
||||
t.GetComponent<BioJoint>().hideFlags = HideFlags.None;
|
||||
}
|
||||
for(int i=0; i<t.childCount; i++) {
|
||||
MakeVisible(t.GetChild(i));
|
||||
}
|
||||
}
|
||||
|
||||
private void MakeInvisible(Transform t) {
|
||||
if(t.GetComponent<BioSegment>()) {
|
||||
t.GetComponent<BioSegment>().hideFlags = HideFlags.HideInInspector;
|
||||
}
|
||||
foreach(BioObjective o in t.GetComponents<BioObjective>()) {
|
||||
o.hideFlags = HideFlags.HideInInspector;
|
||||
}
|
||||
if(t.GetComponent<BioJoint>()) {
|
||||
t.GetComponent<BioJoint>().hideFlags = HideFlags.HideInInspector;
|
||||
}
|
||||
for(int i=0; i<t.childCount; i++) {
|
||||
MakeInvisible(t.GetChild(i));
|
||||
}
|
||||
}
|
||||
|
||||
void OnDestroy() {
|
||||
if(
|
||||
Target == null
|
||||
&&
|
||||
TargetTransform != null
|
||||
&&
|
||||
!IsPlaying
|
||||
&&
|
||||
!IsEnabled
|
||||
&&
|
||||
!EditorApplication.isPlayingOrWillChangePlaymode
|
||||
) {
|
||||
Utility.Cleanup(TargetTransform);
|
||||
}
|
||||
}
|
||||
|
||||
private void PlaymodeStateChanged() {
|
||||
IsPlaying = Application.isPlaying;
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI() {
|
||||
Undo.RecordObject(Target, Target.name);
|
||||
|
||||
SetGUIColor(Color3);
|
||||
using(new EditorGUILayout.VerticalScope ("Button")) {
|
||||
SetGUIColor(Color5);
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.FlexibleSpace();
|
||||
EditorGUILayout.HelpBox(" Settings ", MessageType.None);
|
||||
GUILayout.FlexibleSpace();
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
//SetGUIColor(Color1);
|
||||
//Target.SolveInEditMode = EditorGUILayout.Toggle("Solve In Edit Mode", Target.SolveInEditMode);
|
||||
SetGUIColor(Color1);
|
||||
Target.SetThreading(EditorGUILayout.Toggle("Use Threading", Target.GetThreading()));
|
||||
SetGUIColor(Color1);
|
||||
Target.SetGenerations(EditorGUILayout.IntField("Generations", Target.GetGenerations()));
|
||||
SetGUIColor(Color1);
|
||||
Target.SetPopulationSize(EditorGUILayout.IntField("Individuals", Target.GetPopulationSize()));
|
||||
SetGUIColor(Color1);
|
||||
Target.SetElites(EditorGUILayout.IntField("Elites", Target.GetElites()));
|
||||
SetGUIColor(Color1);
|
||||
Target.Smoothing = EditorGUILayout.Slider("Smoothing", Target.Smoothing, 0f, 1f);
|
||||
SetGUIColor(Color1);
|
||||
Target.AnimationWeight = EditorGUILayout.Slider("Animation Weight", Target.AnimationWeight, 0f, 1f);
|
||||
SetGUIColor(Color1);
|
||||
Target.AnimationBlend = EditorGUILayout.Slider("Animation Blend", Target.AnimationBlend, 0f, 1f);
|
||||
SetGUIColor(Color1);
|
||||
Target.MotionType = (MotionType)EditorGUILayout.EnumPopup("Motion Type", Target.MotionType);
|
||||
if(Target.MotionType == MotionType.Realistic) {
|
||||
Target.MaximumVelocity = EditorGUILayout.FloatField("Maximum Velocity", Target.MaximumVelocity);
|
||||
Target.MaximumAcceleration = EditorGUILayout.FloatField("Maximum Acceleration", Target.MaximumAcceleration);
|
||||
}
|
||||
SetGUIColor(Color1);
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.FlexibleSpace();
|
||||
if(GUILayout.Button(" Reset Posture ")) {
|
||||
Target.ResetPosture(Target.Root);
|
||||
}
|
||||
GUILayout.FlexibleSpace();
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
SetGUIColor(Color3);
|
||||
using(new EditorGUILayout.VerticalScope ("Button")) {
|
||||
SetGUIColor(Color5);
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.FlexibleSpace();
|
||||
EditorGUILayout.HelpBox(" Character ", MessageType.None);
|
||||
GUILayout.FlexibleSpace();
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
//SetGUIColor(Color5);
|
||||
//EditorGUILayout.HelpBox("Degree of Freedom: " + new Model(Target).GetDoF() + " / " + DoF, MessageType.None);
|
||||
|
||||
int maxIndent = 0;
|
||||
ComputeMaxIndentLevel(Target.transform, 0, ref maxIndent);
|
||||
|
||||
Target.Scroll = EditorGUILayout.BeginScrollView(Target.Scroll, GUILayout.Height(500f));
|
||||
InspectBody(Target.FindSegment(Target.transform), 0, maxIndent);
|
||||
EditorGUILayout.EndScrollView();
|
||||
}
|
||||
|
||||
SetGUIColor(Color1);
|
||||
if(Target != null) {
|
||||
EditorUtility.SetDirty(Target);
|
||||
}
|
||||
}
|
||||
|
||||
private void InspectBody(BioSegment segment, int indent, int maxIndent) {
|
||||
SetGUIColor(Color11);
|
||||
using(new EditorGUILayout.VerticalScope ("Box")) {
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
if(Target.SelectedSegment != segment) {
|
||||
if(indent > 0) {
|
||||
SetGUIColor(Color13);
|
||||
using(new EditorGUILayout.VerticalScope ("Box")) {
|
||||
int width = 10*(indent-1);
|
||||
EditorGUILayout.LabelField("", GUILayout.Width(width));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GUI.skin.button.alignment = TextAnchor.MiddleLeft;
|
||||
if(segment == Target.SelectedSegment) {
|
||||
SetGUIColor(Color5);
|
||||
} else {
|
||||
SetGUIColor(Color.Lerp(Color4, Color8, (float)indent / (float)maxIndent));
|
||||
}
|
||||
if(GUILayout.Button(segment.Transform.name, GUILayout.Height(25f), GUILayout.ExpandWidth(true))) {
|
||||
if(Target.SelectedSegment == segment) {
|
||||
Target.SelectedSegment = null;
|
||||
ChosingObjectiveType = false;
|
||||
} else {
|
||||
Target.SelectedSegment = segment;
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
if(Target.SelectedSegment == segment) {
|
||||
InspectSegment(segment);
|
||||
} else {
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.FlexibleSpace();
|
||||
if(segment.Joint != null) {
|
||||
SetGUIColor(Color6);
|
||||
GUILayout.Box(" Joint ");
|
||||
}
|
||||
foreach(BioObjective objective in segment.Objectives) {
|
||||
SetGUIColor(Color9);
|
||||
GUILayout.Box(" " + objective.GetObjectiveType().ToString() + " ");
|
||||
}
|
||||
GUILayout.FlexibleSpace();
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
}
|
||||
|
||||
for(int i=0; i<segment.Childs.Length; i++) {
|
||||
InspectBody(segment.Childs[i], indent+1, maxIndent);
|
||||
}
|
||||
}
|
||||
|
||||
private void InspectSegment(BioSegment segment) {
|
||||
Undo.RecordObject(segment, segment.name);
|
||||
|
||||
SetGUIColor(Color13);
|
||||
using(new EditorGUILayout.VerticalScope ("Box")) {
|
||||
|
||||
SetGUIColor(Color4);
|
||||
Vector3 A = segment.Parent == null ? segment.GetAnchoredPosition() : segment.Parent.GetAnchoredPosition();
|
||||
Vector3 B = segment.GetAnchoredPosition();
|
||||
EditorGUILayout.HelpBox("Link Length: " + Vector3.Distance(A,B), MessageType.None);
|
||||
|
||||
SetGUIColor(Color6);
|
||||
using(new EditorGUILayout.VerticalScope ("Box")) {
|
||||
if(segment.Joint == null) {
|
||||
GUI.skin.button.alignment = TextAnchor.MiddleCenter;
|
||||
SetGUIColor(Color1);
|
||||
if(GUILayout.Button("Add Joint")) {
|
||||
segment.AddJoint();
|
||||
}
|
||||
} else {
|
||||
InspectJoint(segment.Joint);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for(int i=0; i<segment.Objectives.Length; i++) {
|
||||
SetGUIColor(Color13);
|
||||
using(new EditorGUILayout.VerticalScope ("Box")) {
|
||||
|
||||
SetGUIColor(Color9);
|
||||
using(new EditorGUILayout.VerticalScope ("Box")) {
|
||||
InspectObjective(segment.Objectives[i]);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
SetGUIColor(Color13);
|
||||
using(new EditorGUILayout.VerticalScope ("Box")) {
|
||||
|
||||
SetGUIColor(Color9);
|
||||
using(new EditorGUILayout.VerticalScope ("Box")) {
|
||||
|
||||
GUI.skin.button.alignment = TextAnchor.MiddleCenter;
|
||||
SetGUIColor(ChosingObjectiveType ? Color14 : Color1);
|
||||
if(GUILayout.Button("Add Objective")) {
|
||||
ChosingObjectiveType = !ChosingObjectiveType;
|
||||
}
|
||||
if(ChosingObjectiveType) {
|
||||
SetGUIColor(Color8);
|
||||
using(new EditorGUILayout.VerticalScope ("Box")) {
|
||||
int count = System.Enum.GetValues(typeof(ObjectiveType)).Length;
|
||||
string[] names = System.Enum.GetNames(typeof(ObjectiveType));
|
||||
for(int i=0; i<count; i++) {
|
||||
SetGUIColor(Color1);
|
||||
if(GUILayout.Button(names[i])) {
|
||||
ChosingObjectiveType = false;
|
||||
segment.AddObjective((ObjectiveType)i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(segment != null) {
|
||||
EditorUtility.SetDirty(segment);
|
||||
}
|
||||
}
|
||||
|
||||
private void InspectJoint(BioJoint joint) {
|
||||
Undo.RecordObject(joint, joint.name);
|
||||
|
||||
SetGUIColor(Color13);
|
||||
using(new EditorGUILayout.VerticalScope ("Box")) {
|
||||
SetGUIColor(Color5);
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.FlexibleSpace();
|
||||
EditorGUILayout.HelpBox(" Joint ", MessageType.None);
|
||||
GUILayout.FlexibleSpace();
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
SetGUIColor(Color1);
|
||||
joint.enabled = EditorGUILayout.Toggle("Enabled", joint.enabled);
|
||||
|
||||
SetGUIColor(Color4);
|
||||
EditorGUILayout.HelpBox("Geometry", MessageType.None);
|
||||
SetGUIColor(Color1);
|
||||
joint.JointType = (JointType)EditorGUILayout.EnumPopup("Joint Type", joint.JointType);
|
||||
SetGUIColor(Color1);
|
||||
joint.SetAnchor(EditorGUILayout.Vector3Field("Anchor", joint.GetAnchor()));
|
||||
SetGUIColor(Color1);
|
||||
joint.SetOrientation(EditorGUILayout.Vector3Field("Orientation", joint.GetOrientation()));
|
||||
SetGUIColor(Color4);
|
||||
EditorGUILayout.HelpBox("Default Frame", MessageType.None);
|
||||
SetGUIColor(Color1);
|
||||
Vector3 defaultPosition = EditorGUILayout.Vector3Field("Position", joint.GetDefaultPosition());
|
||||
SetGUIColor(Color1);
|
||||
Quaternion defaultRotation = Quaternion.Euler(EditorGUILayout.Vector3Field("Rotation", joint.GetDefaultRotation().eulerAngles));
|
||||
joint.SetDefaultFrame(defaultPosition, defaultRotation);
|
||||
|
||||
InspectMotion(joint.X, " X Motion ");
|
||||
InspectMotion(joint.Y, " Y Motion ");
|
||||
InspectMotion(joint.Z, " Z Motion ");
|
||||
|
||||
GUI.skin.button.alignment = TextAnchor.MiddleCenter;
|
||||
SetGUIColor(Color7);
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.FlexibleSpace();
|
||||
if(GUILayout.Button("Remove", GUILayout.Width(100f))) {
|
||||
joint.Remove();
|
||||
}
|
||||
GUILayout.FlexibleSpace();
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
if(joint != null) {
|
||||
joint.PrecaptureAnimation();
|
||||
joint.PostcaptureAnimation();
|
||||
joint.UpdateData();
|
||||
joint.ProcessMotion();
|
||||
EditorUtility.SetDirty(joint);
|
||||
}
|
||||
}
|
||||
|
||||
private void InspectMotion(BioJoint.Motion motion, string name) {
|
||||
SetGUIColor(Color8);
|
||||
using(new EditorGUILayout.VerticalScope ("Box")) {
|
||||
SetGUIColor(Color5);
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.FlexibleSpace();
|
||||
EditorGUILayout.HelpBox(name, MessageType.None);
|
||||
GUILayout.FlexibleSpace();
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
if(motion.IsEnabled()) {
|
||||
SetGUIColor(Color1);
|
||||
motion.Constrained = EditorGUILayout.Toggle("Constrained", motion.Constrained);
|
||||
if(motion.Constrained) {
|
||||
SetGUIColor(Color1);
|
||||
motion.SetLowerLimit(EditorGUILayout.DoubleField("Lower Limit", motion.GetLowerLimit()));
|
||||
SetGUIColor(Color1);
|
||||
motion.SetUpperLimit(EditorGUILayout.DoubleField("Upper Limit", motion.GetUpperLimit()));
|
||||
SetGUIColor(Color1);
|
||||
motion.SetTargetValue(EditorGUILayout.Slider("Target Value", (float)motion.GetTargetValue(), (float)motion.GetLowerLimit(), (float)motion.GetUpperLimit()));
|
||||
} else {
|
||||
SetGUIColor(Color1);
|
||||
motion.SetTargetValue(EditorGUILayout.DoubleField("Target Value", motion.GetTargetValue()));
|
||||
}
|
||||
|
||||
GUI.skin.button.alignment = TextAnchor.MiddleCenter;
|
||||
SetGUIColor(Color1);
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.FlexibleSpace();
|
||||
if(GUILayout.Button("Disable", GUILayout.Width(250f), GUILayout.Height(20f))) {
|
||||
motion.SetEnabled(false);
|
||||
}
|
||||
GUILayout.FlexibleSpace();
|
||||
GUILayout.EndHorizontal();
|
||||
} else {
|
||||
GUI.skin.button.alignment = TextAnchor.MiddleCenter;
|
||||
SetGUIColor(Color1);
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.FlexibleSpace();
|
||||
if(GUILayout.Button("Enable", GUILayout.Width(250f), GUILayout.Height(20f))) {
|
||||
motion.SetEnabled(true);
|
||||
}
|
||||
GUILayout.FlexibleSpace();
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void InspectObjective(BioObjective objective) {
|
||||
Undo.RecordObject(objective, objective.name);
|
||||
|
||||
SetGUIColor(Color13);
|
||||
using(new EditorGUILayout.VerticalScope ("Box")) {
|
||||
SetGUIColor(Color5);
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.FlexibleSpace();
|
||||
EditorGUILayout.HelpBox(" Objective (" + objective.GetObjectiveType().ToString() + ") ", MessageType.None);
|
||||
GUILayout.FlexibleSpace();
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
SetGUIColor(Color1);
|
||||
objective.enabled = EditorGUILayout.Toggle("Enabled", objective.enabled);
|
||||
|
||||
SetGUIColor(Color1);
|
||||
objective.Weight = EditorGUILayout.DoubleField("Weight", objective.Weight);
|
||||
|
||||
switch(objective.GetObjectiveType()) {
|
||||
case ObjectiveType.Position:
|
||||
InspectPosition((Position)objective);
|
||||
break;
|
||||
|
||||
case ObjectiveType.Orientation:
|
||||
InspectOrientation((Orientation)objective);
|
||||
break;
|
||||
|
||||
case ObjectiveType.LookAt:
|
||||
InspectLookAt((LookAt)objective);
|
||||
break;
|
||||
|
||||
case ObjectiveType.Distance:
|
||||
InspectDistance((Distance)objective);
|
||||
break;
|
||||
|
||||
case ObjectiveType.JointValue:
|
||||
InspectJointValue((JointValue)objective);
|
||||
break;
|
||||
|
||||
case ObjectiveType.Displacement:
|
||||
InspectDisplacement((Displacement)objective);
|
||||
break;
|
||||
|
||||
case ObjectiveType.Projection:
|
||||
InspectProjection((Projection)objective);
|
||||
break;
|
||||
}
|
||||
|
||||
GUI.skin.button.alignment = TextAnchor.MiddleCenter;
|
||||
SetGUIColor(Color7);
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.FlexibleSpace();
|
||||
if(GUILayout.Button("Remove", GUILayout.Width(100f))) {
|
||||
objective.Remove();
|
||||
}
|
||||
GUILayout.FlexibleSpace();
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
if(objective != null) {
|
||||
EditorUtility.SetDirty(objective);
|
||||
}
|
||||
}
|
||||
|
||||
private void InspectPosition(Position objective) {
|
||||
SetGUIColor(Color1);
|
||||
objective.SetTargetTransform(EditorGUILayout.ObjectField("Target Transform", objective.GetTargetTransform(), typeof(Transform), true) as Transform);
|
||||
SetGUIColor(Color1);
|
||||
objective.SetTargetPosition(EditorGUILayout.Vector3Field("Target Position", objective.GetTargetPosition()));
|
||||
SetGUIColor(Color1);
|
||||
objective.SetMaximumError(EditorGUILayout.DoubleField("Maximum Error", objective.GetMaximumError()));
|
||||
}
|
||||
|
||||
private void InspectOrientation(Orientation objective) {
|
||||
SetGUIColor(Color1);
|
||||
objective.SetTargetTransform(EditorGUILayout.ObjectField("Target Transform", objective.GetTargetTransform(), typeof(Transform), true) as Transform);
|
||||
SetGUIColor(Color1);
|
||||
objective.SetTargetRotation(EditorGUILayout.Vector3Field("Target Rotation", objective.GetTargetRotattion()));
|
||||
SetGUIColor(Color1);
|
||||
objective.SetMaximumError(EditorGUILayout.DoubleField("Maximum Error", objective.GetMaximumError()));
|
||||
}
|
||||
|
||||
private void InspectLookAt(LookAt objective) {
|
||||
SetGUIColor(Color1);
|
||||
objective.SetTargetTransform(EditorGUILayout.ObjectField("Target Transform", objective.GetTargetTransform(), typeof(Transform), true) as Transform);
|
||||
SetGUIColor(Color1);
|
||||
objective.SetTargetPosition(EditorGUILayout.Vector3Field("Target Position", objective.GetTargetPosition()));
|
||||
SetGUIColor(Color1);
|
||||
objective.SetViewingDirection(EditorGUILayout.Vector3Field("Viewing Direction", objective.GetViewingDirection()));
|
||||
SetGUIColor(Color1);
|
||||
objective.SetMaximumError(EditorGUILayout.DoubleField("Maximum Error", objective.GetMaximumError()));
|
||||
}
|
||||
|
||||
private void InspectDistance(Distance objective) {
|
||||
SetGUIColor(Color1);
|
||||
objective.SetRadius(EditorGUILayout.DoubleField("Radius", objective.GetRadius()));
|
||||
|
||||
SetGUIColor(Color1);
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.FlexibleSpace();
|
||||
EditorGUILayout.HelpBox("Points", MessageType.None);
|
||||
GUILayout.FlexibleSpace();
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
DistancePoint[] points = objective.GetPoints();
|
||||
for(int i=0; i<points.Length; i++) {
|
||||
SetGUIColor(Color8);
|
||||
using(new EditorGUILayout.VerticalScope ("Box")) {
|
||||
SetGUIColor(Color1);
|
||||
points[i].SetTargetTransform(EditorGUILayout.ObjectField("Target", points[i].Target, typeof(Transform), true) as Transform);
|
||||
SetGUIColor(Color1);
|
||||
points[i].SetRadius(EditorGUILayout.DoubleField("Radius", points[i].Radius));
|
||||
}
|
||||
}
|
||||
SetGUIColor(Color8);
|
||||
if(GUILayout.Button("+")) {
|
||||
objective.AddPoint();
|
||||
}
|
||||
SetGUIColor(Color8);
|
||||
if(GUILayout.Button("-")) {
|
||||
objective.RemovePoint();
|
||||
}
|
||||
}
|
||||
|
||||
private void InspectJointValue(JointValue objective) {
|
||||
SetGUIColor(Color1);
|
||||
objective.SetTargetValue(EditorGUILayout.DoubleField("Target Value", objective.GetTargetValue()));
|
||||
SetGUIColor(Color1);
|
||||
objective.SetXMotion(EditorGUILayout.Toggle("X Motion", objective.IsXMotion()));
|
||||
SetGUIColor(Color1);
|
||||
objective.SetYMotion(EditorGUILayout.Toggle("Y Motion", objective.IsYMotion()));
|
||||
SetGUIColor(Color1);
|
||||
objective.SetZMotion(EditorGUILayout.Toggle("Z Motion", objective.IsZMotion()));
|
||||
}
|
||||
|
||||
private void InspectDisplacement(Displacement objective) {
|
||||
|
||||
}
|
||||
|
||||
private void InspectProjection(Projection objective) {
|
||||
SetGUIColor(Color1);
|
||||
objective.SetTargetTransform(EditorGUILayout.ObjectField("Target Transform", objective.GetTargetTransform(), typeof(Transform), true) as Transform);
|
||||
SetGUIColor(Color1);
|
||||
objective.SetTargetPosition(EditorGUILayout.Vector3Field("Target Position", objective.GetTargetPosition()));
|
||||
SetGUIColor(Color1);
|
||||
objective.SetTargetRotation(EditorGUILayout.Vector3Field("Target Rotation", objective.GetTargetRotation()));
|
||||
SetGUIColor(Color1);
|
||||
objective.SetNormal(EditorGUILayout.Vector3Field("Projection Normal", objective.GetNormal()));
|
||||
SetGUIColor(Color1);
|
||||
objective.SetLength(EditorGUILayout.FloatField("Projection Length", objective.GetLength()));
|
||||
SetGUIColor(Color1);
|
||||
objective.SetSensitivity(EditorGUILayout.Slider("Projection Sensitivitiy", objective.GetSensitivity(), 0f, 1f));
|
||||
SetGUIColor(Color1);
|
||||
objective.SetMaximumError(EditorGUILayout.DoubleField("Maximum Error", objective.GetMaximumError()));
|
||||
}
|
||||
|
||||
public void OnSceneGUI() {
|
||||
DoF = 0;
|
||||
DrawSkeleton(Target.FindSegment(Target.transform));
|
||||
DrawSetup(Target.FindSegment(Target.transform), false);
|
||||
if(Target.SelectedSegment != null) {
|
||||
DrawSegment(Target.SelectedSegment, true);
|
||||
}
|
||||
}
|
||||
|
||||
private bool StopDraw(BioSegment segment) {
|
||||
if(segment.Parent == null) {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
//return segment.Parent.name == "Kopf" && segment.name != "Head" && segment.name != "Ohr_R" && segment.name != "Ohr_L" || segment.name == "Ohr_L_end" || segment.name == "Ohr_R_end";
|
||||
}
|
||||
|
||||
private void DrawSkeleton(BioSegment segment) {
|
||||
if(!StopDraw(segment)) {
|
||||
if(segment.Parent != null) {
|
||||
DrawLine(segment.Parent.GetAnchoredPosition(), segment.GetAnchoredPosition(), 5f, Color.cyan);
|
||||
}
|
||||
for(int i=0; i<segment.Childs.Length; i++) {
|
||||
DrawSkeleton(segment.Childs[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawSetup(BioSegment segment, bool final) {
|
||||
if(!StopDraw(segment)) {
|
||||
DrawSegment(segment, final);
|
||||
for(int i=0; i<segment.Childs.Length; i++) {
|
||||
DrawSetup(segment.Childs[i], final);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawSegment(BioSegment segment, bool final) {
|
||||
Vector3 P = segment.GetAnchoredPosition();
|
||||
if(Target.SelectedSegment == segment && final) {
|
||||
DrawSphere(P, 0.25f, new Color(0f, 0f, 0f, 0.4f));
|
||||
DrawSphere(P, 0.02f, Color5);
|
||||
} else if(Target.SelectedSegment != segment) {
|
||||
DrawSphere(P, 0.02f, Color.cyan);
|
||||
}
|
||||
if(segment.Joint != null) {
|
||||
DrawJoint(segment.Joint, final);
|
||||
}
|
||||
for(int i=0; i<segment.Objectives.Length; i++) {
|
||||
DrawObjective(segment.Objectives[i], final);
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawJoint(BioJoint joint, bool final) {
|
||||
if(!final) {
|
||||
DoF += joint.GetDoF();
|
||||
}
|
||||
//DrawDottedLine(joint.Segment.Transform.position, joint.GetAnchorInWorldSpace(), 5f, Color.magenta);
|
||||
DrawCube(joint.GetAnchorInWorldSpace(), joint.Segment.Transform.rotation * Quaternion.Euler(joint.GetOrientation()), 0.025f, Color.magenta);
|
||||
DrawMotion(joint.X, Color.red, final);
|
||||
DrawMotion(joint.Y, Color.green, final);
|
||||
DrawMotion(joint.Z, Color.blue, final);
|
||||
}
|
||||
|
||||
private void DrawMotion(BioJoint.Motion motion, Color color, bool final) {
|
||||
if(Target.SelectedSegment == motion.Joint.Segment && final) {
|
||||
DrawArrow(motion.Joint.GetAnchorInWorldSpace(), motion.Joint.Segment.Transform.rotation * Quaternion.LookRotation(motion.Axis), 0.125f, motion.IsEnabled() ? color : Color.grey);
|
||||
|
||||
if(!motion.IsEnabled() || !motion.Constrained) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(motion.Joint.JointType == JointType.Rotational) {
|
||||
if(motion == motion.Joint.X) {
|
||||
DrawSolidArc(
|
||||
motion.Joint.GetAnchorInWorldSpace(),
|
||||
motion.Joint.Segment.Transform.rotation * motion.Axis,
|
||||
Quaternion.AngleAxis((float)motion.GetLowerLimit(), motion.Joint.Segment.Transform.rotation * motion.Axis) * motion.Joint.Segment.Transform.rotation * motion.Joint.Y.Axis,
|
||||
(float)motion.GetUpperLimit() - (float)motion.GetLowerLimit(),
|
||||
0.125f,
|
||||
new Color(1f, 0f, 0f, 0.25f)
|
||||
);
|
||||
}
|
||||
if(motion == motion.Joint.Y) {
|
||||
DrawSolidArc(
|
||||
motion.Joint.GetAnchorInWorldSpace(),
|
||||
motion.Joint.Segment.Transform.rotation * motion.Axis,
|
||||
Quaternion.AngleAxis((float)motion.GetLowerLimit(), motion.Joint.Segment.Transform.rotation * motion.Axis) * motion.Joint.Segment.Transform.rotation * motion.Joint.Z.Axis,
|
||||
(float)motion.GetUpperLimit() - (float)motion.GetLowerLimit(),
|
||||
0.125f,
|
||||
new Color(0f, 1f, 0f, 0.25f)
|
||||
);
|
||||
}
|
||||
if(motion == motion.Joint.Z) {
|
||||
DrawSolidArc(
|
||||
motion.Joint.GetAnchorInWorldSpace(),
|
||||
motion.Joint.Segment.Transform.rotation * motion.Axis,
|
||||
Quaternion.AngleAxis((float)motion.GetLowerLimit(), motion.Joint.Segment.Transform.rotation * motion.Axis) * motion.Joint.Segment.Transform.rotation * motion.Joint.X.Axis,
|
||||
(float)motion.GetUpperLimit() - (float)motion.GetLowerLimit(),
|
||||
0.125f,
|
||||
new Color(0f, 0f, 1f, 0.25f)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if(motion.Joint.JointType == JointType.Translational) {
|
||||
Vector3 A = motion.Joint.GetAnchorInWorldSpace() + (float)motion.GetLowerLimit() * (motion.Joint.Segment.Transform.rotation * motion.Axis);
|
||||
Vector3 B = motion.Joint.GetAnchorInWorldSpace() + (float)motion.GetUpperLimit() * (motion.Joint.Segment.Transform.rotation * motion.Axis);
|
||||
Color c = Color.white;
|
||||
if(motion == motion.Joint.X) {
|
||||
c = Color.red;
|
||||
}
|
||||
if(motion == motion.Joint.Y) {
|
||||
c = Color.green;
|
||||
}
|
||||
if(motion == motion.Joint.Z) {
|
||||
c = Color.blue;
|
||||
}
|
||||
DrawLine(A, B, 3f, c);
|
||||
DrawCube(A, motion.Joint.Segment.Transform.rotation, 0.0125f, new Color(c.r, c.g, c.b, 0.5f));
|
||||
DrawCube(B, motion.Joint.Segment.Transform.rotation, 0.0125f, new Color(c.r, c.g, c.b, 0.5f));
|
||||
}
|
||||
|
||||
} else if(Target.SelectedSegment != motion.Joint.Segment) {
|
||||
DrawArrow(motion.Joint.GetAnchorInWorldSpace(), motion.Joint.Segment.Transform.rotation * Quaternion.LookRotation(motion.Axis), 0.05f, motion.IsEnabled() ? color : Color.clear);
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawObjective(BioObjective objective, bool selected) {
|
||||
if(!selected) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch(objective.GetObjectiveType()) {
|
||||
case ObjectiveType.Position:
|
||||
DrawPosition((Position)objective);
|
||||
break;
|
||||
|
||||
case ObjectiveType.Orientation:
|
||||
DrawOrientation((Orientation)objective);
|
||||
break;
|
||||
|
||||
case ObjectiveType.LookAt:
|
||||
DrawLookAt((LookAt)objective);
|
||||
break;
|
||||
|
||||
case ObjectiveType.Distance:
|
||||
DrawDistance((Distance)objective);
|
||||
break;
|
||||
|
||||
case ObjectiveType.JointValue:
|
||||
DrawJointValue((JointValue)objective);
|
||||
break;
|
||||
|
||||
case ObjectiveType.Displacement:
|
||||
DrawDisplacement((Displacement)objective);
|
||||
break;
|
||||
|
||||
case ObjectiveType.Projection:
|
||||
DrawProjection((Projection)objective);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawPosition(Position objective) {
|
||||
DrawSphere(objective.GetTargetPosition(), 0.1f, new Color(1f, 0f, 0f, 0.75f));
|
||||
Handles.Label(objective.GetTargetPosition(), "Target");
|
||||
}
|
||||
|
||||
private void DrawOrientation(Orientation objective) {
|
||||
Quaternion rotation = Quaternion.Euler(objective.GetTargetRotattion());
|
||||
Vector3 right = rotation * Vector3.right;
|
||||
Vector3 up = rotation * Vector3.up;
|
||||
Vector3 forward = rotation * Vector3.forward;
|
||||
float length = 0.1f;
|
||||
DrawLine(objective.Segment.Transform.position - length * right, objective.Segment.Transform.position + length * right, 5f, new Color(1f, 0f, 0f, 0.75f));
|
||||
DrawLine(objective.Segment.Transform.position - length * up, objective.Segment.Transform.position + length * up, 5f, new Color(0f, 1f, 0f, 0.75f));
|
||||
DrawLine(objective.Segment.Transform.position - length * forward, objective.Segment.Transform.position + length * forward, 5f, new Color(0f, 0f, 1f, 0.75f));
|
||||
Handles.Label(objective.Segment.Transform.position, "Target");
|
||||
}
|
||||
|
||||
private void DrawLookAt(LookAt objective) {
|
||||
if(objective.GetViewingDirection().magnitude != 0f) {
|
||||
DrawArrow(objective.transform.position, objective.transform.rotation*Quaternion.LookRotation((objective.GetViewingDirection())), 0.125f, Color5);
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawDistance(Distance objective) {
|
||||
DrawSphere(objective.transform.position, (float)objective.GetRadius(), new Color(0f, 1f, 0f, 0.5f));
|
||||
DistancePoint[] points = objective.GetPoints();
|
||||
for(int i=0; i<points.Length; i++) {
|
||||
DistancePoint point = points[i];
|
||||
if(point != null) {
|
||||
DrawSphere(point.GetTargetPoint(), (float)point.GetRadius(), new Color(1f, 0f, 0f, 0.5f));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawJointValue(JointValue objective) {
|
||||
|
||||
}
|
||||
|
||||
private void DrawDisplacement(Displacement objective) {
|
||||
|
||||
}
|
||||
|
||||
private void DrawProjection(Projection objective) {
|
||||
Vector3 normal = objective.Segment.Transform.rotation * objective.GetNormal();
|
||||
Vector3 start = objective.Segment.Transform.position - objective.GetLength() * normal;
|
||||
Vector3 end = start + objective.GetLength() * normal;
|
||||
|
||||
DrawSphere(start, 0.025f, Color5);
|
||||
DrawArrow(start, Quaternion.FromToRotation(Vector3.forward, end-start), objective.GetLength(), Color5);
|
||||
|
||||
DrawSphere(objective.GetTargetPosition(), 0.025f, Color.red);
|
||||
|
||||
/*
|
||||
Quaternion rotation = Quaternion.Euler(objective.GetTargetRotation());
|
||||
Vector3 right = rotation * Vector3.right;
|
||||
Vector3 up = rotation * Vector3.up;
|
||||
Vector3 forward = rotation * Vector3.forward;
|
||||
|
||||
//float length = 0.05f;
|
||||
|
||||
//DrawLine(objective.Segment.Transform.position - length * right, objective.Segment.Transform.position + length * right, 5f, Color.red);
|
||||
//DrawLine(objective.Segment.Transform.position - length * up, objective.Segment.Transform.position + length * up, 5f, Color.green);
|
||||
//DrawLine(objective.Segment.Transform.position - length * forward, objective.Segment.Transform.position + length * forward, 5f, Color.blue);
|
||||
|
||||
//for(int i=0; i<Corrections.Length; i++) {
|
||||
// normal = transform.rotation * Corrections[i].Direction;
|
||||
// start = transform.position + transform.rotation * Corrections[i].Offset;
|
||||
// end = start + Corrections[i].Length * normal;
|
||||
|
||||
// Gizmos.color = Color.cyan;
|
||||
// Gizmos.DrawSphere(start, 0.025f);
|
||||
// Gizmos.DrawLine(start, end);
|
||||
// Gizmos.DrawSphere(end, 0.025f);
|
||||
//}
|
||||
*/
|
||||
}
|
||||
|
||||
private void DrawSphere(Vector3 position, float radius, Color color) {
|
||||
Handles.color = color;
|
||||
Handles.SphereHandleCap(0, position, Quaternion.identity, radius, EventType.Repaint);
|
||||
}
|
||||
|
||||
private void DrawCube(Vector3 position, Quaternion rotation, float size, Color color) {
|
||||
Handles.color = color;
|
||||
Handles.CubeHandleCap(0, position, rotation, size, EventType.Repaint);
|
||||
}
|
||||
|
||||
private void DrawLine(Vector3 a, Vector3 b, float width, Color color) {
|
||||
Handles.color = color;
|
||||
Handles.DrawAAPolyLine(width, new Vector3[2] {a,b});
|
||||
}
|
||||
|
||||
private void DrawDottedLine(Vector3 a, Vector3 b, float width, Color color) {
|
||||
Handles.color = color;
|
||||
Handles.DrawDottedLine(a, b, width);
|
||||
}
|
||||
|
||||
private void DrawArrow(Vector3 position, Quaternion rotation, float length, Color color) {
|
||||
Handles.color = color;
|
||||
Handles.ArrowHandleCap(0, position, rotation, length, EventType.Repaint);
|
||||
}
|
||||
|
||||
private void DrawSolidArc(Vector3 position, Vector3 normal, Vector3 from, float angle, float radius, Color color) {
|
||||
Handles.color = color;
|
||||
Handles.DrawSolidArc(position, normal, from, angle, radius);
|
||||
}
|
||||
|
||||
private void SetGUIColor(Color color) {
|
||||
GUI.backgroundColor = color;
|
||||
}
|
||||
|
||||
private void ComputeMaxIndentLevel(Transform t, int level, ref int maxIndent) {
|
||||
maxIndent = System.Math.Max(maxIndent, level);
|
||||
for(int i=0; i<t.childCount; i++) {
|
||||
ComputeMaxIndentLevel(t.GetChild(i), level+1, ref maxIndent);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
19
Assets/External/BioIK/Editor/BioIKEditor.cs.meta
vendored
Normal file
19
Assets/External/BioIK/Editor/BioIKEditor.cs.meta
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5a8847e83221c45949ae12a7d52bf67d
|
||||
timeCreated: 1502292671
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Editor/BioIKEditor.cs
|
||||
uploadId: 199125
|
||||
9
Assets/External/BioIK/Helpers.meta
vendored
Normal file
9
Assets/External/BioIK/Helpers.meta
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9f5525619f97641058186a1a4c37f4ab
|
||||
folderAsset: yes
|
||||
timeCreated: 1502291005
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
5
Assets/External/BioIK/Helpers/Enums.cs
vendored
Normal file
5
Assets/External/BioIK/Helpers/Enums.cs
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
namespace BioIK {
|
||||
public enum ObjectiveType {Position, Orientation, LookAt, Distance, Displacement, JointValue, Projection}
|
||||
public enum JointType {Rotational, Translational};
|
||||
public enum MotionType {Instantaneous, Realistic};
|
||||
}
|
||||
19
Assets/External/BioIK/Helpers/Enums.cs.meta
vendored
Normal file
19
Assets/External/BioIK/Helpers/Enums.cs.meta
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6cfa6a2a8d2614961ba86404a314c9f9
|
||||
timeCreated: 1502291013
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Helpers/Enums.cs
|
||||
uploadId: 199125
|
||||
6105
Assets/External/BioIK/Helpers/Evolution.cs
vendored
Normal file
6105
Assets/External/BioIK/Helpers/Evolution.cs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
19
Assets/External/BioIK/Helpers/Evolution.cs.meta
vendored
Normal file
19
Assets/External/BioIK/Helpers/Evolution.cs.meta
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 293464419e12c4a878d56542a32530e6
|
||||
timeCreated: 1502296338
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Helpers/Evolution.cs
|
||||
uploadId: 199125
|
||||
577
Assets/External/BioIK/Helpers/Model.cs
vendored
Normal file
577
Assets/External/BioIK/Helpers/Model.cs
vendored
Normal file
@ -0,0 +1,577 @@
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace BioIK {
|
||||
public class Model {
|
||||
//Reference to the character
|
||||
private BioIK Character;
|
||||
|
||||
//Reference to root
|
||||
private BioSegment Root;
|
||||
|
||||
//Offset to world
|
||||
private double OPX, OPY, OPZ; //Offset rosition to world frame
|
||||
private double ORX, ORY, ORZ, ORW; //Offset rotation to world frame
|
||||
private double OSX, OSY, OSZ; //Offset scale to world Frame
|
||||
|
||||
//Linked list of nodes in the model
|
||||
public Node[] Nodes = new Node[0];
|
||||
|
||||
//Global pointers to the IK setup
|
||||
public MotionPtr[] MotionPtrs = new MotionPtr[0];
|
||||
public ObjectivePtr[] ObjectivePtrs = new ObjectivePtr[0];
|
||||
|
||||
//Assigned Configuraton
|
||||
private double[] Configuration;
|
||||
private double[] Gradient;
|
||||
private double[] Losses;
|
||||
|
||||
//Simulated Configuration
|
||||
private double[] PX,PY,PZ,RX,RY,RZ,RW;
|
||||
private double[] SimulatedLosses;
|
||||
|
||||
//Degree of Freedom
|
||||
private int DoF;
|
||||
|
||||
public Model(BioIK character) {
|
||||
Character = character;
|
||||
|
||||
//Set Root
|
||||
Root = Character.FindSegment(Character.transform);
|
||||
|
||||
//Create Root
|
||||
AddNode(Root);
|
||||
|
||||
//Build Model
|
||||
BioObjective[] objectives = CollectObjectives(Root, new List<BioObjective>());
|
||||
for(int i=0; i<objectives.Length; i++) {
|
||||
List<BioSegment> chain = Character.GetChain(Root, objectives[i].Segment);
|
||||
for(int j=1; j<chain.Count; j++) {
|
||||
AddNode(chain[j]);
|
||||
}
|
||||
}
|
||||
|
||||
//Assign DoF
|
||||
DoF = MotionPtrs.Length;
|
||||
|
||||
//Initialise arrays for single transform modifications
|
||||
for(int i=0; i<Nodes.Length; i++) {
|
||||
Nodes[i].ObjectiveImpacts = new bool[ObjectivePtrs.Length];
|
||||
}
|
||||
PX = new double[ObjectivePtrs.Length];
|
||||
PY = new double[ObjectivePtrs.Length];
|
||||
PZ = new double[ObjectivePtrs.Length];
|
||||
RX = new double[ObjectivePtrs.Length];
|
||||
RY = new double[ObjectivePtrs.Length];
|
||||
RZ = new double[ObjectivePtrs.Length];
|
||||
RW = new double[ObjectivePtrs.Length];
|
||||
Configuration = new double[MotionPtrs.Length];
|
||||
Gradient = new double[MotionPtrs.Length];
|
||||
Losses = new double[ObjectivePtrs.Length];
|
||||
SimulatedLosses = new double[ObjectivePtrs.Length];
|
||||
|
||||
//Assigns references to all objective nodes that are affected by a parenting node
|
||||
for(int i=0; i<ObjectivePtrs.Length; i++) {
|
||||
Node node = ObjectivePtrs[i].Node;
|
||||
while(node != null) {
|
||||
node.ObjectiveImpacts[i] = true;
|
||||
node = node.Parent;
|
||||
}
|
||||
}
|
||||
|
||||
Refresh();
|
||||
|
||||
//DebugSetup();
|
||||
}
|
||||
|
||||
public int GetDoF() {
|
||||
return DoF;
|
||||
}
|
||||
|
||||
public BioIK GetCharacter() {
|
||||
return Character;
|
||||
}
|
||||
|
||||
public void Refresh() {
|
||||
//Updates configuration
|
||||
for(int i=0; i<Configuration.Length; i++) {
|
||||
Configuration[i] = MotionPtrs[i].Motion.GetTargetValue(true);
|
||||
}
|
||||
|
||||
//Update offset from world to root
|
||||
if(Root.Transform.root == Character.transform) {
|
||||
OPX = OPY = OPZ = ORX = ORY = ORZ = 0.0;
|
||||
ORW = OSX = OSY = OSZ = 1.0;
|
||||
} else {
|
||||
Vector3 p = Root.Transform.parent.position;
|
||||
Quaternion r = Root.Transform.parent.rotation;
|
||||
Vector3 s = Root.Transform.parent.lossyScale;
|
||||
OPX = p.x; OPY = p.y; OPZ = p.z;
|
||||
ORX = r.x; ORY = r.y; ORZ = r.z; ORW = r.w;
|
||||
OSX = s.x; OSY = s.y; OSZ = s.z;
|
||||
}
|
||||
|
||||
//Updates the nodes
|
||||
Nodes[0].Refresh();
|
||||
}
|
||||
|
||||
public void CopyFrom(Model model) {
|
||||
OPX = model.OPX;
|
||||
OPY = model.OPY;
|
||||
OPZ = model.OPZ;
|
||||
ORX = model.ORX;
|
||||
ORY = model.ORY;
|
||||
ORZ = model.ORZ;
|
||||
ORW = model.ORW;
|
||||
OSX = model.OSX;
|
||||
OSY = model.OSY;
|
||||
OSZ = model.OSZ;
|
||||
for(int i=0; i<DoF; i++) {
|
||||
Configuration[i] = model.Configuration[i];
|
||||
Gradient[i] = model.Gradient[i];
|
||||
}
|
||||
for(int i=0; i<ObjectivePtrs.Length; i++) {
|
||||
PX[i] = model.PX[i];
|
||||
PY[i] = model.PY[i];
|
||||
PZ[i] = model.PZ[i];
|
||||
RX[i] = model.RX[i];
|
||||
RY[i] = model.RY[i];
|
||||
RZ[i] = model.RZ[i];
|
||||
RW[i] = model.RW[i];
|
||||
Losses[i] = model.Losses[i];
|
||||
SimulatedLosses[i] = model.SimulatedLosses[i];
|
||||
}
|
||||
for(int i=0; i<Nodes.Length; i++) {
|
||||
Nodes[i].WPX = model.Nodes[i].WPX;
|
||||
Nodes[i].WPY = model.Nodes[i].WPY;
|
||||
Nodes[i].WPZ = model.Nodes[i].WPZ;
|
||||
Nodes[i].WRX = model.Nodes[i].WRX;
|
||||
Nodes[i].WRY = model.Nodes[i].WRY;
|
||||
Nodes[i].WRZ = model.Nodes[i].WRZ;
|
||||
Nodes[i].WRW = model.Nodes[i].WRW;
|
||||
Nodes[i].WSX = model.Nodes[i].WSX;
|
||||
Nodes[i].WSY = model.Nodes[i].WSY;
|
||||
Nodes[i].WSZ = model.Nodes[i].WSZ;
|
||||
|
||||
Nodes[i].LPX = model.Nodes[i].LPX;
|
||||
Nodes[i].LPY = model.Nodes[i].LPY;
|
||||
Nodes[i].LPZ = model.Nodes[i].LPZ;
|
||||
Nodes[i].LRX = model.Nodes[i].LRX;
|
||||
Nodes[i].LRY = model.Nodes[i].LRY;
|
||||
Nodes[i].LRZ = model.Nodes[i].LRZ;
|
||||
Nodes[i].LRW = model.Nodes[i].LRW;
|
||||
|
||||
//Nodes[i].RootX = model.Nodes[i].RootX;
|
||||
//Nodes[i].RootY = model.Nodes[i].RootY;
|
||||
//Nodes[i].RootZ = model.Nodes[i].RootZ;
|
||||
Nodes[i].XValue = model.Nodes[i].XValue;
|
||||
Nodes[i].YValue = model.Nodes[i].YValue;
|
||||
Nodes[i].ZValue = model.Nodes[i].ZValue;
|
||||
}
|
||||
}
|
||||
|
||||
//Computes the loss as the RMSE over all objectives
|
||||
public double ComputeLoss(double[] configuration) {
|
||||
FK(configuration);
|
||||
double loss = 0.0;
|
||||
for(int i=0; i<ObjectivePtrs.Length; i++) {
|
||||
Node node = ObjectivePtrs[i].Node;
|
||||
Losses[i] = ObjectivePtrs[i].Objective.ComputeLoss(node.WPX, node.WPY, node.WPZ, node.WRX, node.WRY, node.WRZ, node.WRW, node, Configuration);
|
||||
loss += Losses[i];
|
||||
}
|
||||
return System.Math.Sqrt(loss / (double)ObjectivePtrs.Length);
|
||||
}
|
||||
|
||||
//Computes the gradient
|
||||
public double[] ComputeGradient(double[] configuration, double resolution) {
|
||||
double oldLoss = ComputeLoss(configuration);
|
||||
for(int j=0; j<DoF; j++) {
|
||||
Configuration[j] += resolution;
|
||||
MotionPtrs[j].Node.SimulateModification(Configuration);
|
||||
Configuration[j] -= resolution;
|
||||
double newLoss = 0.0;
|
||||
for(int i=0; i<ObjectivePtrs.Length; i++) {
|
||||
newLoss += SimulatedLosses[i];
|
||||
}
|
||||
newLoss = System.Math.Sqrt(newLoss / (double)ObjectivePtrs.Length);
|
||||
Gradient[j] = (newLoss - oldLoss) / resolution;
|
||||
}
|
||||
return Gradient;
|
||||
}
|
||||
|
||||
//Returns whether the model converges for a particular configuration
|
||||
public bool CheckConvergence(double[] configuration) {
|
||||
FK(configuration);
|
||||
for(int i=0; i<ObjectivePtrs.Length; i++) {
|
||||
Model.Node node = ObjectivePtrs[i].Node;
|
||||
if(!ObjectivePtrs[i].Objective.CheckConvergence(node.WPX, node.WPY, node.WPZ, node.WRX, node.WRY, node.WRZ, node.WRW, node, configuration)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//Applies a forward kinematics pass to the model
|
||||
private void FK(double[] configuration) {
|
||||
for(int i=0; i<Configuration.Length; i++) {
|
||||
Configuration[i] = configuration[i];
|
||||
}
|
||||
Nodes[0].FeedForwardConfiguration(configuration);
|
||||
}
|
||||
|
||||
//Adds a segment node into the model
|
||||
private void AddNode(BioSegment segment) {
|
||||
if(FindNode(segment.Transform) == null) {
|
||||
Node node = new Node(this, FindNode(segment.Transform.parent), segment);
|
||||
|
||||
if(node.Joint != null) {
|
||||
if(node.Joint.GetDoF() == 0 || !node.Joint.enabled) {
|
||||
node.Joint = null;
|
||||
} else {
|
||||
if(node.Joint.X.IsEnabled()) {
|
||||
MotionPtr motionPtr = new MotionPtr(node.Joint.X, node, MotionPtrs.Length);
|
||||
System.Array.Resize(ref MotionPtrs, MotionPtrs.Length+1);
|
||||
MotionPtrs[MotionPtrs.Length-1] = motionPtr;
|
||||
node.XEnabled = true;
|
||||
node.XIndex = motionPtr.Index;
|
||||
}
|
||||
if(node.Joint.Y.IsEnabled()) {
|
||||
MotionPtr motionPtr = new MotionPtr(node.Joint.Y, node, MotionPtrs.Length);
|
||||
System.Array.Resize(ref MotionPtrs, MotionPtrs.Length+1);
|
||||
MotionPtrs[MotionPtrs.Length-1] = motionPtr;
|
||||
node.YEnabled = true;
|
||||
node.YIndex = motionPtr.Index;
|
||||
}
|
||||
if(node.Joint.Z.IsEnabled()) {
|
||||
MotionPtr motionPtr = new MotionPtr(node.Joint.Z, node, MotionPtrs.Length);
|
||||
System.Array.Resize(ref MotionPtrs, MotionPtrs.Length+1);
|
||||
MotionPtrs[MotionPtrs.Length-1] = motionPtr;
|
||||
node.ZEnabled = true;
|
||||
node.ZIndex = motionPtr.Index;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BioObjective[] objectives = segment.Objectives;
|
||||
for(int i=0; i<objectives.Length; i++) {
|
||||
if(objectives[i].enabled) {
|
||||
System.Array.Resize(ref ObjectivePtrs, ObjectivePtrs.Length+1);
|
||||
ObjectivePtrs[ObjectivePtrs.Length-1] = new ObjectivePtr(objectives[i], node, ObjectivePtrs.Length);
|
||||
}
|
||||
}
|
||||
|
||||
System.Array.Resize(ref Nodes, Nodes.Length+1);
|
||||
Nodes[Nodes.Length-1] = node;
|
||||
}
|
||||
}
|
||||
|
||||
//Returns all objectives which are childs in the hierarcy, beginning from the root
|
||||
private BioObjective[] CollectObjectives(BioSegment segment, List<BioObjective> objectives) {
|
||||
for(int i=0; i<segment.Objectives.Length; i++) {
|
||||
if(segment.Objectives[i].enabled) {
|
||||
objectives.Add(segment.Objectives[i]);
|
||||
}
|
||||
}
|
||||
for(int i=0; i<segment.Childs.Length; i++) {
|
||||
CollectObjectives(segment.Childs[i], objectives);
|
||||
}
|
||||
return objectives.ToArray();
|
||||
}
|
||||
|
||||
//Returns a node in the model
|
||||
private Node FindNode(Transform t) {
|
||||
for(int i=0; i<Nodes.Length; i++) {
|
||||
if(Nodes[i].Transform == t) {
|
||||
return Nodes[i];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
//Returns the pointer to the motion
|
||||
public MotionPtr FindMotionPtr(BioJoint.Motion motion) {
|
||||
for(int i=0; i<MotionPtrs.Length; i++) {
|
||||
if(MotionPtrs[i].Motion == motion) {
|
||||
return MotionPtrs[i];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
//Returns the pointer to the objective
|
||||
public ObjectivePtr FindObjectivePtr(BioObjective objective) {
|
||||
for(int i=0; i<ObjectivePtrs.Length; i++) {
|
||||
if(ObjectivePtrs[i].Objective == objective) {
|
||||
return ObjectivePtrs[i];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
//Subclass representing the single nodes for the OFKT data structure.
|
||||
//Values are stored using primitive data types for faster access and efficient computation.
|
||||
public class Node {
|
||||
public Model Model; //Reference to the kinematic model
|
||||
public Node Parent; //Reference to the parent of this node
|
||||
public Node[] Childs = new Node[0]; //Reference to all child nodes
|
||||
public Transform Transform; //Reference to the transform
|
||||
public BioJoint Joint; //Reference to the joint
|
||||
public Transform[] Chain;
|
||||
|
||||
public double WPX, WPY, WPZ; //World position
|
||||
public double WRX, WRY, WRZ, WRW; //World rotation
|
||||
public double WSX, WSY, WSZ; //World scale
|
||||
public double LPX, LPY, LPZ; //Local position
|
||||
public double LRX, LRY, LRZ, LRW; //Local rotation
|
||||
//public double RootX, RootY, RootZ; //World position of root joint
|
||||
|
||||
public bool XEnabled = false;
|
||||
public bool YEnabled = false;
|
||||
public bool ZEnabled = false;
|
||||
public int XIndex = -1;
|
||||
public int YIndex = -1;
|
||||
public int ZIndex = -1;
|
||||
public double XValue = 0.0; //
|
||||
public double YValue = 0.0; //
|
||||
public double ZValue = 0.0; //
|
||||
|
||||
public bool[] ObjectiveImpacts; //Boolean values to represent which objective indices in the whole kinematic tree are affected (TODO: Refactor this)
|
||||
|
||||
//Setup for the node
|
||||
public Node(Model model, Node parent, BioSegment segment) {
|
||||
Model = model;
|
||||
Parent = parent;
|
||||
if(Parent != null) {
|
||||
Parent.AddChild(this);
|
||||
}
|
||||
Transform = segment.Transform;
|
||||
Joint = segment.Joint;
|
||||
|
||||
List<Transform> reverseChain = new List<Transform>();
|
||||
reverseChain.Add(Transform);
|
||||
Node p = parent;
|
||||
while(p != null) {
|
||||
reverseChain.Add(p.Transform);
|
||||
p = p.Parent;
|
||||
}
|
||||
reverseChain.Reverse();
|
||||
Chain = reverseChain.ToArray();
|
||||
}
|
||||
|
||||
//Adds a child to this node
|
||||
public void AddChild(Node child) {
|
||||
System.Array.Resize(ref Childs, Childs.Length+1);
|
||||
Childs[Childs.Length-1] = child;
|
||||
}
|
||||
|
||||
//Recursively refreshes the current transform data
|
||||
public void Refresh() {
|
||||
//Local
|
||||
if(Joint == null) {
|
||||
Vector3 lp = Transform.localPosition;
|
||||
Quaternion lr = Transform.localRotation;
|
||||
LPX = lp.x;
|
||||
LPY = lp.y;
|
||||
LPZ = lp.z;
|
||||
LRX = lr.x;
|
||||
LRY = lr.y;
|
||||
LRZ = lr.z;
|
||||
LRW = lr.w;
|
||||
} else {
|
||||
XValue = Joint.X.GetTargetValue(true);
|
||||
YValue = Joint.Y.GetTargetValue(true);
|
||||
ZValue = Joint.Z.GetTargetValue(true);
|
||||
Joint.ComputeLocalTransformation(XValue, YValue, ZValue, out LPX, out LPY, out LPZ, out LRX, out LRY, out LRZ, out LRW);
|
||||
}
|
||||
Vector3 ws = Transform.lossyScale;
|
||||
WSX = ws.x;
|
||||
WSY = ws.y;
|
||||
WSZ = ws.z;
|
||||
|
||||
//World
|
||||
ComputeWorldTransformation();
|
||||
|
||||
//Feed Forward
|
||||
foreach(Node child in Childs) {
|
||||
child.Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
//Updates local and world transform, and feeds the joint variable configuration forward to all childs
|
||||
public void FeedForwardConfiguration(double[] configuration, bool updateWorld = false) {
|
||||
//Assume no local update is required
|
||||
bool updateLocal = false;
|
||||
|
||||
if(XEnabled && configuration[XIndex] != XValue) {
|
||||
XValue = configuration[XIndex];
|
||||
updateLocal = true;
|
||||
}
|
||||
if(YEnabled && configuration[YIndex] != YValue) {
|
||||
YValue = configuration[YIndex];
|
||||
updateLocal = true;
|
||||
}
|
||||
if(ZEnabled && configuration[ZIndex] != ZValue) {
|
||||
ZValue = configuration[ZIndex];
|
||||
updateLocal = true;
|
||||
}
|
||||
|
||||
//Only update local transformation if a joint value has changed
|
||||
if(updateLocal) {
|
||||
Joint.ComputeLocalTransformation(XValue, YValue, ZValue, out LPX, out LPY, out LPZ, out LRX, out LRY, out LRZ, out LRW);
|
||||
updateWorld = true;
|
||||
}
|
||||
|
||||
//Only update world transformation if local transformation (in this or parent node) has changed
|
||||
if(updateWorld) {
|
||||
ComputeWorldTransformation();
|
||||
}
|
||||
|
||||
//Feed forward the joint variable configuration
|
||||
foreach(Node child in Childs) {
|
||||
child.FeedForwardConfiguration(configuration, updateWorld);
|
||||
}
|
||||
}
|
||||
|
||||
//Simulates a single transform modification while leaving the whole data structure unchanged
|
||||
//Returns the resulting Cartesian posture transformations in the out values
|
||||
public void SimulateModification(
|
||||
double[] configuration
|
||||
) {
|
||||
double[] px=Model.PX; double[] py=Model.PY; double[] pz=Model.PZ;
|
||||
double[] rx=Model.RX; double[] ry=Model.RY; double[] rz=Model.RZ; double[] rw=Model.RW;
|
||||
for(int i=0; i<Model.ObjectivePtrs.Length; i++) {
|
||||
Node node = Model.ObjectivePtrs[i].Node;
|
||||
if(ObjectiveImpacts[i]) {
|
||||
//WorldPosition = ParentPosition + ParentRotation * (LocalPosition . ParentScale) + ParentRotation * LocalRotation * WorldRotation^-1 * (ObjectivePosition - WorldPosition)
|
||||
//WorldRotation = ParentRotation * LocalRotation * WorldRotation^-1 * ObjectiveRotation
|
||||
double lpX, lpY, lpZ, lrX, lrY, lrZ, lrW;
|
||||
Joint.ComputeLocalTransformation(
|
||||
XEnabled ? configuration[XIndex] : XValue,
|
||||
YEnabled ? configuration[YIndex] : YValue,
|
||||
ZEnabled ? configuration[ZIndex] : ZValue,
|
||||
out lpX, out lpY, out lpZ, out lrX, out lrY, out lrZ, out lrW
|
||||
);
|
||||
double Rx, Ry, Rz, Rw, X, Y, Z;
|
||||
if(Parent == null) {
|
||||
px[i] = Model.OPX;
|
||||
py[i] = Model.OPY;
|
||||
pz[i] = Model.OPZ;
|
||||
Rx = Model.ORX;
|
||||
Ry = Model.ORY;
|
||||
Rz = Model.ORZ;
|
||||
Rw = Model.ORW;
|
||||
X = Model.OSX*lpX;
|
||||
Y = Model.OSY*lpY;
|
||||
Z = Model.OSZ*lpZ;
|
||||
} else {
|
||||
px[i] = Parent.WPX;
|
||||
py[i] = Parent.WPY;
|
||||
pz[i] = Parent.WPZ;
|
||||
Rx = Parent.WRX;
|
||||
Ry = Parent.WRY;
|
||||
Rz = Parent.WRZ;
|
||||
Rw = Parent.WRW;
|
||||
X = Parent.WSX*lpX;
|
||||
Y = Parent.WSY*lpY;
|
||||
Z = Parent.WSZ*lpZ;
|
||||
}
|
||||
double qx = Rx * lrW + Ry * lrZ - Rz * lrY + Rw * lrX;
|
||||
double qy = -Rx * lrZ + Ry * lrW + Rz * lrX + Rw * lrY;
|
||||
double qz = Rx * lrY - Ry * lrX + Rz * lrW + Rw * lrZ;
|
||||
double qw = -Rx * lrX - Ry * lrY - Rz * lrZ + Rw * lrW;
|
||||
double dot = WRX*WRX + WRY*WRY + WRZ*WRZ + WRW*WRW;
|
||||
double x = qx/dot; double y = qy/dot; double z = qz/dot; double w = qw/dot;
|
||||
qx = x * WRW + y * -WRZ - z * -WRY + w * -WRX;
|
||||
qy = -x * -WRZ + y * WRW + z * -WRX + w * -WRY;
|
||||
qz = x * -WRY - y * -WRX + z * WRW + w * -WRZ;
|
||||
qw = -x * -WRX - y * -WRY - z * -WRZ + w * WRW;
|
||||
px[i] +=
|
||||
+ 2.0 * ((0.5 - Ry * Ry - Rz * Rz) * X + (Rx * Ry - Rw * Rz) * Y + (Rx * Rz + Rw * Ry) * Z)
|
||||
+ 2.0 * ((0.5 - qy * qy - qz * qz) * (node.WPX-WPX) + (qx * qy - qw * qz) * (node.WPY-WPY) + (qx * qz + qw * qy) * (node.WPZ-WPZ));
|
||||
py[i] +=
|
||||
+ 2.0 * ((Rx * Ry + Rw * Rz) * X + (0.5 - Rx * Rx - Rz * Rz) * Y + (Ry * Rz - Rw * Rx) * Z)
|
||||
+ 2.0 * ((qx * qy + qw * qz) * (node.WPX-WPX) + (0.5 - qx * qx - qz * qz) * (node.WPY-WPY) + (qy * qz - qw * qx) * (node.WPZ-WPZ));
|
||||
pz[i] +=
|
||||
+ 2.0 * ((Rx * Rz - Rw * Ry) * X + (Ry * Rz + Rw * Rx) * Y + (0.5 - (Rx * Rx + Ry * Ry)) * Z)
|
||||
+ 2.0 * ((qx * qz - qw * qy) * (node.WPX-WPX) + (qy * qz + qw * qx) * (node.WPY-WPY) + (0.5 - qx * qx - qy * qy) * (node.WPZ-WPZ));
|
||||
rx[i] = qx * node.WRW + qy * node.WRZ - qz * node.WRY + qw * node.WRX;
|
||||
ry[i] = -qx * node.WRZ + qy * node.WRW + qz * node.WRX + qw * node.WRY;
|
||||
rz[i] = qx * node.WRY - qy * node.WRX + qz * node.WRW + qw * node.WRZ;
|
||||
rw[i] = -qx * node.WRX - qy * node.WRY - qz * node.WRZ + qw * node.WRW;
|
||||
Model.SimulatedLosses[i] = Model.ObjectivePtrs[i].Objective.ComputeLoss(px[i], py[i], pz[i], rx[i], ry[i], rz[i], rw[i], node, configuration);
|
||||
} else {
|
||||
px[i] = node.WPX;
|
||||
py[i] = node.WPY;
|
||||
pz[i] = node.WPZ;
|
||||
rx[i] = node.WRX;
|
||||
ry[i] = node.WRY;
|
||||
rz[i] = node.WRZ;
|
||||
rw[i] = node.WRW;
|
||||
Model.SimulatedLosses[i] = Model.Losses[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Computes the world transformation using the current joint variable configuration
|
||||
private void ComputeWorldTransformation() {
|
||||
//WorldPosition = ParentPosition + ParentRotation*LocalPosition;
|
||||
//WorldRotation = ParentRotation*LocalRotation;
|
||||
double RX,RY,RZ,RW,X,Y,Z;
|
||||
if(Parent == null) {
|
||||
WPX = Model.OPX;
|
||||
WPY = Model.OPY;
|
||||
WPZ = Model.OPZ;
|
||||
RX = Model.ORX;
|
||||
RY = Model.ORY;
|
||||
RZ = Model.ORZ;
|
||||
RW = Model.ORW;
|
||||
X = Model.OSX*LPX;
|
||||
Y = Model.OSY*LPY;
|
||||
Z = Model.OSZ*LPZ;
|
||||
} else {
|
||||
WPX = Parent.WPX;
|
||||
WPY = Parent.WPY;
|
||||
WPZ = Parent.WPZ;
|
||||
RX = Parent.WRX;
|
||||
RY = Parent.WRY;
|
||||
RZ = Parent.WRZ;
|
||||
RW = Parent.WRW;
|
||||
X = Parent.WSX*LPX;
|
||||
Y = Parent.WSY*LPY;
|
||||
Z = Parent.WSZ*LPZ;
|
||||
}
|
||||
WPX += 2.0 * ((0.5 - RY * RY - RZ * RZ) * X + (RX * RY - RW * RZ) * Y + (RX * RZ + RW * RY) * Z);
|
||||
WPY += 2.0 * ((RX * RY + RW * RZ) * X + (0.5 - RX * RX - RZ * RZ) * Y + (RY * RZ - RW * RX) * Z);
|
||||
WPZ += 2.0 * ((RX * RZ - RW * RY) * X + (RY * RZ + RW * RX) * Y + (0.5 - RX * RX - RY * RY) * Z);
|
||||
WRX = RX * LRW + RY * LRZ - RZ * LRY + RW * LRX;
|
||||
WRY = -RX * LRZ + RY * LRW + RZ * LRX + RW * LRY;
|
||||
WRZ = RX * LRY - RY * LRX + RZ * LRW + RW * LRZ;
|
||||
WRW = -RX * LRX - RY * LRY - RZ * LRZ + RW * LRW;
|
||||
}
|
||||
}
|
||||
|
||||
//Data class to store pointers to the objectives
|
||||
public class ObjectivePtr {
|
||||
public BioObjective Objective;
|
||||
public Node Node;
|
||||
public int Index;
|
||||
public ObjectivePtr(BioObjective objective, Node node, int index) {
|
||||
Objective = objective;
|
||||
Node = node;
|
||||
Index = index;
|
||||
}
|
||||
}
|
||||
|
||||
//Data class to store pointers to the joint motions
|
||||
public class MotionPtr {
|
||||
public BioJoint.Motion Motion;
|
||||
public Node Node;
|
||||
public int Index;
|
||||
public MotionPtr(BioJoint.Motion motion, Node node, int index) {
|
||||
Motion = motion;
|
||||
Node = node;
|
||||
Index = index;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/BioIK/Helpers/Model.cs.meta
vendored
Normal file
19
Assets/External/BioIK/Helpers/Model.cs.meta
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b3e01bac35c864625bdfa5e1445acf0f
|
||||
timeCreated: 1502295880
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Helpers/Model.cs
|
||||
uploadId: 199125
|
||||
177
Assets/External/BioIK/Helpers/Utility.cs
vendored
Normal file
177
Assets/External/BioIK/Helpers/Utility.cs
vendored
Normal file
@ -0,0 +1,177 @@
|
||||
using UnityEngine;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace BioIK {
|
||||
|
||||
public static class Utility {
|
||||
public const double Deg2Rad = 0.017453292;
|
||||
public const double Rad2Deg = 57.29578049;
|
||||
public const double PI = 3.14159265358979;
|
||||
|
||||
public static void Destroy(Component c) {
|
||||
if(c == null) {
|
||||
return;
|
||||
}
|
||||
#if UNITY_EDITOR
|
||||
if(Application.isPlaying) {
|
||||
Object.Destroy(c);
|
||||
} else if(!EditorApplication.isPlayingOrWillChangePlaymode) {
|
||||
Undo.DestroyObjectImmediate(c);
|
||||
}
|
||||
#else
|
||||
Object.Destroy(c);
|
||||
#endif
|
||||
}
|
||||
|
||||
public static Vector3 DAZ2Unity(Vector3 angles) {
|
||||
return (Quaternion.Euler(180f, 0f, 0f) * Quaternion.Euler(angles.x, angles.y, angles.z)).eulerAngles;
|
||||
}
|
||||
|
||||
public static Vector3 Unity2DAZ(Vector3 angles) {
|
||||
return (Quaternion.Euler(-180f, 0f, 0f) * Quaternion.Euler(angles.x, angles.y, angles.z)).eulerAngles;
|
||||
}
|
||||
|
||||
public static System.DateTime GetTimestamp() {
|
||||
return System.DateTime.Now;
|
||||
}
|
||||
|
||||
public static double GetElapsedTime(System.DateTime timestamp) {
|
||||
return (System.DateTime.Now-timestamp).Duration().TotalSeconds;
|
||||
}
|
||||
|
||||
public static void Cleanup(Transform t) {
|
||||
/*
|
||||
BioSegment segment = t.GetComponent<BioSegment>();
|
||||
if(segment != null) {
|
||||
if(segment.Joint != null) {
|
||||
segment.Joint.Remove();
|
||||
}
|
||||
foreach(BioObjective objective in segment.Objectives) {
|
||||
objective.Remove();
|
||||
}
|
||||
Destroy(segment);
|
||||
}
|
||||
*/
|
||||
|
||||
foreach(BioJoint joint in t.GetComponents<BioJoint>()) {
|
||||
joint.Erase();
|
||||
}
|
||||
foreach(BioObjective objective in t.GetComponents<BioObjective>()) {
|
||||
objective.Erase();
|
||||
}
|
||||
foreach(BioSegment segment in t.GetComponents<BioSegment>()) {
|
||||
Destroy(segment);
|
||||
}
|
||||
|
||||
for(int i=0; i<t.childCount; i++) {
|
||||
Cleanup(t.GetChild(i));
|
||||
}
|
||||
}
|
||||
|
||||
public static BioSegment AddBioSegment(BioIK character, Transform t) {
|
||||
#if UNITY_EDITOR
|
||||
if(Application.isPlaying) {
|
||||
return (t.gameObject.AddComponent(typeof(BioSegment)) as BioSegment).Create(character);
|
||||
} else {
|
||||
return (Undo.AddComponent(t.gameObject, typeof(BioSegment)) as BioSegment).Create(character);
|
||||
}
|
||||
#else
|
||||
return (t.gameObject.AddComponent(typeof(BioSegment)) as BioSegment).Create(character);
|
||||
#endif
|
||||
}
|
||||
|
||||
public static BioJoint AddBioJoint(BioSegment segment) {
|
||||
#if UNITY_EDITOR
|
||||
if(Application.isPlaying) {
|
||||
return (segment.gameObject.AddComponent(typeof(BioJoint)) as BioJoint).Create(segment);
|
||||
} else {
|
||||
return (Undo.AddComponent(segment.gameObject, typeof(BioJoint)) as BioJoint).Create(segment);
|
||||
}
|
||||
#else
|
||||
return (segment.gameObject.AddComponent(typeof(BioJoint)) as BioJoint).Create(segment);
|
||||
#endif
|
||||
}
|
||||
|
||||
public static BioObjective AddObjective(BioSegment segment, ObjectiveType type) {
|
||||
#if UNITY_EDITOR
|
||||
if(Application.isPlaying) {
|
||||
switch(type) {
|
||||
case ObjectiveType.Position:
|
||||
return (segment.gameObject.AddComponent(typeof(Position)) as BioObjective).Create(segment);
|
||||
|
||||
case ObjectiveType.Orientation:
|
||||
return (segment.gameObject.AddComponent(typeof(Orientation)) as BioObjective).Create(segment);
|
||||
|
||||
case ObjectiveType.LookAt:
|
||||
return (segment.gameObject.AddComponent(typeof(LookAt)) as BioObjective).Create(segment);;
|
||||
|
||||
case ObjectiveType.Distance:
|
||||
return (segment.gameObject.AddComponent(typeof(Distance)) as BioObjective).Create(segment);
|
||||
|
||||
case ObjectiveType.JointValue:
|
||||
return (segment.gameObject.AddComponent(typeof(JointValue)) as BioObjective).Create(segment);
|
||||
|
||||
case ObjectiveType.Displacement:
|
||||
return (segment.gameObject.AddComponent(typeof(Displacement)) as BioObjective).Create(segment);
|
||||
|
||||
case ObjectiveType.Projection:
|
||||
return (segment.gameObject.AddComponent(typeof(Projection)) as BioObjective).Create(segment);
|
||||
}
|
||||
} else {
|
||||
switch(type) {
|
||||
case ObjectiveType.Position:
|
||||
return (Undo.AddComponent(segment.gameObject, typeof(Position)) as BioObjective).Create(segment);
|
||||
|
||||
case ObjectiveType.Orientation:
|
||||
return (Undo.AddComponent(segment.gameObject, typeof(Orientation)) as BioObjective).Create(segment);
|
||||
|
||||
case ObjectiveType.LookAt:
|
||||
return (Undo.AddComponent(segment.gameObject, typeof(LookAt)) as BioObjective).Create(segment);
|
||||
|
||||
case ObjectiveType.Distance:
|
||||
return (Undo.AddComponent(segment.gameObject, typeof(Distance)) as BioObjective).Create(segment);
|
||||
|
||||
case ObjectiveType.JointValue:
|
||||
return (Undo.AddComponent(segment.gameObject, typeof(JointValue)) as BioObjective).Create(segment);
|
||||
|
||||
case ObjectiveType.Displacement:
|
||||
return (Undo.AddComponent(segment.gameObject, typeof(Displacement)) as BioObjective).Create(segment);
|
||||
|
||||
case ObjectiveType.Projection:
|
||||
return (Undo.AddComponent(segment.gameObject, typeof(Projection)) as BioObjective).Create(segment);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
#else
|
||||
switch(type) {
|
||||
case ObjectiveType.Position:
|
||||
return (segment.gameObject.AddComponent(typeof(Position)) as BioObjective).Create(segment);
|
||||
|
||||
case ObjectiveType.Orientation:
|
||||
return (segment.gameObject.AddComponent(typeof(Orientation)) as BioObjective).Create(segment);
|
||||
|
||||
case ObjectiveType.LookAt:
|
||||
return (segment.gameObject.AddComponent(typeof(LookAt)) as BioObjective).Create(segment);;
|
||||
|
||||
case ObjectiveType.Distance:
|
||||
return (segment.gameObject.AddComponent(typeof(Distance)) as BioObjective).Create(segment);
|
||||
|
||||
case ObjectiveType.JointValue:
|
||||
return (segment.gameObject.AddComponent(typeof(JointValue)) as BioObjective).Create(segment);
|
||||
|
||||
case ObjectiveType.Displacement:
|
||||
return (segment.gameObject.AddComponent(typeof(Displacement)) as BioObjective).Create(segment);
|
||||
|
||||
case ObjectiveType.Projection:
|
||||
return (segment.gameObject.AddComponent(typeof(Projection)) as BioObjective).Create(segment);
|
||||
}
|
||||
return null;
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
19
Assets/External/BioIK/Helpers/Utility.cs.meta
vendored
Normal file
19
Assets/External/BioIK/Helpers/Utility.cs.meta
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3bb2a5dbad01b4f52bf79d6f22d2f168
|
||||
timeCreated: 1502292156
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Helpers/Utility.cs
|
||||
uploadId: 199125
|
||||
95
Assets/External/BioIK/ReadMe
vendored
Normal file
95
Assets/External/BioIK/ReadMe
vendored
Normal file
@ -0,0 +1,95 @@
|
||||
========================================================================================================================
|
||||
-------------------------------------------------------- BIO IK --------------------------------------------------------
|
||||
========================================================================================================================
|
||||
Hello! First of all, thank you for your interest and trust in this asset! I hope (and believe!) you will not be disappointed. :)
|
||||
|
||||
Everything you need 'BioIK' component. Add it to your character, and add joints and objectives wherever you like. I suggest you
|
||||
take a look at the various demo scenes to get a quick understanding of how it all works! Note that the online step-by-step tutorial
|
||||
is still online, it was much more complex at that time and is now outdated, but can still be used to get an impression about the concept.
|
||||
If you are happy with this asset, please let me know! If you use it for scientific research or related purposes, I'd be glad
|
||||
if you reference my corresponding publications on my website. If you have any questions or suggestions for improvements,
|
||||
just contact me. If you experience any bugs or unexpected behaviour - please let me know! I will fix it as soon as possible
|
||||
since I'm very interested in consistently improving this asset. Hence, further updates will frequently come! :)
|
||||
|
||||
--- HOW TO SETUP YOUR KINEMATIC MODEL ---
|
||||
#Step 1: Provide an arbitrary model with a hierarchical structure of game objects.
|
||||
#Step 2: Add the 'BioIK' component somewhere to your character. You should then see the controllable segments connected by chains.
|
||||
#Step 3: Add joints and objectives where desired. Joints define the motion, Objectives define the goals to be reached by the optimisation.
|
||||
Note that each segment can only have one joint, but multiple objectives at the same time. However, be aware that a higher number
|
||||
of objectives naturally increases the complexity, but can also help to constrain the motion or possible solutions.
|
||||
#Step 4: Fill the parameters for the objectives (i.e. Transform references).
|
||||
#Step 5: If desired, play around with the settings parameters for the algorithm, or the weights for the objectives.
|
||||
#Step 6: Everything should be fine now. Go play around and see the magic happen! :)
|
||||
|
||||
--- PARAMETERS ---
|
||||
===BioIK===
|
||||
Generations (Recommended: 1-3):
|
||||
The number of generations (iterations) per frame. Increasing this parameter linearly increases the computation time.
|
||||
Individiuals (Recommended: 40-120):
|
||||
This is the number of individuals (potential solutions) that are heuristically created and evolved during each evolutionary generation.
|
||||
This number should always be significantly higher than the elitist individuals.
|
||||
Elites (Recommended: 1-3):
|
||||
This is the number of individuals that are currently most successfull among the population. Those are tracked and are
|
||||
exploited to track multiple solutions (local extrema) simultaneously. 1 Elite will cause strictly unimodal solutions
|
||||
but might get stuck in suboptimal extrema. Multiple elites are likely to cause small fluctuations due to multimodal optimisation.
|
||||
For simple kinematic structures, one elite should be sufficient. If you observe the algorithm getting stuck, try using two or three elites.
|
||||
Smoothing (Recommended: 0.1-0.5):
|
||||
This simply blends between the last joint positions and the current joint positions, introducing a smoother transition between postures.
|
||||
Animation Weight:
|
||||
This factor weights animation into solving IK by manipulating the reference frame and then by post-modulating the animation.
|
||||
Hence, 0 = zero animation added and 1 = full animation added into IK.
|
||||
Note that this factor also shifts the predefined joint limits in direction of the animation offset.
|
||||
Animation Blend:
|
||||
This factor blends between the animation posture and the evolved IK posture, where 0 = IK posture and 1 = animation posture.
|
||||
Motion Type:
|
||||
Realistic - Creates smooth motion to the target configuration depending on acceleration and velocity.
|
||||
Instantaneous - Immediately assigns the target configuration.
|
||||
|
||||
===Joints===
|
||||
Anchor:
|
||||
The connected anchor to which the motion is relative to.
|
||||
Orientation:
|
||||
The orientation of the motion relative to the connected body.
|
||||
Default Frame:
|
||||
This is the reference transformation for computing relative joint motion.
|
||||
|
||||
X/Y/Z Motion:
|
||||
Constrained:
|
||||
Use this if you want to use joint limits.
|
||||
Lower Limit:
|
||||
Assign a lower limit for this joint.
|
||||
Upper Limit:
|
||||
Assign an upper limit for this joint.
|
||||
Target Value:
|
||||
This value is controlled by BioIK, but you can also individually set this value if you want and if you turn off solving IK automatically :)
|
||||
|
||||
===Objective Component=== (See individual files for further description)
|
||||
Weight:
|
||||
How important is this objective for the optimisation?
|
||||
---Position---
|
||||
This objective optimises a given target position with XYZ coordinates. The target can either be a transform or a Vector3.
|
||||
The maximum error is the threshold for which a solution is considered as converged for this objective.
|
||||
---Orientation---
|
||||
This objective optimises a given target orientation. The target can either be a transform or a Quaternion.
|
||||
The maximum error is the threshold for which a solution is considered as converged for this objective.
|
||||
---LookAt---
|
||||
This objective optimises a target by looking into its direction relative to the objective. The target can either be a transform or a Vector3.
|
||||
The direction vector is defined relative to the objective. The maximum error is the threshold for which a solution is considered as converged for this objective.
|
||||
---Distance--- (beta development)
|
||||
This objective ensures that the distance from the objective to the target becomes not lower than the given distance threshold.
|
||||
---Displacement--- (beta development)
|
||||
This objective aims to achieve minimal joint value changes during optimisation, and thus to avoid fluctuations or larger posture changes.
|
||||
Note that the weight should typically be chosen comparatively small.
|
||||
---JointValue--- (beta development)
|
||||
This objective aims to maintain given joint value for a specific joint.
|
||||
---Projection--- (beta development)
|
||||
This objective projects a transform onto the surface with respect to the normal vector and the projection distance. (Will be integrated into position and orientation soon)
|
||||
|
||||
|
||||
========================================================================================================================
|
||||
--------------------------------------------------- ADDITIONAL NOTES ---------------------------------------------------
|
||||
========================================================================================================================
|
||||
#1 - Please avoid non-uniform scaling. It's the root of all evil and might destroy the IK solutions. The implemented FK solver does
|
||||
not consider this mainly for performance reasons.
|
||||
#2 - BIO IK NOW USES THREADING - IF YOU ARE USING THE HOLOLENS ON WINDOWS, THERE MIGHT BE SOME ISSUES. IN THIS CASE, PLEASE CONTACT ME!
|
||||
========================================================================================================================
|
||||
15
Assets/External/BioIK/ReadMe.meta
vendored
Normal file
15
Assets/External/BioIK/ReadMe.meta
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 15c6d7a00aae849258972b7169e6fade
|
||||
timeCreated: 1502921289
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/ReadMe
|
||||
uploadId: 199125
|
||||
9
Assets/External/BioIK/Setup.meta
vendored
Normal file
9
Assets/External/BioIK/Setup.meta
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c660073be26c24b6183eacc7e73abe9d
|
||||
folderAsset: yes
|
||||
timeCreated: 1502284610
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
538
Assets/External/BioIK/Setup/BioJoint.cs
vendored
Normal file
538
Assets/External/BioIK/Setup/BioJoint.cs
vendored
Normal file
@ -0,0 +1,538 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace BioIK {
|
||||
|
||||
[AddComponentMenu("")]
|
||||
public class BioJoint : MonoBehaviour {
|
||||
public BioSegment Segment;
|
||||
public Motion X,Y,Z;
|
||||
public JointType JointType = JointType.Rotational; //Type of the joint
|
||||
|
||||
[SerializeField] private Vector3 Anchor = Vector3.zero; //Joint anchor
|
||||
[SerializeField] private Vector3 Orientation = Vector3.zero; //Joint orientation
|
||||
[SerializeField] private float DPX, DPY, DPZ, DRX, DRY, DRZ, DRW; //Default frame
|
||||
|
||||
private Vector3 AnimationPosition, AnimatedDefaultPosition;
|
||||
private Quaternion AnimationRotation, AnimatedDefaultRotation;
|
||||
private double R1, R2, R3, R4, R5, R6, R7, R8, R9; //Precomputed rotation information
|
||||
private Vector3 LSA; //LocalScaledAnchor
|
||||
private Vector3 ADPADRSA; //AnimatedDefaultPosition + AnimatedDefaultRotation * LocalScaledAnchor
|
||||
private Vector3 LastPosition;
|
||||
private Quaternion LastRotation;
|
||||
private Vector3 Scale;
|
||||
|
||||
void Awake() {
|
||||
|
||||
}
|
||||
|
||||
void Start() {
|
||||
LastPosition = transform.localPosition;
|
||||
LastRotation = transform.localRotation;
|
||||
}
|
||||
|
||||
void OnEnable() {
|
||||
LastPosition = transform.localPosition;
|
||||
LastRotation = transform.localRotation;
|
||||
if(Segment != null) {
|
||||
Segment.Character.Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
void OnDisable() {
|
||||
Segment.Character.Refresh();
|
||||
}
|
||||
|
||||
void OnDestroy() {
|
||||
|
||||
}
|
||||
|
||||
public BioJoint Create(BioSegment segment) {
|
||||
Segment = segment;
|
||||
Segment.Transform.hideFlags = HideFlags.NotEditable;
|
||||
hideFlags = HideFlags.HideInInspector;
|
||||
|
||||
X = new Motion(this, Vector3.right);
|
||||
Y = new Motion(this, Vector3.up);
|
||||
Z = new Motion(this, Vector3.forward);
|
||||
|
||||
SetDefaultFrame(transform.localPosition, transform.localRotation);
|
||||
SetAnchor(Anchor);
|
||||
|
||||
Vector3 forward = Vector3.zero;
|
||||
if(Segment.Childs.Length == 1) {
|
||||
forward = Segment.Childs[0].Transform.localPosition;
|
||||
} else if(Segment.Parent != null) {
|
||||
forward = Quaternion.Inverse(Segment.Transform.localRotation) * Segment.Transform.localPosition;
|
||||
}
|
||||
if(forward.magnitude != 0f) {
|
||||
SetOrientation(Quaternion.LookRotation(forward, Vector3.up).eulerAngles);
|
||||
} else {
|
||||
SetOrientation(Orientation);
|
||||
}
|
||||
|
||||
LastPosition = transform.localPosition;
|
||||
LastRotation = transform.localRotation;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Remove() {
|
||||
RestoreDefaultFrame();
|
||||
Segment.Transform.hideFlags = HideFlags.None;
|
||||
if(Segment != null) {
|
||||
Segment.Joint = null;
|
||||
if(Segment.Character != null) {
|
||||
Segment.Character.Refresh();
|
||||
}
|
||||
}
|
||||
Utility.Destroy(this);
|
||||
}
|
||||
|
||||
public void Erase() {
|
||||
RestoreDefaultFrame();
|
||||
Segment.Transform.hideFlags = HideFlags.None;
|
||||
Utility.Destroy(this);
|
||||
}
|
||||
|
||||
public void PrecaptureAnimation() {
|
||||
transform.hasChanged = false;
|
||||
}
|
||||
|
||||
public void PostcaptureAnimation() {
|
||||
if(transform.hasChanged) {
|
||||
AnimationPosition = transform.localPosition;
|
||||
AnimationRotation = transform.localRotation;
|
||||
} else {
|
||||
AnimationPosition = new Vector3(DPX, DPY, DPZ);
|
||||
AnimationRotation = new Quaternion(DRX, DRY, DRZ, DRW);
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateData() {
|
||||
AnimatedDefaultPosition = (1f-Segment.Character.AnimationWeight) * new Vector3(DPX, DPY, DPZ) + Segment.Character.AnimationWeight * AnimationPosition;
|
||||
AnimatedDefaultRotation = Quaternion.Slerp(new Quaternion(DRX, DRY, DRZ, DRW), AnimationRotation, Segment.Character.AnimationWeight);
|
||||
R1 = (1.0 - 2.0 * (AnimatedDefaultRotation.y * AnimatedDefaultRotation.y + AnimatedDefaultRotation.z * AnimatedDefaultRotation.z));
|
||||
R2 = 2.0 * (AnimatedDefaultRotation.x * AnimatedDefaultRotation.y + AnimatedDefaultRotation.w * AnimatedDefaultRotation.z);
|
||||
R3 = 2.0 * (AnimatedDefaultRotation.x * AnimatedDefaultRotation.z - AnimatedDefaultRotation.w * AnimatedDefaultRotation.y);
|
||||
R4 = 2.0 * (AnimatedDefaultRotation.x * AnimatedDefaultRotation.y - AnimatedDefaultRotation.w * AnimatedDefaultRotation.z);
|
||||
R5 = (1.0 - 2.0 * (AnimatedDefaultRotation.x * AnimatedDefaultRotation.x + AnimatedDefaultRotation.z * AnimatedDefaultRotation.z));
|
||||
R6 = 2.0 * (AnimatedDefaultRotation.y * AnimatedDefaultRotation.z + AnimatedDefaultRotation.w * AnimatedDefaultRotation.x);
|
||||
R7 = 2.0 * (AnimatedDefaultRotation.x * AnimatedDefaultRotation.z + AnimatedDefaultRotation.w * AnimatedDefaultRotation.y);
|
||||
R8 = 2.0 * (AnimatedDefaultRotation.y * AnimatedDefaultRotation.z - AnimatedDefaultRotation.w * AnimatedDefaultRotation.x);
|
||||
R9 = (1.0 - 2.0 * (AnimatedDefaultRotation.x * AnimatedDefaultRotation.x + AnimatedDefaultRotation.y * AnimatedDefaultRotation.y));
|
||||
LSA = Vector3.Scale(Anchor, transform.localScale);
|
||||
ADPADRSA = AnimatedDefaultPosition + AnimatedDefaultRotation * LSA;
|
||||
Scale = transform.lossyScale;
|
||||
}
|
||||
|
||||
public void ProcessMotion() {
|
||||
if(!enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
//Compute local transformation
|
||||
double lpX, lpY, lpZ, lrX, lrY, lrZ, lrW;
|
||||
if(JointType == JointType.Rotational) {
|
||||
ComputeLocalTransformation(Utility.Deg2Rad*X.ProcessMotion(Segment.Character.MotionType), Utility.Deg2Rad*Y.ProcessMotion(Segment.Character.MotionType), Utility.Deg2Rad*Z.ProcessMotion(Segment.Character.MotionType), out lpX, out lpY, out lpZ, out lrX, out lrY, out lrZ, out lrW);
|
||||
} else {
|
||||
ComputeLocalTransformation(X.ProcessMotion(Segment.Character.MotionType), Y.ProcessMotion(Segment.Character.MotionType), Z.ProcessMotion(Segment.Character.MotionType), out lpX, out lpY, out lpZ, out lrX, out lrY, out lrZ, out lrW);
|
||||
}
|
||||
|
||||
//Apply local transformation
|
||||
if(Application.isPlaying) {
|
||||
//Assigning transformation
|
||||
transform.localPosition = (1f-Segment.Character.Smoothing) * new Vector3((float)lpX, (float)lpY, (float)lpZ) + Segment.Character.Smoothing * LastPosition;
|
||||
transform.localRotation = Quaternion.Slerp(new Quaternion((float)lrX, (float)lrY, (float)lrZ, (float)lrW), LastRotation, Segment.Character.Smoothing);
|
||||
|
||||
//Blending animation
|
||||
transform.localPosition = (1f-Segment.Character.AnimationBlend) * transform.localPosition + Segment.Character.AnimationBlend * AnimationPosition;
|
||||
transform.localRotation = Quaternion.Slerp(transform.localRotation, AnimationRotation, Segment.Character.AnimationBlend);
|
||||
} else {
|
||||
transform.localPosition = new Vector3((float)lpX, (float)lpY, (float)lpZ);
|
||||
transform.localRotation = new Quaternion((float)lrX, (float)lrY, (float)lrZ, (float)lrW);
|
||||
}
|
||||
|
||||
//Remember transformation
|
||||
LastPosition = transform.localPosition;
|
||||
LastRotation = transform.localRotation;
|
||||
|
||||
transform.hasChanged = false;
|
||||
}
|
||||
|
||||
//Fast implementation to compute the local transform given the joint values (in radians / metres)
|
||||
public void ComputeLocalTransformation(double valueX, double valueY, double valueZ, out double lpX, out double lpY, out double lpZ, out double lrX, out double lrY, out double lrZ, out double lrW) {
|
||||
if(JointType == JointType.Translational) {
|
||||
//LocalPosition = DefaultLocalPosition + (Values . Axes)
|
||||
//LocalRotation = DefaultLocalRotation
|
||||
valueX /= Scale.x;
|
||||
valueY /= Scale.y;
|
||||
valueZ /= Scale.z;
|
||||
double x = valueX * X.Axis.x + valueY * Y.Axis.x + valueZ * Z.Axis.x;
|
||||
double y = valueX * X.Axis.y + valueY * Y.Axis.y + valueZ * Z.Axis.y;
|
||||
double z = valueX * X.Axis.z + valueY * Y.Axis.z + valueZ * Z.Axis.z;
|
||||
//Local position for translational motion
|
||||
lpX = AnimatedDefaultPosition.x + R1 * x + R4 * y + R7 * z;
|
||||
lpY = AnimatedDefaultPosition.y + R2 * x + R5 * y + R8 * z;
|
||||
lpZ = AnimatedDefaultPosition.z + R3 * x + R6 * y + R9 * z;
|
||||
//Local rotation for translational motion
|
||||
lrX = AnimatedDefaultRotation.x; lrY = AnimatedDefaultRotation.y; lrZ = AnimatedDefaultRotation.z; lrW = AnimatedDefaultRotation.w;
|
||||
} else {
|
||||
//LocalPosition = WorldAnchor + AngleAxis(roll) * AngleAxis(pitch) * AngleAxis(yaw) * (-LocalAnchor)
|
||||
//LocalRotation = DefaultLocalRotation * AngleAxis(roll) * AngleAxis(pitch) * AngleAxis(yaw)
|
||||
double sin, x1, y1, z1, w1, x2, y2, z2, w2, qx, qy, qz, qw = 0.0;
|
||||
if(valueZ != 0.0) {
|
||||
sin = System.Math.Sin(valueZ/2.0);
|
||||
qx = Z.Axis.x * sin;
|
||||
qy = Z.Axis.y * sin;
|
||||
qz = Z.Axis.z * sin;
|
||||
qw = System.Math.Cos(valueZ/2.0);
|
||||
if(valueX != 0.0) {
|
||||
sin = System.Math.Sin(valueX/2.0);
|
||||
x1 = X.Axis.x * sin;
|
||||
y1 = X.Axis.y * sin;
|
||||
z1 = X.Axis.z * sin;
|
||||
w1 = System.Math.Cos(valueX/2.0);
|
||||
x2 = qx; y2 = qy; z2 = qz; w2 = qw;
|
||||
qx = x1 * w2 + y1 * z2 - z1 * y2 + w1 * x2;
|
||||
qy = -x1 * z2 + y1 * w2 + z1 * x2 + w1 * y2;
|
||||
qz = x1 * y2 - y1 * x2 + z1 * w2 + w1 * z2;
|
||||
qw = -x1 * x2 - y1 * y2 - z1 * z2 + w1 * w2;
|
||||
if(valueY != 0.0) {
|
||||
sin = System.Math.Sin(valueY/2.0);
|
||||
x1 = Y.Axis.x * sin;
|
||||
y1 = Y.Axis.y * sin;
|
||||
z1 = Y.Axis.z * sin;
|
||||
w1 = System.Math.Cos(valueY/2.0);
|
||||
x2 = qx; y2 = qy; z2 = qz; w2 = qw;
|
||||
qx = x1 * w2 + y1 * z2 - z1 * y2 + w1 * x2;
|
||||
qy = -x1 * z2 + y1 * w2 + z1 * x2 + w1 * y2;
|
||||
qz = x1 * y2 - y1 * x2 + z1 * w2 + w1 * z2;
|
||||
qw = -x1 * x2 - y1 * y2 - z1 * z2 + w1 * w2;
|
||||
} else {
|
||||
|
||||
}
|
||||
} else if(valueY != 0.0) {
|
||||
sin = System.Math.Sin(valueY/2.0);
|
||||
x1 = Y.Axis.x * sin;
|
||||
y1 = Y.Axis.y * sin;
|
||||
z1 = Y.Axis.z * sin;
|
||||
w1 = System.Math.Cos(valueY/2.0);
|
||||
x2 = qx; y2 = qy; z2 = qz; w2 = qw;
|
||||
qx = x1 * w2 + y1 * z2 - z1 * y2 + w1 * x2;
|
||||
qy = -x1 * z2 + y1 * w2 + z1 * x2 + w1 * y2;
|
||||
qz = x1 * y2 - y1 * x2 + z1 * w2 + w1 * z2;
|
||||
qw = -x1 * x2 - y1 * y2 - z1 * z2 + w1 * w2;
|
||||
} else {
|
||||
|
||||
}
|
||||
} else if(valueX != 0.0) {
|
||||
sin = System.Math.Sin(valueX/2.0);
|
||||
qx = X.Axis.x * sin;
|
||||
qy = X.Axis.y * sin;
|
||||
qz = X.Axis.z * sin;
|
||||
qw = System.Math.Cos(valueX/2.0);
|
||||
if(valueY != 0.0) {
|
||||
sin = System.Math.Sin(valueY/2.0);
|
||||
x1 = Y.Axis.x * sin;
|
||||
y1 = Y.Axis.y * sin;
|
||||
z1 = Y.Axis.z * sin;
|
||||
w1 = System.Math.Cos(valueY/2.0);
|
||||
x2 = qx; y2 = qy; z2 = qz; w2 = qw;
|
||||
qx = x1 * w2 + y1 * z2 - z1 * y2 + w1 * x2;
|
||||
qy = -x1 * z2 + y1 * w2 + z1 * x2 + w1 * y2;
|
||||
qz = x1 * y2 - y1 * x2 + z1 * w2 + w1 * z2;
|
||||
qw = -x1 * x2 - y1 * y2 - z1 * z2 + w1 * w2;
|
||||
} else {
|
||||
|
||||
}
|
||||
} else if(valueY != 0.0) {
|
||||
sin = System.Math.Sin(valueY/2.0);
|
||||
qx = Y.Axis.x * sin;
|
||||
qy = Y.Axis.y * sin;
|
||||
qz = Y.Axis.z * sin;
|
||||
qw = System.Math.Cos(valueY/2.0);
|
||||
} else {
|
||||
lpX = AnimatedDefaultPosition.x;
|
||||
lpY = AnimatedDefaultPosition.y;
|
||||
lpZ = AnimatedDefaultPosition.z;
|
||||
lrX = AnimatedDefaultRotation.x;
|
||||
lrY = AnimatedDefaultRotation.y;
|
||||
lrZ = AnimatedDefaultRotation.z;
|
||||
lrW = AnimatedDefaultRotation.w;
|
||||
return;
|
||||
}
|
||||
|
||||
//Local Rotation
|
||||
//R' = R*Q
|
||||
lrX = AnimatedDefaultRotation.x * qw + AnimatedDefaultRotation.y * qz - AnimatedDefaultRotation.z * qy + AnimatedDefaultRotation.w * qx;
|
||||
lrY = -AnimatedDefaultRotation.x * qz + AnimatedDefaultRotation.y * qw + AnimatedDefaultRotation.z * qx + AnimatedDefaultRotation.w * qy;
|
||||
lrZ = AnimatedDefaultRotation.x * qy - AnimatedDefaultRotation.y * qx + AnimatedDefaultRotation.z * qw + AnimatedDefaultRotation.w * qz;
|
||||
lrW = -AnimatedDefaultRotation.x * qx - AnimatedDefaultRotation.y * qy - AnimatedDefaultRotation.z * qz + AnimatedDefaultRotation.w * qw;
|
||||
|
||||
//Local Position
|
||||
if(LSA.x == 0.0 && LSA.y == 0.0 && LSA.z == 0.0) {
|
||||
//P' = Pz
|
||||
lpX = AnimatedDefaultPosition.x;
|
||||
lpY = AnimatedDefaultPosition.y;
|
||||
lpZ = AnimatedDefaultPosition.z;
|
||||
} else {
|
||||
//P' = P + RA + R*Q*(-A)
|
||||
lpX = ADPADRSA.x + 2.0 * ((0.5 - lrY * lrY - lrZ * lrZ) * -LSA.x + (lrX * lrY - lrW * lrZ) * -LSA.y + (lrX * lrZ + lrW * lrY) * -LSA.z);
|
||||
lpY = ADPADRSA.y + 2.0 * ((lrX * lrY + lrW * lrZ) * -LSA.x + (0.5 - lrX * lrX - lrZ * lrZ) * -LSA.y + (lrY * lrZ - lrW * lrX) * -LSA.z);
|
||||
lpZ = ADPADRSA.z + 2.0 * ((lrX * lrZ - lrW * lrY) * -LSA.x + (lrY * lrZ + lrW * lrX) * -LSA.y + (0.5 - lrX * lrX - lrY * lrY) * -LSA.z);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3 GetAnchorInWorldSpace() {
|
||||
return transform.position + transform.rotation * Vector3.Scale(transform.lossyScale, Anchor);
|
||||
}
|
||||
|
||||
public void SetAnchor(Vector3 anchor) {
|
||||
Anchor = anchor;
|
||||
}
|
||||
|
||||
public Vector3 GetAnchor() {
|
||||
return Anchor;
|
||||
}
|
||||
|
||||
public void SetOrientation(Vector3 orientation) {
|
||||
Orientation = orientation;
|
||||
Quaternion o = Quaternion.Euler(Orientation);
|
||||
X.Axis = o * Vector3.right;
|
||||
Y.Axis = o * Vector3.up;
|
||||
Z.Axis = o * Vector3.forward;
|
||||
}
|
||||
|
||||
public Vector3 GetOrientation() {
|
||||
return Orientation;
|
||||
}
|
||||
|
||||
public Vector3 GetDefaultPosition() {
|
||||
return new Vector3(DPX, DPY, DPZ);
|
||||
}
|
||||
|
||||
public Quaternion GetDefaultRotation() {
|
||||
return new Quaternion(DRX, DRY, DRZ, DRW);
|
||||
}
|
||||
|
||||
public int GetDoF() {
|
||||
int dof = 0;
|
||||
if(X.IsEnabled()) {
|
||||
dof += 1;
|
||||
}
|
||||
if(Y.IsEnabled()) {
|
||||
dof += 1;
|
||||
}
|
||||
if(Z.IsEnabled()) {
|
||||
dof += 1;
|
||||
}
|
||||
return dof;
|
||||
}
|
||||
|
||||
public void SetDefaultFrame(Vector3 localPosition, Quaternion localRotation) {
|
||||
DPX = localPosition.x;
|
||||
DPY = localPosition.y;
|
||||
DPZ = localPosition.z;
|
||||
DRX = localRotation.x;
|
||||
DRY = localRotation.y;
|
||||
DRZ = localRotation.z;
|
||||
DRW = localRotation.w;
|
||||
}
|
||||
|
||||
public void RestoreDefaultFrame() {
|
||||
transform.localPosition = new Vector3(DPX, DPY, DPZ);
|
||||
transform.localRotation = new Quaternion(DRX, DRY, DRZ, DRW);
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class Motion {
|
||||
public BioJoint Joint;
|
||||
|
||||
public bool Enabled;
|
||||
public bool Constrained = true;
|
||||
public double LowerLimit;
|
||||
public double UpperLimit;
|
||||
public double TargetValue;
|
||||
public double CurrentValue;
|
||||
public double CurrentError;
|
||||
public double CurrentVelocity;
|
||||
public double CurrentAcceleration;
|
||||
public Vector3 Axis;
|
||||
|
||||
private const double Speedup = 1.0;
|
||||
private const double Slowdown = 1.0;
|
||||
|
||||
public Motion(BioJoint joint, Vector3 axis) {
|
||||
Joint = joint;
|
||||
Axis = axis;
|
||||
}
|
||||
|
||||
//Runs one motion control cycle
|
||||
public double ProcessMotion(MotionType type) {
|
||||
if(!Enabled) {
|
||||
//return CurrentValue;
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
if(!Application.isPlaying) {
|
||||
UpdateInstantaneous();
|
||||
} else {
|
||||
if(type == MotionType.Instantaneous) {
|
||||
UpdateInstantaneous();
|
||||
}
|
||||
if(type == MotionType.Realistic) {
|
||||
UpdateRealistic();
|
||||
}
|
||||
}
|
||||
|
||||
return CurrentValue;
|
||||
}
|
||||
|
||||
//Performs instantaneous motion control
|
||||
private void UpdateInstantaneous() {
|
||||
CurrentValue = TargetValue;
|
||||
CurrentError = 0f;
|
||||
CurrentVelocity = 0f;
|
||||
CurrentAcceleration = 0f;
|
||||
}
|
||||
|
||||
//Performs realistic motion control
|
||||
//Input: TargetValue, CurrentValue, CurrentVelocity (initially 0), CurrentAcceleration (initially 0), MaximumVelocity, MaximumAcceleration
|
||||
//Output: CurrentValue, CurrentVelocity, CurrentAcceleration
|
||||
private void UpdateRealistic() {
|
||||
if(Time.deltaTime == 0f) {
|
||||
return;
|
||||
}
|
||||
|
||||
double maxVel = Joint.JointType == JointType.Rotational ? Utility.Rad2Deg * Joint.Segment.Character.MaximumVelocity : Joint.Segment.Character.MaximumVelocity;
|
||||
double maxAcc = Joint.JointType == JointType.Rotational ? Utility.Rad2Deg * Joint.Segment.Character.MaximumAcceleration : Joint.Segment.Character.MaximumAcceleration;
|
||||
|
||||
//Compute current error
|
||||
CurrentError = TargetValue-CurrentValue;
|
||||
|
||||
//Minimum distance to stop: s = |(v^2)/(2a_max)| + |a/2*t^2| + |v*t|
|
||||
double stoppingDistance =
|
||||
System.Math.Abs((CurrentVelocity*CurrentVelocity)/(2.0*maxAcc*Slowdown))
|
||||
+ System.Math.Abs(CurrentAcceleration)/2.0*Time.deltaTime*Time.deltaTime
|
||||
+ System.Math.Abs(CurrentVelocity)*Time.deltaTime;
|
||||
|
||||
if(System.Math.Abs(CurrentError) > stoppingDistance) {
|
||||
//Accelerate
|
||||
CurrentAcceleration = System.Math.Sign(CurrentError)*System.Math.Min(System.Math.Abs(CurrentError) / Time.deltaTime, maxAcc*Speedup);
|
||||
} else {
|
||||
//Deccelerate
|
||||
if(CurrentError == 0.0) {
|
||||
CurrentAcceleration = -System.Math.Sign(CurrentVelocity)*
|
||||
System.Math.Min(System.Math.Abs(CurrentVelocity) / Time.deltaTime, maxAcc);
|
||||
|
||||
} else {
|
||||
CurrentAcceleration = -System.Math.Sign(CurrentVelocity)*
|
||||
System.Math.Min(
|
||||
System.Math.Min(System.Math.Abs(CurrentVelocity) / Time.deltaTime, maxAcc),
|
||||
System.Math.Abs((CurrentVelocity*CurrentVelocity)/(2.0*CurrentError))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
//Compute new velocity
|
||||
CurrentVelocity += CurrentAcceleration*Time.deltaTime;
|
||||
|
||||
//Clamp velocity
|
||||
if(CurrentVelocity > maxVel) {
|
||||
CurrentVelocity = maxVel;
|
||||
}
|
||||
if(CurrentVelocity < -maxVel) {
|
||||
CurrentVelocity = -maxVel;
|
||||
}
|
||||
|
||||
//Update Current Value
|
||||
CurrentValue += CurrentVelocity*Time.deltaTime;
|
||||
}
|
||||
|
||||
public void SetEnabled(bool enabled) {
|
||||
if(Enabled != enabled) {
|
||||
Enabled = enabled;
|
||||
Joint.Segment.Character.Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsEnabled() {
|
||||
return Enabled;
|
||||
}
|
||||
|
||||
public void SetLowerLimit(double value) {
|
||||
LowerLimit = System.Math.Min(0.0, value);
|
||||
}
|
||||
|
||||
public double GetLowerLimit(bool normalised = false) {
|
||||
if(Constrained) {
|
||||
if(normalised && Joint.JointType == JointType.Rotational) {
|
||||
return Utility.Deg2Rad * LowerLimit;
|
||||
} else {
|
||||
return LowerLimit;
|
||||
}
|
||||
} else {
|
||||
return double.MinValue;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetUpperLimit(double value) {
|
||||
UpperLimit = System.Math.Max(0.0, value);
|
||||
}
|
||||
|
||||
public double GetUpperLimit(bool normalised = false) {
|
||||
if(Constrained) {
|
||||
if(normalised && Joint.JointType == JointType.Rotational) {
|
||||
return Utility.Deg2Rad * UpperLimit;
|
||||
} else {
|
||||
return UpperLimit;
|
||||
}
|
||||
} else {
|
||||
return double.MaxValue;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetTargetValue(double value, bool normalised = false) {
|
||||
if(normalised && Joint.JointType == JointType.Rotational) {
|
||||
value *= Utility.Rad2Deg;
|
||||
}
|
||||
if(Constrained) {
|
||||
if(TargetValue > UpperLimit) {
|
||||
value = UpperLimit;
|
||||
}
|
||||
if(TargetValue < LowerLimit) {
|
||||
value = LowerLimit;
|
||||
}
|
||||
}
|
||||
TargetValue = value;
|
||||
}
|
||||
|
||||
public double GetTargetValue(bool normalised = false) {
|
||||
if(normalised && Joint.JointType == JointType.Rotational) {
|
||||
return Utility.Deg2Rad * TargetValue;
|
||||
} else {
|
||||
return TargetValue;
|
||||
}
|
||||
}
|
||||
|
||||
public double GetCurrentValue() {
|
||||
return CurrentValue;
|
||||
}
|
||||
|
||||
public double GetCurrentError() {
|
||||
return CurrentError;
|
||||
}
|
||||
|
||||
public double GetCurrentVelocity() {
|
||||
return CurrentVelocity;
|
||||
}
|
||||
|
||||
public double GetCurrentAcceleration() {
|
||||
return CurrentAcceleration;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
19
Assets/External/BioIK/Setup/BioJoint.cs.meta
vendored
Normal file
19
Assets/External/BioIK/Setup/BioJoint.cs.meta
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3531dc447309b4dfe8f7f4652bffd3fa
|
||||
timeCreated: 1502289032
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Setup/BioJoint.cs
|
||||
uploadId: 199125
|
||||
82
Assets/External/BioIK/Setup/BioObjective.cs
vendored
Normal file
82
Assets/External/BioIK/Setup/BioObjective.cs
vendored
Normal file
@ -0,0 +1,82 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace BioIK {
|
||||
|
||||
[AddComponentMenu("")]
|
||||
public abstract class BioObjective : MonoBehaviour {
|
||||
public BioSegment Segment;
|
||||
public double Weight = 1.0;
|
||||
|
||||
void Awake() {
|
||||
|
||||
}
|
||||
|
||||
void Start() {
|
||||
|
||||
}
|
||||
|
||||
void OnEnable() {
|
||||
if(Segment != null) {
|
||||
Segment.Character.Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
void OnDisable() {
|
||||
if(Segment != null) {
|
||||
Segment.Character.Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
void OnDestroy() {
|
||||
|
||||
}
|
||||
|
||||
public BioObjective Create(BioSegment segment) {
|
||||
Segment = segment;
|
||||
hideFlags = HideFlags.HideInInspector;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Remove() {
|
||||
for(int i=0; i<Segment.Objectives.Length; i++) {
|
||||
if(Segment.Objectives[i] == this) {
|
||||
for(int j=i; j<Segment.Objectives.Length-1; j++) {
|
||||
Segment.Objectives[j] = Segment.Objectives[j+1];
|
||||
}
|
||||
System.Array.Resize(ref Segment.Objectives, Segment.Objectives.Length-1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(Segment != null) {
|
||||
if(Segment.Character != null) {
|
||||
Segment.Character.Refresh();
|
||||
}
|
||||
}
|
||||
Utility.Destroy(this);
|
||||
}
|
||||
|
||||
public void Erase() {
|
||||
Utility.Destroy(this);
|
||||
}
|
||||
|
||||
public void SetWeight(double weight) {
|
||||
if(weight < 0.0) {
|
||||
Debug.Log("Weight must be at least zero.");
|
||||
Weight = 0.0;
|
||||
return;
|
||||
}
|
||||
Weight = weight;
|
||||
}
|
||||
|
||||
public double GetWeight() {
|
||||
return Weight;
|
||||
}
|
||||
|
||||
public abstract ObjectiveType GetObjectiveType();
|
||||
public abstract void UpdateData();
|
||||
public abstract double ComputeLoss(double WPX, double WPY, double WPZ, double WRX, double WRY, double WRZ, double WRW, Model.Node node, double[] configuration);
|
||||
public abstract bool CheckConvergence(double WPX, double WPY, double WPZ, double WRX, double WRY, double WRZ, double WRW, Model.Node node, double[] configuration);
|
||||
public abstract double ComputeValue(double WPX, double WPY, double WPZ, double WRX, double WRY, double WRZ, double WRW, Model.Node node, double[] configuration);
|
||||
}
|
||||
|
||||
}
|
||||
19
Assets/External/BioIK/Setup/BioObjective.cs.meta
vendored
Normal file
19
Assets/External/BioIK/Setup/BioObjective.cs.meta
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8afd158613c2448d7931d8562d5edcd3
|
||||
timeCreated: 1502289036
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Setup/BioObjective.cs
|
||||
uploadId: 199125
|
||||
75
Assets/External/BioIK/Setup/BioSegment.cs
vendored
Normal file
75
Assets/External/BioIK/Setup/BioSegment.cs
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace BioIK {
|
||||
|
||||
[AddComponentMenu("")]
|
||||
public class BioSegment : MonoBehaviour {
|
||||
public BioIK Character;
|
||||
public Transform Transform;
|
||||
public BioSegment Parent;
|
||||
public BioSegment[] Childs = new BioSegment[0];
|
||||
public BioJoint Joint = null;
|
||||
public BioObjective[] Objectives = new BioObjective[0];
|
||||
|
||||
void Awake() {
|
||||
|
||||
}
|
||||
|
||||
void Start() {
|
||||
|
||||
}
|
||||
|
||||
void OnDestroy() {
|
||||
|
||||
}
|
||||
|
||||
public BioSegment Create(BioIK character) {
|
||||
Character = character;
|
||||
Transform = transform;
|
||||
hideFlags = HideFlags.HideInInspector;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vector3 GetAnchoredPosition() {
|
||||
return Joint == null ? Transform.position : Joint.GetAnchorInWorldSpace();
|
||||
}
|
||||
|
||||
public void AddChild(BioSegment child) {
|
||||
System.Array.Resize(ref Childs, Childs.Length+1);
|
||||
Childs[Childs.Length-1] = child;
|
||||
}
|
||||
|
||||
public void RenewRelations() {
|
||||
Parent = null;
|
||||
System.Array.Resize(ref Childs, 0);
|
||||
if(Transform != Character.transform) {
|
||||
Parent = Character.FindSegment(Transform.parent);
|
||||
Parent.AddChild(this);
|
||||
}
|
||||
}
|
||||
|
||||
public BioJoint AddJoint() {
|
||||
if(Joint != null) {
|
||||
Debug.Log("The segment already has a joint.");
|
||||
} else {
|
||||
Joint = Utility.AddBioJoint(this);
|
||||
Character.Refresh();
|
||||
}
|
||||
return Joint;
|
||||
}
|
||||
|
||||
public BioObjective AddObjective(ObjectiveType type) {
|
||||
BioObjective objective = Utility.AddObjective(this, type);
|
||||
if(objective == null) {
|
||||
Debug.Log("The objective could not be found.");
|
||||
return null;
|
||||
} else {
|
||||
System.Array.Resize(ref Objectives, Objectives.Length+1);
|
||||
Objectives[Objectives.Length-1] = objective;
|
||||
Character.Refresh();
|
||||
return Objectives[Objectives.Length-1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
19
Assets/External/BioIK/Setup/BioSegment.cs.meta
vendored
Normal file
19
Assets/External/BioIK/Setup/BioSegment.cs.meta
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5cc329982edfc412a8a508a8e175eef1
|
||||
timeCreated: 1502284615
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Setup/BioSegment.cs
|
||||
uploadId: 199125
|
||||
9
Assets/External/BioIK/Setup/Objectives.meta
vendored
Normal file
9
Assets/External/BioIK/Setup/Objectives.meta
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6554a6d6f57374482937e20cf1e95f0c
|
||||
folderAsset: yes
|
||||
timeCreated: 1502289742
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
47
Assets/External/BioIK/Setup/Objectives/Displacement.cs
vendored
Normal file
47
Assets/External/BioIK/Setup/Objectives/Displacement.cs
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
using UnityEngine;
|
||||
|
||||
//!!!!!!
|
||||
//This objective type is still under development
|
||||
//!!!!!!
|
||||
|
||||
namespace BioIK {
|
||||
|
||||
//This objective aims to minimise the joint configuration changes between consecutive solutions.
|
||||
//It should only be used once as it acts as a global objective for the whole body posture.
|
||||
//Preferably add it to the root of your character.
|
||||
[AddComponentMenu("")]
|
||||
public class Displacement : BioObjective {
|
||||
|
||||
public override ObjectiveType GetObjectiveType() {
|
||||
return ObjectiveType.Displacement;
|
||||
}
|
||||
|
||||
public override void UpdateData() {
|
||||
|
||||
}
|
||||
|
||||
public override double ComputeLoss(double WPX, double WPY, double WPZ, double WRX, double WRY, double WRZ, double WRW, Model.Node node, double[] configuration) {
|
||||
double loss = 0.0;
|
||||
for(int i=0; i<configuration.Length; i++) {
|
||||
double diff = System.Math.Abs(Segment.Character.Evolution.GetSolution()[i] - configuration[i]) / (Segment.Character.Evolution.GetUpperBounds()[i] - Segment.Character.Evolution.GetLowerBounds()[i]);
|
||||
loss += diff;
|
||||
}
|
||||
loss /= configuration.Length;
|
||||
return Weight * loss * loss;
|
||||
}
|
||||
|
||||
public override bool CheckConvergence(double WPX, double WPY, double WPZ, double WRX, double WRY, double WRZ, double WRW, Model.Node node, double[] configuration) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public override double ComputeValue(double WPX, double WPY, double WPZ, double WRX, double WRY, double WRZ, double WRW, Model.Node node, double[] configuration) {
|
||||
double value = 0.0;
|
||||
for(int i=0; i<configuration.Length; i++) {
|
||||
double diff = System.Math.Abs(Segment.Character.Evolution.GetSolution()[i] - configuration[i]) / (Segment.Character.Evolution.GetUpperBounds()[i] - Segment.Character.Evolution.GetLowerBounds()[i]);
|
||||
value += diff;
|
||||
}
|
||||
return value /= configuration.Length;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
19
Assets/External/BioIK/Setup/Objectives/Displacement.cs.meta
vendored
Normal file
19
Assets/External/BioIK/Setup/Objectives/Displacement.cs.meta
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1222261562c2b4344aab74254d8cfdce
|
||||
timeCreated: 1502485934
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Setup/Objectives/Displacement.cs
|
||||
uploadId: 199125
|
||||
133
Assets/External/BioIK/Setup/Objectives/Distance.cs
vendored
Normal file
133
Assets/External/BioIK/Setup/Objectives/Distance.cs
vendored
Normal file
@ -0,0 +1,133 @@
|
||||
using UnityEngine;
|
||||
|
||||
//!!!!!!
|
||||
//This objective type is still under development
|
||||
//!!!!!!
|
||||
|
||||
namespace BioIK {
|
||||
|
||||
//This objective aims to keep particular distances to the defined transform positions. This can be used to integrate
|
||||
//real-time collision avoidance. However, note that collision avoidance is typically a very challenging thing for motion generation,
|
||||
//so please do not expect any wonders or some sort of black magic. It works well for typical scenarios, but it will not solve the world for you.
|
||||
//Note that you should use preferably small weights in order to get good-looking results. Best thing is to play around with it and see what happens.
|
||||
//It is not generally clear how to chose those weights.
|
||||
[AddComponentMenu("")]
|
||||
public class Distance : BioObjective {
|
||||
|
||||
[SerializeField] private double Radius = 0.1;
|
||||
[SerializeField] private DistancePoint[] Points = new DistancePoint[0];
|
||||
|
||||
public override ObjectiveType GetObjectiveType() {
|
||||
return ObjectiveType.Distance;
|
||||
}
|
||||
|
||||
public override void UpdateData() {
|
||||
if(Segment.Character.Evolution == null) {
|
||||
return;
|
||||
}
|
||||
for(int i=0; i<Points.Length; i++) {
|
||||
if(Points[i].Target != null) {
|
||||
Vector3 position = Points[i].Target.position;
|
||||
Points[i].TPX = position.x;
|
||||
Points[i].TPY = position.y;
|
||||
Points[i].TPZ = position.z;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override double ComputeLoss(double WPX, double WPY, double WPZ, double WRX, double WRY, double WRZ, double WRW, Model.Node node, double[] configuration) {
|
||||
double loss = 0.0;
|
||||
for(int i=0; i<Points.Length; i++) {
|
||||
if(Points[i] != null) {
|
||||
double dist = System.Math.Sqrt((Points[i].TPX-WPX)*(Points[i].TPX-WPX) + (Points[i].TPY-WPY)*(Points[i].TPY-WPY) + (Points[i].TPZ-WPZ)*(Points[i].TPZ-WPZ));
|
||||
double x = dist - Radius;
|
||||
if(x <= 0.0) {
|
||||
return float.MaxValue;
|
||||
} else {
|
||||
loss += 1.0/x;
|
||||
}
|
||||
}
|
||||
}
|
||||
loss /= Points.Length;
|
||||
return Weight * loss * loss;
|
||||
}
|
||||
|
||||
public override bool CheckConvergence(double WPX, double WPY, double WPZ, double WRX, double WRY, double WRZ, double WRW, Model.Node node, double[] configuration) {
|
||||
for(int i=0; i<Points.Length; i++) {
|
||||
if(Points[i] != null) {
|
||||
if(System.Math.Sqrt((Points[i].TPX-WPX)*(Points[i].TPX-WPX) + (Points[i].TPY-WPY)*(Points[i].TPZ-WPY) + (Points[i].TPZ-WPZ)*(Points[i].TPZ-WPZ)) <= Radius) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override double ComputeValue(double WPX, double WPY, double WPZ, double WRX, double WRY, double WRZ, double WRW, Model.Node node, double[] configuration) {
|
||||
double dist = 0.0;
|
||||
for(int i=0; i<Points.Length; i++) {
|
||||
if(Points[i] != null) {
|
||||
dist = System.Math.Max(dist, System.Math.Sqrt((Points[i].TPX-WPX)*(Points[i].TPX-WPX) + (Points[i].TPY-WPY)*(Points[i].TPY-WPY) + (Points[i].TPZ-WPZ)*(Points[i].TPZ-WPZ)));
|
||||
}
|
||||
}
|
||||
return dist;
|
||||
}
|
||||
|
||||
public void SetRadius(double radius) {
|
||||
Radius = radius;
|
||||
}
|
||||
|
||||
public double GetRadius() {
|
||||
return Radius;
|
||||
}
|
||||
|
||||
public DistancePoint[] GetPoints() {
|
||||
return Points;
|
||||
}
|
||||
|
||||
public DistancePoint AddPoint() {
|
||||
System.Array.Resize(ref Points, Points.Length+1);
|
||||
Points[Points.Length-1] = new DistancePoint();
|
||||
return Points[Points.Length-1];
|
||||
}
|
||||
|
||||
public void RemovePoint() {
|
||||
if(Points.Length > 0) {
|
||||
System.Array.Resize(ref Points, Points.Length-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class DistancePoint {
|
||||
public Transform Target;
|
||||
public double Radius;
|
||||
public double TPX, TPY, TPZ;
|
||||
|
||||
public void SetTargetTransform(Transform t) {
|
||||
Target = t;
|
||||
if(Target != null) {
|
||||
SetTargetPoint(Target.position);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetTargetPoint(Vector3 point) {
|
||||
TPX = point.x;
|
||||
TPY = point.y;
|
||||
TPZ = point.z;
|
||||
}
|
||||
|
||||
public Vector3 GetTargetPoint() {
|
||||
return new Vector3((float)TPX, (float)TPY, (float)TPZ);
|
||||
}
|
||||
|
||||
public void SetRadius(double radius) {
|
||||
Radius = radius;
|
||||
}
|
||||
|
||||
public double GetRadius() {
|
||||
return Radius;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
19
Assets/External/BioIK/Setup/Objectives/Distance.cs.meta
vendored
Normal file
19
Assets/External/BioIK/Setup/Objectives/Distance.cs.meta
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 11a19f1e4ed2541b794d518fc3b60cce
|
||||
timeCreated: 1502485934
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Setup/Objectives/Distance.cs
|
||||
uploadId: 199125
|
||||
131
Assets/External/BioIK/Setup/Objectives/JointValue.cs
vendored
Normal file
131
Assets/External/BioIK/Setup/Objectives/JointValue.cs
vendored
Normal file
@ -0,0 +1,131 @@
|
||||
using UnityEngine;
|
||||
|
||||
//!!!!!!
|
||||
//This objective type is still under development
|
||||
//!!!!!!
|
||||
|
||||
namespace BioIK {
|
||||
|
||||
//This objective aims to keep particular joint values acting as soft-constraints. Using this requires
|
||||
//a joint added to the segment, and introduces some sort of stiffness controlled by the weight to the joint.
|
||||
//Currently, you will require one objective for each >enabled< motion axis you wish to control.
|
||||
[AddComponentMenu("")]
|
||||
public class JointValue : BioObjective {
|
||||
|
||||
public double TargetValue = 0.0;
|
||||
public bool X, Y, Z;
|
||||
|
||||
private BioJoint.Motion Motion;
|
||||
private bool Valid;
|
||||
private Model.MotionPtr Ptr;
|
||||
private double NormalisedTargetValue;
|
||||
|
||||
public override ObjectiveType GetObjectiveType() {
|
||||
return ObjectiveType.JointValue;
|
||||
}
|
||||
|
||||
public override void UpdateData() {
|
||||
if(Segment.Character.Evolution == null) {
|
||||
return;
|
||||
}
|
||||
Valid = IsValid();
|
||||
if(!Valid) {
|
||||
return;
|
||||
}
|
||||
if(X) {
|
||||
Motion = Segment.Joint.X;
|
||||
}
|
||||
if(Y) {
|
||||
Motion = Segment.Joint.Y;
|
||||
}
|
||||
if(Z) {
|
||||
Motion = Segment.Joint.Z;
|
||||
}
|
||||
Ptr = Segment.Character.Evolution.GetModel().FindMotionPtr(Motion);
|
||||
NormalisedTargetValue = Segment.Joint.JointType == JointType.Rotational ? NormalisedTargetValue = Utility.Deg2Rad * TargetValue : TargetValue;
|
||||
}
|
||||
|
||||
public override double ComputeLoss(double WPX, double WPY, double WPZ, double WRX, double WRY, double WRZ, double WRW, Model.Node node, double[] configuration) {
|
||||
if(!Valid) {
|
||||
return 0.0;
|
||||
}
|
||||
double loss = configuration[Ptr.Index] - NormalisedTargetValue;
|
||||
return Weight * loss * loss;
|
||||
}
|
||||
|
||||
public override bool CheckConvergence(double WPX, double WPY, double WPZ, double WRX, double WRY, double WRZ, double WRW, Model.Node node, double[] configuration) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public override double ComputeValue(double WPX, double WPY, double WPZ, double WRX, double WRY, double WRZ, double WRW, Model.Node node, double[] configuration) {
|
||||
if(!Valid) {
|
||||
return 0.0;
|
||||
}
|
||||
return System.Math.Abs(configuration[Ptr.Index] - NormalisedTargetValue);
|
||||
}
|
||||
|
||||
public void SetTargetValue(double value) {
|
||||
TargetValue = value;
|
||||
}
|
||||
|
||||
public double GetTargetValue() {
|
||||
return TargetValue;
|
||||
}
|
||||
|
||||
public void SetXMotion(bool enabled) {
|
||||
if(X != enabled) {
|
||||
ResetMotion();
|
||||
X = enabled;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsXMotion() {
|
||||
return X;
|
||||
}
|
||||
|
||||
public void SetYMotion(bool enabled) {
|
||||
if(Y != enabled) {
|
||||
ResetMotion();
|
||||
Y = enabled;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsYMotion() {
|
||||
return Y;
|
||||
}
|
||||
|
||||
public void SetZMotion(bool enabled) {
|
||||
if(Z != enabled) {
|
||||
ResetMotion();
|
||||
Z = enabled;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsZMotion() {
|
||||
return Z;
|
||||
}
|
||||
|
||||
private void ResetMotion() {
|
||||
X = false; Y = false; Z = false;
|
||||
}
|
||||
|
||||
private bool IsValid() {
|
||||
if(Segment.Joint == null) {
|
||||
return false;
|
||||
}
|
||||
if(!X && !Y && !Z) {
|
||||
return false;
|
||||
}
|
||||
if(X && !Segment.Joint.X.IsEnabled()) {
|
||||
return false;
|
||||
}
|
||||
if(Y && !Segment.Joint.Y.IsEnabled()) {
|
||||
return false;
|
||||
}
|
||||
if(Z && !Segment.Joint.Z.IsEnabled()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/BioIK/Setup/Objectives/JointValue.cs.meta
vendored
Normal file
19
Assets/External/BioIK/Setup/Objectives/JointValue.cs.meta
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dbc0a4a13428c4d64b8f01bf913c9c95
|
||||
timeCreated: 1502485934
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Setup/Objectives/JointValue.cs
|
||||
uploadId: 199125
|
||||
123
Assets/External/BioIK/Setup/Objectives/LookAt.cs
vendored
Normal file
123
Assets/External/BioIK/Setup/Objectives/LookAt.cs
vendored
Normal file
@ -0,0 +1,123 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace BioIK {
|
||||
|
||||
//This objective aims to minimise the viewing distance between the transform and the target.
|
||||
[AddComponentMenu("")]
|
||||
public class LookAt : BioObjective {
|
||||
|
||||
[SerializeField] private Transform Target;
|
||||
[SerializeField] private double TPX, TPY, TPZ;
|
||||
[SerializeField] private Vector3 ViewingDirection = Vector3.forward;
|
||||
[SerializeField] private double MaximumError = 0.1;
|
||||
|
||||
public override ObjectiveType GetObjectiveType() {
|
||||
return ObjectiveType.LookAt;
|
||||
}
|
||||
|
||||
public override void UpdateData() {
|
||||
if(Segment.Character.Evolution == null) {
|
||||
return;
|
||||
}
|
||||
if(Target != null) {
|
||||
Vector3 position = Target.position;
|
||||
TPX = position.x;
|
||||
TPY = position.y;
|
||||
TPZ = position.z;
|
||||
}
|
||||
}
|
||||
|
||||
public override double ComputeLoss(double WPX, double WPY, double WPZ, double WRX, double WRY, double WRZ, double WRW, Model.Node node, double[] configuration) {
|
||||
double aX = 2.0 * ((0.5 - (WRY * WRY + WRZ * WRZ)) * ViewingDirection.x + (WRX * WRY - WRW * WRZ) * ViewingDirection.y + (WRX * WRZ + WRW * WRY) * ViewingDirection.z);
|
||||
double aY = 2.0 * ((WRX * WRY + WRW * WRZ) * ViewingDirection.x + (0.5 - (WRX * WRX + WRZ * WRZ)) * ViewingDirection.y + (WRY * WRZ - WRW * WRX) * ViewingDirection.z);
|
||||
double aZ = 2.0 * ((WRX * WRZ - WRW * WRY) * ViewingDirection.x + (WRY * WRZ + WRW * WRX) * ViewingDirection.y + (0.5 - (WRX * WRX + WRY * WRY)) * ViewingDirection.z);
|
||||
double bX = TPX-WPX;
|
||||
double bY = TPY-WPY;
|
||||
double bZ = TPZ-WPZ;
|
||||
double dot = aX*bX + aY*bY + aZ*bZ;
|
||||
double len = System.Math.Sqrt(aX*aX + aY*aY + aZ*aZ) * System.Math.Sqrt(bX*bX + bY*bY + bZ*bZ);
|
||||
double arg = dot/len;
|
||||
if(arg > 1.0) {
|
||||
arg = 1.0;
|
||||
} else if(arg < -1.0) {
|
||||
arg = -1.0;
|
||||
}
|
||||
double loss = System.Math.Acos(arg);
|
||||
return Weight * loss * loss;
|
||||
}
|
||||
|
||||
public override bool CheckConvergence(double WPX, double WPY, double WPZ, double WRX, double WRY, double WRZ, double WRW, Model.Node node, double[] configuration) {
|
||||
double aX = 2.0 * ((0.5 - (WRY * WRY + WRZ * WRZ)) * ViewingDirection.x + (WRX * WRY - WRW * WRZ) * ViewingDirection.y + (WRX * WRZ + WRW * WRY) * ViewingDirection.z);
|
||||
double aY = 2.0 * ((WRX * WRY + WRW * WRZ) * ViewingDirection.x + (0.5 - (WRX * WRX + WRZ * WRZ)) * ViewingDirection.y + (WRY * WRZ - WRW * WRX) * ViewingDirection.z);
|
||||
double aZ = 2.0 * ((WRX * WRZ - WRW * WRY) * ViewingDirection.x + (WRY * WRZ + WRW * WRX) * ViewingDirection.y + (0.5 - (WRX * WRX + WRY * WRY)) * ViewingDirection.z);
|
||||
double bX = TPX-WPX;
|
||||
double bY = TPY-WPY;
|
||||
double bZ = TPZ-WPZ;
|
||||
double dot = aX*bX + aY*bY + aZ*bZ;
|
||||
double len = System.Math.Sqrt(aX*aX + aY*aY + aZ*aZ) * System.Math.Sqrt(bX*bX + bY*bY + bZ*bZ);
|
||||
double arg = dot/len;
|
||||
if(arg > 1.0) {
|
||||
arg = 1.0;
|
||||
} else if(arg < -1.0) {
|
||||
arg = -1.0;
|
||||
}
|
||||
return System.Math.Acos(arg) <= Utility.Deg2Rad * MaximumError;
|
||||
}
|
||||
|
||||
public override double ComputeValue(double WPX, double WPY, double WPZ, double WRX, double WRY, double WRZ, double WRW, Model.Node node, double[] configuration) {
|
||||
double aX = 2.0 * ((0.5 - (WRY * WRY + WRZ * WRZ)) * ViewingDirection.x + (WRX * WRY - WRW * WRZ) * ViewingDirection.y + (WRX * WRZ + WRW * WRY) * ViewingDirection.z);
|
||||
double aY = 2.0 * ((WRX * WRY + WRW * WRZ) * ViewingDirection.x + (0.5 - (WRX * WRX + WRZ * WRZ)) * ViewingDirection.y + (WRY * WRZ - WRW * WRX) * ViewingDirection.z);
|
||||
double aZ = 2.0 * ((WRX * WRZ - WRW * WRY) * ViewingDirection.x + (WRY * WRZ + WRW * WRX) * ViewingDirection.y + (0.5 - (WRX * WRX + WRY * WRY)) * ViewingDirection.z);
|
||||
double bX = TPX-WPX;
|
||||
double bY = TPY-WPY;
|
||||
double bZ = TPZ-WPZ;
|
||||
double dot = aX*bX + aY*bY + aZ*bZ;
|
||||
double len = System.Math.Sqrt(aX*aX + aY*aY + aZ*aZ) * System.Math.Sqrt(bX*bX + bY*bY + bZ*bZ);
|
||||
double arg = dot/len;
|
||||
if(arg > 1.0) {
|
||||
arg = 1.0;
|
||||
} else if(arg < -1.0) {
|
||||
arg = -1.0;
|
||||
}
|
||||
return Utility.Rad2Deg * System.Math.Acos(arg);
|
||||
}
|
||||
|
||||
public void SetTargetTransform(Transform target) {
|
||||
Target = target;
|
||||
if(target != null) {
|
||||
SetTargetPosition(Target.position);
|
||||
}
|
||||
}
|
||||
|
||||
public Transform GetTargetTransform() {
|
||||
return Target;
|
||||
}
|
||||
|
||||
public void SetTargetPosition(Vector3 position) {
|
||||
TPX = position.x;
|
||||
TPY = position.y;
|
||||
TPZ = position.z;
|
||||
}
|
||||
|
||||
public Vector3 GetTargetPosition() {
|
||||
return new Vector3((float)TPX, (float)TPY, (float)TPZ);
|
||||
}
|
||||
|
||||
public void SetViewingDirection(Vector3 vector) {
|
||||
ViewingDirection = vector;
|
||||
}
|
||||
|
||||
public Vector3 GetViewingDirection() {
|
||||
return ViewingDirection;
|
||||
}
|
||||
|
||||
public void SetMaximumError(double degrees) {
|
||||
MaximumError = degrees;
|
||||
}
|
||||
|
||||
public double GetMaximumError() {
|
||||
return MaximumError;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
19
Assets/External/BioIK/Setup/Objectives/LookAt.cs.meta
vendored
Normal file
19
Assets/External/BioIK/Setup/Objectives/LookAt.cs.meta
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f2576b795e2534cdbab732fca106cf79
|
||||
timeCreated: 1502416166
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Setup/Objectives/LookAt.cs
|
||||
uploadId: 199125
|
||||
106
Assets/External/BioIK/Setup/Objectives/Orientation.cs
vendored
Normal file
106
Assets/External/BioIK/Setup/Objectives/Orientation.cs
vendored
Normal file
@ -0,0 +1,106 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace BioIK {
|
||||
|
||||
//This objective aims to minimise the rotational distance between the transform and the target.
|
||||
[AddComponentMenu("")]
|
||||
public class Orientation : BioObjective {
|
||||
|
||||
[SerializeField] private Transform Target;
|
||||
[SerializeField] private double TRX, TRY, TRZ, TRW;
|
||||
[SerializeField] private double MaximumError = 0.1;
|
||||
|
||||
public override ObjectiveType GetObjectiveType() {
|
||||
return ObjectiveType.Orientation;
|
||||
}
|
||||
|
||||
public override void UpdateData() {
|
||||
if(Segment.Character.Evolution == null) {
|
||||
return;
|
||||
}
|
||||
if(Target != null) {
|
||||
Quaternion rotation = Target.rotation;
|
||||
TRX = rotation.x;
|
||||
TRY = rotation.y;
|
||||
TRZ = rotation.z;
|
||||
TRW = rotation.w;
|
||||
}
|
||||
}
|
||||
|
||||
public override double ComputeLoss(double WPX, double WPY, double WPZ, double WRX, double WRY, double WRZ, double WRW, Model.Node node, double[] configuration) {
|
||||
double d = WRX*TRX + WRY*TRY + WRZ*TRZ + WRW*TRW;
|
||||
if(d < 0.0) {
|
||||
d = -d;
|
||||
if(d > 1.0) {
|
||||
d = 1.0;
|
||||
}
|
||||
} else if(d > 1.0) {
|
||||
d = 1.0;
|
||||
}
|
||||
double loss = 2.0 * System.Math.Acos(d);
|
||||
return Weight * loss * loss;
|
||||
}
|
||||
|
||||
public override bool CheckConvergence(double WPX, double WPY, double WPZ, double WRX, double WRY, double WRZ, double WRW, Model.Node node, double[] configuration) {
|
||||
double d = WRX*TRX + WRY*TRY + WRZ*TRZ + WRW*TRW;
|
||||
if(d < 0.0) {
|
||||
d = -d;
|
||||
if(d > 1.0) {
|
||||
d = 1.0;
|
||||
}
|
||||
} else if(d > 1.0) {
|
||||
d = 1.0;
|
||||
}
|
||||
return 2.0 * System.Math.Acos(d) <= Utility.Deg2Rad * MaximumError;
|
||||
}
|
||||
|
||||
public override double ComputeValue(double WPX, double WPY, double WPZ, double WRX, double WRY, double WRZ, double WRW, Model.Node node, double[] configuration) {
|
||||
double d = WRX*TRX + WRY*TRY + WRZ*TRZ + WRW*TRW;
|
||||
if(d < 0.0) {
|
||||
d = -d;
|
||||
if(d > 1.0) {
|
||||
d = 1.0;
|
||||
}
|
||||
} else if(d > 1.0) {
|
||||
d = 1.0;
|
||||
}
|
||||
return Utility.Rad2Deg * 2.0 * System.Math.Acos(d);
|
||||
}
|
||||
|
||||
public void SetTargetTransform(Transform target) {
|
||||
Target = target;
|
||||
if(Target != null) {
|
||||
SetTargetRotation(Target.rotation);
|
||||
}
|
||||
}
|
||||
|
||||
public Transform GetTargetTransform() {
|
||||
return Target;
|
||||
}
|
||||
|
||||
public void SetTargetRotation(Quaternion rotation) {
|
||||
TRX = rotation.x;
|
||||
TRY = rotation.y;
|
||||
TRZ = rotation.z;
|
||||
TRW = rotation.w;
|
||||
}
|
||||
|
||||
public void SetTargetRotation(Vector3 angles) {
|
||||
SetTargetRotation(Quaternion.Euler(angles));
|
||||
}
|
||||
|
||||
public Vector3 GetTargetRotattion() {
|
||||
return new Quaternion((float)TRX, (float)TRY, (float)TRZ, (float)TRW).eulerAngles;
|
||||
}
|
||||
|
||||
public void SetMaximumError(double degrees) {
|
||||
MaximumError = degrees;
|
||||
}
|
||||
|
||||
public double GetMaximumError() {
|
||||
return MaximumError;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
19
Assets/External/BioIK/Setup/Objectives/Orientation.cs.meta
vendored
Normal file
19
Assets/External/BioIK/Setup/Objectives/Orientation.cs.meta
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 819049a361f354ea4b9cac723854e0ff
|
||||
timeCreated: 1502413797
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Setup/Objectives/Orientation.cs
|
||||
uploadId: 199125
|
||||
99
Assets/External/BioIK/Setup/Objectives/Position.cs
vendored
Normal file
99
Assets/External/BioIK/Setup/Objectives/Position.cs
vendored
Normal file
@ -0,0 +1,99 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace BioIK {
|
||||
|
||||
//This objective aims to minimise the translational distance between the transform and the target.
|
||||
[AddComponentMenu("")]
|
||||
public class Position : BioObjective {
|
||||
|
||||
[SerializeField] private Transform Target;
|
||||
[SerializeField] private double TPX, TPY, TPZ;
|
||||
[SerializeField] private double MaximumError = 0.001;
|
||||
|
||||
private double ChainLength;
|
||||
private double Rescaling;
|
||||
//private Vector3 Root;
|
||||
|
||||
public override ObjectiveType GetObjectiveType() {
|
||||
return ObjectiveType.Position;
|
||||
}
|
||||
|
||||
public override void UpdateData() {
|
||||
if(Segment.Character.Evolution == null) {
|
||||
return;
|
||||
}
|
||||
ChainLength = 0.0;
|
||||
Transform[] chain = Segment.Character.Evolution.GetModel().FindObjectivePtr(this).Node.Chain;;
|
||||
for(int i=0; i<chain.Length-1; i++) {
|
||||
ChainLength += Vector3.Distance(chain[i].position, chain[i+1].position);
|
||||
}
|
||||
Rescaling = (Utility.PI * Utility.PI) / (ChainLength * ChainLength);
|
||||
//Root = chain[0].position;
|
||||
if(Target != null) {
|
||||
Vector3 position = Target.position;
|
||||
TPX = position.x;
|
||||
TPY = position.y;
|
||||
TPZ = position.z;
|
||||
}
|
||||
}
|
||||
|
||||
public override double ComputeLoss(double WPX, double WPY, double WPZ, double WRX, double WRY, double WRZ, double WRW, Model.Node node, double[] configuration) {
|
||||
//Adaptive
|
||||
/*
|
||||
double loss = System.Math.Sqrt((TPX-WPX)*(TPX-WPX) + (TPY-WPY)*(TPY-WPY) + (TPZ-WPZ)*(TPZ-WPZ));
|
||||
double s = System.Math.Sqrt(
|
||||
(node.Chain.Length+loss)
|
||||
*
|
||||
(System.Math.Sqrt((WPX-Root.x)*(WPX-Root.x) + (WPY-Root.y)*(WPY-Root.y) + (WPZ-Root.z)*(WPZ-Root.z))+loss)
|
||||
);
|
||||
loss = Utility.PI * loss / s;
|
||||
return Weight * loss * loss;
|
||||
*/
|
||||
|
||||
//Fast and slightly adaptive
|
||||
return Weight * Rescaling * ((TPX-WPX)*(TPX-WPX) + (TPY-WPY)*(TPY-WPY) + (TPZ-WPZ)*(TPZ-WPZ));
|
||||
|
||||
//Fastest but not adaptive
|
||||
//return Weight * ((TPX-WPX)*(TPX-WPX) + (TPY-WPY)*(TPY-WPY) + (TPZ-WPZ)*(TPZ-WPZ));
|
||||
}
|
||||
|
||||
public override bool CheckConvergence(double WPX, double WPY, double WPZ, double WRX, double WRY, double WRZ, double WRW, Model.Node node, double[] configuration) {
|
||||
return System.Math.Sqrt((TPX-WPX)*(TPX-WPX) + (TPY-WPY)*(TPY-WPY) + (TPZ-WPZ)*(TPZ-WPZ)) <= MaximumError;
|
||||
}
|
||||
|
||||
public override double ComputeValue(double WPX, double WPY, double WPZ, double WRX, double WRY, double WRZ, double WRW, Model.Node node, double[] configuration) {
|
||||
return System.Math.Sqrt((TPX-WPX)*(TPX-WPX) + (TPY-WPY)*(TPY-WPY) + (TPZ-WPZ)*(TPZ-WPZ));
|
||||
}
|
||||
|
||||
public void SetTargetTransform(Transform target) {
|
||||
Target = target;
|
||||
if(Target != null) {
|
||||
SetTargetPosition(Target.position);
|
||||
}
|
||||
}
|
||||
|
||||
public Transform GetTargetTransform() {
|
||||
return Target;
|
||||
}
|
||||
|
||||
public void SetTargetPosition(Vector3 position) {
|
||||
TPX = position.x;
|
||||
TPY = position.y;
|
||||
TPZ = position.z;
|
||||
}
|
||||
|
||||
public Vector3 GetTargetPosition() {
|
||||
return new Vector3((float)TPX, (float)TPY, (float)TPZ);
|
||||
}
|
||||
|
||||
public void SetMaximumError(double units) {
|
||||
MaximumError = units;
|
||||
}
|
||||
|
||||
public double GetMaximumError() {
|
||||
return MaximumError;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
19
Assets/External/BioIK/Setup/Objectives/Position.cs.meta
vendored
Normal file
19
Assets/External/BioIK/Setup/Objectives/Position.cs.meta
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9463c0da940cf43e5aa26edf005dbf39
|
||||
timeCreated: 1502289747
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Setup/Objectives/Position.cs
|
||||
uploadId: 199125
|
||||
231
Assets/External/BioIK/Setup/Objectives/Projection.cs
vendored
Normal file
231
Assets/External/BioIK/Setup/Objectives/Projection.cs
vendored
Normal file
@ -0,0 +1,231 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace BioIK {
|
||||
|
||||
//This objective aims to minimise both the translational and rotational distance between
|
||||
//the projected transform with respect to the normal of the game object to other collideable objects in the scene.
|
||||
[AddComponentMenu("")]
|
||||
public class Projection : BioObjective {
|
||||
|
||||
[SerializeField] private Transform Target;
|
||||
[SerializeField] private double TPX, TPY, TPZ;
|
||||
[SerializeField] private double TRX, TRY, TRZ, TRW;
|
||||
[SerializeField] private double MaximumError = 0.001;
|
||||
[SerializeField] private Vector3 Normal = Vector3.up;
|
||||
[SerializeField] private float Length;
|
||||
[SerializeField] private float Sensitivity = 0.75f;
|
||||
|
||||
private Vector3 LastPosition;
|
||||
private Quaternion LastRotation;
|
||||
|
||||
//private Vector3 Position;
|
||||
//private Quaternion Rotation;
|
||||
private double ChainLength;
|
||||
private double Rescaling;
|
||||
|
||||
//public Correction[] Corrections = new Correction[0];
|
||||
|
||||
private RaycastHit[] Hits;
|
||||
|
||||
public override ObjectiveType GetObjectiveType() {
|
||||
return ObjectiveType.Projection;
|
||||
}
|
||||
|
||||
public override void UpdateData() {
|
||||
if(Segment.Character.Evolution == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
ChainLength = 0.0;
|
||||
Transform[] chain = Segment.Character.Evolution.GetModel().FindObjectivePtr(this).Node.Chain;;
|
||||
for(int i=0; i<chain.Length-1; i++) {
|
||||
ChainLength += Vector3.Distance(chain[i].position, chain[i+1].position);
|
||||
}
|
||||
Rescaling = (Utility.PI * Utility.PI) / (ChainLength * ChainLength);
|
||||
|
||||
if(Target != null) {
|
||||
SetTargetPosition(Target.position);
|
||||
SetTargetRotation(Target.rotation);
|
||||
}
|
||||
|
||||
Vector3 position = new Vector3((float)TPX, (float)TPY, (float)TPZ);
|
||||
Quaternion rotation = new Quaternion((float)TRX, (float)TRY, (float)TRZ, (float)TRW);
|
||||
|
||||
Vector3 normal = rotation * Normal;
|
||||
Vector3 start = position - Length * normal;
|
||||
Vector3 end = start + Length * normal;
|
||||
|
||||
Hits = Physics.RaycastAll(start, end-start, Length);
|
||||
if(Hits.Length > 0) {
|
||||
SortByDistance(ref Hits);
|
||||
for(int i=0; i<Hits.Length; i++) {
|
||||
RaycastHit hit = Hits[i];
|
||||
if(!hit.collider.isTrigger && Segment.Character.FindSegment(hit.collider.transform) == null) {
|
||||
position = hit.point;
|
||||
rotation = Quaternion.FromToRotation(normal, -hit.normal.normalized) * rotation;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
position = Vector3.Slerp(LastPosition, position, Sensitivity);
|
||||
rotation = Quaternion.Slerp(LastRotation, rotation, Sensitivity);
|
||||
|
||||
LastPosition = position;
|
||||
LastRotation = rotation;
|
||||
|
||||
/*
|
||||
Vector3 correctionPosition = Vector3.zero;
|
||||
Quaternion correctionRotation = Quaternion.identity;
|
||||
for(int i=0; i<Corrections.Length; i++) {
|
||||
if(Physics.Raycast(position + rotation*Corrections[i].Offset, rotation*Corrections[i].Direction.normalized, out Hit, Corrections[i].Length)) {
|
||||
if(Hit.collider.transform.root != transform.root) {
|
||||
float weight = (Corrections[i].Length-Hit.distance) / Corrections[i].Length;
|
||||
correctionPosition += weight * (Hit.point-position);
|
||||
correctionRotation = Quaternion.Slerp(Quaternion.identity, Quaternion.FromToRotation(rotation*Normal.normalized, -Hit.normal.normalized), weight) * correctionRotation;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
position += correctionPosition;
|
||||
rotation = correctionRotation * rotation;
|
||||
*/
|
||||
|
||||
TPX = position.x;
|
||||
TPY = position.y;
|
||||
TPZ = position.z;
|
||||
|
||||
TRX = rotation.x;
|
||||
TRY = rotation.y;
|
||||
TRZ = rotation.z;
|
||||
TRW = rotation.w;
|
||||
}
|
||||
|
||||
private void SortByDistance(ref RaycastHit[] hits) {
|
||||
System.Array.Sort(hits,
|
||||
delegate(RaycastHit a, RaycastHit b) {
|
||||
return a.distance.CompareTo(b.distance);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public override double ComputeLoss(double WPX, double WPY, double WPZ, double WRX, double WRY, double WRZ, double WRW, Model.Node node, double[] configuration) {
|
||||
/*
|
||||
double d = System.Math.Sqrt((TPX-WPX)*(TPX-WPX) + (TPY-WPY)*(TPY-WPY) + (TPZ-WPZ)*(TPZ-WPZ));
|
||||
double s = System.Math.Sqrt((node.Chain.Length+d)*(System.Math.Sqrt((WPX-node.RootX)*(WPX-node.RootX) + (WPY-node.RootY)*(WPY-node.RootY) + (WPZ-node.RootZ)*(WPZ-node.RootZ))+d));
|
||||
d = PI * d / s;
|
||||
double o = WRX*TRX + WRY*TRY + WRZ*TRZ + WRW*TRW;
|
||||
if(o < 0.0) {
|
||||
o = -o;
|
||||
}
|
||||
if(o > 1.0) {
|
||||
o = 1.0;
|
||||
}
|
||||
o = 2.0 * System.Math.Acos(o);
|
||||
return Weight * 0.5 * (d*d + o*o);
|
||||
*/
|
||||
double d = Rescaling * ((TPX-WPX)*(TPX-WPX) + (TPY-WPY)*(TPY-WPY) + (TPZ-WPZ)*(TPZ-WPZ));
|
||||
double o = WRX*TRX + WRY*TRY + WRZ*TRZ + WRW*TRW;
|
||||
if(o < 0.0) {
|
||||
o = -o;
|
||||
if(o > 1.0) {
|
||||
o = 1.0;
|
||||
}
|
||||
} else if(o > 1.0) {
|
||||
o = 1.0;
|
||||
}
|
||||
o = 2.0 * System.Math.Acos(o);
|
||||
return Weight * 0.5 * (d*d + o*o);
|
||||
}
|
||||
|
||||
public override bool CheckConvergence(double WPX, double WPY, double WPZ, double WRX, double WRY, double WRZ, double WRW, Model.Node node, double[] configuration) {
|
||||
double d = System.Math.Sqrt((TPX-WPX)*(TPX-WPX) + (TPY-WPY)*(TPY-WPY) + (TPZ-WPZ)*(TPZ-WPZ));
|
||||
double o = WRX*TRX + WRY*TRY + WRZ*TRZ + WRW*TRW;
|
||||
if(o < 0.0) {
|
||||
o = -o;
|
||||
if(o > 1.0) {
|
||||
o = 1.0;
|
||||
}
|
||||
} else if(o > 1.0) {
|
||||
o = 1.0;
|
||||
}
|
||||
o = Utility.Rad2Deg * 2.0 * System.Math.Acos(o);
|
||||
return d <= MaximumError && o <= MaximumError;
|
||||
}
|
||||
|
||||
public override double ComputeValue(double WPX, double WPY, double WPZ, double WRX, double WRY, double WRZ, double WRW, Model.Node node, double[] configuration) {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
public void SetTargetTransform(Transform target) {
|
||||
Target = target;
|
||||
if(Target != null) {
|
||||
SetTargetPosition(Target.position);
|
||||
SetTargetRotation(Target.rotation);
|
||||
}
|
||||
}
|
||||
|
||||
public Transform GetTargetTransform() {
|
||||
return Target;
|
||||
}
|
||||
|
||||
public void SetTargetPosition(Vector3 position) {
|
||||
TPX = position.x;
|
||||
TPY = position.y;
|
||||
TPZ = position.z;
|
||||
}
|
||||
|
||||
public Vector3 GetTargetPosition() {
|
||||
return new Vector3((float)TPX, (float)TPY, (float)TPZ);
|
||||
}
|
||||
|
||||
public void SetTargetRotation(Quaternion rotation) {
|
||||
TRX = rotation.x;
|
||||
TRY = rotation.y;
|
||||
TRZ = rotation.z;
|
||||
TRW = rotation.w;
|
||||
}
|
||||
|
||||
public void SetTargetRotation(Vector3 angles) {
|
||||
SetTargetRotation(Quaternion.Euler(angles));
|
||||
}
|
||||
|
||||
public Vector3 GetTargetRotation() {
|
||||
return new Quaternion((float)TRX, (float)TRY, (float)TRZ, (float)TRW).eulerAngles;
|
||||
}
|
||||
|
||||
public void SetMaximumError(double value) {
|
||||
MaximumError = value;
|
||||
}
|
||||
|
||||
public double GetMaximumError() {
|
||||
return MaximumError;
|
||||
}
|
||||
|
||||
public void SetNormal(Vector3 normal) {
|
||||
Normal = normal;
|
||||
}
|
||||
|
||||
public Vector3 GetNormal() {
|
||||
return Normal;
|
||||
}
|
||||
|
||||
public void SetSensitivity(float sensitivity) {
|
||||
Sensitivity = Mathf.Clamp(sensitivity, 0f, 1f);
|
||||
}
|
||||
|
||||
public float GetSensitivity() {
|
||||
return Sensitivity;
|
||||
}
|
||||
|
||||
public void SetLength(float length) {
|
||||
Length = length;
|
||||
}
|
||||
|
||||
public float GetLength() {
|
||||
return Length;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
19
Assets/External/BioIK/Setup/Objectives/Projection.cs.meta
vendored
Normal file
19
Assets/External/BioIK/Setup/Objectives/Projection.cs.meta
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fe8e654ecc18f42d3884dbbd9aed1624
|
||||
timeCreated: 1502485934
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 67819
|
||||
packageName: Bio IK
|
||||
packageVersion: 2.0d
|
||||
assetPath: Assets/BioIK/Setup/Objectives/Projection.cs
|
||||
uploadId: 199125
|
||||
8
Assets/Scripts/HandTracking.meta
Normal file
8
Assets/Scripts/HandTracking.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2fd98f94acdd2294d93c612da351d805
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Scripts/HandTracking/HandTracking.meta
Normal file
8
Assets/Scripts/HandTracking/HandTracking.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6535987dfca1ddd4c9d30a24447122eb
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Scripts/HandTracking/HandTracking.unity
(Stored with Git LFS)
Normal file
BIN
Assets/Scripts/HandTracking/HandTracking.unity
(Stored with Git LFS)
Normal file
Binary file not shown.
7
Assets/Scripts/HandTracking/HandTracking.unity.meta
Normal file
7
Assets/Scripts/HandTracking/HandTracking.unity.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 114fdda276c6fc147b9df81056c8a4b7
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Scripts/HandTracking/HandTracking/GlobalVolumeProfile.asset
(Stored with Git LFS)
Normal file
BIN
Assets/Scripts/HandTracking/HandTracking/GlobalVolumeProfile.asset
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8ba096e0f19d4994ebcd28612e9c159d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Scripts/HandTracking/PuppetHand.fbx
(Stored with Git LFS)
Normal file
BIN
Assets/Scripts/HandTracking/PuppetHand.fbx
(Stored with Git LFS)
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user