Object Type Reference

From Blender2crystal

Jump to: navigation, search

Language : EnglishEspañolFrançais


This document is a reference about the object types b2cs currently supports, and their general capabilities.

First we have the blender objects that will always export as a certain cs type, let's call them pure types.

Then there is the types you can set to a mesh object in blender so it will export to a certain mesh type in crystalspace, we'll call them here mesh types.

Finally there is some additional types that will export as pure entities for cel, we'll call them cel types.

Contents

[edit] Pure Types

[edit] Lamp

A lamp in blender, this will be exported as a light in cs using colour and distance from the light. Lamps support ipo colour animation and movementa animation on export. Lamps can also be entities (for cel).

The parameters that get exported for a lamp entity are the radius and the r, g, b components. Brightness and other such values are ignored.

[edit] Camera

A camera in blender, this will be exported as a start location in crystalspace map, so its not a real object in cs.

[edit] Empty

Blender Empty objects are exported as cs nodes, this is a special type of object that only has position and rotation, but no more properties.

[edit] Armature

Armatures with children set to genmesh will be exported as crystalspace skeletons with corresponding animations, and children genmesh will export rigging. If the child is set to spr3d the armature itself wont be exported, but the object will take care to bake the animation into keyframes.

[edit] Socket

With mesh socket you can mount meshes. Child mesh will follow parent's animation, you can use it for example for keeping weapon or ride a horse. At this moment you can use socket only with genmesh+skeletal animation. To make a socket you need dummy mesh (for example small sphere or box - size doesn't matter, only center of the mesh matters) then set type to 'socket' and set position for it. Now parent it to bone. To do it you need set armature to pose mode, select dummy socket mesh, keep SHIFT, select armature, CTRL+P, 'Make parent to: Bone'.

[edit] Mesh Types

All mesh types export some factory and meshobj to the map, (unless explicitly set to not generate the meshobj).

All support position and location sequences on export, and can use physics or entity properties.

[edit] thing

Thing is the default type in blender2crystal.

This is a type more appropiate for square geometry, and is the only type that supports lightmaps using the standard renderer.

Thing doesnt export the UV coordinates for vertex correctly for quad faces, they will look ok for simple meshes but for more organic shapes you want to use genmesh type.

[edit] genmesh

This is the general mesh type in crystalspace.

It can use vertex colours and will always export correct uv mapping.

Can also be parented to an armature for animation, which will be exported as crystalspace skeleton with corresponding animation and genmesh rigging information. Note the renderloop must be one with light steps (diffuse, shadowed, shadowmap...).

[edit] instmesh

This is an instancing type in crystalspace, in principle its faster but will be more difficult to manipulate the different instances of the factory from crystalspace.

You want to use this when you have many different static objects that share a factory. Instmesh cant be entities or have physics assigned in b2cs.

[edit] cal3d

An object with properties set for wrapping a cal3d object
An object with properties set for wrapping a cal3d object

Note that cal3d inclusion into the map is a bit special because it is a foreign format for both blender and CrystalSpace.

This is a special type that wont export geometry, but instead wrap a cal3d file residing on the hard drive.

Note that the cal3d files to be included into the map must already be generated. In blender you can generate cal3d files, but this should be done by using the Cal3d export plugin (usually bundled with blender).

For exporting to CrystalSpace through this exporter, the type property must be set to "cal3d", and the "cal3dcfg" property must be set to point to a .cfg cal3d mesh description file in the filesystem. There is also a tool called "Cal3d Tool" in the old ui to facilitate this task.

The exporter will not consider the geometry of the blender object but will instead generate a factory and a meshobject for the cal3d mesh referenced. The cal3d files will also be included into the .zip file, and view can be used from this point on to view the cal3d mesh with viewmesh if so desired.

Some more properties can be set up by hand to assign starting animation for the mesh. Some properties must be set to point at the cal3d cfg file.

[edit] spr2d

