Crystal Space 2.0.0: 5.8.2 First Steps

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 5.8.2 First Steps

This section presents the main panel of the user interface of the `io_scene_cs` add-on script.

## Main export panel

The main `‘Crystal Space Export’` panel is placed in the `‘Render’` context of the `‘Properties’` (or `‘Buttons’`) window. Some other panels are also added in some other contexts of the `‘Properties’` window, they will be presented later.

The panel is composed of several buttons and controls to configure and run the exporter:

- Export as a CS library: whether the scene should be exported as a `‘library’` or a `‘world’` file.
- Enable double sided meshes: globally enable the setting of the `‘double sided’` property. If it is disabled, then all meshes that are exported will be single sided, whatever their specific setting.
- Export path: path to the folder where the generated files will be put.
- Export: export the scene to the specified path.
- Export and Run: export the scene then run it in Crystal Space's `‘walktest’`.
- Console: enable the `-console` flag of `‘walktest’`
- Verbose: enable the `-verbose=-scf` flag of `‘walktest’`
- Silent: enable the `-silent` flag of `‘walktest’`

If the `‘CRYSTAL’` environment variable is not defined or pointing to a directory containing the `‘walktest’` application, then most of these controls are not present and are replaced instead by the comment `‘'walktest' isn't available!’`. See the dedicated section in order to solve this.

## The 'Export' button

When you click on the Export button, Blender will start working and writing informations about the export process on the Blender console, until the final message: `‘EXPORTING complete’`. The files generated should have been placed in the given export folder.

The structure of the files will depend whether you have checked or not the `‘Export as a CS library’` option. If its is not checked, then it will be the following:

- a `‘world’` file containing your scene (i.e. all sectors) is created at the root of the export directory
- a `‘textures’` directory is created in the export directory, and all texture files are put in it
- a `‘factories’` directory is created in the export directory, and all library files (i.e. the mesh factories) are put in it

If the `‘Export as a CS library’` option is checked, then there will be only one file generated:

- a `‘library’` file containing all mesh factories is created at the root of the export directory
- a `‘textures’` directory is also created in the export directory, and all texture files are put in it

If you want to visualize the exported objects, then you can open the library files with `‘viewmesh’`. Take care for that that the path where are your files should be mounted correctly in the Virtual File System of Crystal Space (VFS).

In order to mount the VFS path, use the following command:

    viewmesh -R=<export_path> factories/<library_file>

## The 'Export and Run' button

This button allows the user to either launch the export process and view the result in the `‘walktest’` application.

In order to work correctly, your scene needs:

- at least one camera,
- at least one light lighting your objects,
- some visible objects below the camera, to be used as a roof and in order for the `‘walktest’`'s camera to not fall into the void as soon as you start the map.

Once clicked on the Export and Run button, the export process will start until the status message: EXPORTING complete appears on the Blender console. Shortly after that, the `‘walktest’` window should appear (otherwise, check the Blender console for some output message).

Using the arrow keys, you will be able to move around your scene. Note that `‘walktest’` has a lot of different keys and options, so you may want to have a look at the dedicated manual page for that.

#### If the 'walktest' window fails to open

- Check that there are no errors in the Blender console window.

#### If the 'walktest' screen is kept black

- Check if there is a light, and if it is close enough to your geometry.
- It is also possible that since the gravity is activated by default in walktest, the camera pans away from the set view too fast. Ensure that you added a floor below your camera.
- Check the console to ensure that your entire scene is being exported. Sometimes only the camera will be exported hence you will only see a black screen. If you have this problem, then check that the visibility of your objects is activated in the viewport.
- Check that the normals from the visible objects are pointing in the correct direction. If you made a cube surrounding the player this usually means you need to reverse its normals (in Blender and in Edit mode, press the hotkey `‘W’` then select `‘Flip Normals’`).

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

This document was generated using texi2html 1.76.