Wednesday, August 31, 2016

Cell Knight ( Mobile prototype)

Disclaimer :Student work , done for academic purpose, few copyrighted images , and few images from existing apps are used for explanatory purpose.

Not to be seen as a UI project , but a group of students coming with an idea

Cell KNIGHT moble app Prototype  (This prototype was developed as a teamwork   at university, certain source images taken from existing apps, but most of the designs are done by myself(George Abhilash). Other members who have given contributions to this proto type are Piyush Singh, Roma Madan , Mandeep Kaur , Monika Panesar )
App name

 cell Knight

App description
Cell Knight is a personal safety mobile application. It comprises of features to contact, the police, ambulance, fire force, friends and family in case of danger. It has features to send your location details to the rescue party. Cell knight is a safety app which protects you wherever you go 24/7 free of charge. Get your personal Knight today.

slogan
Guarding you day & Knight

The application helps a person  to be safe. In case of emergency the person can contact the police, ambulance and family, with a click of a button. In case of slight difficulty it has provision to send automatic  S.M.S of  location details to family and friends. Another main feature of this app is the  G.P.S tracker. The speciality of this is it  keeps track of the speed of the vehicle the person is travelling. It let friends or family if the driver is adhering to traffic rules.For instance the person may had a few drinks after a party, within the allowed  limit. This tracker helps the family to know whether the driver is ok or to go for help, especially helpful for parents worried about partying teenagers. The app has another feature which tracks sudden breaks or acceleration, if the range is acceptable it just sends sms to family . In addition  if the tracker shows like 100 km/hour to sudden break it automatically calls the ambulance and police. The person can set the journey and unplanned stops happen it informs the family and friends. The app has an additional feature of weather and fire warning. Incase of fire it alerts the user from taking data from weather forecast and shows an escape route for the user.

ICON CELL KNIGHT




TWO VERSIONS RED WHEN RED ALERT MODE SET
(this mode has to be set by user in settings pre hand before going to a trip)


 when in RED ALERT MODE so user can just click the icon and actions in red alert page wiill automatically take place.ie  911 called in one click. This comes only in paid version.

BACKGROUND SCREEN




MAIN MENU PAGE


ICONS (Automatically lits up with help of built in settings)

Fire  icon lits up  showing when there is a fire /natural disaster

danger this icon  automatically  shows up , when a accident occurs;  by  tracking speed and sudden braking enough to cause an accident . This sends calls to 911

buttons( these have to be pressed)

red alert      calls 911 opens red alert page

family         opens family page


health       opens health page
­­­
speed tracker
      opens spped tracker page(only avialaible with paid option)
weather & fire    opens page of settings for weather and fire alarms and calls
(paid version only)

RED ALERT SETTINGS PAGE


This is the  red alert page

shows call going to 911
police and ambulance

it has buttons to hang up the call

and   has a speaker phone icon



FAMILY PAGE



map shows location of the user and families mobile connection.

Dialling home is not a button but showing automatic calls going to home when family button was pressed

send sms to friends   this button when pressed sents sms to friends about location of the user

HEALTH PAGE


Buttons
 when pressed
call doctor  : dials the  doctor's number  when pressed

call ambulance  :dials ambulance contact number

first aid:  when pressed phone goes to  voice call were pre recorded  or live instructions for first aid is given from menu or from a  nurse in person.




SPEED TRACKER PAGE (speed tracker text is not a button)


it tracks the speed of the vehicle

It has only one button
the travel log    opens the travel log page

(paid version only)




TRAVEL LOG PAGE

This page shows the tracking of the travel
speed time, distance etc
buttons to display map, export or share  present

This is an additional feature not necessarily a safety page ,but still an available feature for premium customers

WEATHER AND FIRE SETTINGS PAGE




This page has  settings in  response to weather adversities

has buttons
connection to cloud
this button open the settings of the app connected to cloud for live data
weather threat
shows the report on weather
fire danger shows report on chances of fire

alert settings this is to edit the alarms  or alerts to danger

emergency settings this is to edit the responses to emergency how calls should call, options to call 911 only ,or both 911 home and a friend etc

DANGER DUE TO FIRE  PAGE

This page opens automatically when the fire danger icon is detected

It calls 911 automatically

Button  evacuation route  opens a page showing map to escape

EVACUATION MAP PAGE


This page shows map for path of evacuation
incase of forest fire, or flooding or some other disaster .
Live updates of the danger area are shown on the map
zoom in zoom out is possible

ACCIDENT PAGE

This page is automatically when accident case is detected
(when accident icon displayed .it is sensed by tracking the speed travelling and sudden braking happens or very big shocks and shakes are sensed)
automatically  dials 911
dials family
buttons to end call and speaker phone are present





Animator Buddy snippet in Maya environment


Animator buddy interface


