_id
int64 0
49
| text
stringlengths 71
4.19k
|
---|---|
3 | How do I animate a tilemap in Flixel? I am trying to animate a tilemap using Flixel 2.55. I found this code that apparently enables the use of sprites as tiles. To my understanding, this loops over the tilemap's graphic and replaces the tile's pixels with the sprite's pixels each time they change. I have implemented the class and it's working, but not completely the tiles get replaced, but do not animate unless the camera moves. Here's is the relevant part from LevelLoader.as, which only instantiates the AnimatedTilemaps (piece of code from forum) and pushes sprites into an array AnimatedTile is just an extended FlxSprite private var waterTop1 AnimatedTile Create ground tilemap groundTilemap new AnimatedTilemap() groundTilemap.loadMap( rawXML.Ground, Assets.OverworldGround, 8, 8) FlxG.state.add( groundTilemap) waterTop1 new AnimatedTile(8, 8, Assets.WaterTop, 100) .Animate only adds and plays an animation, with a startAtFrame param. waterTop1.Animate('run', 0...47 , 10, true, 0) It seems as though the sprites are updating. I tried tracing the update()s, and they are running for both the sprites and the tilemap. The sprites are even changing frames. Using only AnimatedTiles and hard placing them (giving a x and y) works and animates. What troubles me is that they only update when the camera moves. I've been stuck on this for a week now. I am also open to other solutions for animating tilemap tiles. |
3 | Running two simultaneous animations on a model? I am just looking for a broad answer to this question. I am more curious about the general information rather than the specific. Also, I tried to search for this, but I think it's hard to word it so you get the right question. Anyway One common thing I see in a lot of games is multiple animations on the same model. i.e. A character runs, but also raises his arms an shoots. A character has a walking animation, but can also be carrying resources as he walks. I am curious if the first model has a "run" animation and a "run while shooting" animation. Or if they have a "run" animation and a "shoot" animation and run them at the same time. Obviously the first is possible, but I am wondering how the second one is done. Do they use two models for upper and lower body or is there a way to ignore certain parts of a model when animating? I know this depends a lot on the model, the programmer, language and the way the animation is done. But broadly, if you were making a model with the intent of it doing multiple animations at once, what would be the best way to go about it? Again, not after detailed specifics, just an overview ) Thanks! |
3 | What is next to interpolate camera position with smooth speed changes? I am working on a path camera to be used in demo playback. (3d game) The spline math used is catmull rom. I am on my second attempt to get constant position speed ( (someone else is doing rotation). The path cam keyframes are position time. I have a step now when the path is recalculated, it also generates the arc distance time lookup table which I have normalized. I have the duration of each segment(k through k 1)as well as each segments linear velocity calculated from that data. I am not very good at reading anything except basic equations. I could use an explanation or psuedo code of what is needed next in order to get the camera to smoothly accelerate or decelerate depending on the velocity of the next segment. Right now it's instant changes and no good. I tried googling for hours and was going in circles. |
3 | Should Animations in Turn Based Games Happen Before or After State Transitions? I'm planning a roguelike game and I'm unsure how to design for animations. Since a roguelike is turn based, the game model is discrete and would have no intermediate states during an animation(?). I've come up with two possible approaches Perform state transitions immediately upon input and compute the animations that occurred. In the case of a moving character, draw the animation as a member of the destination tile (instead of the static sprite) and coming from the origin tile. Compute animations before transitioning and transition the state asynchronously after the animation completes. Draw moving objects as members of their origin tile so that they arrive immediately before the state transition. Do developers of this type of game tend to prefer approach 1 or 2 (or some third option) and why? |
3 | How do I convert a Source engine NPC model to a player model? The Source engine's NPC and player models differ An NPC model applied to the player has no animations. It cannot walk and holds its arms out to the side by about a foot. The weapon is held in the right hand and you can see the player switch weapons, but the weapons also have no animation. How do I convert between these model types? |
3 | Blender books for advanced character animation and modeling? I've been messing with Blender on and off for over a year, and am now ready to put a lot of sweat into making a great model for an iPhone app I'm working on. I want to learn tips and tricks on how to make great looking models and how to animate them as well. I know how to do key frame animation, I just want to learn how to do it well. For instance, I have made a model that walks, but I want to improve it. I want to learn how make its movements realistic. Does anyone have any resources that could help me with this? |
3 | Animating from json file in pygame? I have got a json file and I am trying to load the single sprites from that file but I gives this error after a few loops and also the animation is not smooth(gets stuck) error Traceback (most recent call last) File quot test.py quot , line 18, in lt module gt screen.blit(image, (0, 50)) TypeError argument 1 must be pygame.Surface, not None This is the json file I am using quot textureAtlas quot quot texture quot quot Run (32x32).png quot , quot regionWidth quot 32, quot regionHeight quot 32 , quot cycles quot quot animation0 quot quot frames quot 0,1,2,3,4,5,6,7,8,9,10,11 The script for the animation import json pygame.init() clock pygame.time.Clock() c 0 def lcAnim(sfile) global c with open(sfile) as f data json.load(f) img pygame.image.load(data 'textureAtlas' 'texture' ) while c lt len(data 'cycles' 'animation0' 'frames' ) img.set clip(pygame.Rect(data 'cycles' 'animation0' 'frames' c 1 32,0,32,32)) Locate the sprite you want draw me img.subsurface(img.get clip()) Extract the sprite you want c c 1 print(c) return draw me c 0 and the main script import pygame import lcanim name of the animation script (width,height) (300,200) clock pygame.time.Clock() screen pygame.display.set mode((width,height)) pygame.display.flip() running True while running image lcanim.lcAnim('run.sf') name of json file for event in pygame.event.get() if event.type pygame.QUIT running False screen.blit(image, (0, 50)) screen.blit(alimg,( 10,10)) pygame.display.update() screen.fill((255,255,255)) clock.tick(10) pygame.quit() Here's a video showing the problem https youtu.be 8IeaqVCxvms (sorry other video sharing services were not working) |
3 | Sprite animation with "overlapping" animations? I'm trying to implement my own sprite animation system, and so far I've got it working quite nicely. I store each animation as a "take" which basically denotes the row of the animation in the sprite sheet, the starting frame and the number of frame. These takes are created during start up and played by calling play(takeID) on the animation. The player is split into four sprites head, torso, arms and legs, and different animations can be played on each of these separately from the other parts. Now, this works fine for situations where I only need a single animation (walking, idling, running, swinging a sword etc.), but I need a more complex animation system for situations where the player performs multiple things at the same time, for example walking while swinging a sword. I've tried to break down the requirements of the animation system by using the example above, and I've found these cases 1. Player swings the sword 1.1. Play swinging animation 1.2. When done, play idle animation 2. Player starts walking 2.1. Play walking animation until player stops 2.2. Play idle animation when player stops 3. Player walks and swings the sword 3.1. Play walking animation 3.2. Replace the animation of the hands by a swinging animation 3.3. When swinging animation is done, revert back to the "walking hands" animation 4. Player walks, initiates a swing and stops walking during the swing 4.1. Play walking animation 4.2. Replace the animation of the hands by a swinging animation 4.3. (Player stops walking during the swing) 4.4. Stop walking animation and play idle animation for all other body parts except the hands 4.5. When swinging animation is done, play idle animation for hands I've tried fiddling around with "overriding" animations where the animation with the higher priority (in this case, the "swinging" animation) would be shown instead of the lower priority animation (the walking animation) while updating still both simultaneously to maintain the correct rhythm of the original animation. However, I have trouble getting it to work properly. The "reversion to idle animation" is a rather challenging task if I have just the single walking animation, I can stop it and then play the idle animation (or rather, the "idle frame"), but when the sword swinging is added, it becomes more difficult to know when to swap to the idle animation. So, to conclude with my question has anyone faced a similar problem? How should I tackle this issue? |
3 | Animations won't transfer states until entire animation is completed I am following the survival shooter tutorial and am using Unity 5. I just completed this video (linked) and I tested played it to see my animations worked but it seems like it will only transition from idle to walking after the entirety of the idle animation completes. The idle animation is quite long so my character will move around when it looks like its idling since the movement responds right away. Did I mess up something in my transitions? I followed the directions exactly and didn't change anything in the inspector that I wasn't told to do. |
3 | Why (SDL) animated filled circle leaves trail of movement? I'm trying to achieve proper animation using SDL. Used flags are SDL HWSURFACE and SDL DOUBLEBUF. That what I'm getting is technically smooth (I think), but I can figure out what should I do to remove that trail? My animation is time based (I'm calculating displacement with delta time). Link to to video https vimeo.com 62065078 my (every frame) drawing function is like for(int x 0 x lt screen gt w x) for(int y 0 y lt screen gt h y) draw pixel(screen, x, y, 136, 136, 136) and ball filledCircleColor(screen, ball.x, ball.y, 17, 0x000000ff) and finally SDL Flip(screen) main loop is for( ) curr ts stopwatch seconds elapsed(sw) d time curr ts prev ts prev ts curr ts cpSpaceStep(space, d time) draw scene(screen) |
3 | Unity animation won't play on trigger. What do I do to fix it? Ok so I added a play animation line to my trigger script. I made an animation, added it to the trigger object, attached the animation to the trigger, and tested. The target goes to the trigger as it should, deletes the trigger, but the animation never plays. So I check the console, and it's telling me "The AnimationClip 'MazeDoorClose' used by the Animation component 'SuckInTarget' must be marked as Legacy." so I do that, but now the trigger activates before the target gets there, and there is still no animation playing! I know this sounds confusing so in an attempt to make it easier to understand I made a short video . Sorry for the crappy quality, but hey it's free. Here is the code using UnityEngine using System.Collections public class SuckIn MonoBehaviour public Transform target public float speed public string ObjectWithTagToBeDestroyed public string ThingToAnimate void Update() float step speed Time.deltaTime target.position Vector3.MoveTowards(target.position, transform.position, step) void OnTriggerEnter(Collider coll) if (coll.gameObject.tag "Ball") Destroy(GameObject.FindWithTag(ObjectWithTagToBeDestroyed)) GetComponent lt Animation gt ().Play(ThingToAnimate) Before you ask yes the animation is on the object as it should be, and as Unity told me to do I marked it as a legacy animation. Any ideas what am doing wrong? |
3 | Frame Interpolation issues for skeletal animation I'm trying to animate in between keyframes for skeletal animation but having some issues. Each joint is represented by a quaternion and there is no translation component. When I try to slerp between the orientations at the two key frames, I got a very wacky animation. I know my skinning equation is right because the animation is perfectly fine when the animation is directly on a keyframe rather than in between two. I'm using glm's built in mix function to do the slerp, so I don't think there are any problems with the actual slerp implementation. There's really one thing left that could be wrong here. I must not be in the correct space to do slerp. Right now the orientations are in joint local space. Do I have to be in world space? In some other space along the way? I have the bind pose matrix and world space transformation matrix at my disposal if those are needed. |
3 | Workflow for non human ragdolls So I want to make automatic ragdoll generation system for all my enemies in my game, the assets are already made and have been paid for a while ago so I can't really ask the artist to change anything or generate some extra info, they are a variety of models (humans, robots, beasts) with a hard limit of 32 bones. Each bone is labelled and there is only a single mesh provided, which is skinned and ready to go. I am trying to understand how an automated system can generate ragdolls from this. So far my idea involves convex decomposition (v hacd?) to split up the mesh into small convex hulls and attach them using hinge and cone twist constrains (in bullet physics). The idea sounds simple in my head but actually there are so many questions such as, how to do it automatically? how to make each convex hull be attached to a bone correctly? how to join the convex hulls with constraints in the correct place? the ragdoll would be generated from the bind pose, but how to transform the ragdoll so that it is perfectly aligned with the skeleton after its death animation? I would very much appreciate some guidance on this, thanks. |
3 | What animation technique is used in 'Dont Starve'? While playing a few games in my personal time off development I've stumbled across a survival 2D 3D survival game. The game was apparently made in SDL and GLUT (Dont starve) but what really amazed me was the animations in the game. The animations are extremely smooth and fluent. There is no distortion while animating, what usually happens in hand made animations is that pixels get removed, animations are jaggy and they simply aren't as smooth. That got me thinking on how they managed to accomplish such a quality of animations. Were they really handmade (If they were, then it must've taken a very talented artist), is it bone animation or are they using another technique? |
3 | How to resolve "Accessed None trying to read property" error? Whenever I finish running the project, this error message appears Blueprint Runtime Error "Accessed None trying to read property jogador". Blueprint Jogador BP Anim Function Execute Ubergraph Jogador BP Anim Graph Transition Node Result By clicking to know where the error is coming from, the program tells me this code This is the code I made to get the player reference (jogador player Animation Blueprint) This is basically for the transition code between animations, to receive information whether or not the player is jumping (jogador player Blueprint) Animations perform normally, so the error doesn't seem to compromise project execution, but why does it occur? I looked at some links, but I don't know how to remove it. https forums.unrealengine.com development discussion blueprint visual scripting 86607 accessed none trying to read property |
3 | Objective C Moving UIView along a curved path I'm not sure if I am approaching this the correct way. In my app, when a user touches the screen I capture the point and create an arc from a fixed point to that touch point. I then want to move a UIView along that arc. Here's my code ViewController.m method to "shoot" object KIP Projectile creates the arc, KIP Character creates the object I want to move along the arc ... get arc for trajectory KIP Projectile vThisProjectile KIP Projectile alloc initWithFrame CGRectMake(51.0, fatElvisCenterPoint 30.0, touchPoint.x, 60.0) vThisProjectile.backgroundColor UIColor clearColor self.view addSubview vThisProjectile ... KIP Character thisChar KIP Character alloc initWithFrame CGRectMake(51, objCenterPoint 5, imgThisChar.size.width, imgThisChar.size.height) thisChar.backgroundColor UIColor clearColor thisChar.charID charID thisChar.charType 2 thisChar.strCharType "Projectile" thisChar.imgMyImage imgThisChar thisChar.myArc vThisProjectile thisChar buildImage thisChar traceArc in KIP Projectile I build the arc using this code (CGMutablePathRef) createArcPathFromBottomOfRect (CGRect) rect (CGFloat) arcHeight CGRect arcRect CGRectMake(rect.origin.x, rect.origin.y rect.size.height arcHeight, rect.size.width, arcHeight) CGFloat arcRadius (arcRect.size.height 2) (pow(arcRect.size.width, 2) (8 arcRect.size.height)) CGPoint arcCenter CGPointMake(arcRect.origin.x arcRect.size.width 2, arcRect.origin.y arcRadius) CGFloat angle acos(arcRect.size.width (2 arcRadius)) CGFloat startAngle radians(180) angle CGFloat endAngle radians(360) angle CGMutablePathRef path CGPathCreateMutable() CGPathAddArc(path, NULL, arcCenter.x, arcCenter.y, arcRadius, startAngle, endAngle, 0) return path (void)drawRect (CGRect)rect CGContextRef currentContext UIGraphicsGetCurrentContext() myArcPath self createArcPathFromBottomOfRect self.bounds 30.0 CGContextSetLineWidth(currentContext, 1) CGFloat red 4 1.0f, 0.0f, 0.0f, 1.0f CGContextSetStrokeColor(currentContext, red) CGContextAddPath(currentContext, myArcPath) CGContextStrokePath(currentContext) Works fine. The arc is displayed with a red stroke on the screen. In KIP Character, which has been passed it's relevant arc, I am using this code but getting no results. (void) traceArc CGMutablePathRef myArc myArc.myArcPath Set up path movement CAKeyframeAnimation pathAnimation CAKeyframeAnimation animationWithKeyPath "position" pathAnimation.calculationMode kCAAnimationPaced pathAnimation.fillMode kCAFillModeForwards pathAnimation.removedOnCompletion NO pathAnimation.path myArc CGPathRelease(myArc) self.layer addAnimation pathAnimation forKey "savingAnimation" Any help here would be appreciated. |
3 | Inverse kinematics behaving weirdly I have been trying to figure out why my player character crouches like this when I use inverse kinematics on it. I followed this tutorial https docs.unity3d.com Manual InverseKinematics.html? ga 2.157285243.1916573353.1569208906 694809292.1561053348 but then the weirdness in the picture above happens. What is going on? In case It helps, I used makehuman to make the player model, and used its "Game Engine" rigging option. EDIT Here are some additional pictures after I remade the project I left look obj blank because all it does is makes the player's head look a certain direction. |
3 | The animation state could not be played because it couldn't be found! If I try to use animation.Play() or have Play automatically ticked in the inspector on the animtion object, it gives me the follwing error The animation state could not be played because it couldn't be found! I searched around the web and everywhere they say you need set the animation type to 'legacy', but I already changed type to legacy and it did NOT fix the problem. Thanks in advance. |
3 | How can I make the Player animation appear smooth? I'm using GLFW for my window and input related work. I'm calculating delta time and multiplying it with my player speed and then finally adding it to the current position of the player. The thing is that, though it makes my motion frame independent the player movement appears to slow and speed up interchangeably. Well the reason would be the different values of delta time at each frame. What should I do to smooth out this animation? Here is the relevant code, and a capture of what's going on float deltaTime 0 float oldTime 0 The direction in which the player will move int playerX 0 int playerY 0 callback method for keyboard events void keyboard callback(GLFWwindow window, int key, int scancode, int action, int mods) if (key GLFW KEY W amp amp action GLFW REPEAT) playerX 0 playerY 1 if (key GLFW KEY S amp amp action GLFW REPEAT) playerX 0 playerY 1 if (key GLFW KEY D amp amp action GLFW REPEAT) playerX 1 playerY 0 if (key GLFW KEY A amp amp action GLFW REPEAT) playerX 1 playerY 0 update player's position void update() player gt move(playerX, playerY, TIME PER FRAME) set up glfw keyboard callback function and other stuff void init() glClearColor(0, 0, 0, 0) player gt bindVertexAttributes(shader.getAttributeLocation("position")) glfwSetKeyCallback(window gt getGLFWWindow(), keyboard callback) wait logic float expected frame end glfwGetTime() TIME PER FRAME void wait() while (glfwGetTime() lt expected frame end) expected frame end TIME PER FRAME playerX playerY 0 rendering function void render() glClear(GL COLOR BUFFER BIT GL DEPTH BUFFER BIT) player gt setUniformMatrixLocation(shader.getUniformLocation("projectionMatrix"), shader.getUniformLocation("transformationMatrix")) shader.useProgram() update() player gt render() wait() shader.stopProgram() main function int main(int argc, char argv) init() main loop while (!glfwWindowShouldClose(window gt getGLFWWindow())) render() window gt swapBuffers() glfwPollEvents() glfwTerminate() return 0 |
3 | MoCap data files applied to avatars using Mecanim I am applying some animations (e.g. running) from this free MoCap package that I got off the Unity Assets Store, and as far as I can see from running the animation previews, they seem fine (i.e. playing smoothly) but once I apply them to my avatar (generated through the free AutoDeskCharacterGenerator) and I run the animation, the avatar seems to rise on the floor... Please see the attached images that illustrate the character (with its collider, etc...) initially being perfectly aligned (touching the ground) but then a few seconds into running, it has been lifted off the ground. At first, I thought this must be due to the recorded motion data files, but (1) it has happened in every animation I have tried from the package so far, and (2) these motion data files were recorded off real people, so I find it unlikely that all the performers happened to be moving around on very uneven surfaces and slopes. Has anybody come across this problem before? |
3 | How should i manage intro animation never realized how the animation intro of a game is done, I've thought that perhaps you have all the images of each frame of the animation, or have a video made and make the load. anyway, if it is made of any of these ways, What is the best way to do this? |
3 | How to add custom control shapes to a rig in Maya I find most Maya animation videos has these circle lines to control character part rotation Why does my imported fbx not have these circle lines? |
3 | How do I render an animation where some frames appear twice? I am animating a sprite. The sprite has 7 different frames, but the animation is 10 frames long. This is because 3 of the original frames appear twice in the animation 3 gt 4 gt 5 gt 6 gt 4 gt 3 gt 2 gt 1 gt 0 gt 2 Frames 2, 3 and 4 appear twice. This avoids having to store duplicate frames in the spritesheet. How can I render the animation in this sequence with repeated frames? |
3 | Character on Character fighting animations sorry about the vague title, but these couple of videos images might explain my situation a bit better https www.youtube.com watch?v MG1mNyjNuXk (Wolfenstein the Old Blood) https www.youtube.com watch?v NVmsucYKlvo (Mad Max the Game) https www.youtube.com watch?v XYWQ UzTpZ8 (at 0 49 seconds, Credits go to Ranon Sarono AKA Hyper) I am basically wondering how you would animate the 2 characters if 1 of them knifed the other one, do they both have their separate animations? or do they just take the animation file? |
3 | Problems with imported model animation from Blender to Unity I've downloaded a free sculpted arm and created my own rig and animation for it in Blender. So here is how it looks like in Blender And the model itself looks fine in Unity, but as soon as the animation starts, the vertices are partially glued together like this I've simply imported the .blend file for the moment, is there some better way to import this? |
3 | How to implement scene changing in real time? I want to implement real time scene changing effects to make my game could changing from spring to summer, summer to fall, fall to winter. And Chaning effects like this game. Giana Sisters. I think Giana Sisters use animation to transit from two scenes, but I dont know how to make these animations. Is any other suggestions could make this effects? |
3 | how to use .getTransform to get the current coordinates of translated rotating object I m stuck trying to figure out how to use .getTransform to determine what pointA (x1,y1) and pointB (x2,y2) of each of my lines would be after translate and rotate. I've found other answers but they don't seem to target exactly what I need nor do I fully understand the matrix that gets returned. From the snippet provided you can see that my lines always return their original values. I know there's a formula for this, or a way to use the matrix, I just don't know it or how I would implement it. What I need is the start and end points of every line. The plan will be to rotate (animated spinning) them to any angle and have those coordinates get used for ray casting. I've previously done this from a center point out or one direction to another but not with so many lines using the rotate method. I have tried the same thing with boxes and just can't seem to grasp how I can get the rotated coordinates. Here's the snippet let canvas document.getElementById("canvas") let ctx canvas.getContext("2d") canvas.width 200 canvas.height 180 class Rays constructor(x1, y1, x2, y2) this.x1 x1 this.y1 y1 this.x2 x2 this.y2 y2 draw() ctx.save() ctx.translate(canvas.width 2,canvas.height 2) ctx.rotate(45 (Math.PI 180)) ctx.beginPath() ctx.strokeStyle 'black' ctx.moveTo(this.x1, this.y1) ctx.lineTo(this.x2, this.y2) ctx.stroke() ctx.closePath() ctx.restore() let rays function createRays() due to translate i have to push some lines in the negative and some positive this causes an overlap of one line in the center. for (let i 0 i lt 26 i ) let x1 i lt 13 ? 10 i i 10 canvas.width 2 20 let y1 canvas.height let x2 i lt 13 ? 10 i i 10 canvas.width 2 20 let y2 canvas.height rays.push(new Rays(x1, y1, x2, y2)) enter angle here createRays() let count 0 just used to stop it from constantly console logging rays.x1 function drawRays() for (let i 0 i lt rays.length i ) rays i .draw() count lt 1 ? console.log(rays i .x1) false count drawRays() console.log(ctx.getTransform()) function animate() ctx.clearRect(0, 0, canvas.width, canvas.height) ctx.fillStyle "lightgrey" ctx.fillRect(0,0,canvas.width,canvas.height) drawRays() requestAnimationFrame(animate) animate() lt canvas id "canvas" gt lt canvas gt |
3 | Can't attach animation to script I'm working on a little game (which is also my first one) and I want to insert a splash screen at the beginning (after the Unity one). I've finally achieved to add a fade in and a fade out transistion when the splash screen starts and ends, but the fade out is activated by a button and I wont to play it simply after a certain time. I've made a script for that using UnityEngine using UnityEngine.UI using System.Collections public class FadeInOut 2 MonoBehaviour public Animation anim IEnumerator Start() yield return new WaitForSeconds(2f) anim.GetComponent lt Animation gt ().Play() Application.LoadLevel(Application.loadedLevel 1) The problem is when I try to attach the animation the Inspector refuses to do it. Any ideas? Thanks |
3 | Exporting distinct images from a sprite sheet using GIMP I have recently found that in Photoshop there is a script that enables you to export individual images on different layers into distinct png images on disk. Is it GIMP capable of doing the same thing and how? I have a sprite sheet (png image) and there are 36 perfectly aligned images in 4 rows (64x64 pixels each). I have to cut and export 36 times. Can be GIMP of some help here? I don't have Photoshop. |
3 | Need to produce an animated texture of Water where each image tiles in all directions I need to produce a 2D 'animated' texture of "water" for a game in which each image tiles in 'all' directions, much like those produced by the Caustics Generator, but with the power and flexibility of something the likes of Blender. The final result from Caustics Generator is 32 images that are actually animated such that when the full 32 images are played in a loop they will seamlessly loop forever. They will not only loop in time, but each image also tile in all directions. This is nice, but it comes in only one flavor so to speak. I'd like to accomplish the same thing with a Blender type tool, and I have actually gotten to the point where I generate the X number of images, but they do not tile in 'all' directions, nor are they slightly animated. I've tried Blender texture animations using offsets but with only limited success. Does anyone know of how to (or of a tool) which will animate textures such that they tile in all (4) directions? Many thanks in advance .... |
3 | FPS Android game that moves the gun as user swipes the screen I am Making a First Person shooter game for android. Gun moves in all directions I swipe left right up or down. But the speed is so slow. How can i increase it's Speed.Here is my code. void FixedUpdate () foreach (Touch t in Input.touches) if (t.phase TouchPhase.Began) initialTouch t else if (t.phase TouchPhase.Moved amp amp !hasSwiped) float deltaX initialTouch.position.x t.position.x float deltaY initialTouch.position.y t.position.y distance formula distance Mathf.Sqrt((deltaX deltaX) (deltaY deltaY)) bool swipeSideways Mathf.Abs (deltaX) gt Mathf.Abs (deltaY) if (distance gt 100f) if (swipeSideways amp amp deltaX gt 0) this.transform.Rotate (new Vector3 (0, 30f, 0), rotationSpeed Time.deltaTime) else if (swipeSideways amp amp deltaX lt 0) swipe right this.transform.Rotate (new Vector3 (0, 30f, 0), rotationSpeed Time.deltaTime) hasSwiped true else if (t.phase TouchPhase.Ended) initialTouch new Touch () hasSwiped false |
3 | Why does exporting to FBX in 3dmax loses simulated animation I made a cloth simulation (wind blowing a cloth). When I export it to FXB and the animation box is ticked on export menu it seems ok (no error in longs). When I reload it to Unity. or 3DMAX again. The wind animation is lost. How can I fix that? Thanks |
3 | Rigging Skinning of human skeleton skin mesh scanned by MRI I have successfully developed a system in Qt C for human musculoskeletal mocap simulations. I can run asf, amc, bvh motion capture files and can visualize the joint transformations. I even simulated the static rigid bones of MRI scanned meshes. 31 mesh bones were extracted from MRI data and each bone is assigned to .asf skeleton bone id name and parent and child relationship is created. I have absolute and relative transformations of each bone and the bone mesh vertices positions are also known. Now there is a skin mesh over the skeleton bones. I want to do rigging skinning of that skin mesh with the bone transformation. If a bone transforms, its skin mesh should be transforming too. Literature study tells us that, assign each vertex of its bone and assign some weight to each vertex, sum up all and multiple with the bone's transformation matrix, etc. etc. and find the new position of a vertex. I have pretty much experience to play with meshes and transformations, I can do that. But here I do not get the concept, first of all, how can we assign vertex to its specific bone? because human skin is a continues with Only One Shell, do we assign by computing the offset minimum distance from bone to skin? Second question is how do we compute weight for each vertex? Because this mesh is not exported from MAYA or some 3D softwares, where each vertex is assigned with a weight value, but this is a static rigid mesh with no precomputed information. Third question comes to mind that how can we know that this specific vertex should be transforming with the transformation of Foot for example? How do we know that this vertex is a Foot vertex? I want to have some concepts about the methodology, please guide me. Thanks. |
3 | How do I support animation with frames of different sizes? I'm trying to create a simple top view 2D rpg, in the style of Zelda and Secret of Mana, using PyGame. I've managed to make the beginnings of a game, with an animated character walking around. However, when I start animating attacks, I'm running into problems because the sprite with the sword slash is bigger than the walking sprite. This makes the character appear to be jumping around when attacking. I managed to handle the problem by defining a center of gravity, so to speak, for each image, and apply a suitable offset at each frame in the animation to make the center of the character stay at the same place throughout the animation. I defined a dictionary of lists of images (instances of pygame.Surface), where I pick out the correct list by the state of the character, so for example there is one list for walking left, and then I loop over the list to get the animation. To handle the offset, I similarly created a dictionary of lists of offsets, looping over those in the same way. However, I'm not entirely pleased with this implementation, so I'm looking for a more elegant solution. I tried to add an attribute called offset to each instance of the pygame.Surface class, to hold the offset for each image, but the Surface class doesn't allow new attributes to be set. I then thought about subclassing pygame.Surface, which would allow me to set any attribute I wanted, but then I couldn't load my images with pygame.image.load without a lot of extra code. I imagine everyone who makes a game with animations where the size of the sprite changes between frames would have to deal with this problem, so if anyone could suggest an elegant implementation, that would be great. If example code with PyGame is available, that would be even greater. |
3 | Head bone not found when importing .blend to Unity I have created a model, rigged it(using rigify), and created several actions(animation clips) for it Blender. Everything seems to be fine. However, when I import the .blend to Unity I get a console warning that "Required human bone 'Head' not found". I know that there is a bone called "head" in my .blend. The animations work, except the head rotation does appear to not be deforming. Has anyone experienced this? Is this just a naming convention thing. Should I try to rename my "head" bone to "Head"? I just don't know the inner workings of the the import process well enough to know what to do. |
3 | Creating Smooth Animations Possible Duplicate What s the best way to create animations when doing Android development? What animation technique is used in Dont Starve ? I've always admired Zeptolab for their smooth in game animations. Zeptolab has created both Cut the Rope and now Pudding Monsters. I'm wonder how you're able to get animations this smooth? Are these sprite sheets? Are they actual 3D models? Here's a video of their latest game http www.youtube.com watch?v rV1dlN dbJQ If you get to the game play you'll see how the guys are constantly wiggling and it's so smooth. You also saw this in the monster guy in Cut the Rope. I'm just wanting some insight into how this is done. Like what tools they may be using. Thanks |
3 | Should I use procedural animation? I have started to make a fantasy 3d fps swordplay game and I want to add animations. I don't want to animate everything by hand because it would take a lot of time, so I decided to use procedural animation. I would certainly use IK (starting with simple reaching an object with hand ...). I also assume procedural generation of animations will make less animations to do by hand (I can blend animations ...). I want also to have a planner for animation which would simplify complex animations those which can be split to a sequence run and then jump, jump and then roll or which are separable legs running and torso swinging with sword . I want for example a character to chop a head of a big troll. If troll crouches character would just chop his head off, if it is standing he would climb on a troll. I know that I would have to describe the state ("troll is low", "troll is high", "chop troll head" ..) which would imply what regions animation will be in (if there is a gap between them character would jump), which would imply what places character can have some of legs and hands or would choose an predefined animation. My main goal is simplicity of coding, but I want my game to be looking cool also. Is it worthy to use procedural animation or does it make more troubles that it solves? (there can be lot of twiddling ...) I am using Blender Game Engine (therefore Python for scripting, and Bullet Physics). |
3 | Who should handle animations when game logic is separated from rendering? Suppose I have a tile based game and I want the step to be 1 tile but also want the movement to be smooth while the player is getting there. If I understand correctly, the only way to achieve this would be making a series of small movements where the increment is a percentage of a tile. My question is should the game logic thread send the animations to the rendering thread? What is the best way to go about it? |
3 | How do I make a 2D sprite flash green when tapped? I have a sprite that is based on an image of a gray circle. When the user touches the sprite, I want the sprite to flash green, as in I want the circle to appear to turn green for 0.2 seconds. I tried setting the color of the sprite via SpriteRenderer's function SetColor, and it blended the color with the initial gray color of the sprite, so I got a very dark green even though I'm really sure I didn't mess up the values when I created the color. Now I'm trying to get my flashing effect by using separate images. I have the images I need, and I have a message getting logged when I tap the circle, I just need to setup a non looping animation and trigger that animation in my code. |
3 | Are the Minecraft animations hardcoded into the game? I would like to know how the animation system works in minecraft. I get a feeling that all the mobs are hardcoded into the game. Did notch really sit there and create the matrices for all the animation bones by hand? I like recreating games for fun, so I would like to know how he did this. Also, if he truly does hardcode them... is there a better way? |
3 | Calculating the correct roll from a bone transform matrix Read this forum topic for more info http blenderartists.org forum showthread.php?260602 transform matrix to bone 28head tail roll 29 bug I'm trying to get my Blender3d modeller importer to create correct bones from my file's transform matrices. The Blender Python API doesn't have a way to do this (anymore!), so people had to dig the Blender C source to find out how Blender does it and port that. Here's a Python port of the needed functions, not by me (I don't know C) def vec roll to mat3(vec, roll) target mathutils.Vector((0,1,0)) nor vec.normalized() axis target.cross(nor) if axis.dot(axis) gt 0.0000000001 this seems to be the problem for some bones, no idea how to fix axis.normalize() theta target.angle(nor) bMatrix mathutils.Matrix.Rotation(theta, 3, axis) else updown 1 if target.dot(nor) gt 0 else 1 bMatrix mathutils.Matrix.Scale(updown, 3) rMatrix mathutils.Matrix.Rotation(roll, 3, nor) mat rMatrix bMatrix return mat def mat3 to vec roll(mat) vec mat.col 1 vecmat vec roll to mat3(mat.col 1 , 0) vecmatinv vecmat.inverted() rollmat vecmatinv mat roll math.atan2(rollmat 0 2 , rollmat 2 2 ) return vec, roll How to use them pos mymatrix.to translation() axis, roll mat3 to vec roll(mymatrix.to 3x3()) bone armature.edit bones.new('name') bone.head pos bone.tail pos axis bone.roll roll Sadly, it seems even the Blender C code is buggy and doesn't take into account cases when the bone is parallel to (0,1,0). So such bones can get assigned wrong (by 180 degrees) rolls and mess up animations. Does anyone have better code for generating roll which takes into account such cases? The old Blender 2.4 API generated correct ones. Its C code can be found here http svn.blender.org svnroot bf blender branches blender 2.47 source blender blenkernel intern armature.c I'm no C coder myself, again. |
3 | How do character object interaction animations work in isometric games? I am planning an isometric business simulation game where the player sees an office with the usual furniture such as desks, whiteboards etc. Characters (Staff NPC's) within the game should interact with these objects by performing some pre defined tasks such as typing on the keyboard at the desk or writing on the whiteboard etc. What I am interested in, specifically, is the following scenario Character moves across the office (1) to his desk (2) and sits down and starts to type (3). From what I understand I would have a sprite sheet for the character movement (1) and a static sprite for the desk (2) but I don't quite understand how the third step would be handled? Is there a combined sprite that contains both desk and character? I assume not, otherwise I would need to have a sprite sheet for every desk and character combination. How is this normally handled? EDIT Here is a specific example animation from the game Theme Hospital. You can see the video here. As far as I can see the animation is split into several steps. Step 1 Character moves between desk and chair. This suggests that chair and desk are in fact separate sprites. Step 2 Character sits down animation Notice how in the very last frame the chair is closer to the desk. Step 3 Desk animations Step 4 Stand up animation Is the same as sit down but played in reverse. Step 5 Move away Use normal move animation to move away. The questions I have is how are these animations best separated and how would a graphic artist usually provide these animations? Is the character sitting and typing on the desk actually three different sprites (desk, character and chair)? Does anyone know any example sprites of similar animations? EDIT 2 I guess my biggest concern is that I have the right expectations on how the sprites will actually look like. I can't draw them myself so I will have to pay someone to do it and I assume there is some kind of best practice way to do these kind of animations? |
3 | Why should a FPS game use a "floating arms" approach over full body one? I've seen many first person shooter games both single and multiplayer using a set of floating arms and a gun instead of using the whole body model. What is the advantage of floating arms? You are technically doubling the work making two meshes and two animations for each action. |
3 | How do I show a small sprite being dragged by touch? In my mobile game, users drag shapes across the screen. Think of it as a classic Lines game, where you drag a dot on the field, or a chess game where you drag and drop pieces. The problem is that the player's finger totally covers the sprite, making dragging confusing. Is there a common practice to solve this? My best try so far was to move the sprite to be offset from the finger when the dragging starts, then move along with the finger in the offset position until dropped. The problem with this approach is that users might be left or right handed. If I offset the sprite to the top left of the finger, dragging with the left hand covers the sprite again. |
3 | Blending effect on textures Hi i am trying to build screen animation like flickering, interlace, color separation similar to old style malfunctioning Amiga screens. The intended effects are shown in this video. I am using libgdx and I already discovered the universal tween engine, which helps a lot to build transitional animations, but how should I approach those blending effects, any suggestions? I will specify my question once I learned more about libgdx, but maybe you could give me some hints already. Thanks! |
3 | Guidelines when rigging a character Just wondering that how many IK (Inverse Kinematic) bones should you apply to a game character before it starts to go resource hog. Basically should you try to get rid of IK bones and just try to animate without them but using IK bones makes things easier for the animator but might cause unnecessary use of resources and possibly cause bottleneck when calculating bone and mesh translations. I'm using Blender and couple of animation tutorials are suggesting to use IK controllers and they indeed help a lot but when importing the character into a game they might be plain pointless since they are used only to help the animator. |
3 | Player sprite moving slower on iPhone 4 I just finished getting movement jump animation for a player sprite in Xcode using Cocos2D. The basic movement algorithm is a timer that updates every 0.01 sec, changing the sprite position to (sprite.position.x xVel, sprite.position.y yVel). Each time a movement button is tapped, the appropriate velocity (initialized to 0) is changed to whatever speed I choose, then a stop movement button returns the velocity to 0. It's not an ideal solution but I'm very new at this and stoked to at least have that working with little help from the internet. So I may not have explained that perfectly, but it is in fact working to my satisfaction in Xcode's iPhone Simulator, however when I build it for my device and run it on my phone, the sprite's movement speed is noticeably slower than in Xcode. At first I thought it must have to do with the resolution of the iPhone 4, making the sprite's movement path twice as long, but I found that if I pull up the multitask bar, then return to the app the speed will sometimes jump back to normal. My second theory was that the code is just inefficient and is bogging the processes down, but I would see this reflected in the frame rate wouldn't I? It stays at 59 60 the whole time, and the spritesheet animation runs at the correct speed. Has anyone experienced this? Is this a really obvious issue that I'm completely missing? Any help (or tips for optimizing my approach to movement) would be much appreciated! |
3 | Which style technique is more time efficient for an inexperienced artists? For a top view 2D mobile game where you have to create and animate humanoids (human, golems) and "objects" like fire, boulders, levers, etc. Considering the artist has no prior experience with drawing, nor with any related software. |
3 | Should I use animation or simple object rotation in this case I'm making game where players control hover tanks using Unreal Engine 4. Tank have a turret which rotates around for aiming. Turret pivot center of mass is not exactly in joint with rest of tank so it rotates around point behind the turret. You can see it here https www.youtube.com watch?v 2k d4u6Htzg I asked my friend who made this mesh to create skeleton for it. Now I'm not sure, which is the best way to implement correct rotation. Should I make and use animation of tower rotating? Keeping turret as child of rest of tank and simply rotating it was easier and more straightforward, so maybe I should just change pivot position? Maybe, there is some easy way to rotate turrent around bone? Which way is best in Your opinion and why? |
3 | why animated tiles aren't animated? So I got some code and I'm using pytmx to load the maps, but the animated tiles don't seem to animate in my pygame game. Is there a setting to change that or do I need to write the animation code myself? |
3 | How to add (not blend) non looped animation clip to looped animation with Mecanim? I have a GameObject with Animator and looped animation clip. This animation changes X coordinate from 0 to 10 and back. I need to add another animation to the first one that increases GameObject's scale and changes its color to red simultaneously. After scale and color change GameObject keeps these parameters and continues to move according to the first animation clip. The only way I managed to work it around is writing a custom script with couroutine IEnumerator Animate() float scaleDelta 0.2f float colorDelta 0.02f for (int i 0 i lt 50 i ) spriteRenderer.color new Color( spriteRenderer.color.r, spriteRenderer.color.g colorDelta, spriteRenderer.color.b colorDelta) transform.localScale new Vector3( transform.localScale.x scaleDelta, transform.localScale.y scaleDelta, transform.localScale.z) yield return new WaitForSeconds(0.02f) This works for linear interpolation, but requires to write additional code and write even more code for non linear transformations. How can I achieve the same result with Mecanim? Sample project link https drive.google.com file d 0B8QGeF3SuAgTU0JWNGd2RnpUU00 view?usp sharing |
3 | How to animate infinite rotary movement I would like to add a chainsaw (or something similar to it... a rotary blade) to my game as a melee weapon. In fact, a rotary blade is a better example. Would it be better to do it in blender somehow, using skeleton, or should I just create two parts (the handle and the blade) and then rotate it in UE4? |
3 | Creating a large amount of sprites and animations For my AP U.S. Government and Politics class, I am making a spinoff of Mortal Kombat. Because of time constraints, I'm using an open source version of the game and want to create new characters. I have about two weeks to do the project and can invest about 1 4 hours most days. I want it to look as nice as it can with the limited knowledge, skill, and time that I have. What programs or techniques would be best for a beginner with my time constraint? |
3 | Blender to UE4 eye mesh is getting detached I've created a rigged and animated mesh using MakeHuman and Blender and exported it as FBX file to be used in Unreal Engine, all seems to be working well except the eyes. I've tried parenting the eye mesh to the head bone which works fine in Blender but unfortunately doesn't work with Unreal Engine. My second approach was to create a bone for each eyes and parent the eye mesh with weights which is better but it's still doesn't work as it shows in blender. In Blender 2.82 ( works through out the animation ) In UE4 4.24.3 ( sometimes the eyes are inside the body, sometimes it pops outside, never in the right place. ) |
3 | How to transition between states and mix states in a finite state machine? I don't understand how to use a finite state machine with the entity controlled by the player. For example I have a Mario style game (2d platform). I can jump, run, walk, take damage, swim, etc. So my first thought was to use this actions as states. But what happens, if you are running when you take damage? Or jumping, taking damage and shooting at the same time? I just want to add functionalities (actions) to the player in a clean way (not using it for all the actions in the entity update) . |
3 | How do I convert a Source engine NPC model to a player model? The Source engine's NPC and player models differ An NPC model applied to the player has no animations. It cannot walk and holds its arms out to the side by about a foot. The weapon is held in the right hand and you can see the player switch weapons, but the weapons also have no animation. How do I convert between these model types? |
3 | Unity Network Animations Not Smooth I am attempting to learn Unity Networking using the new UNET framework. I have a functioning rudimentary 3rd person setup in which a host and a client can connect to localhost 7777. Animations are working across both client and host. However, some of the animations are not smooth. I am using the ThirdPersonAnimationController and the Ethan model that come with Unity. The animations from running to turning left or right and from running to stopping are quite jittery. However, they are not jittery when viewing the screen in which the controls are being input. I am using the NetworkManager and my Player prefab has a NetworkAnimator. I'm calling my movements in the Update function of my Player script void Update() param anim.parameters if (!isLocalPlayer) return float move Input.GetAxis("Vertical") anim.SetFloat("Forward", move) float moveTurn Input.GetAxis("Horizontal") anim.SetFloat("Turn", moveTurn) Camera.main.transform.position new Vector3(transform.position.x, 2, transform.position.z 2.5f) public override void PreStartClient() GetComponent lt NetworkAnimator gt ().SetParameterAutoSend(0, true) GetComponent lt NetworkAnimator gt ().SetParameterAutoSend(1, true) GetComponent lt NetworkAnimator gt ().SetParameterAutoSend(4, true) public override void OnStartLocalPlayer() good for initializing things only for the local player cameras, input, etc... GetComponent lt NetworkAnimator gt ().SetParameterAutoSend(0, true) GetComponent lt NetworkAnimator gt ().SetParameterAutoSend(1, true) GetComponent lt NetworkAnimator gt ().SetParameterAutoSend(4, true) Is there a way to improve the animation across the network? Any suggestions would be very helpful. Thanks. |
3 | What technique would I use to animate a 2D curling tentacle? I have played around in Cocos2D X and I think I understand the limitations of sprite based animation fairly well. I want to have a game with some characters curling and extending a tentacle which varies in length and amount of curl depending on the terrain. Maybe imagine a sloth swinging from a tree but with arms that stretch at times (Gumby character?). Is there a name for such a technique? Would this be a variant on Animating Bezier Curves as seen in Jason Davies's example or discussed in this blog on tweening control points? I'm a very experienced polyglot programmer but relatively naive in games and graphics. |
3 | Which MoCap Animation Sits I have an UMA that I want to be in a sitting position basically forever. I assume I need an animation that will put him in an idle sitting position. I found the MoCap Huge Animation library for free in the Assets Store, but it is so big that I don't know which animation is sitting. Does anyone know of an idle sitting animation that I could use? Or specifically which number (ie 02 01) of the MoCap Huge Library which has one? |
3 | How to reset AnimatedSprite? In Godot v2, it seems that AnimatedSprite had a method set frame() see here. But in v3, this method does not seem to exist anymore. Only 3 methods are available see here bool is playing () void play (String anim quot quot , bool backwards false ) void stop () What is the way to reset an animation in Godot 3? |
3 | Designing an API for defining rigged game entities I am making a game framework for building constructing what I would imagine are called something like quot multi component rigged entities quot . This would be things like a stick figure drawing. Can't find a great animation to demonstrate, but something like this, where the head is a circle, the hands circles, the arms are poles, torso is one block, etc. (imagine there is no bending, only rigid shapes moving attached by joints). I need to design some kind of API for a user of the framework to use to describe such a rigged entity. As one example, I am looking at Vue.js and their API is basically like this, you have a template lt div id quot watch example quot gt lt p gt Ask a yes no question lt input v model quot question quot gt lt p gt lt p gt answer lt p gt lt div gt And a model, which has external internal properties, computed properties, and methods var watchExampleVM new Vue( el ' watch example', data question '', answer 'I cannot give you an answer until you ask a question!' , watch question function (newQuestion, oldQuestion) this.answer 'Waiting for you to stop typing...' this.debouncedGetAnswer() , created function () this.debouncedGetAnswer .debounce(this.getAnswer, 500) , methods getAnswer function () if (this.question.indexOf('?') 1) this.answer 'Questions usually contain a question mark. )' return this.answer 'Thinking...' var vm this axios.get('https yesno.wtf api') .then(function (response) vm.answer .capitalize(response.data.answer) ) .catch(function (error) vm.answer 'Error! Could not reach the API. ' error ) ) This is just one example of an API I am looking for. But what I'm looking for is some inspiration, perhaps from Unity or some other gaming framework engine, where it allows you to specify not quot view components quot but entire rigged entities like in this animation above. It seems to come down to a skeleton with bones and joints, and the bones are somehow attached to skins, but that's as far as my knowledge goes, and I'm not really sure what a DSL sort of thing would look like for defining a rigged entity. How can I design an API that handles this task? |
3 | How to motion capture animations? I'm not an animation artist and so I want to create some animations for testing. I want to use a camcorder to record me while I'm running and so I want to know if exists a software that grab the video and translate it in animation frames. |
3 | How do I use the morpher modifier in 3dsmax to morph into several targets simultaneously? I have a 3D Face from Facegen here including all necessary phenomes' positions. But these targets are separated into upper, lower teeth, sock and eyes. How do I combine them for the face to morph into each facial position at once? |
3 | How can I get my first person character in Unity to move to a ledge with an animation? I'm trying to get this to happen The character walks up to a large crate, the player presses a button, and an animation starts playing where the character climbs up on to the crate. (all in first person view). So far I tried this with normal "First Person Controller" Prefab in Unity. My code so far function OnTriggerStay(other Collider) if(other.tag "GrabZone") if(Input.GetKeyDown("e")) animation.Play("JumpToLedge") However when i use this on The FPC it will always play from the position the animation is created on. I also tried to create an empty game object, placing the FPC in there. Gives same effect. I also tried just animating the graphics of the FPC alone. This seems to work but since the Character Controller itself is not animated that stays onthe ground. So the whole FPC wont work anymore. Is there anyway i could let this animation play on the local position the player is on at that time? Or can you think of any other logical solution for a grab and climb? |
3 | How to interrupt movement where the model can lag behind I have a movement system for my characters where the model is allowed to lag behind the character's actual position. In a way it is like the model is being dragged on a string behind the actual position. This works well to smooth out the movement when the character is running around corners or changing direction, because the pathfinder will supply a list of waypoints that are otherwise followed in a straight line. The only problem I have is when the character is interrupted in his movement, if for instance he spots an enemy and wants to shoot at him. In this case the rendered model will often be a bit behind the actual position. What is currently happening is that the character changes state to shoot, but this is not immediately reflected in the model, because it is still moving (lerping) towards the actual position. As a result, when the model finally gets there, it will not have time to play the full shoot animation, so it appears like the character just lifts his weapon halfway to aim, then lowers it again. What is the best way to resolve this issue? It seems like there is no perfect solution... |
3 | How can I create a 2D "gooey" "sticky" separation effect? I want to create an effect similar to this animation where two shapes separate over time but are connected (for a time) by something gooey that stretches and eventually breaks. Like pizza cheese, but specifically in 2D. I'm using Swift and SpriteKit. I'm thinking this probably involves keyframes bezier path animations, but I'm not sure. How can I achieve this effect? |
3 | Milkshape3D Animation on Windows 7 64 bit when I run Milkshape 3D on my 64 bit Windows 7 machine, certain joints expand when I try to rotate them. For example, my model's leg has hip, knee, foot and toe joints. So to do a walking animation I would rotate the hip joint, then rotate the knee joint. Then as soon as I start rotating the foot, the foot joint moves away from the knee rather than just rotating around the axis. These images show what I'm talking about I've tried to run Milkshape in comaptibility mode and with the Mesa software OpenGL renderer, but it doesn't work. At the moment my workaround is to run Milkshape in a 32 bit Windows XP virtual machine. Does anyone know what causes it and how to solve it? |
3 | Exporting the frames in a Flash CS5.5 animation and possibly creating the spritesheet Some time ago, I asked a question here to know what would be the best way to create animations when making an Android game and I got great answers. I did what people told me there by exporting each frame from a Flash animation manually and creating the spritesheet also manually and it was very tedious. Now, I changed project and this one is going to contain a lot more animations and I feel like there has to be a better way to to export each frame individually and possibly create my spritesheets in an automated manner. My designer is using Flash CS5.5 and I was wondering if all of this was possible, as I can't find an option or code examples on how to save each frame individually. If this is not possible using Flash, please recommend me another program that can be used to create animations without having to create each frame on its own. I'd rather keep Flash as my designer knows how to use it and it's giving great results. |
3 | Sprite animation with "overlapping" animations? I'm trying to implement my own sprite animation system, and so far I've got it working quite nicely. I store each animation as a "take" which basically denotes the row of the animation in the sprite sheet, the starting frame and the number of frame. These takes are created during start up and played by calling play(takeID) on the animation. The player is split into four sprites head, torso, arms and legs, and different animations can be played on each of these separately from the other parts. Now, this works fine for situations where I only need a single animation (walking, idling, running, swinging a sword etc.), but I need a more complex animation system for situations where the player performs multiple things at the same time, for example walking while swinging a sword. I've tried to break down the requirements of the animation system by using the example above, and I've found these cases 1. Player swings the sword 1.1. Play swinging animation 1.2. When done, play idle animation 2. Player starts walking 2.1. Play walking animation until player stops 2.2. Play idle animation when player stops 3. Player walks and swings the sword 3.1. Play walking animation 3.2. Replace the animation of the hands by a swinging animation 3.3. When swinging animation is done, revert back to the "walking hands" animation 4. Player walks, initiates a swing and stops walking during the swing 4.1. Play walking animation 4.2. Replace the animation of the hands by a swinging animation 4.3. (Player stops walking during the swing) 4.4. Stop walking animation and play idle animation for all other body parts except the hands 4.5. When swinging animation is done, play idle animation for hands I've tried fiddling around with "overriding" animations where the animation with the higher priority (in this case, the "swinging" animation) would be shown instead of the lower priority animation (the walking animation) while updating still both simultaneously to maintain the correct rhythm of the original animation. However, I have trouble getting it to work properly. The "reversion to idle animation" is a rather challenging task if I have just the single walking animation, I can stop it and then play the idle animation (or rather, the "idle frame"), but when the sword swinging is added, it becomes more difficult to know when to swap to the idle animation. So, to conclude with my question has anyone faced a similar problem? How should I tackle this issue? |
3 | How do I convert a Source engine NPC model to a player model? The Source engine's NPC and player models differ An NPC model applied to the player has no animations. It cannot walk and holds its arms out to the side by about a foot. The weapon is held in the right hand and you can see the player switch weapons, but the weapons also have no animation. How do I convert between these model types? |
3 | How should I go about handling nonuniformed sprite sheet with JSON data? This might be a lenghty question so bare with me. I'm developing a 2D game i Monogame framework and I'm stuck with it comes to handle large sprite sheets with different frame width, height and animation. I want to load a sprite sheet that has different animation. Like this one Taken from this question Some frames in this sprite sheet have different width and height, meaning that I can't use a uniform split with spritesheets width amount of columns because it will not work with all the frames. I have used a tool that gives me cordinates in JSON format like this " imagePath" "sprites.png", "SubTexture" " name" "spriteframe1.png", " x" "862", " y" "0", " width" "112", " height" "120" , " name" "spriteframe10.png", " x" "0", " y" "320", " width" "252", " height" "156" But here I have problem understanding how I should handle these different frames. How can I switch between animation frames and make sure that the animation loops with state of the object? E.G If the object in this case flies, I want to loop trough the wing animation but how should I handle it so that only the "Fly frames" are being looped? At the moment I have all the frames in a list where every element is a frame with its own x,y,width and height metadata. |
3 | What constraint (if any) limits crowd animation variety? I have recently noticed something in a large number of sports games relating to the animation of the crowd. Scenario Player holes the golf ball and the crowd all clap their hands. Whilst the faces and attire of the crowd members are different the animation is exactly the same. That is, the arm and hand movement of each member is identical. Similar scenarios exist in other sports games in football games the crowd often stand up and sit down together as well as doing things like "fist pump", wave, etc. in a perfectly synchronised manner. Question Why is there no (or very little) variation in the crowd animation? Is this a memory constraint? If so, what is the general architecure design of this functionality and why is it so constrained? Is it along the lines of "It is more efficient to animate a collection of objects than multiple individuals"? Or do game developers simply not see crowd variation as an important enough requirement? As technology and game "realism" advances so quickly, this is something that still strikes me as "wooden" and unrealistic. |
3 | Saving Skin weights Issue I have Skinned the character using rig simulator and now wanted to add Bendy controls.. How can I export the skin weights and apply on modified rig? |
3 | How does this animation work? This project "Locomotion Skills for Simulated Quadrupeds" creates an animation for the dog model in the program. However if you go into the project's files the dog's skeleton is made of individual obj files for each bone. How were the bones loaded into the program to make the complete animation? It's as if the position of the obj's were attached to... the vector I guess? Can anyone elaborate a little more? My reasoning for this is because I want to replicate it, create a model (to be animated) out of separate model files. I guess my question is how make one character out of several separate model files? Thanks |
3 | Data driven animations Say you are using C SDL for a 2D game project. It's often the case that people use a structure to represent a frame in an animation. The struct consists of an image and how much time the frame is supposed to be visible. Is this data sufficient to represent somewhat complex animation? Is it a good idea to separate animation management code and animation data? Can somebody provide a link to animations tutorials that store animations in a file and retrieve them when needed. I read this in a book (AI game programming wisdom) but would like to see a real implementation. |
3 | Wait till all CCActions have completed I am developing a simple cocos2d game in which I want to animate two CCSprites simultaneously, and for this purpose I simply set CCActions on respective CCSprite's as follows. first runAction CCMoveTo actionWithDuration 1 position secondPosition second runAction CCMoveTo actionWithDuration 1 position firstPosition Now I want to wait till the animations are complete, so I can perform the next step. How should I wait for these animations to finish? There are actually two method calls, the first one animates the objects via the code above and second call does the other animation. I need to delay the second method call until the animations in first are complete. (I would not like to use CCCallFunc blocks as I want to call the second method from the same caller as the first one. |
3 | FPS Android game that moves the gun as user swipes the screen I am Making a First Person shooter game for android. Gun moves in all directions I swipe left right up or down. But the speed is so slow. How can i increase it's Speed.Here is my code. void FixedUpdate () foreach (Touch t in Input.touches) if (t.phase TouchPhase.Began) initialTouch t else if (t.phase TouchPhase.Moved amp amp !hasSwiped) float deltaX initialTouch.position.x t.position.x float deltaY initialTouch.position.y t.position.y distance formula distance Mathf.Sqrt((deltaX deltaX) (deltaY deltaY)) bool swipeSideways Mathf.Abs (deltaX) gt Mathf.Abs (deltaY) if (distance gt 100f) if (swipeSideways amp amp deltaX gt 0) this.transform.Rotate (new Vector3 (0, 30f, 0), rotationSpeed Time.deltaTime) else if (swipeSideways amp amp deltaX lt 0) swipe right this.transform.Rotate (new Vector3 (0, 30f, 0), rotationSpeed Time.deltaTime) hasSwiped true else if (t.phase TouchPhase.Ended) initialTouch new Touch () hasSwiped false |
3 | Blending Two different animations I'm sure there are articles around on this but I'm not really sure what they are called. animation blending tends to give me the blend between two different complete animation such as walk and run. what I'm after is having a player with that has a walk jump animation and a firing gun animation. Is this still animation blending? Can anybody enlighten me to how this process could be achieved? |
3 | Is it possible to connect an external source machine to Live Link? I would like to be able to connect multiple external machines to Unreal Engine via Live Link in order to stream solved motion capture from one of the Vicon run time solvers retargeter (i.e. Pegasus). In one of the streams, it was mentioned that Vicon provides a client side plug in for Unreal that was used in the Siren demo. I decided to test Live Link's capabilities by connecting from a different machine to UE4 from Maya (I assume that the concept is the same regardless of the source program because at the end of the day we are sending solved animation data, right?). It turned out that Live Link in Unreal out of the box only detects the incoming data from the source machine that is on the same computer where Unreal is running. I am curious as to whether it is possible to modify Live Link or build a custom plug in using Live Link that would enable me to connect from an external machine to the engine over the network. The whole topic is very new to me, but I am tasked with providing a solution, so any information would be appreciated. Please correct me if I misunderstand the process. If you know where to look for more details regarding the problem, please tell me. |
3 | Why do I have to run my 2D game at 300 FPS for movement to be passably smooth? I'm working on a simple game with SFML, and the only way to make the game reasonably smooth is to allow it the highest framerate my machine can handle (that is, giving it no limit). 60 FPS in my game looks like 5 FPS in most games. I've made sure it wasn't any weird timing issue with sf Clock by making my delta variable constant, and I've made a simple moving square with the default SFML template to make sure it wasn't anything else in my code. Limiting framerate using window.setFramerateLimit(80), window.setVerticalSync(true), or by placing usleep(1000 15), a 15 millisecond pause ( 67 FPS, in theory) in the game loop, cause the terribly glitchy, asymmetric animation. I think the problem is my Mac. I hesitate to blame anything other than my code, but I just can't explain the problem otherwise. I'm running OS X Mavericks on a 15 inch MacBook Pro with a Retina display (2.4 GHz i7, Nvidia, 8GB RAM). Is it the Retina display, or some issue with the sleep() system calls? Any thoughts are welcome. Thanks! |
3 | Efficient sprite animation display methods? I'm making a game sprite, with animations for transitioning to different states, such as idle, sleeping, etc. I'm wondering what the most efficient way to play the animations is. As of now, I have a couple of ideas store all frames as separate PNG images, and display only the frames for the current state (e.g. play frames 1 5 for idle, 5 10 for transitioning, 10 15 for sleeping) make the animations into GIFs and play the one corresponding to the current state. merge them all into a spritesheet. Please let me know which would be the best approach, or if there's a better way to do things. I'm new to handling images and animation with code, so I'm not sure what the advantages and disadvantages are. Thanks! In case the information helps anyone, I'm planning to use Python for this (although I could also do Java or C , if there are good solutions in those languages), and the sprite image size isn't large, it's pixel art. |
3 | Data driven animations Say you are using C SDL for a 2D game project. It's often the case that people use a structure to represent a frame in an animation. The struct consists of an image and how much time the frame is supposed to be visible. Is this data sufficient to represent somewhat complex animation? Is it a good idea to separate animation management code and animation data? Can somebody provide a link to animations tutorials that store animations in a file and retrieve them when needed. I read this in a book (AI game programming wisdom) but would like to see a real implementation. |
3 | SDL sprite animation problem I'm currently drawing my character from a single file, and my sprite class handles it taking the file path as an argument. Now, I need to add a simple animation, cycling between two frames. The problem is that I have the other animation frame in another file, not in the same file as the first frame. How can I handle the animation without loading and unloading the two files and without merging the files into one? |
3 | How can I implement procedural humanoid generation like MakeHuman? Some applications allow you to generate a human mesh by simply adjusting parameters. The results are broad and convincing you can get from a thin asian girl to a muscular african man by just adjusting those. MakeHuman, for example, exposes the following UI What is the technique and what are the formulas used to implement that kind of procedural humanoid generation? Is there any published study resource with the required information? |
3 | How can I improve my Animation The first approaches in animation for my game relied mostly on sine and cosine functions with the time as parameter. Here is an example of a very basic jump I implemented. if(jumping) height sin(time) if(height lt 0) jumping false player landed player.position.z height if(keydown(SPACE) amp amp !jumping) jumping true time now() store the starting time So my player jumped in a perfect sine function. That seems quite natural, because he slows down when he reached the top position, and in the fall he speeds up again. But patching every animation out of sine and cosine is stretched to its limits soon. So can I improve my animation and provide a more abstract layer? |
3 | Trade offs of linking versus skinning geometry What are the trade offs between inherent in linking geometry to a node versus using skinned geometry? Specifically What capabilities do you gain lose from using each method? What are the performance impacts of doing one over the other? What are the specific situations where you would want to do one over the other? In addition, do the answers to these questions tend to be engine specific? If so, how much? |
3 | Is my skeletal animation algorith representation correct? I'm representing a rig (skeleton) as A root pivot point, with a position (Vector3) and a direction (Vector 3). A tree of bones, where each bone is a struct with a rotation (Quaternion) and a length (Float). I'm projecting the positions of the joints by Start with the root pivot point and the root bone, rotate it by bone.rotation and project it by bone.length across its new direction. The new pivot is a pair of position, direction. Repeat for each child bone. Is that correct? |
3 | 2D Scaling a character with multiple RigidBody2Ds? So, this example is in the Godot Engine, but other engines porbably have this kind of problem, too I have a character with multiple RigidBody2Ds, that also has a bone skeleton for animation over them. Now, the problem is, that Godot's physics engine handles the transforms of the bodies, so they won't scale properly. If you scale the children (CollisionShape2Ds and Sprites) the positions will be off. Is anybody aware of a proper way to work around this? Being able to scale these kind of characters would be awesome. Thanks for all your answers. Greetings, Footurist |
3 | Smooth animation in Cocos2d for iOS I move a simple CCSprite around the screen of an iOS device using this code self schedule selector(update ) interval 0.0167 (void) update (ccTime) delta CGPoint currPos self.position currPos.x xVelocity currPos.y yVelocity self.position currPos This works however the animation is not smooth. How can I improve the smoothness of my animation? My scene is exceedingly simple (just has one full screen CCSprite with a background image and a relatively small CCSprite that moves slowly). I've logged the ccTime delta and it's not consistent (it's almost always greater than my specified interval of 0.0167... sometimes up to a factor of 4x). I've considered tailoring the motion in the update method to the delta time (larger delta larger movement etc). However given the simplicity of my scene it's seems there's a better way (and something basic that I'm probably missing). |
3 | How can I draw an animated vector field on a map? I want to render an animated vector field map similar to this wind speed visualization. How can I do this? |
3 | Character is out of location after animation montage in UE4 so I have my running and idle animation working fine on my character but once I do the attack animation thru an animation montage, my character slowly floats off the ground and as I attack many times it floats more and more and sometimes starts to lean and when I run and Idle it stays on air .. attached link to video https www.facebook.com groups 467991570685914 permalink 940206510131082 |
3 | Ledge grab and climb in Unity3D I just started on a new project. In this project one of the main gameplay mechanics is that you can grab a ledge on certain points in a level and hang on to it. Now my question, since I've been wrestling with this for quite a while now. How could I actually implement this? I have tried it with animations, but it's just really ugly since the player will snap to a certain point where the animation starts. |
3 | Following a path in a smooth fashion I am currently making a 2d tower defense game with a static, predetermined lane that the enemies follow (i.e. towers cannot block the path and path finding is not the problem I am trying to solve). I am trying to figure how exactly to make units follow this lane in a smooth way. I have two rough ideas about how to do this, but I would love some input on which is likely to be easier to implement the more standard technique. Or of course if I there is some totally different way that I haven't considered I would love to learn about that as well. Waypoints My first idea was to define the path as a series of hard coded waypoints. Units would then use a basic "seek" steering algorithm (such as this one) to move to each waypoint along the path in succession. However, I have wondered if it might be hard to keep the units from deviating to much from the lane I want them to follow. I wonder if inability to turn sharply enough might cause them to sort of "glide" out off of the desired lane. I suppose I might be able to prevent that though by allowing for a relatively strong steering force to be applied? Bezier Curves The second solution I have considered is to define the path with a bezier curve and at each time step calculate the point along the curve with is (dt speed) away from the unit's current location. I suspect that this technique would make it much easier to precisely define the path that units will follow, but I don't know know how exactly to go about implementing this. Any suggestions? Also, I don't this will change anyone's answers, but units also must be able to travel at a constant speed along the path. Additionally, I am programming this game in python using the pyglet framework. If anything about the question is unclear please let me know. Edit Also for whatever its worth, I'm sort of trying to replicate the movement behavior of enemies in the Kingdom Rush. |
3 | Animation is delayed after few play attemps even though all transition times' are zero I am trying to play animation forward and backward when player press the same button again and again. I have a straight line and I want to convert it to 8 while moving it. I want to play animation backward or forward from the exact frame where I pressed the button again. When I pressed the button, animation starts playing and moving and If I pressed the button again in the middle of animation it is played backward from the exact frame. However, after a few try my animation starts playing with a delay or it stops playing completely. I am sending speedMultiplier parameter to make the speed 1 to play backward my animation. This is the video of the problem private Animator eightAnimator private bool isLine private bool isMoving private bool becomingEight private bool becomingLine private Vector3 nextPosition private Vector3 startPosition Start is called before the first frame update void Start() isMoving false isLine false becomingEight false becomingLine false eightAnimator GetComponent lt Animator gt () startPosition this.transform.position Update is called once per frame void Update() if(Input.GetKeyDown(KeyCode.M)) eightAnimator.SetBool("isMoving", true) if (isLine) isMoving true isLine false becomingEight true becomingLine false nextPosition new Vector3(this.transform.position.x 6, this.transform.position.y, this.transform.position.z) eightAnimator.SetFloat("speedMultiplier", 1f) else isMoving true isLine true becomingLine true becomingEight false eightAnimator.SetFloat("speedMultiplier", 1f) if(becomingEight) this.transform.position Vector3.MoveTowards(this.transform.position, nextPosition, Time.deltaTime 10) if (Vector3.Distance(nextPosition, this.transform.position) lt 0.01f) isMoving false becomingEight false eightAnimator.SetBool("isMoving", false) if(becomingLine) this.transform.position Vector3.MoveTowards(this.transform.position, startPosition, Time.deltaTime 10) if (Vector3.Distance(this.transform.position, startPosition) lt 0.01f) isMoving false isLine true becomingLine false eightAnimator.SetBool("isMoving", false) I am adding here unity package, video, screen shot and my simple code. So how can I play my animation when I pressed the button with the exact frame and exact time without delay This is the project unitypackage file |
3 | Where to find animated matrix transformations in an fbx file? Where can I find matrix transformation animation data in an fbx file? I have an fbx file with animations. I have successfully read the indices, matrix, and weight from it. How can I get the frame by frame changes in the matrix? Unfortunately, I haven't been able to find the answer in the Autodesk documentation. |
3 | Is there a way to squash stretch a sprite based on an angle? I have a ball that can move along any angle, and I want to squash and stretch it based on this angle. To be clear, if you dropped the ball down at a 90 angle, the squash would be all along the y, and the stretch on the x. This wouldn't work however for a 0 degree angle, where the squash is on the x, and the stretch on the right. Is there a way to generalise this into an equation? |
3 | How to reset AnimatedSprite? In Godot v2, it seems that AnimatedSprite had a method set frame() see here. But in v3, this method does not seem to exist anymore. Only 3 methods are available see here bool is playing () void play (String anim quot quot , bool backwards false ) void stop () What is the way to reset an animation in Godot 3? |
3 | Why does my sprite shifts position on specific animationframe? I have created a spritesheet to create animation. Everything is working fine untill I come to a specific frame in one animation. I have currently 3 animations loops Idle Animation Moving Animation Shooting Animation Nr 1,2 is working fine and behave like they should but when I am shooting my sprite shifts a little to the left. And I don't why it does. Here is a gif for the animations Here is the spritesheet I am using for the animations And here is the code I am using for looping and shifting different animations public void DrawSpriteSheetFrame(CustomTexture2D ct, Vector2 position, StateOfObject soo, GameTime gt, SpriteFont sf) if (! currentstate.Equals(soo)) currentframe 0 currentstate soo List lt SpriteFrameInfo gt currentLoopsheet ct.SubTexture.FindAll(x gt x.name.Contains(soo.ToString())) timeSinceLastFrame gt.ElapsedGameTime.Milliseconds if ( timeSinceLastFrame gt frameUpdateSpeed) timeSinceLastFrame frameUpdateSpeed if ( currentframe lt currentLoopsheet.Count 1) currentframe else currentframe 0 var t currentLoopsheet.Where(x gt x.name.Contains( currentframe.ToString())).FirstOrDefault() Vector2 origin new Vector2(t.width, t.height) var rec new Rectangle(0,0, 400,200) spriteBatch.Begin() spriteBatch.DrawString(sf, "Currentsheet " t.name, new Vector2(100), Color.White) spriteBatch.DrawString(sf, "Position X " position.X, new Vector2(100,150), Color.White) spriteBatch.DrawString(sf, "Position Y " position.Y, new Vector2(100,200), Color.White) spriteBatch.DrawString(sf, "SheetCord X " t.x, new Vector2(100, 250), Color.White) spriteBatch.DrawString(sf, "SheetCord Y " t.y, new Vector2(100, 300), Color.White) spriteBatch.Draw(ct.Texture, position, new Rectangle(new Point(t.x, t.y), new Point(t.width, t.height)), Color.White, 0, origin, 1, SpriteEffects.None, 1) DrawBorder(new Rectangle(new Point(t.x, t.y), new Point(t.width, t.height)), 1, Color.Black) spriteBatch.Draw(ct.Texture, position, new Rectangle(new Point(t.x, t.y), new Point(t.width, t.height)), Color.White, 0, Vector2.Zero, 1, SpriteEffects.None, 1) spriteBatch.Draw(ct.Texture, position, rec, Color.White, 0, Vector2.Zero, 1, SpriteEffects.None, 1) spriteBatch.End() |
3 | How do I make a flickering engine exhaust animation using only bone animation? I'm trying to replicate the flickering engine exhaust animation in this SketchFab model. SketchFab doesn't support particle systems, so the animation must be a simple bone animation. Can someone help me understand how to achieve such an effect? My best guess is animated opacity, but I don t know how to replicate it. My final goal is to use it in a Unity 5 mobile game. |
3 | Can CCAnimations be paused? I am new to cocos2d. I am using CCAnimation. It's working fine, except I want to pause the animation occasionally. How do I do this? Here's what I'm doing so far mySprite runAction CCRepeatForever actionWithAction CCAnimate actionWithAnimation walkAnim |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.