Tuesday 7 February 2012

Tagged under: , , ,

Macromedia Flash 8

Flash is a drawing and animation package designed to work with vector graphics. It creates animations which can include sounds, music and interactivity, and which are optimised for use on the web. Hence, the files it produces are small and designed for streaming. Furthermore, all the elements which form part of a flash movie are embedded within the movie. This means that, unlike a standard web page which relies on the fonts and resources on the client machine, as long as the user has the flash player installed, the movie will play exactly as you design it.
                The default file extension for a Flash file is .fla. Flash movie files can also be published in .htm, .swf, .jpg, .exe, .png or as a projector file.

Layout:

§  Toolbox:
The toolbox contains all tools necessary for drawing, viewing, coloring and modifying your objects. Each tool in the toolbox comes with a specific set of options to modify that tool. The diagram below outlines the grouping of tools.

Sunday 5 February 2012

Tagged under: , ,

Autodesk MAYA



Introduction:

Maya is the 3-D animation software that provides a number of tools for creating complex characters and animations. Maya's powerful feature set gives us the flexibility to create any kind of animation. The functionality of the Maya software can be extended with the use of MEL (Maya embedded language). MEL can be used to customize the user interface and write scripts and macros. 
Maya can create objects, lights, cameras and textures. Any object, light, camera, or just any entity can be animated by changing the value of its parameters in time. We can use Maya, to create effects or animations or movies, commercials, architectural animation and forensic animation.

Interface:

Maya user interface looks provides a large number of functions and the scope to add more functions to the user interface which provides the real flexibility to the program. Along with the common functions there are set of functions dedicated to a more specific task like modeling, texturing, animation, rendering etc. The default Maya user interface can be divided into the following sections.
  • Main Menu Bar
Tools and items are accessible from pull down menus located at the top of the user interface. In Maya, menus are grouped into menu sets. These menu sets are accessible from the Main Menu bar.

  • Status Line
The Status Line, located directly below the Main Menu bar, contains a variety of items, most of which are used while modeling or working with objects within Maya. Many of the Status Line items are represented by a graphical icon. The icons save space in the Maya interface and allow for quick access to tools used most often.

  • Shelf
It contains different tools and commands which are used to organize commonly used functions and tools into groups. Different shelves can be created for different functions like modeling, animation, texturing etc with the required tools for each function.

  • Tool Box
Maya Tool Box contains common tools as well as layout buttons for changing views and layouts. The tool box contains:
- Select tool to select a particular object or a group of objects together.
- Lasso tool is used to draw a free hand border around the objects to be selected.
- Move, Rotate and Scale tools are used for transforming objects in Maya.
- Soft Modification tool is used to select the sub-object elements and modify them by
  moving, rotating or scaling in a way that the neighboring sub-objects also get affected
  by this deformation with the effect being an inverse of distance from the primary
  selected sub-objects.
- Last Selected tool section shows the last used tool for easy access.
- Single Perspective view button lets you view the workspace as a single large view from a single perspective.
- Four Views can be used to view the workspace in four sections with each section containing the three orthographic views top, side and front and a perspective view respectively.
Other combination options below these tools are used to divide the workspace into different section in such a way that one section contains the view of the scene and other contains an animation or rendering editor so that you can edit the attributes and watch the results simultaneously.

  • Workspace
The Workspace displays by default in a perspective window or panel. The purpose of using workspace is to view your scene. The workspace can be divided into sections to accommodate the orthographic and perspective views of the scenes as well as the different editors for animation, texturing and rendering etc.

  • Panel Menus
Every view panel has a common set of menus at the top.

  • Time Slider & Range Slider
The Two Sliders are for controlling the frames in your animation. The Time Slider includes the playback buttons and the current time indicator. The Range slider includes start and end times and allows animators to focus on a specific part of the animation.

  • Command Line
The command Line lets you enter the MEL (Maya embedded Language) commands to perform various functions. The left side is where you can type MEL commands and the right half displays system responses, error messages, and warnings.

  • Help Line
Like several other applications, you can look at the help line for descriptions, instructions, and other useful information. While a tool is selected, the helpline gives out a brief description for "how to" and "what for".

  • Channel box
The Channelbox is on the right side of the screen. In this menu you will find all the properties of selected objects, and you can change those properties. If you apply a certain command on an object, Maya will remember this. This is called the history of an object and that is also shown here.

  • Layer editor
It helps in working with different layers in an animation. Objects can be placed in different layers and can be edited using this tool.

Components:



Fluid Effects

A realistic fluid simulator effective for simulating smoke, fire, clouds and explosions.

Classic Cloth

Cloth simulation to automatically simulate clothing and fabrics moving realistically over an animated character.

Fur

Animal fur simulation similar to Maya Hair. It can be used to simulate other fur-like objects, such as grass.

