Yet Another Blender Egg Exporter (YABEE r13.1)

Return to Pipeline

YEAHHH!!!

Postby santiago-gamer » Wed Mar 14, 2012 1:40 pm

Thank you so much for your help!! :D :D :D

I've downloaded Blender 2.62 again and replace the new one (without modifications) with the one I've already got.

Now everything seems to be working (at least exporting animations), so the problem, I think, was with Yabee versions conflict or something like that.

Thank you guys for the help, and ninth, thank you for this awesome exporter!!! :D :D :D

EDIT: I also have a question about blend shapes (morhp target once exported): Do we have to procedurally modify the morph targets with controlJoint() like specified in the chicken manual? Does Yabee export the blend shapes like Chicken? <---that sounds so funny :lol: :lol:

Fragment of the Chicken Exporter Manual:
3.17 Shape Keys

Shapekey data is stored in the .egg file as vertex displacement data, to be used with the actor controlJoint() method to create a morph target and setX(<float value>) to displace the mesh geometry dynamically. An example, with code, may be found in the chicken test directory. (You may also find this within a zip file with the Chicken exporting step already done.)
Shape key based animation sequences are ignored - it only allows direct manual control of the shape key weights within Panda.
Sorry for my english :)
santiago-gamer
 
Posts: 40
Joined: Fri Dec 31, 2010 12:10 am
Location: Uruguay

Postby ninth » Thu Mar 15, 2012 5:41 am

redpanda, yes, "copying textures" is a default behaviuor.

preusser, Texture type convertations for the "simple" mode:
Blender option -> Panda envtype
default -> 'MODULATE'
use_map_normal -> 'NORMAL'
use_map_emit -> 'GLOW'
use_map_specular -> 'GLOSS'

santiago-gamer, yes, YABEE can export shapekeys and shapekey animations. Of course, you can control the shapekey procedurally. However, this features still not fully tested, especially in the latest Blender version.
Vodka, bears, balalaika... hmm... sorry for my English =)
ninth
 
Posts: 372
Joined: Fri Jan 23, 2009 9:06 am
Location: Russia

Postby preusser » Thu Mar 15, 2012 6:29 am

preusser, Texture type convertations for the "simple" mode:
Blender option -> Panda envtype
default -> 'MODULATE'
use_map_normal -> 'NORMAL'
use_map_emit -> 'GLOW'
use_map_specular -> 'GLOSS'

I don't quite understand. Do you mean we need to manually change those variables in the script for the maps to export?

BTW, do you think it's time to document the script?
preusser
 
Posts: 516
Joined: Sun Mar 27, 2011 10:07 am

Postby ninth » Thu Mar 15, 2012 3:04 pm

Do you mean we need to manually change those variables in the script for the maps to export?

I mean "Influence" options in the texture tab. You should activate one of them to tell to the YABEE what kind of the texture type is used.

BTW, do you think it's time to document the script?

May be something like small howto for the first time?

-------------------
I made a copy of the YABEE repo on the Github: https://github.com/09th/YABEE
Vodka, bears, balalaika... hmm... sorry for my English =)
ninth
 
Posts: 372
Joined: Fri Jan 23, 2009 9:06 am
Location: Russia

Postby santiago-gamer » Thu Mar 15, 2012 4:50 pm

ninth wrote:santiago-gamer, yes, YABEE can export shapekeys and shapekey animations. Of course, you can control the shapekey procedurally. However, this features still not fully tested, especially in the latest Blender version.


Thanks for the response! :D :D

I'll try this and post here my results. :) :)
Sorry for my english :)
santiago-gamer
 
Posts: 40
Joined: Fri Dec 31, 2010 12:10 am
Location: Uruguay

Postby preusser » Fri Mar 16, 2012 4:42 am

ninth wrote:I mean "Influence" options in the texture tab. You should activate one of them to tell to the YABEE what kind of the texture type is used.

Oh, you mean the check buttons. Don't remember these in Blender 2.4.

I'll try to write something similar to the Chicken docs when I get the time.

So is there any obvious feature the script is missing? This question is for everyone.

EDIT: Hows this? http://www.2shared.com/document/B5sWDMcN/yabee.html
preusser
 
Posts: 516
Joined: Sun Mar 27, 2011 10:07 am

alpha-file textures?

Postby CarlosNovaes » Fri Mar 16, 2012 2:58 pm

Hello!


I found out that if the material has a uv texture changing its alpha property, it does not get exported as an alpha but as an modulation.

So, the same model in blender 2.41 exported by chicken

Code: Select all
<Texture> Material_00_TexColor {
  "./TextureTest241_Color.png"
  <Scalar> alpha-file { "/home/tocha/Downloads/panda3d-1.8.0/GameTry/Models/Fleur/TextureTest241_Alpha.png" }
  <Scalar> format { RGBA }
  <Scalar> alpha { BLEND_NO_OCCLUDE }
  <Scalar> draw_order { 10000 }
  <Scalar> saved-result { 1 }
  <Scalar> envtype { MODULATE }
  <Scalar> minfilter { LINEAR_MIPMAP_LINEAR }
  <Scalar> magfilter { LINEAR_MIPMAP_LINEAR }
  <Scalar> wrap { REPEAT }
}


And from blender 2.62 exported by YABEE

Code: Select all
<Texture> TexColor {
  "tex/TextureTest241_Color.png"
  <Scalar> envtype { modulate }
}
<Texture> TexAlpha {
  "tex/TextureTest241_Alpha.png"
  <Scalar> envtype { modulate }
}


The rendered results are very different, at least its easy to edit the egg file to reflect the results from chicken. As I do not make many models and also I am learning panda3d, I really don't know if this is a very important feature, there are even some issues on chicken.
CarlosNovaes
 
Posts: 7
Joined: Wed Mar 07, 2012 8:33 pm
Location: Brasil

Postby preusser » Sun Mar 18, 2012 2:46 am

I can't even export a model with image texture in 2.62.
And when I try to use the image in the "UV/Image editor" option, I get this:
Code: Select all
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


Also, how to export a mesh double sided?
YABEE doesn't seem to be using the "Double Side" checkbutton located in the "Object data" section of the "Properties" window.
preusser
 
Posts: 516
Joined: Sun Mar 27, 2011 10:07 am

Postby ninth » Mon Mar 19, 2012 12:09 am

CarlosNovaes, so far, the separate alpha texture is not supported by YABEE. May be fixed in future.
You can try to edit an exported model manually, or try to use the 'bake' mode.

preusser seems, that you have an emty image in the UV editor, can you show your model?
As for the doublesided - since Blender 2.60a this option has been moved to the "Blender game" render options and called "Backface culling" (Material settings)
Vodka, bears, balalaika... hmm... sorry for my English =)
ninth
 
Posts: 372
Joined: Fri Jan 23, 2009 9:06 am
Location: Russia

Postby preusser » Mon Mar 19, 2012 7:19 am

ninth wrote:seems, that you have an emty image in the UV editor, can you show your model?

The texture is loaded on a material which the vertices are assigned to. I don't think there's a reason to load the texture image once more in the UV/Image Editor for it to work. But I did even that. The texture is never referenced in the exported egg file.
Though I don't get the error when using the "UV as texture", so I was probably doing something wrong.

My model is not extraordinary: just the default cube textured with a png image I made in gimp. If you want, I can create and send a blend file.

As for the doublesided - since Blender 2.60a this option has been moved to the "Blender game" render options and called "Backface culling" (Material settings)

Where is that "Blender game renderer options" located itself?
preusser
 
Posts: 516
Joined: Sun Mar 27, 2011 10:07 am

Postby CarlosNovaes » Mon Mar 19, 2012 3:12 pm

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
 
Posts: 7
Joined: Wed Mar 07, 2012 8:33 pm
Location: Brasil

Postby ninth » Tue Mar 20, 2012 12:20 am

CarlosNovaes
seens to create multiple animation nodes

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.
https://www.panda3d.org/forums/viewtopi ... 9699#79699

preusser
I can create and send a blend file.

Please, if not difficult )

Image
Vodka, bears, balalaika... hmm... sorry for my English =)
ninth
 
