Installing NewtonPhysics
From Micasim
| Project | OpenSim Physics |
|---|---|
| Project Lead | Rob Knop |
| Project Homepage | NewtonPhysics |
Contents |
Installing the micasim module
The source code for the NewtonPhysics OpenSim module is stored in the micasim project on the OpenSim Project Site.
Download the Source Code
You'll need to use SVN to do this. Run the following
svn checkout http://forge.opensimulator.org/svn/micasim/trunk
Give "anonymous" as the username, and just hit return when prompted for a password. (If you're a registered developer on the OpenSim forge site, you can try using your username and password there. This command will create a directory trunk in your current directorty hat has the micasim code.
Instructions for installing NewtonPhysics are in the INSTALL file in that directory. I will echo them here.
I'll assume that you've got your directory tree set up as:
basedir/ --> the directory where you untarred opensim and ran svn
trunk/ --> the trunk of micasim
opensim-0.6.6-release/ --> the opensim source directory (version number may vary)
Patch prebuild.xml
In the top directory of your opensim source tree, there's a file prebuild.xml that tells the compilation process which modules need to be compiled. You need to patch that so that it knows about NewtonPhysics.
cd into the top OpenSim source directory and run:
patch -p0 < ../trunk/prebuild.patch
Adjust this as necessary if your directory layout doesn't match what I'm assuming.
If that completes succesfully, you'll get a message that the patch succeeded (perhaps offset by a certain number of lines). If you get error messages, stop and panic.
Copy the NewtonPhysics source code into the OpenSim tree
Warning: I tried to be clever and use symbolic links rather than copying. This resulted in much confusion for me as the compilation failed. I recommend you don't try that, but just go ahead and accept the copying.
There are two ways to do this. The first (more straightforward) way is to just copy it. From your "trunk" directory, run:
cp -a NewtonPlugin ../opensim-0.6.6-release/OpenSim/Region/Physics/
The second way is just to make a second svn checkout. If you think you might be editing the code, this may actually be easier.
cd opensim-0.6.6-release/OpenSim/Region/Physics svn co http://forge.opensimulator.org/svn/micasim/trunk/NewtonPhysics
Note that this may cause you confusion if you're using a source tree you checked out from an OpenSim repository.
Rebuild OpenSim
From the top opensim directory:
./runprebuild.sh nant
If all goes well, you'll get a "build succesful" message at the end of all of it.
Configure OpenSim to use NewtonPhysics
Cd into the bin directory under your OpenSim top directory. If you have not yet run OpenSim from this build, you'll need to make yourself an OpenSim.ini file:
cp OpenSim.ini.example OpenSim.ini
Next, edit OpenSim.ini and search for the lines that start with "physics =". Comment out (with a ;) all the physics lines there now, and add a line that reads
physics = Newton
Run OpenSim
In the bin subdirectory, run:
mono OpenSim.exe
If this is the first time you've run it, you'll be prompted for things like a region name and a master avatar. The master avatar will be the account you log into.
Log in with a client
You can use the same Second Life client you usually use, but you'll find it's actually easier to log into your running OpenSim region if you download the Hippo OpenSim Viewer. That viewer has a "Grids" button that lets you easily specify the grid you want to log into. One of the grids is "local", which will set the parameters right for logging in to the region you're running on your computer.
Once you've set the grid, give the master avatar name and password and log in. Now you can play with it....

