animator help session. agenda introduction curve implementation - requirements - what are all those...

Download Animator Help Session. Agenda Introduction Curve implementation - Requirements - What are all those vectors? - Where should I put things? Particle System

Post on 01-Jan-2016

218 views

Category:

Documents

6 download

Embed Size (px)

TRANSCRIPT

  • Animator Help Session

  • AgendaIntroductionCurve implementation- Requirements- What are all those vectors?- Where should I put things?Particle System - Requirements- What should I implement?- Suggestions- Cool forces

  • AgendaExtra credit ideasAnimating well vs. well just animatingTiming!MusicLightLasseters animation principlesCreating your artifactSelecting a curve typeCompositing

  • IntroductionHow to integrate with my model?just replace robotarm.cpp with your model better to do this sooner than laterModeler View vs. Curves ViewGraph Widget Interface

  • Spline CurvesRequirementsB-splineCatmull-Romcurve must be a function! sample solution is not perfectly correct; you must do at least as well as sample.

  • Curve ImplementationWhat are all those vectors?In any specific curveEvaluator classptvCtrlPts: a collection of control points that you specify in the curve editorptvEvaluatedCurvePts: a collection of evaluated curve points that you return from the function calculated using the curve types formulasfAniLength: maximum time that a curve is definedbWrap: a flag indicating whether or not the curve should be wrapped

  • Curve ImplementationWhere should I put things?Create curve evaluator classes for each that inherit from CurveEvaluatorB-splineCatmull-RomIn GraphWidget classChange the skeleton to call your new constructors in the GraphWidget class.

  • Particle SystemRequirementsParticle System classShould have pointers to all particles and a marching variable (time) for simulationIf you have two separate simulations (say, cloth sim and particles that respond to viscous drag) you may want to make that distinction here (as well as in your force and particle implementationSolver In the skeleton, this actually exists within the Particle System classParticles

  • Particle SystemRequirementsTwo distinct forcesDistinct may mean forces whose values are calculated with different equations (gravity and drag are distinct because gravity eq is of form f=ma, where drag is defined in terms of a drag coefficient and velocity)Alternatively (and better): distinct may mean that one force is a unary force and another is a n-ary force or spatially driven forceCollision detectionWith one primitive of your choiceRestitution coefficient must be slider controlled

  • Particle SystemWhat should I implement?Canonical components ConstructorDestructoretcSimulation functionsdrawParticles()startSimulation()computeForcesAndUpdateParticles()stopSimulation()

  • Particle SystemWhat should I implement?Particle struct or classyou may have several of these if you have multiple types of simulationsIf this is the case, take advantage of inheritanceForce classAn elegant implementation would include a generic Force class and a variety of distinct forces that inherit from it

    *Note: I stress inheritance because it will make your implementation easier (and less messy) and in general will make your life easier. If the TA that grades your project must look at your code, clean object oriented code is a great headache-prevention-tool.

  • Particle SystemEmbedding in your hierarchyNeed to find world coordinates of particles- Model View Matrix- Inverse Camera Transformation- Generate world coordinate for particles by undoing camera transformations to the point you want to launch from.Euler IntegrationHooking up your particle system

  • Particle SystemCool ForcesParticles in a latticeCloth simulationDeformable objectsFlockingWill require multiple forces: Attractive force that affects far away particlesRepulsive force that affects nearby particlesWhat else?

  • Extra Credit ideasTension control for Catmull-RomInterpolating splines are cool because keyframing the parameter values that you want is more intuitiveBut what about the time instances not keyed? Without control of curve tension, you may not get the parameter values that you would really like, and your animation could sufferAllow control points to have C0, C1, or C2 continuityThis can be VERY helpful in creating a good animationInitialize particle velocity with velocity of model hierarchy node to which it is attachedThis is fairly easy and will make your particle system noticeably more realistic

  • Extra Credit ideasBillboardingAdding support for sprites (billboarding) can DRASTICALLY increase the aesthetic quality of your simulationAdditional benefit: very easy to skin particles and make multiple instance of same particle look uniqueBakingA must for complicated simulations or for particle systems with a lot of particles

  • Extra Credit ideasBetter collision detectionBetter forcesLens flareMost animator artifacts suffer from lack of realistic looking lightingIdeally, this problem would be solved with ray tracing or photon mappingSince these are probably not options, lens flare is an alternative way to give the impression of interesting lighting

  • Animating well vs. well just animatingTiming!Timing is VERY, VERY important Consider timing before you bother to get specific about joint rotations or object positions

  • Animating well vs. well just animating Good timing

  • Animating well Music!Sound and music can greatly enhance the cohesion of your artifactIf your artifact idea includes a theme or stylization, it can be very effective to time your animation with events in the theme music. Good sound

  • Animating well Light!Like sound, light is VERY VERY important compositionallyAnything you can do to be creative with lighting will help

  • Particle SystemCreating Your ArtifactChoice of curve typesI recommend Bezier curves. Why?Recall the animation of a bouncing ballWhen the ball hits the ground, the curve describing its position should have a C1 discontinuityWithout C1 discontinuity here, the animation will look wrongCatmull-Rom is usually the preferred curve choice but unless your project supports the option to add C1 discontinuity at will, you might find yourself trying to fight the Catmull-Rom to create pauses and other timing goodies

  • Particle SystemCreating Your ArtifactCompositingRecommended that you break your intended artifact up into shorter clips combining them all in the end.This will make your life easier for many reasons:Splitting up work is straightforwardChanging camera angles is GOOD for a compositionYou can incrementally complete your artifact Download a trial of Adobe Premiere Play around with it, check the website for some details on how to use it. The user interface is pretty intuitive.