AR Portal

All instruction came from week7

  • On Github, download zip of ARPortal and extract and add it on Unity hub
  • Downlaod Smoking Room, Texture, and shader on google drive and drag the smoking room on your 3D folder, texture on texture
  • On the folder of Sponza, you would have to create a new material of SmokingRoom and drag the texture on Albedo, which is in SmokingRoomMat’s Inspector
  • On Sponza folder, drag the Sponza to SmokingRoomMat, on that inspector, you should see Stencil Comp
  • On 3D folder, drag a SmokingRoom on the scene. Reset the position
  • On the sample scene, right click the SmokingRoom and unpack Prefab. After that, separate the default and delete SmokingRoom. Rename default to SmokingRoom
  • Enable the Portal on the Inspector and in the scene, drag the SmokingRoom object to a spot where the you’ll see Portal in front of the door. Increase size of the Smoking Room if it doesn’t fit by using the scale
  • Once completing that, drag the SmokingRoomMat’s material on SmokingRoom object in the scene
  • Open your Portal prefab in sample scene and drag the SmokingRoom inside the Portal prefab. Put it under PortalPlane.
  • In Sponza’s inspector, disable it. Doing that, you’ll see a castle inside the door.
  • For SmokingRoom on the sample scene, you would to drag that on Prefabs folder.
  • On the Portal’s Inspector that shows Portal Manager (script), you would replace Sponza to SmokingRoom by dragging SmokingRoom from the SampleScene
  • Save it on HelloAR’s scene
  • Disable Portal from the Inspector
  • In addition, take a screenshot of the castle once going inside put yourself on the screenshot by using photoshop

C# Playermovement and mouselook

– Add a player with a camera that can look around

– Drag it into the centre of our scene

– Add a character controller component

– Turn on gizmos 

– Create some graphics so that we can easily see it within our scene

– Remove the capsule collider 

– Drag the main camera under our first person player

– Create a PlayerLook script that is of course responsible for our ability to look around

– On the main camera, we want to add a new component and call it MouseLook.

– On void Update, gather some input based on our mouse movement. Create a float called mouseX and set this equal to Input.GetAxis. And the axis that we want to get is the mouse x-axis. This is going to change based on our mouse movement

float mouseX = Input.GetAxis(ā€œMouse Xā€);

– Weā€™ll also do the same for the y-axis

float mouseY = Input.GetAxis(ā€œMouse Yā€);

– Create a public float called mouseSensitivity and letā€™s just default it to 100. Then when we gather the input, we can simply multiply with our mouseSensitivity and because weā€™re doing this inside the update function, 

– We want to make sure that we rotate independent of our current frame rate. We also want to multiply with Time.deltaTime. 

float mouseX = Input.GetAxis(ā€œMouse Xā€) * mouseSensitivity * Time.deltaTime;

– Do the exact same thing to mouse Y

float mouseY = Input.GetAxis(ā€œMouse Yā€) * mouseSensitivity * Time.deltaTime;

– Create a public transform and call it playerBody

– Inside of our update method, we can now access playerBody.Rotate. Here we can specify an axis that we want to rotate around. So weā€™re going to rotate around Vector3.up and multiply that based on our mouseX

– Implement our mouseY. Create a private variable. Make a float call it xRotation and set this to zero.

– On the update, we can say xRotation minus equals our mouseY 

– Put transform.localRotation equals Quaternion dot Euler. Inside the rotation, we want to put in our xRotation for the x, zero on the y, and zero on the z 

– Add clamping this rotation. Weā€™ll set xRotation equal to Math.Clamp. Inside the clamp, weā€™ll put our xRotation, negative 90 degrees and 90 degrees.

xRotation = Mathf.Clamp(xRotation, -90f, 90f);

This way we make sure that we can never over-rotate and look behind the player. 

-Add a single line of code in the start function 

-Cursor.lockState = CursorLockMode.Locked;

– Select First person player and add a new component of PlayerMovement script 

– Add some input. Create a float called x and set it equal to Input.GetAxis of horizontal. Same thing with the z and set it equal to Input.GetAxis vertical. 

float x = Input.GetAxis(ā€œHorizontalā€);

float z = Input.GetAxis(ā€œVerticalā€);

– Create a Vector3 called move. We can simply consider this an arrow that points in the direction that we want to move. So weā€™ll set this equal to 

Vector3 move = transform.right * x + transform.forward * z;

– We need a reference to our character controller. Create a public CharacterController and call it controller 

public CharacterController controller;

– Below the Vector3, call controller.Move, which is a function on this character controller, inside the move, we can simply put in our move Vector3.

– Create a public float called speed and set it equal to 12 by default. Then down here where we move our player, we can simply multiply our move motion by our speed. Make sure to multiple with Time.deltaTime. This way we make it frame rate independence

Public float speed = 12f;

controller .Move(move * speed * Time.deltaTime); 

– Drag Character controller to player movementā€™s controller

– On top of PlayerMovementā€™s script, create a Vector3, this is going to store our current velocity 

– Inside the method, increase velocity.y

public float gravity = -9.81;

velocity.y += gravity * Time.deltaTime;

controller.Move(velocity * Time.deltaTime);

– For groundCheck, create a public transform called groundCheck and also create a public float with the groundDistance, and finally create a public layer mask and call this ground mask 

public Transform groundCheck;

public float groundDistance = 0.4f;

Public LayerMask groundMask;

– Weā€™ll create private variable. This is going to be bool of isGrounded. 

– Inside of our update function at the very top, set isGrounded equal to the result of our physics check. Physics.CheckSphere. This is going to create a sphere based on the groundCheck.position. Since weā€™re not moving down, weā€™re standing on the ground. 

