-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node_Animation Model Group #426
Conversation
Source/ModelGroups/Node_Animation.cs
Outdated
Model CreateModel(Action<List<Property>, List<Runtime.Channel>, Runtime.Node> setProperties) | ||
{ | ||
var properties = new List<Property>(); | ||
var cube = Gltf.CreateCube(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return primitive instead of gltf
Source/ModelGroups/Node_Animation.cs
Outdated
|
||
namespace AssetGenerator | ||
{ | ||
internal class Node_Animation : ModelGroup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Node_Animation -> Animation_Node
Output/Animation_Node/README.md
Outdated
|
||
The following table shows the properties that are set for a given model. | ||
|
||
| | Sample Image | Translation | Rotation | Scale | Interpolation | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's try a single column for Target(s)
and list the targets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The (s)
causes an error when used as a enum, so I went with Targets
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
{ | ||
public String Name { get; set; } | ||
public List<AnimationChannel> AnimationChannels { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restore the Animation
prefix for types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Source/ModelGroups/Animation_Node.cs
Outdated
channels.Add(new Runtime.Channel()); | ||
channels.Add(new Runtime.Channel()); | ||
|
||
SetTranslationChannelTarget(properties, channels[0], node); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create a new properties list and then combine the strings afterwards into the real properties list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Source/ModelGroup_Cube.cs
Outdated
new Vector2(1.000f, 0.000f), | ||
new Vector2(0.500f, 0.000f), | ||
|
||
// Right |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left <-> Right
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Source/ModelGroups/Animation_Node.cs
Outdated
}, | ||
new List<Quaternion> | ||
{ | ||
new Quaternion(0, 0, 0, 0), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Show Right, Front, then Left
Source/ModelGroups/Animation_Node.cs
Outdated
properties.Add(new Property(PropertyName.Scale, ":white_check_mark:")); | ||
} | ||
|
||
void SetLinearSampler(List<Property> properties, Runtime.Channel channel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create a new function for Scale and rename this to be specific for Translation. Make scale half, normal, double
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made scale loop as well. Is it really nessessary to specify the 0,0,0 value? As far as I can tell, setting that middle value doesn't make a difference due to being exactly between the min/max values with equal time spacing between.
In reference to the linear sampler. It makes sense for the step sampler.
Source/ModelGroups/Animation_Node.cs
Outdated
{ | ||
InTangent = new Vector3(1, 1, 1), | ||
Value = new Vector3(0.1f, 0.1f, 0.1f), | ||
OutTangent = new Vector3(1, 1, 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to zero.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Source/ModelGroups/Animation_Node.cs
Outdated
new Runtime.CubicSplineSampler<Vector3>.Key | ||
{ | ||
InTangent = new Vector3(0, 0, 0), | ||
Value = new Vector3(1, 1, 1), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBD
Looking into #428 tomorrow for model 06. The model also appears to change scale when rotating, but I'm not sure if that is an issue or not. |
Source/ModelGroups/Animation_Node.cs
Outdated
properties.Add(new Property(PropertyName.Interpolation, "Cubic Spline")); | ||
} | ||
|
||
void SetLinearSamplerForRotation(List<Property> properties, Runtime.AnimationChannel channel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this with the linear functions
Output/Animation_Node/README.md
Outdated
@@ -0,0 +1,15 @@ | |||
These models are intended to test the basic attributes of animation on a node. | |||
|
|||
The last model on this list creates a curve which doesn't start at Zero. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
@@ -1,6 +1,6 @@ | |||
namespace AssetGenerator.Runtime | |||
{ | |||
internal struct AnimationChannelTarget | |||
internal class ChannelTarget |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant the name and not the class to struct change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, switched that back around.
Source/Property.cs
Outdated
@@ -142,6 +142,8 @@ internal enum PropertyName | |||
Translation, | |||
Rotation, | |||
Scale, | |||
Targets, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to singular
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Implements the Node_Animation model group.
Changed some of the runtime animation objects from structs to classes because the structs were causing issues with how we've been passing references.
Addresses several parts of #414
Fixes #404, #428
TODO: