installing crystal space in fedora 9
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 12 of 12
  1. #1
    Join Date
    May 2008
    Location
    Giza, Egypt
    Age
    39
    Posts
    176
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Arrow installing crystal space in fedora 9

    Our purpose here is to demonstrate a full installation of the crystal space 3d game engine. By the end of this article the reader should be able to:
    1. Install crystal space with demos, documentation, and development packages.
    2. run the demos with hardware acceleration support(openGL)

    So let's go.
    1.Before we start...
    Make sure your video card has the appropriate driver installed and that hardware acceleration enabled. This's out of the scope of this article. Several posts on the internet(and in this forum) describes how to install nvidia and ATI drivers. For nvidia, consider the post http://forums.fedoraforum.org/forum/...d.php?t=188241. ATI users also have their own posts, like http://forums.fedoraforum.org/forum/...d.php?t=189227.
    If you plan to use the livna repository during this howto, you should have yum configured to use yum as a repository. Instructions about setting up yum to use the livna repository can be found at http://www.firewing1.com/content/view/63/40/
    I also use sudo for commands that need to be executed as root. If you don't have sudo configured on your system for administrative tasks, try running the commands neeting root privileges from a root shell. You may use su to start a root shell and run these commands.
    2.Install crystal space packages
    Fine, this's the intuitive part. Type the following command at the command line to get crystal space installed.
    Code:
    sudo yum install crystalspace crystalspace-demos crystalspace-utils crystalspace-devel crystalspace-doc
    The package crystalspace is what you need to only run applications developed using the crystal space engine. The packages crystalspace-demos and crystalspace-utils contain some programs to demonstrate the engine features as well as some useful utilities and scripts for working with the engine. The packages crystalspace-devel and crystalspace-doc, along with the aforementioned crystalspace-utils packages, are what you need to develop your own programs using the crystal space engine. Consider your own needs so that you mayn't install any packages you mayn't need. In my case I find them all useful. For the rest of this article, I'll assume that the reader has installed the packages crystalspace, crystalspace-demos, and crystalspace-utils at least.
    OK. For now it seems everything is complete. You may run a demo test by issuing the command:
    Code:
    sudo walktest-1.2 -relight
    Note that you need root privileges for the first time only to run the demo with the relight option, to update the lighting maps. In subsequent times, you may simply issue the command walktest-1.2 as a normal user, without the relight option.
    Fine everything seems to be working fine with the demo you've run, except one annoying problem: the demo reports the message
    Code:
    could not load plugin 'crystalspace.graphics3d.shader.glcg'
    several times. This error message tries to explain that the demo is requesting an engine plugin that isn't installed on your system by default. A short discussion about this plugin follows.
    This plugin is part of the full installation process of crystal space, however it requires external dependencies. I used to install it with the engine after satisfying its dependencies in the past when I used to build and install the crystal space engine from its sources(; there were times when there were no crystal space packages in fedora repositories, or any other third-party repositories ).
    Why is this plugin not included as pre-built part of the crystal space packages? This refers us back to the debate about fedora and its inclusion to any proprietary software piece. The requested plugin, called ghshader_cg, actually depends on the Cg library, a library developed by nvidia with advanced features for shading and that staff. Since all nvidia software products are proprietary, just like the nvidia display driver, fedora doesn't include such products in its official packages, even if such proprietary products are needed as dependencies.
    Enough for the discussion, let's see how to resolve that problem.
    3.Install the Cg library
    There're two alternatives for this part.
    The first one is to download the library from nvidia website. The latest package, at the time of this writing, can be located at http://developer.download.nvidia.com...5-0.x86_64.rpm for 64-bit systems, and http://developer.download.nvidia.com...015-0.i386.rpm for 32-bit systems. You can then issue the command
    Code:
    sudo yum localinstall <your Cg package>
    where <your Cg package> is the 32-bit or 64-bit package you've just downloaded.
    The second alternative is to use livna to install Cg via the command
    Code:
    sudo yum install Cg
    This approach requires that you've yum set up to use livna, as I illustrated in the section of prerequisites 1.Before we start....
    Now this still doesn't solve our problem. We're going to build the missing plugin ourselves.
    4.Prepare the build environment
    Install the package rpmdevtools issuing the command
    Code:
    sudo yum install rpmdevtools
    Now issue the command
    Code:
    rpmdev-setuptree
    to create the development tree structure in your home folder. Note that this command doesn't require root privileges.
    The rpm build environment is now set up. All what is remaining is to build the missing plugin.
    5.Build the glshader_cg plugin
    Download the crystal space source RPM using the command
    Code:
    yumdownoader --source crystalspace
    After downloading the package, install it to the build tree we composed in the previous step using the command:
    Code:
    rpm -ivh <crystal space source package name>
    This command doesn't requrie root privileges either.
    Note: DON'T use the command
    Code:
    sudo yum localinstall <crystal space source package name>
    As this will ask for downloading a hell of development packages, which we obviously don't need for the moment. After all, we aren't going to build the whole engine, just the missing plugin.
    Then go the directory ~/rpmbuild/SOURCES/. If you ls that location, you'll find two files: a bz2 file and a patch file. We're interested in the bz2 archive.
    Create a directory where you'll extract the bz2 archive. In my case, I created it in my home directory using the command
    Code:
    mkdir ~/workspace
    Of course, you can create it anywhere you like with any name your prefer.
    Assuming you're still in the ~/rpmbuild/SOURCES/ directory(; go there if you aren't), extract the bz2 archive using the command
    Code:
    tar -C$HOME/workspace -xjf crystalspace-src-1.2.tar.bz2
    Substitute the directory you've just created for the $HOME/workspace parameter. The file crystalspace-src-1.2.tar.bz2 is the archive used for the current version of crystal space. If you've a different version(like a newer one), substitute its name for crystalspace-src-1.2.tar.bz2, the one used here.
    Go to where you've just extracted your archive, in my case ~/workspace/crystalspace-src-1.2, and issue the following commands.
    Code:
    ./configure
    ./jam -q glshader_cg
    If no error occurs during these commands, you've successfully built the glshader_cg plugin. All what's remaining is to install them in the appropriate location for the engine(and demos) to find them.
    6.Install the glshader_cg plugin
    Issue the follwoing two commands to install the glshader_cg plugin files to the crystal space system directories:
    Code:
    sudo install glshader_cg.so /usr/lib64/crystalspace-1.2/
    sudo install plugins/video/render3d/shader/shaderplugins/glshader_cg/glshader_cg.csplugin /usr/lib64/crystalspace-1.2/
    If you're using a 32-bit system, substitute lib for lib64 in the previous two commands. You can simply use the cp command instead of the install one in the previous commands; I've just used install out of the fact that the install target(in the process of installing the whole engine from sources) used the install command.
    Congratulations, you've just got the missing plugin in your system! You may run now walktest-1.2 without encountering that nasty message about missing plugins.

  2. #2
    leigh123linux Guest
    Moved to gamers lounge !

  3. #3
    Join Date
    Apr 2005
    Location
    Littleton, CO
    Age
    36
    Posts
    2,856
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I brief blurb on what crystal space is, as well as what we would use it for, would be appreciated.

    Interestingly enough I did not get any missing plug error when running walktest.
    S.C.O.U.R.G.E. Heroes of lesser renown, contributor.

  4. #4
    Join Date
    May 2008
    Location
    Giza, Egypt
    Age
    39
    Posts
    176
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb

    Crystal space is a 3D game engine. It's mostly written in c++. It has public API for a lot of gaming concepts like composing 3D graphics, sound, physics(through ODE), networking, and other staff needed to develop a game. It has been being developed for about 9 or 10 years now. It was initiated by Jorrit Tyberghein in 1998. Its design is based on plugins, so it should be easily extendible.
    It's suitable for both developers and artists. It has a vast variety of scripts for creating skeleton projects, exporting and importing maps and worlds, and other staff.
    The engine website can be visited at http://www.crystalspace3d.org for more information. The website also contains a manual and API documentation which can be downloaded separately or with the crystal space binary download.
    I've been reading and learning the engine for approximately 9 months. I haven't created anything serious with it, but I hope I can one day. I learnt blender for a while, to be able to create some simple models to use with the engine, although I haven't till now since I haven't completed reading the full manual yet. I'm by no means a good artist(I'm originally a software developer), but I want to see who I may make progress about that.
    I hope this description has made it a bit clear about crystal space. Sorry for any confusion regarding my first post, in which I assumed readers already know what's crystal space.

  5. #5
    Join Date
    Apr 2005
    Location
    Littleton, CO
    Age
    36
    Posts
    2,856
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep, that's a good blurb.

    I will mention that it appears that crystal space supports texture normal mapping, which is sweet. Normal mapping is a technique that allows additional height info for an object to be stored as an image. This way textures can have much more depth without increasing the polycount of the object. This allows truly incredible detail to be added to an object while keeping it reasonably well performing at render time. Take a look at the grout line in the walktest to see what I mean.
    S.C.O.U.R.G.E. Heroes of lesser renown, contributor.

  6. #6
    Join Date
    May 2008
    Location
    Giza, Egypt
    Age
    39
    Posts
    176
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    leadgolem, you mentioned in a previous post in this thread that you didn't get any plugin errors when you ran walktest. Of course, this's something good.
    What I know is that the walktest demo tries to use the openGL renderer by default, switching to the software renderer if it fails to find openGL. Maybe it ran with the software renderer in your case, I amn't sure however.
    In my case when I invoke the software renderer manually with the command
    Code:
    walktest -video=software
    I get some strange error about failing to initialize the glarb plugin(glshader_arb), although it exists. This error is different however from the error of glCg(glshader_cg), which indicates failing to load the plugin. Initialization of a plugin occurs after loading it.
    Anyway, the software renderer is very slow and delivers very bad results(; you may notice that in the scenes at least). I may look at that error closely later, maybe by having some discussions with the crystal space community.

  7. #7
    Join Date
    Apr 2005
    Location
    Littleton, CO
    Age
    36
    Posts
    2,856
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm, that's weird. I could have sworn I didn't get any errors when loading it last time. Tried it again and got this, as you indicated above.
    Code:
    could not load plugin 'crystalspace.graphics3d.shader.glcg'
    EDIT: Performance in demo was perfectly fine.
    S.C.O.U.R.G.E. Heroes of lesser renown, contributor.

  8. #8
    Join Date
    May 2008
    Location
    Giza, Egypt
    Age
    39
    Posts
    176
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb

    Just a slight correction, the plugin glshader_cg is also needed even if you use the software renderer. That was what I noted when I ran the walktest-1.2 demo using the software renderer without having the glshader_cg plugin installed.

  9. #9
    Join Date
    May 2008
    Location
    Giza, Egypt
    Age
    39
    Posts
    176
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation

    Quote Originally Posted by MSK61
    The second alternative is to use livna to install Cg via the command
    Code:
    sudo yum install Cg
    This approach requires that you've yum set up to use livna, as I illustrated in the section of prerequisites 1.Before we start....
    I tried that second alternative myself and found it causing problems. If you follow this approach in installing the Cg library, you won't be able to build the glshader_cg only later. It seems the Cg package built in livna misses something that Cg from nvidia adds or configures in the system.
    I originally mentioned this method of installing Cg because my system update automatically updated the Cg library from livna. I originally installed Cg for the first time from nvidia.
    So my recommendation is to install Cg for the first time from nvidia. You may optionally later let system update pick up the update from livna repositories, although I don't recommend that either. Updating the Cg library from livna has the effect of producing an error message(at the very end of the demo walktest) about fatal error with Cg. This error didn't appear when the Cg library from nvidia was installed.

  10. #10
    Join Date
    May 2008
    Location
    Giza, Egypt
    Age
    39
    Posts
    176
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Arrow alternate method for installation

    Fine, a few days ago I found an alternative to install crystal space and glshader_cg plugin. I can't claim this method is simpler than the former one, but I thought about posting it here as some people may find it more suitable for installing the engine and the plugin.
    This method uses a method very similar to(and actually including) building the engine from sources. However it builds the software in the same way fedora packagers do.
    Now, to the steps...
    Step 1: exactly as step 1 in the first method
    Step 2: Refer to step 3 in the first method(noting that installing the Cg library from nvidia is far safer than the one provided by livna).
    Step 3: exactly as step 4 in the first method
    Step 4: Create the rpm package for the crystal space engine.
    What we're going to do here is to create our own binary package for crystal space. The package we're going to create will include the glshader_cg plugin(thanks to installing the Cg library in step 2) already within the binary files contained in that package.
    Follow step 5 in the first method until you install the source package using the command
    Code:
    rpm -ivh <crystal space source package name>
    as normal user. Then go the directory ~/rpmbuild/SPECS/. This directory now should contain the spec file for crystal space.
    Create the binary package(that will have the glshader_cg plugin contained in its binaries) using the command
    Code:
    rpmbuild --clean --rmsource --rmspec -bb <spec file>
    No root privileges are needed for this command either.
    This command is going to take a while(; on my machine it took about 20 minutes). It'll pass through the %prep, %build, %install stages and then finally creating the binary RPM packages constituting crystal space different parts. It'll output a lot of output(all the compilation commands, compiler warnings, hopefully with no build errors at all ).
    OK, after this command completes successfully, you should find some binary packages for crystal space in the path ~/rpmbuild/RPMS. Namely you'll find all the packages available from the fedora repositories, namely crystalspace, crystalspace-docs, crystalspace-utils, crystalspace-demos, crystalspace-devel. There's only a package for the debug version of crystal space, crystalspace-debuginfo.
    Fine, most of these packages match the ones provided by fedora packages(; I don't suspect those of course and I didn't compare the packages). The one of interest here is the base crystalspace package itself. It's different from the one provided by fedora repositories in one thing; it does contain the plugin glshader_cg within its binaries, and it will be installed along with all other binary files in the package. Actually, the package containing the debug version of crystal space, crystalspace-debuginfo, also contains the debug version of the plugin glshader_cg, but we aren't interested in any debugging right now. You may install this package as well, if you intend to debug any binaries of crystal space.
    Step 5: Install crystal space packages.
    Now install the resulting binary package using the command
    Code:
    sudo yum localinstall --nogpgcheck <crystalspace package>
    Two things to note about that command: first it needs root privileges(sudo or a root shell with su), just like installing any other package. Second, we're using the --nogpgcheck option here since this binary package is our own product; it isn't signed by fedora packagers.
    The glshader_cg plugin should be now installed now in the system directories.
    You may now install other crystal space packages, as provided in fedora repositories:
    Code:
    sudo yum install crystalspace-demos crystalspace-utils crystalspace-devel crystalspace-doc
    You may alternatively choose to install them from the ones you created yourself; just don't forget to use the --nogpgcheck when you do.
    This ends the installation procedure; you should exactly have the same results when you run walktest-1.2, as the ones you got with the first method.

  11. #11
    Join Date
    Sep 2008
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hello i have a problem in this step, is it normal ?

    thks

    Code:
     ./jam -q glshader_cg
    don't know how to make glshader_cg
    ...found 1 target(s)...
    ...can't find 1 target(s)...

  12. #12
    Join Date
    May 2008
    Location
    Giza, Egypt
    Age
    39
    Posts
    176
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb

    Hi, freakss. You must have installed Cg from livna through yum. I've already explained the problems resulting of this approach in this same thread at post 9.
    You should rather download the Cg RPM package from nvidia website and install it using
    Code:
    sudo rpm -ivh <downloaded Cg package file>
    or
    Code:
    sudo yum --nogpgcheck localinstall <downloaded Cg package file>
    Last edited by MSK61; 11th September 2008 at 01:27 PM.

Similar Threads

  1. blender 2 crystal
    By freakss in forum Gamers' Lounge
    Replies: 0
    Last Post: 7th September 2008, 08:48 PM
  2. Installing in free space
    By rob_botch in forum Installation, Upgrades and Live Media
    Replies: 4
    Last Post: 21st July 2008, 05:38 PM
  3. How-to realocate space from empty hard drive space to Fedora Core 5 partiton
    By JoeyJoJoe in forum Guides & Solutions (Not For Questions)
    Replies: 3
    Last Post: 3rd February 2008, 05:09 PM
  4. Replies: 8
    Last Post: 14th October 2007, 04:03 PM
  5. Crystal Fontz
    By HarshReality in forum Hardware
    Replies: 0
    Last Post: 4th November 2004, 12:55 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •