Yet Another Blender Egg Exporter (YABEE)

Thanks ninth, I do think that this feature is not very important anyway. By now I am a bit confuse…
It seens a bit strange when I try to export an model with many animated meshes… seens to create multiple animation nodes with the same name and I was unable to deal with this in the program I am codding. When I joined all the meshes the animations are loaded correctly.

That Backface culling is something i will try very soon. Actually my test model has one mesh that should get the two side rendered and I was calling set_two_sided() on the code, but since all meshes should be joined before exporting, I think that it may be a performance loss.

preusser I found out this http://code.blender.org/index.php/2011/09/bge-material-texface-changes/ and had to change the upper combo box from “blender render” to “blender game”, and then that option show up on the shadding tab of the material menu. If I am wrong, please someone correct me as I will check this only after some homeworking.

CarlosNovaes

Yes, you are right. I plan to add option to join multiple meshes to the single actor, but at this time you should make it manually, or load multiple actors from the one file.
panda3d.org/forums/viewtopi … 9699#79699

preusser

Please, if not difficult )

I’m sorry, seems like I hadn’t change the texture mapping to “UV”.

Another question: I understand this is how Chicken worked too, but why can’t we really export more than 1 (the active) animation?
I think it could be easily implemented by checking if the name you entered in the name field of an Animation in the exporter GUI matched with a name of an Action in Blender.

  1. Looks like a bug. Yabee should export multiple animations. I’ll check it.

  2. I’m not sure about actions names. As i know, single frames range can contains multiple actions.

I don’t understand what you mean.

Any news, ninth?
I have something already, if you didn’t notice:
2shared.com/document/jfPo7OPo/yabee.html

Why the right code in the method “pre_convert_vtx_colors” is commented out and a bugged one is on it’s place?
The commented one accepts triangles, and the uncommented doesn’t.
(I was getting wrong vertex colors, so I was going to fix that and notice there’s a correct code commented there o_O). I changed the code and works ok now. :wink:). I guess a fix should be commited.

And what’s the repository in use now? github or google code?

I sent a patch proposal with support to:

  • alpha files (I guess it’s an important feature for the pipeline [at least for me]). Now it identifies the alpha channel slot and put it on the color (modulate) channel (example below)
  • alpha type (If it’s binary I get it assigned in the .egg, otherwise I do nothing)
  • mipmap (If the “mipmap” button at texture is checked we put magfilter and minfilter)
  • wrap mode (If user chooses CLIP then we set wrap mode to clamp, right?)
  • and the correction for the vertex color bug (it was there already, just uncommented)

It now prints something like this, for example:

<Texture> Rgb {
  "./tex/plant_texture_color.jpg"
  <Scalar> envtype { MODULATE }
  <Scalar> minfilter { LINEAR_MIPMAP_LINEAR }
  <Scalar> magfilter { LINEAR_MIPMAP_LINEAR }
  <Scalar> wrap { CLAMP }
  <Scalar> alpha-file { "./tex/plant_texture_alpha.jpg" }
  <Scalar> alpha { BINARY }
}
Traceback (most recent call last):
  File "C:\Program Files (x86)\Blender Foundation\blender-2.62-release-windows32\2.62\scripts\addons\io_scene_egg\__init__.py", line 321, in execute
    sett.get_bake_dict())
  File "C:\Program Files (x86)\Blender Foundation\blender-2.62-release-windows32\2.62\scripts\addons\io_scene_egg\yabee_libs\egg_writer.py", line 1030, in write_out
    file.write(get_egg_materials_str())
  File "C:\Program Files (x86)\Blender Foundation\blender-2.62-release-windows32\2.62\scripts\addons\io_scene_egg\yabee_libs\egg_writer.py", line 897, in get_egg_materials_str
    for m_idx in get_used_materials():
  File "C:\Program Files (x86)\Blender Foundation\blender-2.62-release-windows32\2.62\scripts\addons\io_scene_egg\yabee_libs\egg_writer.py", line 886, in get_used_materials
    m_list.append(obj.data.materials[f.material_index].name)
