old-www/HOWTO/3D-Modelling-3.html

305 lines
8.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
<TITLE>3D Graphics Modelling and Rendering mini-HOWTO: Installation Instructions</TITLE>
<LINK HREF="3D-Modelling-4.html" REL=next>
<LINK HREF="3D-Modelling-2.html" REL=previous>
<LINK HREF="3D-Modelling.html#toc3" REL=contents>
</HEAD>
<BODY>
<A HREF="3D-Modelling-4.html">Next</A>
<A HREF="3D-Modelling-2.html">Previous</A>
<A HREF="3D-Modelling.html#toc3">Contents</A>
<HR>
<H2><A NAME="Inst-Instructions"></A> <A NAME="s3">3. Installation Instructions</A></H2>
<P>Keep in mind that these are brief instructions; a quick summary of the more
important details you'll find listed in README files for the corresponding
software packages. It is, by no means, a substitute for actually reading
those files (as they contain copyright information and other instructions
not necessarily covered by this document).
<H2><A NAME="Inst-Warning"></A> <A NAME="ss3.1">3.1 Warning</A>
</H2>
<P>First, let it be known that this document only covers how to get up and
running using RedHat v7.0. Whenever given the choice as to which software
package to download, please make sure it is compatible with the flavour
of Linux you happen to be running.
<P>Second, please only send E-mail if you have information that would be
helpful to other people who might read this document (such as explaining
how to install other tools, pointers to other tutorials, missing steps
grammar and/or speling mistakes and/or tpyos, etc.). If software
doesn't compile, or you can't figure it out, please read its accompanying
documentation. Please understand that your system may be completely
different, and as such debugging problems via E-mail across the Internet is
not a task anyone enjoys. ;-)
<P>Third, these are software packages that installed without any severe
hitches (read: severe headaches). In the Related Links section, there
are alternate software packages along side the ones covered below. Note
that just because a given software package is not covered in depth does
not mean it is any worse (or better) than those chosen to install.
<P>Good luck!
<H2><A NAME="Inst-Download"></A> <A NAME="ss3.2">3.2 Download the Software</A>
</H2>
<P>Before you begin, you will need a web browser and Unix shell. If you
don't know how to use a shell [bash, ksh, etc.], you're own your own
(although instructions are given in both English and shell commands).
<P>Unless otherwise specified, all instructions are to be carried out as
<CODE>root</CODE>.
<P>
<P>
<OL>
<LI>Create a new directory <CODE>/usr/local/archives</CODE> for the packages:
<BLOCKQUOTE><CODE>
<PRE>
mkdir /usr/local/archives
</PRE>
</CODE></BLOCKQUOTE>
</LI>
<LI>Download the following packages (in <B>.tar.gz</B> form)
into the newly created directory (homepages are given, as
well as links to download pages, and minimum software version):
<UL>
<LI>
<A HREF="http://www.mesa3d.org/">Mesa Graphics Library</A> v3.4.1:
<A HREF="http://www.mesa3d.org/download.html">www.mesa3d.org/download.html</A></LI>
<LI>
<A HREF="http://www.bmrt.org/">Blue Moon Rendering Toolkit</A> v2.6beta:
<A HREF="http://www.bmrt.org/BMRTdownload/index.html">www.bmrt.org/BMRTdownload/index.html</A></LI>
<LI>
<A HREF="http://www.informatik.uni-rostock.de/~rschultz/mops/">The Mops</A> v0.42d:
<A HREF="http://www.informatik.uni-rostock.de/~rschultz/mops/download.html">www.informatik.uni-rostock.de/~rschultz/mops/download.html</A></LI>
</UL>
</LI>
</OL>
<H2><A NAME="Inst-GL"></A> <A NAME="ss3.3">3.3 Install the Graphics Library</A>
</H2>
<P>Old versions of <CODE>tar</CODE> do not support the <CODE>z</CODE> argument.
For those systems, leave out the <CODE>z</CODE> argument and use <CODE>gunzip</CODE>
on the file before using <CODE>tar</CODE>.
<P>
<OL>
<LI>Change to the <CODE>/usr/local/archives</CODE> directory:
<BLOCKQUOTE><CODE>
<PRE>
cd /usr/local/archives
</PRE>
</CODE></BLOCKQUOTE>
</LI>
<LI>Extract <EM>Mesa</EM> (substitute version number where required):
<BLOCKQUOTE><CODE>
<PRE>
tar zxf MesaLib-3.4.1.tar.gz
tar zxf MesaDemos-3.4.1.tar.gz
</PRE>
</CODE></BLOCKQUOTE>
</LI>
<LI>Change to the <CODE>MesaLib</CODE> subdirectory:
<BLOCKQUOTE><CODE>
<PRE>
cd Mesa-3.4.1
</PRE>
</CODE></BLOCKQUOTE>
</LI>
<LI>Configure, make, and install <EM>Mesa</EM> with the following sequence of
commands:
<BLOCKQUOTE><CODE>
<PRE>
./configure; make; make install
</PRE>
</CODE></BLOCKQUOTE>
</LI>
<LI>Edit <CODE>/etc/ld.so.conf</CODE>, and ensure you have a line that
reads:
<BLOCKQUOTE><CODE>
<PRE>
/usr/local/lib
</PRE>
</CODE></BLOCKQUOTE>
</LI>
<LI>Run the dynamic library configuration program:
<BLOCKQUOTE><CODE>
<PRE>
ldconfig
</PRE>
</CODE></BLOCKQUOTE>
</LI>
</OL>
<H2><A NAME="Inst-GR"></A> <A NAME="ss3.4">3.4 Install the Graphics Renderer</A>
</H2>
<P>
<OL>
<LI>Return to the <CODE>/usr/local/archives</CODE> directory:
<BLOCKQUOTE><CODE>
<PRE>
cd ..
</PRE>
</CODE></BLOCKQUOTE>
</LI>
<LI>Extract the <EM>Blue Moon Rendering Toolkit</EM> (substitute version
number where required):
<BLOCKQUOTE><CODE>
<PRE>
tar zxf BMRT2.6beta.linux-glibc2.tar.gz
</PRE>
</CODE></BLOCKQUOTE>
</LI>
<LI>Change to the <CODE>BMRT</CODE> subdirectory:
<BLOCKQUOTE><CODE>
<PRE>
cd BMRT2.6
</PRE>
</CODE></BLOCKQUOTE>
</LI>
<LI>Copy files to appropriate destination directories:
<BLOCKQUOTE><CODE>
<PRE>
cp bin/* /usr/local/bin/
cp lib/lib* /usr/local/lib/
cp include/* /usr/local/include/
</PRE>
</CODE></BLOCKQUOTE>
</LI>
<LI>Make a directory for the shaders, ensure it is world-writable,
then copy the shader files into it:
<BLOCKQUOTE><CODE>
<PRE>
mkdir /usr/local/shaders
chmod 777 /usr/local/shaders
cp shaders/*.sl* /usr/local/shaders/
cp shaders/*.h /usr/local/shaders/
cp examples/*.sl* /usr/local/shaders/
cp examples/*.h /usr/local/shaders/
</PRE>
</CODE></BLOCKQUOTE>
</LI>
<LI>Edit the system login profile (<CODE>/etc/profile</CODE> or equivalent),
and add the line:
<BLOCKQUOTE><CODE>
<PRE>
export SHADERS=.:/usr/local/shaders
</PRE>
</CODE></BLOCKQUOTE>
</LI>
<LI>Copy the <CODE>.rendribrc</CODE> file to each user's home directory.</LI>
</OL>
<P>If anything goes wrong, please consult the <CODE>README</CODE> file
that accompanies the <EM>Blue Moon Rendering Toolkit</EM>, or visit
their website.
<H2><A NAME="Inst-GM"></A> <A NAME="ss3.5">3.5 Install the Graphics Modeller</A>
</H2>
<P><EM>The Mops</EM> may be installed on a per-user basis, or on a system-wide
basis by root (or equivalent). In this example, it is installed using a
non-administrative account, which should yield positive results. Note that
the compile failed during the install (missing a C header file), so the
precompiled binaries (compatible with RedHat v6.0, your system may vary)
were installed, as follows:
<P>
<OL>
<LI>Change to one directory above where you'd like <EM>The Mops</EM> to
reside. For example, if <CODE>/usr/local/mops</CODE> was desired, then issue
the following command:
<BLOCKQUOTE><CODE>
<PRE>
cd /usr/local
</PRE>
</CODE></BLOCKQUOTE>
</LI>
<LI>Extract the mops (substitute number where required), then change into
its directory:
<BLOCKQUOTE><CODE>
<PRE>
tar zxf /usr/local/archives/mops-0.42d-BMRT26-linux.tar.gz
cd mops
</PRE>
</CODE></BLOCKQUOTE>
</LI>
<LI>Move the following files from <CODE>/usr/local/mops/src</CODE>
to <CODE>/usr/local/mops</CODE>:
<BLOCKQUOTE><CODE>
<PRE>
mv src/crtmopssh.sh .
mv src/mfio.so .
mv src/mops .
</PRE>
</CODE></BLOCKQUOTE>
</LI>
<LI>Copy the <CODE>.mopsrc</CODE> file to the home directory of each user
wanting to run The Mops. For example, the user "jane" would need the
following commands run:
<BLOCKQUOTE><CODE>
<PRE>
cp src/mopsrc /home/jane/.mopsrc
</PRE>
</CODE></BLOCKQUOTE>
</LI>
<LI>Create <CODE>/usr/local/lib/mops</CODE> and move the buttons and shaders:
<BLOCKQUOTE><CODE>
<PRE>
mkdir /usr/local/lib/mops/
mv buttons/* /usr/local/lib/mops/
mv shader/*.sl* /usr/local/shaders/
</PRE>
</CODE></BLOCKQUOTE>
</LI>
</OL>
<P>If anything goes wrong, please consult the <CODE>README</CODE> and
<CODE>Setup.txt</CODE> files that accompany <EM>The Mops</EM>, or visit
their website.
<P>Log out from <CODE>root</CODE>. Log in as a regular user, and run
<EM>The Mops</EM> as follows:
<P>
<BLOCKQUOTE><CODE>
<PRE>
/usr/local/mops/mops
</PRE>
</CODE></BLOCKQUOTE>
<P>You may wish to create a subdirectory within <CODE>$HOME/mops</CODE> called
<CODE>models</CODE> for saving 3D models.
<H2><A NAME="Inst-Clean"></A> <A NAME="ss3.6">3.6 Clean Up</A>
</H2>
<P>Now that the installation is complete, you can remove from your
system all files that you no longer require (substituting version
numbers where required).
<P>
<BLOCKQUOTE><CODE>
<PRE>
cd /usr/local/archives/
rm -rf BMRT2.6
rm -rf Mesa-3.4.1
</PRE>
</CODE></BLOCKQUOTE>
<P>Note: Be cautious when using <CODE>rm -rf</CODE> ... make sure you are
in the correct directory, and the files and/or directories you wish to
delete are present.
<HR>
<A HREF="3D-Modelling-4.html">Next</A>
<A HREF="3D-Modelling-2.html">Previous</A>
<A HREF="3D-Modelling.html#toc3">Contents</A>
</BODY>
</HTML>