Monday, August 29, 2016

My favourite piece of code (Animator Buddy)



It is written in MEL (maya embedded language)THIS IS A PIECE OF CODE THAT I CREATED IN 2014 (NOT FULLY JUST PARTS OF IT ,)( See images and UI in following posts)
I named it  - Animator Buddy

It brings up a window named animator buddy.I modeled it  based on  a digital calculator program I did long time back using Visual basic
The window has buttons like
 
Buttons                    Explanation

 animation curves ,     opens the window in maya software showing the animation curves
set animation key       sets a animated key in maya software
playblast                     creates a video of the animated keys

create face camera      creates a camera automatically facing  the face of a 3d model

show only polygon     this shows only polygons in maya , (so no round or nurbs , or rigs are shown)


All these are already in maya menus , but the animator has to go through various menus each time and click various options , or some had to be done manually , like face camera
(my logic in automatically setting the face camera was , just automatically setup a camera facing the bone which has face as its name)
The codes were not written just like that . there is a editor in maya called MEL editor, I used go and click a particular option , or menu and look up the corresponding code
To be honest I just put together ,and tweaked all the codes the code editor , produced by itself.I had the help of my mentor  Jonathan Mafi  jono@podlance.co.nz.
many parts of the code , I dont know what it does
but I am sending the whole script so that if you would run in a mel script editor it would show the entire output.

But it is still a brilliant piece of code and if developed a bit more could be used professionally in animation companies even WETA  ,with adjustments to speed up the process of animation. Even now animators might find it useful.

It is  the application and  the idea more of "me" than the code  itself. This is my favorite piece of code  because it helped me do my animation project  , though many ideas are copied .I feel ,it is marketable  if tweaked and made more  professional.

the project I did with this tool  link is

https://www.youtube.com/watch?v=UETTjlJEy3U


if(`window -exists AnimatorBuddy`)
{
  deleteUI AnimatorBuddy; 
}
global proc nurbsselect ()
{
  setObjectPickMask "Marker" false;
updateObjectSelectionMasks;
updateComponentSelectionMasks;
setObjectPickMask "Joint" false;
updateObjectSelectionMasks;
updateComponentSelectionMasks;
setObjectPickMask "Surface" false;
updateObjectSelectionMasks;
updateComponentSelectionMasks;
setObjectPickMask "Deformer" false;
updateObjectSelectionMasks;
updateComponentSelectionMasks;
setObjectPickMask "Dynamic" false;
updateObjectSelectionMasks;
updateComponentSelectionMasks;
setObjectPickMask "Rendering" false;
updateObjectSelectionMasks;
updateComponentSelectionMasks;
setObjectPickMask "Other" false;
updateObjectSelectionMasks;
updateComponentSelectionMasks;
 
}
//shoes a graph editor and a cam and hypergraph
global proc interface ()
{
    setNamedPanelLayout "Persp/Graph/Hypergraph"; updateToolbox();
   findNewCurrentModelView;
   // Result: 1 //
  findNewCurrentModelView;
  // Result: 1 //
  updateModelPanelBar MayaWindow|formLayout1|viewPanes|modelPanel4|modelPanel4|modelPanel4;
}

  // keys a selected control 
global proc keyselected ()
{
   
  SetKey; 
}

//keys all selected controls
global proc keyall ()
  // Result: 1 //
  //updateModelPanelBar MayaWindow|formLayout1|viewPanes|modelPanel4|modelPanel4|modelPanel4;
{
    string $curves[] = `ls -type "nurbsCurve"`;
  
  // loop through each curve
  for( $shape in $curves )
  {
     
          pickWalk -d up $shape;
    SetKey;
  }
}

// locks a control named Global
global proc globallock ()
{
    string $gcurve[] = `ls -type "nurbsCurve" "*Global*"`;   
    for( $gshape in $gcurve )
    {
     
       string $pw[] = `pickWalk -d up $gshape`;
       
  setAttr -lock true ($pw[0] + ".tx");
        setAttr -lock true ($pw[0] + ".ty");
        setAttr -lock true ($pw[0] + ".tz");
        setAttr -lock true ($pw[0] + ".rx");
        setAttr -lock true ($pw[0] + ".ry");
        setAttr -lock true ($pw[0] + ".rz");
        setAttr -lock true ($pw[0] + ".sx");
        setAttr -lock true ($pw[0] + ".sy");
        setAttr -lock true ($pw[0] + ".sz");
        setAttr -lock true ($pw[0] + ".v");
 }
}