AttributeError: 'NoneType' object has no attribute 'name'

location:<unknown location>:-1

do you have a material assigned to your model?

Yes, you are right. It seems yabee supports objects with no material, but crashes with an empty one.
I can avoid it, but please fix this ninth. It’s kind of annoying.

Traceback (most recent call last): 
   File "C:\Program Files (x86)\Blender Foundation\blender-2.62-release-windows32\2.62\scripts\addons\io_scene_egg\__init__.py", line 321, in execute 
     sett.get_bake_dict()) 
   File "C:\Program Files (x86)\Blender Foundation\blender-2.62-release-windows32\2.62\scripts\addons\io_scene_egg\yabee_libs\egg_writer.py", line 1030, in write_out 
     file.write(get_egg_materials_str()) 
   File "C:\Program Files (x86)\Blender Foundation\blender-2.62-release-windows32\2.62\scripts\addons\io_scene_egg\yabee_libs\egg_writer.py", line 924, in get_egg_materials_str 
     used_textures = st.get_used_textures() 
   File "C:\Program Files (x86)\Blender Foundation\blender-2.62-release-windows32\2.62\scripts\addons\io_scene_egg\yabee_libs\texture_processor.py", line 39, in get_used_textures 
     if f.image.source == 'FILE': 
 AttributeError: 'NoneType' object has no attribute 'source' 

 location:<unknown location>:-1

I get the same error as preusser :frowning:

I checked the UV mapping, preusser can you say what you did exactly to fix this please?

thx and sorry for my english :wink:

this might also be something to do with having a material, but I’m not positive. Make sure that you have a material with your UV texture assigned to it and then try to export again. e.g. I’ve had problems trying to export a model with a UV texture without also having a material.

thanks for answer!

Iv got like 10 materials on the model and only one of them has the texture assigned, and its pinned on the UV, I dont understand why I get this error.

Anyway I exported a .egg without texture to my project and ¡surprise! It has the texture applied O.o I’m a noob on this 3d gaming world but is this normal? xD The cool part is I have my textured model, the bad part is I dont know why xD

Hm, where’s ninth? I was hoping we could get the exporter to Chicken’s level.

Anyway, the exporter doesn’t export vertex colors correctly:

preusser, I sent a patch (17, 18 http://code.google.com/p/yabee/issues/list) with some features (see my earlier post) and one of them corrects that too.
The vertex color fix wasn’t mine, it was in the code already (the earlier post explains the error too), but commented (since ever, it seems).

You can see the pre_convert_vtx_colors method.

No one liked the small features I added? :cry: hahahah

Oh, nice. When did you send them? Does ninth know?
I’ll need to go back and read those posts you mentioned.

Am I the only one who doesn’t like copying textures being the default behavior? I guess everyone would be happy if settings could be saved to a config file and reused.

Has anyone written a patch to export collision meshes as such?

How do I install YABEE in Blender? I’ve tried adding it as an addon (in Blender 2.63 and 2.62), by going to File -> User Preferences -> Addons -> Install Addon, I then select the YABEE init.py but Blender gives no feedback whatsoever.

Did I miss the install instructions somewhere else in this thread/forum? I also didn’t notice any README or the like in YABEE.

I’m new to Panda (this is my first post), and my first priority is to get a working pipeline.

UPDATE:

I solved the problem. I tried installing the exporter using the Blender UI, and I don’t know why that never worked. I installed it by placing the YABEE script in the addons folder; specifically I placed the io_scene_egg folder there. I found this page helpful: wiki.blender.org/index.php/Doc:2 … on/Add-Ons

Glad you got it working. I’m such a blender noob that I didn’t even know it had a UI for installing addons, I brute-forcely copied the script in the nearest directory as well.

I agree, the documentation is scarce. The tool seems very straightforward and easy to use, but only once you know what you’re doing. I’m unfortunately not there yet :slight_smile:.