Camera Rotation Animation - paraview

I have simulated a rotating cube filled with particles by moving the gravity vector rather than changing all of the geometry. I want to use the ParaView animation tools to rotate the camera to keep the gravity vector pointing down so it all looks right. When moving the camera (not animations) I would use the rotate 90 degrees tools.
How would I achieve this effect for an animation?
EDIT:
I have done it using a video editor as an extra step after ParaView, this is the effect I am going for: https://youtu.be/rym2fdKkPps

You cannot animate GUI button usage with animation. However you can animate camera position and orientation as finely as you want.
Try adding a camera track to the animation track of type "Interpolate Camera Location".
Add the two positions you want and set the time to be very close.

Related

World to Cube projection Unity

That's the setting:
I have 2 cameras in the game scene. The game must be played in a room with screens on frontal wall and on the floor. To be able to test it I just recreated the 2 screens in Unity. The goal is to make the game immersive, creating the correct illusion as the image on the left.
What I've tried so far (and it kinda worked as you can see from the screenshot) is:
Camera0: goes directly in the frontal display.
Camera1: I created a post processing effect that deforms the output texture to create the correct perspective illusion.
The problem:
The fact that I'm basically working over a texture creates some blurry effect on the borders, because the pixel density is not the same in start and deformed image.
I think the best approach would be to make the deforming transformation happen on the projection matrix of Camera1 instead. But I just failed. Have you any idea on how to approach this problem correctly?
You can let your perspective cameras do the work for you.
Set the fov of the floor camera so that it shows only as much as will fit on the screen.
Then, have the cameras at the same position.
Finally, have the floor camera rotated on the +x axis by half of the sum the fov of both cameras. For example, if the wall camera is fov 80º and the floor fov is 40º, set the floor camera to be rotated by 60º along the x axis.
This will guarantee that the view of the cameras do not overlap, and they will have the correct projection along their surfaces to create the desired illusion.

Rotating character in relation to First Person camera? (Unity3D, Pictures linked)

I'm having an issue where my character is facing 90 degrees away from the (first person) camera. So when I move the character, the model is turned 90 degrees to the right instead of facing forward. (Pic 1)
Since the camera is a child of the player, if I rotate the character -90 degrees, the camera rotates with it. If I rotate my camera back 90 degrees, the controls get messed up (the W to go forward becomes W to go right, etc.) (Pic 2)
Is there anything I can do to either change the default rotation of the
For reference, I am using this FP Controller torah horse(.)com(/)First-Person-Drifter-Controller-for-Unity3d-1 (that uses a cylinder, so doesn't have the same rotation issue)
I'd advise you to put a script on the Camera instead of making it a child of the player. This gives you more freedom in how the Camera behaves.
Actually, looking at your pictures again... Why not just set the Camera behind the player correctly, instead of rotating the player. When you have the Camera as s child it will be responsive to the parents transform, but it wont mimic. It will follow with the same offset as it starts with. So instead of rotating the player, which messes up the controls, simply put the Camera where you want it from the start.

unity slide sphere on a slope without rotating

I have a ramp and I move a sphere with arrows. I have unity's gravity and I want the rigid body of sphere to slide when it is stoped at the top of the ramp but without rotating it's body. The problem is if I Freeze rotation on x axis, it won't slide.
Try to use physics materials like ice and freeze rotations.
See info about materials here. "Like ice" means than you need set frictions to zero.
You should create a new Physical Material and set both dynamic and static friction to 0. Then drag it to the sphere and maybe also to the ramp.
Test with both rotation constrained and not.

Implement slots machine game animation

I am developing slots machine game in cocos2D. I want to implement the animation of the liver pulling. As in the image attached i want, that the user touches the liver and pull it downwards and the liver gives animation effect like it is being pulled in the way that it is coming outwards in the z direction to the half way downwards. How can i achieve this animation effect?
Make the lever a 3d model in blender(free) skin the model with the lever.
In blender animate the lever and then save the animation images frame by frame.
Make a list of png files for each frame(objective c does not like gif files)
Make an animation array and a UIImageView. Set that UIImageViews animationimages to the array.
When you want the user to simulate pulling the lever set the UIImageView to animating with a repeat count of 1.
Copy the animation backwards to have it go back into place if you want to.
I think the best answer has been given, if you want the game to have a 3d looking lever.
Another approach is to increase the size of the lever ball (SPIN) as you shrink the height of the handle. This would also give a similar look to the handle moving towards and away from the player.

Device roll compensation on augmented reality

I'm working on an app that performs geolocalization over the camera stream of the iPhone. I use the compass to figure out where to put the icons and information onto the the camera layer. If I rotate the device around yaw axis everything works fine.
However, when I roll the iPhone all the information on screen goes away. That's because when you roll the device the compass orientation also changes. However, there are apps like Layar or Wikitude that allow roll rotation without losing focus on the visual items you have onto the camera layer. That way, these apps allow smooth transition between portrait orientation to landscape orientation.
How they achieve that? How can I compensate the roll rotation of the device to keep information on screen?
By the way, the ARKit framework has the same problem as me.
Thanks.
If you are in 2D maybe it is enough to take the point you are calculating from camera field view and offset heading, calculate the distance to the center of the screen, and use that distance as a radius for a circle to do x += r*cos, y += r*sin with -roll as the angle, so the object moves in a circle against the roll. Then you just have to counter rotate the image itself with a transform (CGAffineTransformMakeRotation) to keep it vertical.