This was the hardest Max patch we wrote up till now as it is logic base and after LPD taught us about the function of different commands –
Clocker(used in the patch to count down the 3,2,1,)
Speedlim (use in this patch to prevent sound from looping endlessly)
Split (used in this patch to split zeros with all other number hence when there is no value = 0 = do nothing)
Gate (I tried to use this, but diden fully understand this so i used IF statement)
Onebang(my favourite) (make sure there is only one bang until it is reset)
Expr (to put mathemathical expression (x1 + x2)/2 )
Pack and Pak
all of these are basic tools and if one can use them to their fullest by chaining up different object, alot of cool stuffs could be done in just these objects.
This is the main piece of patcher in my patch, the rest of the patch are very similar to the previous exercise, so in summary, the flow of this patcher
get the square value from face & unpack it
find the middle of the square in terms of X value and Y value
split into 5 zone
1) Middle Zone (MZ) (the zone where X and y value are around the center, for my patch it is 60 < X < 80 and 50 < Y < 70),
2) X higher than MZ
3) X Lower than MZ
4) Y Higher than MZ
5) Y Lower than MZ
For 2 to 5, send the number straight to the audio player
And for 1,send the number to audio player while if the value stays in the zone without X or Y going out of the zone for 3 seconds(using counter and if $i1 >= 3000), then take a photo, else stop the timer(and when the timer resumed, it will auto start from 0
lastly, I used a single playlist of audio player just because i dont want the patch to play more than one sound clip at any given moment, the only way for different soundclip to play is either
1) when one clip finish playing and the condition is still the same, it will playback the same soundclip after 2000ms or
2) when condition changed when a soundclip is playing, it will then stop the current playing soundclip and play another sound clip instantly.
I hope this is relative clear of the flow, through this exercise, I learnt mainly about logic flow, which i think is the most important in every kind of coding.
I tried to find floor plan of ADM online and after long period of searching, I could not find any Floor plan that contain any information information I need Therefore I took a photo of ADM floor plan at level one near the lift to use it as the base to build ADM so that my general proportion is correct(hopefully).
First Blender Usage – Gave up.
I’ve tried blender (since its free) and seriously dont like it as I am totally not used to it, all the basic control is different from what I am used to, therefore I’ve decided to stick to Sketchup since it can be exported into FBX and be used as Unity Models.
The Start of BUILDING ADM.
In the end, sketch up is much better since the function is more basic and is able to be used to create a low poly model(note: my game is phone base game therefore highly detailed models might lag game and reduce the overall experience while playing).I have the picture of the Floor plan of level one. But the height and other thing like the slope gradient I’ve used google image search to estimate how tall it should be, how steep each slope is and roughly model ADM out visually(i am sure it is wrong structurally speaking, but at least i tried to make it as visually similar to the real thing as possible.) Every line was actually drawn by me(except the little human figure which is there by default when sketchup is opened, which i used it to gauge the scale of whole ADM and i changed the scale a few times afterwards)
When I tried to build the Sunken plaza, I realized that I’ve modeled ADM wrongly in the previous picture the ending of the two slope (product design room and the animation room side) are on different height and tried to fix it to the correct one below.
As the top of ADM is a slope and curvy, everything near to the top of ADM was REALLLYYY HARD to align as sketchup is good only in making XYZ alignment but not otherwise so I need to draw many line in XYZ direction just to align the position and delete those lines afterwards, which took me a lot of time.
After that all this modeling, I’ve made the rough exterior of ADM out but I am sure that the bigger problem will be the interior which will take up most of the time, at least I’ve got the easiest part done, FOR NOW.
After trying out the tutorial in the last post, I found another one which is much better!
I’ve went through this tutorial twice by accident as my save file got overwritten by another file when I tried to explore the asset store. so yeah, this is the most basic of Unity, the way to move something without animation.
ANDDDDD THE MAIN POINT OF THIS POST!
This is Unity Chan!!!
most probably the character I am going to use for my 3D game, Unity Chan is a free to use character model by Unity(I am sure of it as I’ve read all of the licencing, Grant of License, Condition of use, as well as their official page FAQ.*They even allow it for normal commercial use*)
After this Tutorial, this is still insufficient to create the basic control of the game as there are many mechanics lacking (camera panning, the character dont even move well), but I still gain important knowledge from here and trying it out, this is a tutorial focusing on animation than movement.
I’ve also did my scripting and modified it to make it animate and move slightly better than in the tutorial, so yeah, that’s about it, the exploration of unity and learning lots of stuffs in it, maybe one day I could be a game producer 😉
After a few more attempt and followup on the project, i managed to make the camera to follow and pan according to the character movement which i really like it, this should be the base to create the final project.
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
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.