I am trying to change the scale and rotation of my object in specific key frames but it changes the object attributes throughout the animation and I do not want that,how do I resolve this problem?
I know its a stupid question but could not figure it out on my own ,so here we go...
Thinking about your question, without much information to go by, there could be a few reasons for your unexpected results.
attributes in question have no keyframe, changing the value is static during the animation and therefore will reflect on the whole time range. If an attribute is not highlighted with a red color in the channel box, then no keyframes exist on that channel.
your previous and next keyframe could be very far apart and the blend could therefore be creating undesired results. Add keyframes closer to the frame you keyed to have a shorter blend from one value to the other.
if you are looking for very quick and not blended changes in values, try setting the curves to stepped instead of linear blend. Even there you will have to have at least more than one key to have a change of value during the animation.
if you are working with animation layers, check whether you you are in additive or overwrite mode. In both cases you might have to create multiple keys.
in the bottom right of Maya there is a button called "Auto Keyframe". This one will create keyframes automatically when you change values, but will do so only on already keyed channels.
use the graph editor to see what's going on with your curves for the attributes in question (Windows - Animation - Graph Editor). Don't rely on the red ticks in the main timeline, as you can only see whether a keyframe exists but you can't tell for which attribute(s).
Related
Application used: everycircuit
Example circuits used (the book icon in the left sidebar):
: "LED Array", "RC step response"
So,
the image is of a parametric plot of some quantities on vertical axis (legend indicated by #3 in image), and one quantity on horizontal axis (legend indicated by #2)
in this, there's one parameter with respect to which all values are changing (which is time)
in the plot, the trail of values is kept for some time then it is erased - the keeping behaviour helps when the system is stable, and the erasing helps a lot to declutter the plot and zoom into the new relevant area/scale when the system changes its characteristics
How to do this animation in other code based data analysis software? like python/octave/julia etc?
Animation i.e.
the values changing with change in the parameter (i.e. the normal plot),
but the trail shown for only some time (hence, non-static)
while still retaining some way to change the parameter, and see which point corresponds to that (also known as "track" the plot)
I'm working on a 3rd person game built on Three.js where the user has free orbital control of the camera.
To enhance player experience, I'd like to use an outline on the active character that the user is controlling (there can be more characters in the scene), but only show the outline when (a part) of the player model is occluded/behind something.
Example:
The effect I want to create is shown on the far right (Stencil: 1), but instead of an opaque effect, I just want the outline as shown on the other models. There should be no outline on the visible parts of the player character, but only when the character is either partially behind another object or completely.
Now, the outline effect itself isn't really a problem. There are more than enough resources/examples/tutorials/whatnot about that. The part where I'm stuck is how to combine something like this with the occluding part. There is also the part about performance. If at all possible, I would really like to avoid rendering my entire scene multiple times for performance reasons.
Thanks in advance!
Using threejs R88 / 89-dev.
I have a game that requires the player to roll two die. As this is a multiplayer game, the way I currently do this is have 6 animations (1 for each die's outcome). When the player clicks a button, it sends a request to my server code. My server code determines the die's outcome and sends the results to the client. The client then plays the corresponding animations.
This works ok, but has some issues. For instance, if the server sends back two of the same values (two 6's, for example) then the animations don't work correctly. As both animations are the same, they overlay each other, and it looks like only one die was rolled.
Is there a better way to do this? Instead of animations, using "real" dice? If that's the case, I always need to be sure to "pre-determine" the outcome of the dice roll, on the server. I also need to make sure the dice don't fall off the table or jostle any of the other player pieces on the board.
thanks for any ideas.
The server only needs to care about the value result, not running physics calculations.
Set up 12 different rolling animations:
Six for the first die
Six for the second die
Each one should always end with the same modeled face pointing upwards (the starting position isn't relevant, only the ending position). For the latter steps you'll probably want to adjust the model's UV coordinates to use a very tall or very wide texture (or just a slice of a square one). So not like this but rather all in a line 1-2-3-4-5-6.
The next step is picking a random animation to play. You've already got code to run a given animation, just set it to pick randomly instead of based on the die-roll-value from the server:
int animNum = Mathf.Floor(Random.Next()*6);
Finally, the fun bit. Adjusting the texture so that the desired face shows when the animation is done. I'm going to assume that you arrange your faces along the top edge of your square texture. Material.SetTextureOffset().
int showFace = Mathf.Floor(Random.Next()*6); //this value should come from the server
die.renderer.material.SetTextureOffset(1f/6 * showFace,0);
This will set the texture offset such that the desired face will show on top. You'll even be able to see it changing in the inspector. Because of the UVs being arranged such that each face uses the next chunk over and because textures will wrap around when reaching the edge (unless the texture is set to Clamp in its import settings: you don't want this here).
Note that this will cause a new material instance to be instantiated (which is not very performant). If you want to avoid this, you'll have to use a material property block instead.
You could simulate the physics on the server, keep track of the positions and the orientations of the dice for the duration of the animation, and then send the data over to the client. I understand it's a lot of data for something so simple, but that's one way you can get the rolls to appear realistic and synced between all clients.
If only Unity's physics was deterministic that would be a whole lot easier.
in one of my projects, I would like to create heatmap of user clicks. I was searching a while and found this library - http://www.patrick-wied.at/static/heatmapjs/examples.html . That is basically exactly what I would like to make. I would like to create heatmap in SVG, if possible, that is only difference.
I would like to create my own heatmap and I'm just wondering how to do that. I have XY clicks position. Each click has mostly different XY position, but there can be exceptions time to time, a few clicks can have the came XY position.
I found a few solutions based on grid on website, where you have to check which clicks belong into the same column in this grid and according to these informations you are able to fill the most clicked columns with red or orange and so on. But it seems a little bit complicated to me and maybe slower for bigger grids.
So I'm wondering if there is another solution how to "calculate" heatmap colors or I would like to know the main idea used in library above.
Many thanks
To make this kind of heat map, you need some kind of writable array (or, as you put it, a "grid"). User clicks are added onto this array in a cumulative fashion, by adding a small "filter" sub-array (aligned around each click) to the writable array.
Unfortunately, this "grid" method seems to be the easiest, simplest way to get that kind of smooth, blobby appearance. Fortunately, this kind of operation is well-supported by software and hardware, under the name "computer graphics".
When considered as a computer graphics operation, the writable array is called an "accumulation buffer". The filter is what gives you the nice blobby appearance, even with a relatively small number of clicks -- you can tweak the size of the filter according to the needs of your application.
After accumulating the user clicks, you will need to convert from the raw accumulated values to some kind of visible color scale. This may involve looking through the entire accumulation buffer to find the largest value, and mapping your chosen color scale accordingly. Alternately, you could adjust your scale according to the number of mouse clicks, or (as in the demo you linked to) just choose a fixed scale regardless of the content of the buffer.
Finally, I should mention that SVG is not well-adapted to representing this kind of graphic. It should probably be saved as some kind of image file (.jpg or .png) instead.
I'm not sure whether it is the right place to ask a PowerPoint question. So, if it isn't, don't be too harsh with me, please.
I have two rectangles created using the drawing tools on a ppt slide. These both rectangles are connected using an arrow with magnetic connectors.
Now I want to move first one of the rectangles using an animation and in a second step the other one.
That's easy so far.
But now I also want that the magentic connectors stay tied to the rectangles during the animation.
Is this possible somehow?
(I'm unfortunately not sure whether I always use the correct ppt terms above, since I only have a German installation of ppt.)
Thanks!
I don't think there is an easy solution as the connector won't move with an animation of the connecting shape.
However, if the required movement isn't to complex you could try to replicate the behavior with a set of animations:
Move rectangle using motion path
Grow connector shape horizontally or vertically
Move connector in the required direction using another motion path which must be adjusted to growth rate of the grow animation
All animations need to start simultaneously ("start with previous") and smooth start/end need to be set to 0 sec for the motion paths. A sample of the stretch effect (2.+3.) can be found here: http://pptheaven.mvps.org/experimental.html ("Zoom Test").