Genmeshes are used to reduce the amount of geometry CS will handle. You can
define a "factory" object (example: a stone) and then copy it in several places
of the level. If it's a genmesh the copies will be exported with the reference
to the factory, plus their position and rotation, all the geometry will be identical
to the "factory" object. This saves a lot of memory. Please note that genmeshes
can have just one material per object. You can have one material (e.g. stone1.gif)
on the factory, a different one on a certain instance (e.g. stone2.gif), and
so on. You cannot have two materials (e.g. column_top.gif and column_body.gif).
To have genmeshes working you must follow carefully these procedures.
Create a valid factory:
- Define a valid name for factory
- name it with a starting "_g_" prefix
- name it with a unique identifier that will be used on copies. eg.: "_g_stonebig"
- add a "_0" suffix to the end of the name to tell the exporter that this
is a factory.
- A valid factory name is: "_g_stonebig_0". Underscores should be in the
right quantity: "_g_stone_big_0" is invalid and this will not be
considered a factory.
- Reset the factory
- Move the factory object to 0,0,0. This will be used as a reference for
the position of all other instances
- Select the object, go to Hierarchy, click on Affect Object Only, and
then "Align to World", "Center to Pivot"
- Click on Affect Pivot Only, and then "Align to World"
Create a valid instance:
- Define a valid name for instance
- name it with a starting "_g_" prefix
- use the same unique indentifier of the factory (I mean the central part
of the name. e.g. "stonebig")
- add a unique suffix at the end of the name: eg.: "_g_stonebig_01"
- Reset the instances
- NEVER create an instance by mirroring the factory. Mirror function mess
up the pivot, so we have no way to have it oriented correctly when exported.
To create an instance copy the factory object and then rotated it, move
it as you wish.
- Select the object, go to Hierarchy, click on Affect Object Only, and then
"Center to Pivot"
- Click on Affect Pivot Only, and then "Align to object"
Please note that the factory is NOT exported in the scene, so it will be invisible
in CS.
All genmeshes have the tiling mixmode.
Shadows: genmeshes can have the same settings Objects have for shadows
(see Object Properties).
Trasparency: if the object has a transparent texture you have two options:
1) if the object is made of just one plane you can just add the property transparent
on the factory object (see Object Properties)
2) if the object is made of many planes, some of which can be seen as overlapping
by the player (like two parallel planes one after the other), then you must
add the transparentmultiple property on the factory object (see Object
Properties)
Thingmeshes are used to reduce the amount of geometry CS will handle. You can
define a "factory" object (example: a house) and then copy it in several
places of the level. If it's a thingmesh the copies will have only the location,
rotation and texture associated, all the geometry will be identical to the "factory"
object. This saves a lot of memory. The difference with genmeshes is that thingmesh
instances can have a different texture from the factory, that thingmesh support
multiple textures and that those "can receive light (check with Jorrit)".
To have thingmeshes working you must follow carefully these procedures.
Create a valid factory:
- Define a valid name for factory
- name it with a starting "_f_" prefix
- name it with a unique identifier that will be used on copies. eg.: "_g_house"
- add a "_0" suffix to the end of the name to tell the exporter that this
is a factory.
- A valid factory name is: "_f_house_0". Underscores should be in the
right quantity: "_f_house_big_0" is invalid and this will not be
considered a factory.
- Reset the factory
- Move the factory object to 0,0,0. This will be used as a reference for
the position of all other instances
- Select the object, go to Hierarchy, click on Affect Object Only, and
then "Align to World", "Center to Pivot"
- Click on Affect Pivot Only, and then "Align to World"
Please note that the factory is NOT exported in the scene, so it will be invisible
in CS.
Create a valid instance:
- Define a valid name for instance
- name it with a starting "_f_" prefix
- use the same unique indentifier of the factory (I mean the central part
of the name. e.g. "house")
- add a unique suffix at the end of the name: eg.: "_f_house_01"
- Reset the instances
- NEVER create an instance by mirroring the factory. Mirror function mess
up the pivot, so we have no way to have it oriented correctly when exported.
To create an instance copy the factory object and then rotated it, move
it as you wish.
- Select the object, go to Hierarchy, click on Affect Object Only, and then
"Center to Pivot"
- Click on Affect Pivot Only, and then "Align to object"
Trasparency: if the object has a trasparent texture you should set a
property on the factory object (see Object Properties).
Next: Lights