[Blend2cs-user] Re: [Cel-main] Loading mesh from Blender in CS via cel

Jorrit Tyberghein jorrit.tyberghein at pandora.be
Wed Nov 3 06:52:42 CET 2004


Thomas Degris wrote:

> Hello,
>
> I am currently trying to load simple mesh object from Blender into CS 
> via cel. The objects don't have any animations (I am not using cal3d). 
> I create them with Blender and I convert the Blender file into a CS 
> library using blend2cs (with the -l option).
>
> The mesh is loaded in cel using the following cel code:
> csRef<iPcMesh> pcmesh = CEL_QUERY_PROPCLASS_ENT(entity, iPcMesh);
> assert(pcmesh);
> pcmesh->SetMesh("avatar", "/bugspace/objectlibrary.zip");
> The entity has the following cel properties: pcactormove, 
> pclinearmovement.
>
> I have different major problems using this method:
> 1) collision detection between the object and the floor seems to be 
> done with the origin of the object in Blender instead of the mesh 
> itself. That means that if the origin of the object is placed bellow 
> the object itself, then the object will navigate in cel without 
> colliding with the floor (it will seem to fly). Is that normal ?

CS and CEL use a technique to test CD only with objects that are near. 
To test if
two objects are near CS will compute the distance between the 0,0,0 points
of the objects. This is also the case for lighting. So it is always 
recommended to
place the 0,0,0 point of the object at a suitable place in the object 
and not
removed from it.

>
> 2) I don't understand how objects are rotated in the world. Two 
> objects orientated with the same angles in Blender will NOT 
> necessarily be orientated the same way once loaded in cel. On the 
> contrary, two objects not orientated the same way in Blender may be 
> orientated identically in cel. It seems that it depends how objects 
> are initially created in Blender, but I am not sure. Also, 
> modifications in Blender does not seem to be taken into account in 
> CEL. I am really looking for some informations about that. 

I don't understand this. What do you mean by 'modifications in Blender'? 
What kind
of modifications?

>
> 3) Objects loaded in CS are all black. I guess it is because lights 
> are not computed for them. So, I would like to know what to do in 
> cel/Blender  to get nice textures/lighting with my mesh objects. Any 
> hint ? 

CS should do the lighting. So you must add some lights and
do -relight on the level.

Greetings,



More information about the Blend2cs-user mailing list