isGrounded = Physics.CheckSphere(groundCheck.position, groundDistance, groundMask);

if(isGrounded && velocity.y < 0)

{

Velocity.y = -2f;

}

– In our ground mask, add a layer of ground

– Inside the script of PlayerMovement, create an Input.GetButtonDown, jump. This is another default input that automatically maps to the space key and weā€™re currently grounded. Set velocity.y equal to the square root, so Math.Sqrt. Create a public float with the jumpHeight

Public float jumpHeight = 3f; 

if(Input.GetButtonDown(ā€œJumpā€ ) && isGrounded)

{

Velocity.y = Mathf..Sqrt(jumpHeight * -2f * gravity);

}

Steps of ar face mask

– Go to your build settings and select android. Once selecting it, then click switch platform

– Go to player settings in build settings and change the company name, product name

– If youā€™re on android platform, go to other settings in player, get rid of Vulkan on graphics APIsĀ 

– Disable multithreaded rendering and change your package name

– Change your minimum API level to ā€œAndroid 8.0 ā€˜Oreoā€™ (API level 26)

– In package manager, install AR Foundation, then install ARCore XR Plugin

– In sample scene, add AR Session Origin and AR Session

– Delete the main camera

– In the inspector of AR Session Origin, add a component of AR Face Manager

– For prefab, in the Sample scene, add AR default face

– In the assets, create a folder and name it Materials

– Inside the materials, create a material

– Change the color if you want

– In AR default faceā€™s inspector, drag your material in Element 0Ā 

– You want AR default face to become prefab. In order to do that, you have to create a folder of prefab and drag AR default face in the prefab’s folder. You can delete AR default face on Sample scene after you dragged it on the folder

– In AR session origin, drag the prefab to AR face manager of face prefab

– Build and RunĀ 

Artivive Super Saiyan 3

In the beginning of the Artivive, I was using Safari and not Google Chrome. I had lots of moments where the gif wouldn’t work and website constantly trolling. Example: unable to change the color. Throughout my suffering, I’ve contacted professor and he gave me a website where I can turn the gif into mp4. I finally decided to change my safari to Google Chrome since there were some glitches that were extremely annoying. And BANG, super saiyan 3 with electricity motion. I want to print out the image because I downloaded an app of Artivive, but I freaking have low inks.

Dragon Ball Z

Dragon Ball Z/Super follows the adventures of the adult Goku who along with his companions, defends the earth against an assortment of villains ranging from intergalactic space fighters and conquerors, unnaturally powerful androids and near indestructible magical creatures.Ā 

KiĀ is also known as “latent energy” or “fighting power,” which directly translates as “life force.” This force is a tangible energy inside every living being, with its major focus being in the center of the body. By drawing it out, an individual is able to manipulate it and use it outside the body.Ā Ki can be used for many different techniques. Because there are physical limits to the strength of the body itself, it is necessary to increase one’sĀ ki to overcome this barrier and become stronger. Usually, the more concentrated the masses are, the more time the user requires to draw it out by powering up. When fighters gatherĀ ki, they are able to gain enhanced strength, speed, endurance, and can increase the power of their attacks to inflict greater damage to opponents. Normally, the more theĀ kiĀ is increased, the harder it is to control, soĀ ki control is also important.Ā Energy can be lost when the user sustains injuries, as exclaimed by Gohan when he loses over half of his maximum energy supply when hit by Cell’s Time to die. Maintaining proper balance between the body and spirit is important in utilizing energy, and the more properly balanced they are, the more energy you can project.

Ki sensing is the ability to sense the location, life force, and power level of anyone; the stronger and closer the enemy, the more powerful the sensation. Also, if a kiĀ is very powerful, it can be sensed from afar by people who are trained to sense energy

The concept of ki/chi exists in martial arts – typically eastern ones and practices related to healing.

It does not allow you to shoot balls of energy. There are people who claim to heal with chi, and there are people who claim that they use it in fight – for achieving resistance to wounds or making limb/body ā€œunbendableā€.

It is unclear whether this is something that actually exists or a mental construct that instructs your body to work in a specific way (some of the stuff is similar to ā€œautogenic trainingā€, for example). The other thing is, that some of the supposed effects are very easy to fake when filming. So unless you run into a ki user yourself, you wonā€™t know if it is real or not. If you do run into such user and experience the effects, then nobody will ever believe you, obviously.

 

Cops

 

Across U.S., police officers abuse confidential databases

No single agency tracks how often the abuse happens nationwide, and record-keeping inconsistencies make it impossible to know how many violations occur. But the AP, through records requests to state agencies and big-city police departments, found law enforcement officers and employees who misused databases were fired, suspended or resigned more than 325 times between 2013 and 2015. They received reprimands, counseling or lesser discipline in more than 250 instances, the review found.

Officers are instructed that those systems, which together contain data far more substantial than an internet search would yield, may be used only for legitimate law enforcement purposes. They’re warned that their searches are subject to being audited and that unauthorized access could cost them their jobs or result in criminal charges. Yet misuse persists,

Phone

Edward revealed an NSA program called Optic Nerves. The operation was a bulk surveillance program under which they captured webcam images every five minutes from Yahoo users’ video chats and then stored them for future use. It is estimated that between 3% and 11% of the images captured contained “undesirable nudity”

Government security agencies like the NSA can also have access to your devices through in-built backdoors. This means that these security agencies can tune in to your phone calls, read your messages, capture pictures of you, stream videos of you, read your emails

CityTech #MTEC1001OpenLab