Posts: 372
Joined: Fri Jan 23, 2009 9:06 am
Location: Russia

Postby preusser » Tue Mar 20, 2012 7:02 am

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.
preusser
 
Posts: 516
Joined: Sun Mar 27, 2011 10:07 am

Postby ninth » Tue Mar 20, 2012 11:42 pm

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.
Vodka, bears, balalaika... hmm... sorry for my English =)
ninth
 
Posts: 372
Joined: Fri Jan 23, 2009 9:06 am
Location: Russia

Postby preusser » Sun Mar 25, 2012 2:19 am

ninth wrote:I'm not sure about actions names. As i know, single frames range can contains multiple actions.

I don't understand what you mean.
preusser
 
Posts: 516
Joined: Sun Mar 27, 2011 10:07 am

Postby preusser » Mon Apr 02, 2012 8:50 am

Any news, ninth?
I have something already, if you didn't notice:
http://www.2shared.com/document/jfPo7OPo/yabee.html
preusser
 
Posts: 516
Joined: Sun Mar 27, 2011 10:07 am

Postby heek_ » Fri Apr 06, 2012 5:44 pm

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. ;)). I guess a fix should be commited.

And what's the repository in use now? github or google code?
heek_
 
Posts: 83
Joined: Sat May 03, 2008 7:21 pm
Location: Brazil

Postby heek_ » Fri Apr 06, 2012 11:02 pm

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:
Code: Select all
<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 }
}
heek_
 
Posts: 83
Joined: Sat May 03, 2008 7:21 pm
Location: Brazil

Postby redpanda » Tue Apr 10, 2012 7:58 am

Code: Select all
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

redpanda
 
Posts: 380
Joined: Wed Aug 03, 2011 6:34 am

Postby waufrepi » Tue Apr 10, 2012 3:27 pm

redpanda wrote:
Code: Select all
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?
waufrepi
 
Posts: 7
Joined: Tue Jan 12, 2010 9:28 pm

Postby redpanda » Wed Apr 11, 2012 12:48 am

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.
redpanda
 
Posts: 380
Joined: Wed Aug 03, 2011 6:34 am

Postby willer » Wed Apr 11, 2012 7:18 pm

Code: Select all
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 :(

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

thx and sorry for my english ;)
willer
 
Posts: 10
Joined: Wed Nov 30, 2011 11:06 am

Postby waufrepi » Wed Apr 11, 2012 8:43 pm

willer wrote:
Code: Select all
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 :(

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

thx and sorry for my english ;)


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.
waufrepi
 
Posts: 7
Joined: Tue Jan 12, 2010 9:28 pm

Postby willer » Sun Apr 15, 2012 12:47 am

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
willer
 
Posts: 10
Joined: Wed Nov 30, 2011 11:06 am

Postby preusser » Sun Apr 15, 2012 3:24 am

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:
Image
preusser
 
Posts: 516
Joined: Sun Mar 27, 2011 10:07 am

Postby heek_ » Sun Apr 15, 2012 3:47 am

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
heek_
 
Posts: 83
Joined: Sat May 03, 2008 7:21 pm
Location: Brazil

Postby preusser » Sun Apr 15, 2012 2:51 pm

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.
preusser
 
Posts: 516
Joined: Sun Mar 27, 2011 10:07 am

Postby Niriel » Mon May 07, 2012 4:46 am

Has anyone written a patch to export collision meshes as such?
User avatar
Niriel
 
Posts: 62
Joined: Sun Apr 29, 2012 6:10 am
Location: Groningen, Netherlands

Postby Buttons840 » Wed May 09, 2012 8:03 pm

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: http://wiki.blender.org/index.php/Doc:2 ... on/Add-Ons
Buttons840
 
Posts: 1
Joined: Wed May 09, 2012 7:42 pm

Postby Niriel » Thu May 10, 2012 3:57 am

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 :).
User avatar
Niriel
 
Posts: 62
Joined: Sun Apr 29, 2012 6:10 am
Location: Groningen, Netherlands

PreviousNext

Return to Pipeline

Who is online

Users browsing this forum: No registered users and 0 guests