Yet Another Blender Egg Exporter (YABEE)

I re-downloaded rev 11, but the problem remains.

I found if i dont try to export my collision mesh the problem improves but it still crashes.


Proportional size (0.000000) under 0.00001, reseting to 1!
RELOADING MODULES
WRITE main EGG to c:\Program Files\Blender Foundation\Blender\exp_test\cruiser0.
egg
RENDER IMAGE to c:\Program Files\Blender Foundation\Blender\exp_test\textures\me
sh_gloss.jpeg; rel path: ./textures/mesh_gloss.jpeg
RENDER IMAGE to c:\Program Files\Blender Foundation\Blender\exp_test\textures\me
sh_diffuse.jpeg; rel path: ./textures/mesh_diffuse.jpeg
RENDER IMAGE to c:\Program Files\Blender Foundation\Blender\exp_test\textures\me
sh_glow.jpeg; rel path: ./textures/mesh_glow.jpeg
RENDER IMAGE to c:\Program Files\Blender Foundation\Blender\exp_test\textures\me
sh_normal.jpeg; rel path: ./textures/mesh_normal.jpeg
{'mesh_diffuse': ('', './textures/mesh_diffuse.jpeg', 'MODULATE'), 'mesh_glow':
('', './textures/mesh_glow.jpeg', 'GLOW'), 'mesh_normal': ('', './textures/mesh_
normal.jpeg', 'NORMAL'), 'mesh_gloss': ('', './textures/mesh_gloss.jpeg', 'GLOSS
')}

:egg(error): Unable to open Files/Blender

(I dont know where these textures (mesh_gloss/glow/diffuse) are coming from)

My collision mesh isnt supposed to have a texture or a UV Layer, so i dont know whats indicating to YABEE that it needs one.

Seems that trouble in the path to the file - “Program Files” contain a space character. I’ll try to fix it, but now you simply can change the export path, or try to disable TBS generation. Also switch TEXTURE_PROCESSOR to ‘SIMPLE’ if you don’t need textures.

Have update an archive. Try to download again. I can’t check it on windows now, but i think it should work with space characters.

I switched the processor over to Simple, which fixed my collisionMesh issue.

EDIT

Ok, so it’s working. I made a boo-boo, Ninth, your patch worked perfectly.

Now im just trying to workout textures (it doesnt export with them) but im sure thats my fault not properly giving a directory.

Tags is supported. They are set in the Blender’s “Game Logic” section - “Add Game Property”. But they are not converted to object type now, although you simply can open .egg in the text editor and replace “ ObjectType” to “”

@Ninth

Yeah, i decided to actually read the thread, and the post above my initial one was all about collision! (Surprise!)

So, i checked the manual and got the collision business sorted, works like a charm now. Im really hoping i dont have to do than manual nonsense with the textures, i dont want to have to apply ’ { ship0_hull.jpg }’ to all 9000 polygons.

I believe i have the pathway to my textures set properly, but no texture support is included in the egg, not even:

<Texture> name {
  "./path/to/name.jpg"
  <Scalar> Type { whatever }
}

I do not quite understand the essence of the claims.

I installed rev 10 and the gui script,but have not had a chance to try it yet. I will tonight after work. As I read the thread it seems most people are concerned about exporting normal,emit and other types of add on maps. I do not need those right now. I just use a straight uv unwrap painted in gimp and imported into blender.

My main concerng is getting the character mesh the uv textures and most importantly that animations of a human mesh into panda. ninht if you could explain a bit more on how to get the actions or animations from your script to export and how to use them in panda I would greatly appreciate it.

Shaba, just read the script; it is self explanatory. There is a section for animation,uvs, baking, etc. Sometimes I have problems with the gui. Maybe you should just use the script directly if you’re new to it. Remember to select everything you want to export.

@ Ninth

Ah, sorry i’ve been away.

Anyway, my problem is that my textures wont work. My texture path is set to:

TEX_PATH = ‘C:/GAMENAME/lib/data/textures’

And my texture is there and is properly applied to my model in blender. When i export the model, theres no references to a texture map. It’s like the script didnt recognize i even had UVLayer.

Any idea?

hi,
The script seems to work fine exporting a simple cube but when I try to export a more complicated mesh I get a floating point error. here’s a test.blend with a simple cube scene and a scene containing a humanoid mesh exported from makehuman and imported into blender in the collada format. the human mesh gives the floating point error. any ideas?
docs.google.com/leaf?id=0B76Ekb … m&hl=en_US

thanks, john

I’ve had to fiddle with my output paths on export for models. try something like ‘/GAMENAME/lib/data/textures’ and see if that puts it where you want it. maybe so maybe not.
best,
john

Shaba1
See at the yabee.py comments and at the first page of this topic.

Alviss

or

waufrepi
I tried to export model from your file and I have not had any problem. link
Can you post error message from console here?

Well thing are not that obvious from reading the comments in the script. For instance when the comments mention animation does the script only support action exporting from blender or ipo animated movement or what. In chicken all your animations have to be actions and have to have an armature attached by the armature modifier in order to be recognized by that script.

I realize that this is not chicken and that english is not ninth’s native language but some further explanations would be helpful. Rather then just running the script and getting and error and wondering
WWhat you doid wrongly

Just to note that I’m using revision 10. From your file it looks like you used revision 11 for your export. everything above what I posted was the same (Vector * Matrix) error. The division by zero float error is the last line. I really hope I’m just doing something stupid…

C:\Users\john\Desktop\YABEE10\YABEE\yabee_libs\tbn_generator.py:72
Warning: (Vector * Matrix) is now deprecated, reverse the multiplication order i
n the script.
C:\Users\john\Desktop\YABEE10\YABEE\yabee_libs\tbn_generator.py:73
Traceback (most recent call last):
  File "C:\Users\john\Downloads\test.blend\yabee.py", line 62, in <module>
    FLOATING_POINT_ACCURACY)
  File "C:\Users\john\Desktop\YABEE10\YABEE\yabee_libs\egg_writer.py", line 1024
, in write_out
    file.write(gr.get_full_egg_str())
  File "C:\Users\john\Desktop\YABEE10\YABEE\yabee_libs\egg_writer.py", line 115,
 in get_full_egg_str
    egg_str += ch.get_full_egg_str(level + 1)
  File "C:\Users\john\Desktop\YABEE10\YABEE\yabee_libs\egg_writer.py", line 91,
in get_full_egg_str
    egg_mesh = EGGActorObjectData(self.object)
  File "C:\Users\john\Desktop\YABEE10\YABEE\yabee_libs\egg_writer.py", line 589,
 in __init__
    EGGMeshObjectData.__init__(self,obj)
  File "C:\Users\john\Desktop\YABEE10\YABEE\yabee_libs\egg_writer.py", line 307,
 in __init__
    self.tbs = yabee_libs.tbn_generator.TBNGenerator(obj).generate()
  File "C:\Users\john\Desktop\YABEE10\YABEE\yabee_libs\tbn_generator.py", line 4
9, in generate
    tbs = self.get_triangle_basis(tidx)
  File "C:\Users\john\Desktop\YABEE10\YABEE\yabee_libs\tbn_generator.py", line 8
4, in get_triangle_basis
    tmp = 1.0 / ((v1_u * v2_v) - (v2_u * v1_v))
ZeroDivisionError: float division by zero

thanks for your time.
best, john

Ok, got it working.

This:

EXPORT_UV_IMAGE_AS_TEXTURE = True 

should probably be default. (Or perhaps i should, again, read things carefully)

Thanks so much for your time Ninth, and your wonderful script! I thought i was screwed when i updated Panda and chicken stopped working.

waufrepi
Rev 11 used with 2.59. In this version matrix*vector operaton was changed. Try to update Blender.
As for error - it’s occurs while TBS generating. Seems that UV is not correct. I am not handled this situation in the TBS generator. In rev 11 you can use Panda utils (default) for generate TBS, or disable it.
Also you can try to fix tbn_generator.py. Something like this:

            try:
                tmp = 1.0 / ((v1_u * v2_v) - (v2_u * v1_v))
            except:
                tmp = 1.0

Shaba1
I would be happy if anyone helped me to write “help” :wink:

Script works with Armature modifier and with shape keys. Script tries to bake all animations, applied to skeleton, on each frame in timeline, and write it into .egg. But I am not familiar with IPO and I would be happy if you checked it )

Alviss
I thought that you work with materials. If you use UV image as texture - yes you need EXPORT_UV_IMAGE_AS_TEXTURE = True and TEXTURE_PROCESSOR = ‘SIMPLE’