// shows only polygon
global proc showpolygon ()
{
    // Result: scriptEditorPanel1Window|TearOffPane|scriptEditorPanel1|formLayout49|formLayout51|paneLayout4|cmdScrollFieldReporter2 //
updateShowMenu MayaWindow|formLayout1|viewPanes|modelPanel4|menu30 modelPanel4 "modelPanel4" "Playblast Display";
modelEditor -e -allObjects 0 modelPanel4;updateShowMenu MayaWindow|formLayout1|viewPanes|modelPanel4|menu30|menuItem531 modelPanel4 "modelPanel4" "Playblast Display";
updateModelPanelBar MayaWindow|formLayout1|viewPanes|modelPanel4|modelPanel4|modelPanel4;
updateShowMenu MayaWindow|formLayout1|viewPanes|modelPanel4|menu30 modelPanel4 "modelPanel4" "Playblast Display";
modelEditor -e -polymeshes true modelPanel4;
// Result: modelPanel4 //
updateModelPanelBar MayaWindow|formLayout1|viewPanes|modelPanel4|modelPanel4|modelPanel4;
}

// clears the keyframes
global proc clearkeys ()
{
     cutKey -clear;
}

//global proc playblast ()
//{
   
//}
// image plane ,to which a brrowser window is loaded
global proc refpicture ()
{
       importImagePlane { "perspShape" };
        np_getPrimaryProjectFileRules 0;
}

// looks through a camera called facecamera(this is such a simple piece technically , but practically it is a leap for the animator doing the work.
global proc facecam ()
{
  if(`objExists "*facecamera*"`)
 {
    

 select -r" *facecamera*" ;
 lookThroughSelected 0 modelPanel4; 
 }
else
    {
       CreateCameraOnly;;

    
    
      lookThroughSelected 0 modelPanel4;
      }
 
}

// zeros all controls
global proc zerocontrols ()
{
  //generateChannelMenu MayaWindow|MainChannelsLayersLayout|ChannelsLayersPaneLayout|ChannelBoxForm|menuBarLayout1|frameLayout1|mainChannelBox|popupMenu1 1;
//channelBoxCommand -freezeAll;
//refreshAE;
  string $acurve[] = `ls -type "nurbsCurve" `;   
    for( $ashape in $acurve )
    {
     
       string $zw[] = `pickWalk -d up $ashape`;
       
  setAttr  ($zw[0] + ".translateX") 0 ;
  setAttr  ($zw[0] + ".translateY") 0 ; 
  setAttr  ($zw[0] + ".translateZ") 0 ;
  setAttr  ($zw[0] + ".rotateX") 0 ;  
  setAttr  ($zw[0] + ".rotateY") 0 ;
  setAttr  ($zw[0] + ".rotateZ") 0 ;
  setAttr  ($zw[0] + ".scaleX") 1 ; 
  setAttr  ($zw[0] + ".scaleY") 1 ; 
  setAttr  ($zw[0] + ".scaleZ") 1 ;       
       
}
}



//create the window (but keep invisible)
window AnimatorBuddy;
    //create the columnLayout
      columnLayout -rowSpacing 10 AbCol;
      
        button  -c nurbsselect -w 250 -h 35 -bgc 0 .0 .5  
                -l "NURBS ONLY SELECTABLE" -p AbCol buttonA;
               
                button -c interface -w 250 -h 35 -bgc 0 .0 .5
                -l "ANIMATION INTERFACE" -p AbCol buttonB;
              button -c keyselected -w 250 -h 35 -bgc 0 .0 .5
                -l "KEY SELECTED" -p AbCol buttonC;
                button -c keyall -w 250 -h 35 -bgc 0 .0 .5 
                -l "KEY ALL CONTROLS" -p AbCol buttonC1;
                button -c globallock -w 250 -h 35 -bgc 0 .0 .5
                -l "GLOBAL CONTOL LOCK" -p AbCol buttonD; 
                button -c showpolygon -w 250 -h 35 -bgc 0 .0 .5
                -l "SHOW POLYGONS ONLY" -p AbCol buttonE;
               
                button -c clearkeys -w 250 -h 35 -bgc 0 .0 .5
                
                -l "CLEAR ALL KEYS" -p AbCol buttonF;
               
                button -c playblast -w 250 -h 35 -bgc 0 .0 .5
                -l "PLAYBLAST" -p AbCol buttonG;
                button -c refpicture -w 250 -h 35 -bgc 0 .0 .5
                -l "REFERENCE PICTURE" -p AbCol buttonH;
                button -c facecam -w 250 -h 35 -bgc 0 .0 .5
                -l "FACE Cam" -p AbCol buttonI;
                button -c zerocontrols -w 250 -h 35 -bgc 0 .0 .5
                -l "ZERO ALL CONTROLS" -p AbCol buttonJ;
               
       
               
        rowLayout -w 250 -h 35 -nc 3 -p AbCol AbRow;
           
//show the window
showWindow AnimatorBuddy;
//edit the window size
//window -e -wh 1000 500 AnimatorBuddy;