Crystal Space
Welcome, Guest. Please login or register.
August 29, 2014, 09:24:53 am

Login with username, password and session length
Search:     Advanced search
9008 Posts in 2043 Topics by 8357 Members
Latest Member: Msyexelcarl03
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Game Content Creation
| | |-+  blender2crystal and spr3d animation?
« previous next »
Pages: [1] Print
Author Topic: blender2crystal and spr3d animation?  (Read 2948 times)
deckerego
Full Member
***
Posts: 149


View Profile WWW
« on: October 24, 2005, 04:36:50 am »

Has anyone been able to get blender2crystal's spr3d export to work?

I built a model in Blender, then exported it using the cal3d exporter. That mesh seemed to animate via cal3d's miniviewer.
When I attempt to export it using blender2crystal into a spr3d library it doesn't animate. The mesh itself loads just fine in viewmesh, but I can't start an animation loop.

I looked through the viewmesh source and didn't find any glaring problems, and looked through the mesh's XML and didn't find one, either. I'm *guessing* the problem might be in viewmesh? I'm using today's CVS.

The mesh itself is available at http://www.cs.indiana.edu/~joellis/spr3dSteve.zip, just in case enterprising minds are interested.
Logged
deckerego
Full Member
***
Posts: 149


View Profile WWW
« Reply #1 on: October 25, 2005, 06:46:16 am »

GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHH

Looking at a simpler version of a spr3d file (just a boxman) I can now see what's going on. ALL THE FRAMES HAVE THE SAME VERTEX INFORMATION.

Jeesh.

So... someone help me here... how does blender2crystal determine vertex offsets for each frame? It's obviously not by armature... or IPO... so how else would it divine what LocRot transformation to set?

Looking at the source, it appears it's only getting raw mesh data. Is there another way I should be doing this in Blender?
Logged
deckerego
Full Member
***
Posts: 149


View Profile WWW
« Reply #2 on: October 27, 2005, 04:31:24 am »

Has anyone else been able to communicate with the blender2crystal team? No e-mail addresses, no forum, mailing list doesn't work...

Given how genmesh animation with spr3d would be much nicer (from my pov, anyways) than the current cal3d solution, I'd like to work through why the correct vertex information isn't being sent along during export.
Logged
deckerego
Full Member
***
Posts: 149


View Profile WWW
« Reply #3 on: October 29, 2005, 03:31:06 am »

I figured out the bug in the blender2crystal exporter. Or maybe it's a bug in Blender. Or a feature. To any point, I'll post what I found then follow it up with inflammatory comments just to see if anyone, preferably anyone who might maintain blender2crystal is reading this thread.

Blender's NMesh module has two methods that will return an NMesh object: GetRaw and GetRawFromObject. GetRaw will get the raw mesh info for a given mesh, while GetRawFromObject will get mesh info for a given object. Like Jorrit pointed out a while ago, the (loose) analogy is like retreiving a factory vs. a mesh. GetRaw, in its current state, returns just the mesh data itself without deformations. GetRawFromObject returns deformed mesh data (see Blender's Python Docs for the whole dirty business).

srp3d.py in the blender2crystal distribution uses GetRaw which just returns the static mesh data without skeletal deformations from rigging at a given frame. I hacked the Python script to use GetRawFromObject and things now work peachy. Just change
Code:
mesh = Blender.NMesh.GetRaw(mesh.name)

to
Code:
mesh = Blender.NMesh.GetRawFromObject(object.name)

Now I just need to figure out why exporting as a library makes the exporter barf.

<inflamatory comment>
I think we should bring back the <BLINK> tag.
</inflamatory comment>
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 3.137 seconds with 13 queries.