Hair

A simulator for realistic-looking human hair implemented using curves and Paint Effects. These are also known as dynamic curves.

Maya Live

A set of motion tracking tools for CG matching to clean plate footage.

nCloth

nCloth is the first implementation of Maya Nucleus, Autodesk's simulation framework. It gives the artist further control of cloth and material simulations.

nParticle

nParticle is addendum to Maya Nucleus toolset. nParticle is for simulating a wide range of complex 3D effects, including liquids, clouds, smoke, spray, and dust.

MatchMover

This enables compositing of CGI elements with motion data from video and film sequences.

Composite

It is an interactive node based film composing solution.

Camera Sequencer

Camera Sequencer is used to layout multiple camera shots and manage them in one animation sequence.


Maya Embedded Language:

Maya has its very own cross-platform scripting language called Maya Embedded Language. MEL is used not only for scripting, but also as a means to customize the core functionality of the software, since much of the tools and commands used are written in it. Code can be used to engineer modifications, plug-ins or be injected into runtime. Outside these superficial uses of the language, user interaction is recorded in MEL, allowing even inexperienced users to implement subroutines.

Friday 3 February 2012

Tagged under: , , , , ,

Client Server Chat

In this tutorial we will learn how to write a simple client server chat program in java. We will right both the server and client side of this program. One of the ways computers can communicate to each other through the internet is by using TCP/IP.
network socket is an endpoint of an inter-process communication flow across a computer network. Today, most communication between computers is based on the Internet Protocol; therefore most network sockets are Internet sockets.
socket address is the combination of an IP address and a port number, much like one end of a telephone connection is the combination of a phone number and a particular extension. Based on this address, internet sockets deliver incoming data packets to the appropriate application process or thread.

An Internet socket is characterized by a unique combination of the following:
  • Local socket address: Local IP address and port number
  • Remote socket address: Only for established TCP sockets. As discussed in the client-server section below, this is necessary since a TCP server may serve several clients concurrently. The server creates one socket for each client, and these sockets share the same local socket address.
  • Protocol: A transport protocol (e.g., TCP, UDP, raw IP, or others). TCP port 53 and UDP port 53 are consequently different, distinct sockets.

So, now lets get started with the actual code...
  • Client.java:
import java .io.*;
import java.net.*;
public class Client
{
Socket soc;
BufferedReader inFromUser,inFromServer;
PrintWriter outToServer;
String str;
public Client()
{
try
{
soc=new Socket(InetAddress.getLocalHost(),9999);
inFromUser=new BufferedReader(new InputStreamReader(System.in));
outToServer=new PrintWriter(soc.getOutputStream(), true);
System.out.println("Client Started");
while(true)
{
str=inFromUser.readLine();
outToServer.println(str);
new InnerClient();
}
}
catch (Exception e){e.printStackTrace();}
}
class InnerClient extends Thread
{
String str1;
InnerClient()
{
try
{inFromServer=new BufferedReader(new InputStreamReader(soc.getInputStream()));
start();
}
catch (Exception e){e.printStackTrace();}
}
public void run()
{
try
{
while(true)
{
str1=inFromServer.readLine();
System.out.println("Server says : " +str1);
}
}
catch (Exception e){e.printStackTrace();}
}
}
public static void main(String args[])
{
new Client();
}
}
  • Server.java:
import java.io.*;
import java.net.*;
public class Server extends Thread
{
ServerSocket ss;
Socket soc;
BufferedReader inFromUser,inFromClient;
PrintWriter outToClient;
String str;
public Server()
{
try
{
System.out.println("Chat Server");
ss=new ServerSocket(9999);
System.out.println("Server started.Wawiting for Client......");
soc=ss.accept();
System.out.println("client connected.");
inFromUser= new BufferedReader(new InputStreamReader(soc.getInputStream()));
start();
new InnerServer();
}
catch (Exception e) {e.printStackTrace();}
}
public void run()
{
try
{
while(true)
{
str= inFromUser.readLine();
System.out.println("Client says:"+str);
}
}
catch (Exception e) {e.printStackTrace();}
}
class InnerServer
{
String str1;
InnerServer()
{
try
{
inFromClient=new BufferedReader(new InputStreamReader(System.in));
outToClient=new PrintWriter(soc.getOutputStream(),true);
while(true)
{
str1=inFromClient.readLine();
outToClient.println(str1);
}
}
catch(Exception e){e.printStackTrace();}
}
}
public static void main(String args[])
{
new Server();
}
}



Note: If you want to implement the Server & Client on Different PC's then the only change required is changing the InetAddress.getLocalHost() in Client.java to the IP address of the Server PC!!

SNAPSHOTS OF SERVER & CLIENT SIDES

 

You can for further assistance.