Files
UnrealEngineUWP/Engine/Source/Runtime/AnimGraphRuntime/Public/BoneControllers/AnimNode_LookAt.h
Andrew Grant f25badee7f Copying //UE4/Orion-Staging to //UE4/Main (Origin: //Orion/Dev-General @2826496)
#lockdown Nick.Penwarden

==========================
MAJOR FEATURES + CHANGES
==========================

Change 2826201 on 2016/01/13 by Zabir.Hoque

	Add more verbose logging to try to understand #OR-11297

	#lockdown Andrew.Grant
	#CodeReview Marcus.Wassmer
	#RB none
	#TESTS compiled Win64 debug editor, ran agora_p

Change 2826170 on 2016/01/13 by Marcus.Wassmer

	Flush unloaded resource properly in LoadMap
	#codereview Gil.Gribb
	#rb none
	#test cycling game.  memory is freed properly now.
	#lockdown Andrew.Grant

Change 2826135 on 2016/01/12 by Michael.Noland

	Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation
	- Disabled async streaming for the duration of the QOS ping measurement to avoid hitches
	- Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future)
	- Added logging of the current average frame time when the datacenter ping is finalized
	- Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4)
	#jira OR-12453
	#rb paul.moore
	#tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc...

	Merging CL# 2826128 using //Orion/Main_to_//Orion/Dev-General

Change 2826131 on 2016/01/12 by Michael.Noland

	#UE4 - added print out of MS/FPS during Qos ping evaluation
	#rb michael.noland
	#tests loaded up through login screen to see output

	Merging CL# 2825678 using //Orion/Main_to_//Orion/Dev-General

Change 2826128 on 2016/01/12 by Michael.Noland

	Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation
	- Disabled async streaming for the duration of the QOS ping measurement to avoid hitches
	- Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future)
	- Added logging of the current average frame time when the datacenter ping is finalized
	- Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4)
	#jira OR-12453
	#rb paul.moore
	#tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc...

	Merging CL# 2826116 using //Orion/Release-Next->//Orion/Main

Change 2826116 on 2016/01/12 by Michael.Noland

	Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation
	- Disabled async streaming for the duration of the QOS ping measurement to avoid hitches
	- Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future)
	- Added logging of the current average frame time when the datacenter ping is finalized
	- Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4)
	#jira OR-12453
	#rb paul.moore
	#tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc...
	#lockdown andrew.grant
	#codereview josh.markiewicz

Change 2825772 on 2016/01/12 by Dmitry.Rekman

	Linux signal handling improvements.

	- Switch crash handlers to use "crash malloc" (preallocated memory) on crash.
	- Remove unnecessary memory allocations from graceful termination handler.

	#rb none
	#tests Run the Linux server and crashed it a few times.
	#codereview David.Vossel, Michael.Trepka

Change 2825768 on 2016/01/12 by Josh.Markiewicz

	#UE4 - added print out of MS/FPS during Qos ping evaluation
	#rb michael.noland
	#tests loaded up through login screen to see output

Change 2825703 on 2016/01/12 by Brian.Karis

	Switched on new motion blur. Set temporal AA sharpness to 1.

	#rb none
	#TESTS editor

Change 2825689 on 2016/01/12 by Lina.Halper

	Fix for get animation notify crash

	https://jira.ol.epicgames.net/browse/OR-12248
	https://jira.ol.epicgames.net/browse/OR-12348

	- Also fixed the crash in preview of persona due to blend sample cache contains previous animation data
	- Also fixed blend space player to reinitialize cache data
	- The main issue is marker doesn't clamp the length, causing notifies ensure to trigger.

	#rb : Laurent.Delayen
	#tests: 10 Sparrows bot match for long time
	#code review: Martin.Wilson
	#lockdown: Andrew.Grant

Change 2825680 on 2016/01/12 by Martin.Mittring

	fixed all cases with r.Tonemapper.ScreenPercentage, ScreenPercentage, Fringe, Vignette, ViewRect, flickering with transluceny (View members have been modified while other thread was reading)
	#rb:Olaf.Piesche, David.Hill
	#test: PC, many cases

Change 2825579 on 2016/01/12 by Chris.Bunner

	Force shadow shape bone indices on the required update list.
	#rb Lina.Halper, Rolando.Caloca
	#tests Editor
	#codereview Daniel.Wright
	#jira OR-12339

Change 2825443 on 2016/01/12 by Martin.Mittring
2016-01-14 08:11:47 -05:00

148 lines
4.4 KiB
C++

// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "AnimNode_SkeletalControlBase.h"
#include "AnimNode_LookAt.generated.h"
UENUM()
namespace EAxisOption
{
enum Type
{
X,
Y,
Z,
X_Neg,
Y_Neg,
Z_Neg
};
}
UENUM()
/** Various ways to interpolate TAlphaBlend. */
namespace EInterpolationBlend
{
enum Type
{
Linear,
Cubic,
Sinusoidal,
EaseInOutExponent2,
EaseInOutExponent3,
EaseInOutExponent4,
EaseInOutExponent5,
MAX
};
}
/**
* Simple controller that make a bone to look at the point or another bone
*/
USTRUCT()
struct ANIMGRAPHRUNTIME_API FAnimNode_LookAt : public FAnimNode_SkeletalControlBase
{
GENERATED_USTRUCT_BODY()
/** Name of bone to control. This is the main bone chain to modify from. **/
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=SkeletalControl)
FBoneReference BoneToModify;
/** Target Bone to look at - you can't use LookAtLocation as alternative as you'll get a delay on bone location if you query directly **/
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Target)
FBoneReference LookAtBone;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Target)
FName LookAtSocket;
/** Target Location in world space if LookAtBone is empty */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Target, meta = (PinHiddenByDefault))
FVector LookAtLocation;
/** Look at axis, which axis to align to look at point */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=SkeletalControl)
TEnumAsByte<EAxisOption::Type> LookAtAxis;
/** Whether or not to use Look up axis */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=SkeletalControl)
bool bUseLookUpAxis;
/** Look up axis in local space */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=SkeletalControl)
TEnumAsByte<EAxisOption::Type> LookUpAxis;
/** Look at Clamp value in degree - if you're look at axis is Z, only X, Y degree of clamp will be used*/
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=SkeletalControl, meta=(PinHiddenByDefault))
float LookAtClamp;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=SkeletalControl, meta=(PinHiddenByDefault))
TEnumAsByte<EInterpolationBlend::Type> InterpolationType;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=SkeletalControl, meta=(PinHiddenByDefault))
float InterpolationTime;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=SkeletalControl, meta=(PinHiddenByDefault))
float InterpolationTriggerThreashold;
UPROPERTY(EditAnywhere, Category=SkeletalControl)
bool bEnableDebug;
// in the future, it would be nice to have more options, -i.e. lag, interpolation speed
FAnimNode_LookAt();
// FAnimNode_Base interface
virtual void GatherDebugData(FNodeDebugData& DebugData) override;
virtual void UpdateInternal(const FAnimationUpdateContext& Context) override;
virtual void Initialize(const FAnimationInitializeContext& Context) override;
// End of FAnimNode_Base interface
// FAnimNode_SkeletalControlBase interface
virtual void EvaluateBoneTransforms(USkeletalMeshComponent* SkelComp, FCSPose<FCompactPose>& MeshBases, TArray<FBoneTransform>& OutBoneTransforms) override;
virtual bool IsValidToEvaluate(const USkeleton* Skeleton, const FBoneContainer& RequiredBones) override;
// End of FAnimNode_SkeletalControlBase interface
private:
// FAnimNode_SkeletalControlBase interface
virtual void InitializeBoneReferences(const FBoneContainer& RequiredBones) override;
// End of FAnimNode_SkeletalControlBase interface
FVector GetAlignVector(const FTransform& Transform, EAxisOption::Type AxisOption);
EAlphaBlendType GetInterpolationType()
{
switch (InterpolationType)
{
case EInterpolationBlend::Cubic:
return ABT_Cubic;
case EInterpolationBlend::Sinusoidal:
return ABT_Cubic;
case EInterpolationBlend::EaseInOutExponent2:
return ABT_EaseInOutExponent2;
case EInterpolationBlend::EaseInOutExponent3:
return ABT_EaseInOutExponent3;
case EInterpolationBlend::EaseInOutExponent4:
return ABT_EaseInOutExponent4;
case EInterpolationBlend::EaseInOutExponent5:
return ABT_EaseInOutExponent5;
}
return ABT_Linear;
}
/** Debug transient data */
FVector CurrentLookAtLocation;
/** Current Target Location */
FVector CurrentTargetLocation;
FVector PreviousTargetLocation;
/** Current Alpha */
float AccumulatedInterpoolationTime;
/** Look at socket bone cache data */
int32 CachedLookAtSocketMeshBoneIndex;
FCompactPoseBoneIndex CachedLookAtSocketBoneIndex;
FTransform CachedSocketLocalTransform;
};