Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Catlard · Jan 21, 2013 at 01:51 PM · inputtimedrawing

Animation Curve Data Recording

So, I'm interested in recording the data in an animation curve to a text file. My users are going to create a drawing. The goal is for the drawing to be able to be replayed in the same time frame it was recorded -- but then for the creator of the drawing to be able to control the speeds/rates at which the drawing plays back, as defined by an animation curve.

So, as stated, I'd like to record numbers that describe that curve. I'm trying to think about the most efficient way of doing this -- clearly one cheap way of doing it would be to have an array of any number of pre-set "CurveDataObjects", each of which has a name and a curve -- so that the text file being imported by my application might just read "Apply curve 55", and know which curve to utilize. Basically this is the same thing that teachers do on report cards -- instead of writing "This student never did homework" on 20 different report cards, they just write the number "55" and the computer knows to print that comment. But that's the only way I can think of to do it, aside from converting one curve into 300 different keys, writing these values to a file, and then creating an approximate curve with those.

What do you think? What would your solution be?

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image AlucardJay · Jan 22, 2013 at 04:18 AM 0
Share

I thought this was an excellent unique question, so Upvoted. But am a little confused. Are you collecting a set of waypoints and playing them back at desired speed, or from the waypoints storing the X and Y values to an animationCurve and calculating the tangent in and out of that waypoint for the animationCurve? I did something of an answer for reading a curve and copying that curve to another gameObject in edit mode, I'm sure it could be modified to output the curve data to a text file (if that is what you are after) : http://answers.unity3d.com/questions/320689/derive-an-equation-from-a-graph.html

I cannot see how a master key system (CurveDataObjects) would work for you unless you are using predefined curves to draw.

avatar image Catlard · Jan 22, 2013 at 07:52 AM 0
Share

Hey! Thanks. Yes, that's what I mean -- using predefined curves to draw.

Essentially, the drawing class I'm using is from here (http://www.everyday3d.com/blog/index.php/2010/03/15/3-ways-to-draw-3d-lines-in-unity3d/), and it creates a series of meshes. These can be displayed iteratively, giving the effect of looking like something is being drawn. What I'm hoping to do is, after the user has drawn something (a line, for example), for them to be able to adjust the way that line looks like it is being drawn-- perhaps in reality they've drawn it as the same constant speed, but they want it to look like the drawing is speeding up at the end. Rather than using any one static tween (Quintic, Quadratic, etc), I'd like the user to be able to define a custom tween. I understand how my user might be able to edit a curve in the editor, but what I don't understand is how to transfer that animation to a text file without creating a heck of a lot of waypoints. Does that make more sense?

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Transition based off day length speed? ( day/night system) 1 Answer

Does Unity provide a means to determine the time since the last user interaction? 2 Answers

How can I make it so that inputs only function once per second? 2 Answers

Comparing a player made image to an original image 1 Answer

How can I use multiple GetButtonDown keys simultaneously? 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges