Year 2 sem 2 – Narrative for interaction Week 6 – ADM RPG try Sketchup to Unity

This is a (really) late post for week 6 as I had been busy building the Sketchup model throughout the week and over the 1 week school break.

During Week 5 to 6, i build the outer walls of ADM and tried to import it into Unity and figured out how the collision work as the model doesnt have collision and I figured that I need to add the mesh collider to the model by finding the model mesh among 3 thousands of mesh and use it as a collider. after which, this is the first try I did for the game, i would say it is working better than I expected.

Year 2 sem 2 – Interactive 2 – Exercise 2, Le Peeping Tom

Featured image warning: “sorry I retard I laughed at myself LOLLLOLL”

This Exercise was built on top of the previous one where we can use the majority of the exercise 1’s code and add on the playback of another video to it, playing the frame corresponding to the x position of the face detected.

I’ve also added the “if” statement which made the video to “look” at the middle when no face is detected and “line” it so that the face will turn gradually(only somewhat as i do not have enough framecount in my clip to make it really smooth)

 

in this exercise, I’ve learnt how to:

  • playback a certain part of video
  • use the “if”, “then” and “else” statement properly in max

2017-02-06-19-13-25 2017-02-06-19-13-39 2017-02-06-19-13-50
2017-02-06-19-14-22

Year 2 sem 2 – Interactive 2 – Exercise 1, Mirror Mirror on the.. screen.

This is the first exercise of max and we are all new to this program(we were kind of used to the script coding and this is really new! YAY TO NO MORE SCRIPT WRITING!! hopefully)

“your face is so ugly where the mirror got blackout if you are too near”

Principals behind this project:
1 – turn camera on
2 – detect face using the camera
3 – know how big(near) the face is in correlation to the image
4 – dim the image the bigger(nearer) the face is in correlation to the image
5 – when there are no face, set to normal value i.e. 1
6 – in the event of rapid transition between jumping numbers(face and no face) gradually dim or brighten the image.

I personally think max is relative easy to pick up but hard to master as it is a logic base(atleast i think it is for now) and the biggest problem of max is that 1- the documentation is hard to find comparing to other coding language. 2 – you have to know the syntax of the object before you can do anything and *read number 1 again*

there are a few difference between max and processing, i love that max is a multi thread processor which means it can do many different task at a single moment which is visually making sense (like things happening at the same time can be put side by side)

some really useful stuffs I’ve learnt in this exercise:

  • jit. – a useful library
  • cv.jit. – a library that need to download
  • unpack – take a package of many sets of number and split them into different number
  • Split – to be honest, i dont really know how this came about in my patch, i copied from somewhere and put it in which works(shall find out next time)
  • scale – to map the input and scale it to the range of output
  • line – to “smoothen” the transition of one number to anotherBelow is the system i used, the patch”p unpack&split” is math which i used to calculate where the face is and the best and smoothest transition between face.
    2017-02-06-19-15-34 2017-02-06-19-15-54 2017-02-06-19-16-07 2017-02-06-19-16-38