Tuesday, February 8, 2011

Solar System animation

Here is an animation created using the animation capability built into the scripting component. The animation is of a group of planets organized into a solar system. Note that one of the planets has a moon.

http://www.youtube.com/watch?v=BE7KhCUVft0

FlyCam animation

During the week I created an animation of a HUD camera attached to a bug model that flies around in an OWL world. The bug animation was created in Maya and contains the animations to do the movements as in the video.

Here is the url to the video:


Morris

Shape module copy script

In the process of doing the shape cell tutorial I wanted to rename the module so that there would be no overlap of names/files/etc. Rather than manually rename everything I created a script to create a new module from the shape module with everything renamed. Here it is. Hope the blog doesn't screw up the formatting too much! By the way, it is a *nix script.

Looks like the lines wrapped a bit so I separated them to clarify it a bit.

It is run from the shape cell directory as:

./constructor.h [path to this directory] [path to new module] [new module name] [path to image file to use]

For example I used:
./constructor.sh
/Users/morrisford/trunk-20100321/wonderland-modules/unstable/shape-tutorial-module /Users/morrisford/trunk-20100321/wonderland-modules/unstable/shapeMorris shapeMorris /Users/morrisford/images/apple.jpg



echo "Enter constructor"
echo "Shape path = $1"
echo "New module path = $2"
echo "New module name = $3"
echo "Image file name = $4"
mkdir $2
mkdir -p $2/src/classes/org/jdesktop/wonderland/modules/$3/client
mkdir -p $2/src/classes/org/jdesktop/wonderland/modules/$3/client/jme
mkdir -p $2/src/classes/org/jdesktop/wonderland/modules/$3/client/jme/cellrenderer

mkdir -p $2/src/classes/org/jdesktop/wonderland/modules/$3/common
mkdir -p $2/src/classes/org/jdesktop/wonderland/modules/$3/server
mkdir -p $2/lib
mkdir -p $2/nbproject/private
mkdir -p $2/art

cp $4 $2/art/.

sed -e s/shape/$3/g -e s/Shape/$3/g < $1/build.xml > $2/build.xml
sed -e s/shape/$3/g -e s/Shape/$3/g < $1/nbproject/project.xml > $2/nbproject/project.xml
cp $1/nbproject/nb.properties $2/nbproject/nb.properties
cp $1/nbproject/private/private.xml $2/nbproject/private/private.xml

sed -e s/shape/$3/g -e s/Shape/$3/g < $1/my.module.properties > $2/my.module.properties

sed -e s/com.jme.scene.shape/saveit/g -e s/shape/$3/g -e s/Shape/$3/g -e s/saveit/com.jme.scene.shape/g < $1/src/classes/org/jdesktop/wonderland/modules/shape/client/jme/cellrenderer/ShapeCellRenderer.java > $2/src/classes/org/jdesktop/wonderland/modules/$3/client/jme/cellrenderer/$3CellRenderer.java

sed -e s/shape/$3/g -e s/Shape/$3/g < $1/src/classes/org/jdesktop/wonderland/modules/shape/client/ShapeCell.java > $2/src/classes/org/jdesktop/wonderland/modules/$3/client/$3Cell.java

sed -e s/shape/$3/g -e s/Shape/$3/g -e s/MountainPicture.png/`basename $4`/g < $1/src/classes/org/jdesktop/wonderland/modules/shape/client/ShapeCellFactory.java > $2/src/classes/org/jdesktop/wonderland/modules/$3/client/$3CellFactory.java

sed -e s/shape/$3/g -e s/Shape/$3/g < $1/src/classes/org/jdesktop/wonderland/modules/shape/common/ShapeCellChangeMessage.java > $2/src/classes/org/jdesktop/wonderland/modules/$3/common/$3CellChangeMessage.java

sed -e s/shape/$3/g -e s/Shape/$3/g < $1/src/classes/org/jdesktop/wonderland/modules/shape/common/ShapeCellClientState.java > $2/src/classes/org/jdesktop/wonderland/modules/$3/common/$3CellClientState.java

sed -e s/shape/$3/g -e s/Shape/$3/g < $1/src/classes/org/jdesktop/wonderland/modules/shape/common/ShapeCellServerState.java > $2/src/classes/org/jdesktop/wonderland/modules/$3/common/$3CellServerState.java

sed -e s/shape/$3/g -e s/Shape/$3/g < $1/src/classes/org/jdesktop/wonderland/modules/shape/server/ShapeCellMO.java > $2/src/classes/org/jdesktop/wonderland/modules/$3/server/$3CellMO.java


sed -e s/shape/$3/g -e s/Shape/$3/g < $1/src/classes/org/jdesktop/wonderland/modules/shape/client/InfoContextMenuFactory.java > $2/src/classes/org/jdesktop/wonderland/modules/$3/client/InfoContextMenuFactory.java