[Blend2cs-user] Re: [Cel-main] Loading mesh from Blender in CS via
cel
Thomas Degris
thomas.degris at lip6.fr
Wed Nov 3 18:53:57 CET 2004
Hello,
after some experiments, we finally managed to understand what was going
on for rotations between Blender and cel (thanks to John Ellis).
Rotations are applied in cel only if they are done in Edit mode (and not
Object mode) in Blender. Two difficulties have been observed from this
observation:
1) because of the strange conversion between the classic coordinate
system in Blender and the (very) unusual coordinate system in cel,
rotations of object in Blender are very difficult to predict in cel
2) the origin of the rotation depends on the initial window used to
create the object in Blender. That means that if you create two
different objects, the first one in the top window and the second one in
the front window. Then, even if you rotate it to have these objects
oriented the same way in Blender, they won't be oriented identitically
in cel. The problem is that you have to remember in what Blender window
you created your object to know which rotation to apply to get the
object the right way in cel.
We were happy to get (at last) our objects in cel well oriented. But
now, we have the problem of collision detection as you can see on this
movie:
http://www-poleia.lip6.fr/~degris/crystal/collisionDetection.avi
Maybe it comes from the position of the mesh relative to its 0,0,0
position but I don't see how to modify it to get collision detection
working.
Last problem but not least, objects don't receive lights from the
environment (as you can see on the video). As I said in a previous email
(sorry for repeating myself), we added the type property in Blender and
set it to genmesh. The problem is that our application got an assert.
Here is the full backtrace (with the assert unlike the last email I send):
plugins/mesh/genmesh/object/genmesh.cpp:648: failed assertion 'mater != 0'
Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 1077556320 (LWP 16265)]
csGenmeshMeshObject::SetupObject() (this=0x81e3958) at
plugins/mesh/genmesh/object/genmesh.cpp:649
649 plugins/mesh/genmesh/object/genmesh.cpp: No such file or directory.
in plugins/mesh/genmesh/object/genmesh.cpp
(gdb) bt
#0 csGenmeshMeshObject::SetupObject() (this=0x81e3958)
at plugins/mesh/genmesh/object/genmesh.cpp:649
#1 0x42b91642 in csGenmeshMeshObject::DrawTest(iRenderView*, iMovable*,
unsigned) (
this=0x81e3958, rview=0xbffff000, movable=0x81bbdd0, frustum_mask=9)
at plugins/mesh/genmesh/object/genmesh.cpp:658
#2 0x410684ee in csMeshWrapper::DrawIntFull(iRenderView*, unsigned)
(this=0x81bbcd8,
rview=0xbffff000, frustum_mask=9) at plugins/engine/3d/meshobj.cpp:678
#3 0x410683c8 in csMeshWrapper::DrawInt(iRenderView*, unsigned)
(this=0x81bbcd8,
rview=0xbffff000, frustum_mask=9) at plugins/engine/3d/meshobj.cpp:653
#4 0x41067f66 in csMeshWrapper::Draw(iRenderView*, unsigned)
(this=0x81bbcd8, rview=0xbffff000,
frustum_mask=9) at plugins/engine/3d/meshobj.cpp:513
#5 0x4109189d in csSector::Draw(iRenderView*) (this=0x82ea320,
rview=0xbffff000)
at plugins/engine/3d/sector.cpp:892
#6 0x41094c02 in csSector::eiSector::Draw(iRenderView*)
(this=0x82ea434, rview=0xbffff000)
at sector.h:554
#7 0x410401d2 in csEngine::Draw(iCamera*, iClipper2D*) (this=0x8092430,
c=0x81a1f78,
view=0x81e3f08) at plugins/engine/3d/engine.cpp:1904
#8 0x4265c546 in csView::Draw() (this=0x8535bc8) at
libs/cstool/csview.cpp:167
#9 0x4264e425 in celPcCamera::TickEveryFrame() (this=0x81c21d0)
at plugins/propclass/engine/engfact.cpp:801
#10 0x4134a30b in celPlLayer::HandleEvent(iEvent&) (this=0x8097c30,
ev=@0x80f0dc0)
at plugins/stdphyslayer/pl.cpp:117
#11 0x4135030b in celPlLayer::EventHandler::HandleEvent(iEvent&)
(this=0x80fcd10, ev=@0x80f0dc0)
at pl.h:182
#12 0x40418808 in csEventQueue::Notify(unsigned) (this=0x80b4398,
pseudo_event=9)
at libs/csutil/cseventq.cpp:219
#13 0x40418926 in csEventQueue::Process() (this=0x80b4398) at
libs/csutil/cseventq.cpp:235
#14 0x40440f55 in csDefaultRunLoop(iObjectRegistry*) (r=0x80ae4e8)
at libs/csutil/generic/runloop.cpp:81
#15 0x40408095 in csApplicationFramework::Run() () at
csapplicationframework.h:307
#16 0x40405079 in CrystalSpaceApplication::Application() (this=0x8051f90)
at crystalspaceapplication.cpp:155
#17 0x404085c5 in csApplicationFramework::Start() () at
libs/cstool/csapplicationframework.cpp:68
#18 0x40408863 in csApplicationFramework::Main(int, char**)
(this=0x8051f90, argc=2,
argv=0xbffff594) at libs/cstool/csapplicationframework.cpp:115
#19 0x403f3f2d in CApplication::Main(int, void*, int) (this=0x80e19f8,
argc=2, argvPtr=0xbffff594,
argvSize=0) at capplication.cpp:53
#20 0x0804a5fb in LabySouris::Main(int, char**) (this=0x80c30a0, argc=2,
argv=0xbffff594)
at labysouris.cpp:37
#21 0x0804d838 in main (argc=2, argv=0xbffff594) at main.cpp:24
Thank you very much for your help,
Regards,
Thomas
More information about the Blend2cs-user
mailing list