Yet Another Blender Egg Exporter (YABEE)

Cool. I just tried exporting again. This time I left out the glow and spec and it shows the diffuse correctly now, but I don’t see any sign of a normal map being applied in pview (I pressed ‘l’ to show lights and still nothing but the color map). Does the pview not support normal maps?
Sorry, ignore the greyed out bit, didn’t realize you had to turn on per-pixel lighting :blush:

Also is there a way I can apply the spec and glow map after I use the yabee.py to export the .egg?

Thanks,
~B-Man

You have to also press ‘p’ in pview to enable per-pixel lighting for the normal maps.

David

Thank-you, didn’t realize I needed to turn it on :laughing:.

I have another question that may be out of the scope of this thread, but: How do you add collision surfaces to the models? Is there a special naming convention for the meshes so that they turn into collision surfaces upon export?

Thanks,
~B-Man

At the moment, are not exported envtypes. I’m working on it. ) For your particular case needs to be written envtypes by hand. Like this:

<Texture> Spec {
  "/c/Projects/eggTests/Panel_Spec.png"
  <Scalar> envtype { GLOSS }
}

<Texture> Emitter {
  "/c/Projects/eggTests/Panel_Illum.png"
  <Scalar> envtype { GLOW }
}

<Texture> Diffuse {
  "/c/Projects/eggTests/Panel_Diffuse.png"
  <Scalar> envtype { MODULATE }
}

<Texture> Normal {
  "/c/Projects/eggTests/Panel_Norm.png"
  <Scalar> envtype { NORMAL }
} 

Awesome! Thank you very much! :smiley:
I’ll give this a shot.

~B-Man

As for collision, you need to add " { type }" entry into . Object types described in the Confauto.prc file. Simply set type to barrier to get invisible collision mesh. Also you can add your own type in Confauto.

Rev 11 for Blender 2.59

  • Fix matrix*vector operations for use with Blender 2.59
  • Add vertex color export
  • Add variable to switch tangent space calculation: inner calculation; calculation through egg-trans; disable TBS
  • Change texture export.

I could not appropriately reproduce the Blender’s texture blend types to Panda’s envtypes, so I split texture exporting into ‘SIMPLE’ and ‘BAKE’ modes, and added varable to switch it.

‘SIMPLE’ - export all texture layers as MODULATE.
Except:
use map normal == NORMAL
use map specular == GLOSS
use map emit == GLOW

‘BAKE’ - bake textures depending on the BAKE_LAYERS dictionary settings. It’s untested “voodoo magic”, so I advise to save your model before using this option :slight_smile:
Also the glow and the gloss textures are baking into the b/w intensity map, but Panda used alpha for this texture types, therefore you need to convert black color into alpha after exporting.

Sorry for the noob question, but how do I run Rev11?

I tried pasting yabee.py into the text editor, but then it can’t find the other files.

Is there some blender guru incantation I am leaving out? :stuck_out_tongue:

Instead of pasting it, go into Text -> Open Text Block and load the file from there.

Thanks, works perfectly now. :slight_smile:

This is the bone roll problem I’ve been having. Has anyone else had this problem with animated meshes?

The bone roll property in bone edit mode affects the animation when I export to egg. If the roll isn’t what the exporter expects, the animation is twisted, with limbs in the wrong directions. Here’s a file that explains, with blend files and egg animations. There is a text in the zip that describes how to recreate the problem.

sites.google.com/site/ambyra/all/boneRoll.zip

a copy if the first doesn’t work.
mediafire.com/?azh0cfb4fhc9i2b

great job!

however, i met a problem when trying to export the blender file into egg format. The problem especially occurs for the duplicated models.

for example, I have a cube, which can be exported correctly, then I duplicate the cube with alt+D or shift+D, then try to export them both or one of them, there is always a script error.

Here is the error message:

[size=75]File “//home/aqu/.blender/scripts/YABEE 11/yabee_libs/texture_processor.py”, line 189, in bake
img_path = paths[key]
KeyError: ‘Sphere.001_gloss’[/size]

BTW, if you rename the duplicated model then export it, it probably will success sometimes.

Ok. Thanks, i’ll check this.

hi ninth,

there is another problem with the exporter: it does generate the normal map image correctly but the normal map does not have any effect in pview. (i just roughly test it in pview with l and p)

ambyra
You have used rev 9.1. Try to use 10 or 11. I think I have fix this bug in the last revision.

aquCHAOS

  1. I can’t to reproduce the bug with duplicate object. Can you make a .blend example file?
  2. Try to disable Glow export - the normal map effect can overlapped by the glow.

Hi!

Im having a problem using YABEE.

i get a Python script error when i try to run the script. But nothing shows up in the Console, and the output’d egg file is occasionally empty, or just says: { Z-up }

(just scroll down to get past the useless thumbnail)

Im using,
YABEE rev 11
Python 1.6.5
Panda 1.7.2
Blender 2.59

To see anything in the console, you should run Blender from the console (windows command prompt in your case).
Win+R -> cmd
Please, try it an see what it says.

Hello :wink:
I have an error when I try to run the script with a basic cube.

Im using,
YABEE rev 11
Blender 2.59 64 bits

Heres the printout

C:\Coding\Games\Tauris\lib\data\shapes\cruiser0.blend
RELOADING MODULES
PATH C:\Program Files\Blender Foundation\Blender\backup not exist. Trying to mak
e path
WRITE main EGG to C:\Program Files\Blender Foundation\Blender\backup\cruiser0.eg
g
Traceback (most recent call last):
  File "C:\Coding\Games\Tauris\lib\data\shapes\cruiser0.blend\yabee.py", line 89
, in <module>
    BAKE_LAYERS)
  File "C:\Users\owner\AppData\Roaming\Blender Foundation\Blender\2.59\scripts\a
ddons\yabee_libs\egg_writer.py", line 1008, in write_out
    file.write(get_egg_materials_str())
  File "C:\Users\owner\AppData\Roaming\Blender Foundation\Blender\2.59\scripts\a
ddons\yabee_libs\egg_writer.py", line 914, in get_egg_materials_str
    used_textures = tb.bake(BAKE_LAYERS)
  File "C:\Users\owner\AppData\Roaming\Blender Foundation\Blender\2.59\scripts\a
ddons\yabee_libs\texture_processor.py", line 158, in bake
    assigned_data = self._prepare_images(btype, params[0])
  File "C:\Users\owner\AppData\Roaming\Blender Foundation\Blender\2.59\scripts\a
ddons\yabee_libs\texture_processor.py", line 113, in _prepare_images
    active_uv_idx = obj.data.uv_textures[:].index(active_uv)
ValueError: None is not in list

Gatou, Alviss
Fixed. I have update archive. But error was caused by a lack of UV layer, so to see the textures on your model you steel should unwrap UV.