This is a 2d object that always looks at the camera. You want to use this for light effects, flares, or cheesy geometry.

It will export a 2d object based on the front view of the object with this type.

[edit] spr3d

This is the crystalspace type you can use for key framed animation.

It can export *any* animation assigned to the object (soft body, bones, vertex anim) by internally baking to keyframed animation.

The drawback is animations can't be mixed in crystalspace, and the method to set the animations and keyframes to use is a bit awkward in b2cs at the moment, also spr3d does not totally correctly handle lighting information in cs, but can work good for simple cases.

[edit] curve

If there is a bevelled curve object in blender, b2cs will automatically export that as a genmesh, generating UVs.

Under the curve subsection there is the unwrap_mode where you can choose between overlap and vertical. With overlap the sections as you go along the curve are repeating the texture, whereas vertical will unwrap is such that for each section there is a seperate part of the uv map downwards.

You also have the option of saving this uv map. Setting uv_save_layout will mean a uv face layout texture is generated and stored as a targa image. When making textures for curve objects you may wish to set the exporter to only export selected, select the curve object, turn on uv_save_layout and click export. ;)

To apply textures to curves, use the material context in the buttons window and a apply a texture to the curves material.

[edit] particles

This is a special type that will export a particle system. The emitter will have the radius of the assigned mesh, but otherwise object geometry will be ignored. There is lots of properties to set in the interface.

[edit] rain & snow

When a mesh type is set to rain or snow the mesh geometry won't be output, but a rain or snow field will be created with the cube bounds of the object.

Special care must be taken if rain or snow is wanted to rain downwards. The rain will by default "fall" in downwards direction in the object local coordinates. This means rotation must be applied in blender (crtl-A) or the rain will "fall" in unnatural direction (this can be useful for other kind of effects, like particles in a tunnel).

Default settings are to give snow the /lib/std/snow.jpg texture, and rain the /lib/std/raindrop.png texture, but if the overridematerial property is set to true user defined texture will be used (set through uv texturing on the object)

[edit] emit

An emitter particle system. This is deprecated in favour of the more generic particles type.

[edit] terrain

Mesh suitable for export as terrain type
Mesh suitable for export as terrain type

For outputting a terrain object. It is usually used in combination with std_rloop_terrain, std_rloop_terrainfixed (see SectorSettings or WorldSettings).

In addition to the world file blender2crystal can also generate a heightmap, normalmap, materialmap, and base material. (also normalmap for scattering rendering)

To use this you basically have to create a mesh from a plane that has the shape of the landscape. blender2crystal will scan that mesh and create a landscape from it. The texture mappings of the triangles on that mesh will be used for the material palette and the vertex colour information will be used for the base material.

To change the default tiling for splat textures you can use the shader_scale property.

One nice plugin for blender that generates suitable land meshes is the A.N.T. Landscape Creator plugin

There is some example maps for terrain in the Files section.

[edit] meshref

This is an object that references a factory defined elsewhere (i.e. another world file, library, or something created in code by the game). With meshref the actual geometry of the object as defined in blender will be ignored.

[edit] meshlib

This is an object that references a mesh object defined in the world but not in any sector. The actual geometry of the object as defined in blender will be ignored.

[edit] ball

Mesh will be exported as a genmesh sphere.

[edit] sky

Mesh will be exported as a genmesh sphere with default properties apropiate for generating a skysphere.

[edit] Cel Types

[edit] trigger_sphere

This will export a special entity with a pctrigger with "trigger_sphere" property set to the bounds of the object.

Use this if you want an entity only trigger sphere (with no mesh).

[edit] trigger_box

This will export a special entity with a pctrigger with "trigger_box" property set to the bounds of the object.

Use this if you want an entity only trigger box (with no mesh).

[edit] pcbillboard

This will be exported as a special entity with only pcbillboard set. it will use the material assigned to the object.

Several properties are available to let you change the position, size and clickable state, you can check them in the MassTag tool.

Personal tools
Documentation