09th / yabee Goto Github PK
View Code? Open in Web Editor NEWExport models from the Blender to Panda3D game engine
License: MIT License
Export models from the Blender to Panda3D game engine
License: MIT License
May I know how is there references on how to export shape key animation and how to use it in Panda3d? Thanks a lot
Using YABEE on Blender 2.7.4. I've used this to make EGG files of stagnant and animated models before, but today I'm trying to animate a cube to "wave" like water, with the armature looking like the following:
However, trying to export this cube as an animated EGG file is giving a pop up of "export failed, check console for details," and the console showing the following error:
Traceback (most recent call last):
File "C:\Users\...\Blender\2.74\scripts\addons\YABEE-master\yabee_libs\egg_writer.py", line 1719, in write_out
print('Objects for export:', [obj.yabee_name for obj in obj_list])
File "C:\Users\...\Blender\2.74\scripts\addons\YABEE-master\yabee_libs\egg_writer.py", line 1719, in <listcomp>
print('Objects for export:', [obj.yabee_name for obj in obj_list
AttributeError: 'NoneType' object has no attribute 'yabee_name'
This is the first time I've tried to make an animated EGG on this computer, but I've used this add-on on Blender 2.7.4 on other machines to make animated EGG files and have never seen this before.
Any idea what's happening here?
I'll try to dig deeper, but I get this stack trace relatively often:
Traceback (most recent call last):
File "/Users/magregor/Library/Application Support/Blender/2.79/scripts/addons/io_scene_egg/yabee_libs/egg_writer.py", line 1737, in write_out
file.write(gr.get_full_egg_str())
File "/Users/magregor/Library/Application Support/Blender/2.79/scripts/addons/io_scene_egg/yabee_libs/egg_writer.py", line 187, in get_full_egg_str
return ''.join(self.get_full_egg_str_arr(level))
File "/Users/magregor/Library/Application Support/Blender/2.79/scripts/addons/io_scene_egg/yabee_libs/egg_writer.py", line 220, in get_full_egg_str_arr
egg_str.append( ch.get_full_egg_str(level + 1) )
File "/Users/magregor/Library/Application Support/Blender/2.79/scripts/addons/io_scene_egg/yabee_libs/egg_writer.py", line 187, in get_full_egg_str
return ''.join(self.get_full_egg_str_arr(level))
File "/Users/magregor/Library/Application Support/Blender/2.79/scripts/addons/io_scene_egg/yabee_libs/egg_writer.py", line 213, in get_full_egg_str_arr
for line in self._yabee_object.get_full_egg_str().splitlines():
File "/Users/magregor/Library/Application Support/Blender/2.79/scripts/addons/io_scene_egg/yabee_libs/egg_writer.py", line 947, in get_full_egg_str
self.get_polygons_str()))
File "/Users/magregor/Library/Application Support/Blender/2.79/scripts/addons/io_scene_egg/yabee_libs/egg_writer.py", line 939, in get_polygons_str
polygons = '\n' + ''.join(self.collect_polygons())
File "/Users/magregor/Library/Application Support/Blender/2.79/scripts/addons/io_scene_egg/yabee_libs/egg_writer.py", line 912, in collect_polygons
tref(f, attributes)
File "/Users/magregor/Library/Application Support/Blender/2.79/scripts/addons/io_scene_egg/yabee_libs/egg_writer.py", line 740, in collect_poly_tref
if material.use_nodes:
AttributeError: 'NoneType' object has no attribute 'use_nodes'
Trying to export a simple plane I got this error:
AttributeError: 'BlendData' object has no attribute 'scripts'
in egg_writer.py:1097
Changing it from
bpy.data.scripts, bpy.data.shape_keys, bpy.data.sounds,
to
bpy.data.shape_keys, bpy.data.sounds,
fixed that error for me.
I have tried with multiple models (as simple as a cube with two bones) and downloading yabee again from github, but it seems yabee can't recognize scales in animations.
Is this a bug or an unsupported feature?.
Space characters in shape key names break the export (while blender seems to consider them perfectly valid) - at least if the instant preview is enabled since the panda previewer will fail to load the model again due to a syntax error in the egg file.
The exporter should either figure out how to embed space characters in shape key names properly, or if really not possible then at least display a verbose error with instructions to change the shape key name and abort cleanly.
YABEE/yabee_libs/egg_writer.py
Line 642 in 5a9a99b
this line should be:
attributes.append('<RGBA> { %f %f %f %f }' % col[:])
or it returns an error
I know that this plugin is written for Blender 2.5-2.7, but it may be worthwhile preparing for the forthcoming Blender 2.8.
Guidelines on things to be changed: https://wiki.blender.org/wiki/Reference/Release_Notes/2.80/Python_API/Addons
I attempted to make the changes myself, but I can't get it to appear in the export menu.
Hi,
there seem to be some issues with UV-Map export. When a uv-name is exported that contains space(s), panda's egg parser throws a syntax error. You may want to try yourself by exporting the windows of the castle using this blend file: http://blenderartists.org/forum/showthread.php?353711-Princess-Peach-Castle-Demo&p=2758299&viewfull=1#post2758299
Another issue occurs when there are multiple uv-maps specified for the same object. You should see what I mean when exporting the castle or the terrain.
Yabee at rev. 4493206
Blender 2.74
I just tried to export a model (link below), and this is the error I get on the console:
e:~$ blender
connect failed: No such file or directory
read blend: /home/e/Develop/3dhorror/gfx/part1.blend
This is the model causing the error for me: < dead link >
blender 2.72 on Ubuntu 15.04 x86_64 with the egg tools from recent panda3d master revision
(As far as I see, GitHub doesn't seem to allow pull requests for specific commits. So I hope that it's okay that I'm simply creating issues for my commits, and linking to them to reference the changes. >_<)
This commit includes two changes that I feel are somewhat similar, and somewhat connected.
The first change allows the user to export vertex colours with an alpha channel. Since Blender doesn't (as far as I'm aware) support vertex-colours with an alpha channel, this is done by adding a second layer of vertex-colours in Blender, with the "red" channel being interpreted as the "alpha" channel.
The second allows YABEE to export layers from the third onwards (as the second is used as described above) as "aux" layers.
(A quick note: I've used British English in naming the resultant shader-input. I imagine that it would make sense to change this to match the Panda's convention if the changes are accepted.)
Commit reference: ArsThaumaturgis@39e2abf
I just tried exporting this thing,
However, I'm getting this backtrace:
Objects for export: ['Armature']
WRITE main EGG to /home/e/Develop/sh/gfx/girlbaked.egg
Traceback (most recent call last):
File "/home/e/.config/blender/2.73/scripts/addons/YABEE-master/yabee_libs/egg_writer.py", line 1411, in write_out
file.write(ac.get_full_egg_str())
File "/home/e/.config/blender/2.73/scripts/addons/YABEE-master/yabee_libs/egg_writer.py", line 1069, in get_full_egg_str
for line in self.get_skeleton_anim_str(obj_name).splitlines():
File "/home/e/.config/blender/2.73/scripts/addons/YABEE-master/yabee_libs/egg_writer.py", line 1047, in get_skeleton_anim_str
for line in self.bone_groups[obj_name].get_full_egg_str(data, self.framerate, -1).splitlines():
File "/home/e/.config/blender/2.73/scripts/addons/YABEE-master/yabee_libs/egg_writer.py", line 917, in get_full_egg_str
egg_str += ch.get_full_egg_str(anim_info, framerate, level + 1)
File "/home/e/.config/blender/2.73/scripts/addons/YABEE-master/yabee_libs/egg_writer.py", line 892, in get_full_egg_str
bone_data = anim_info[''][self.object.yabee_name]
KeyError: 'root'
(As far as I see, GitHub doesn't seem to allow pull requests for specific commits. So I hope that it's okay that I'm simply creating issues for my commits, and linking to them to reference the changes. >_<)
This allows the user to export vertex colours when no material is present, as long as "force export vertex colors" is checked.
Commit reference: ArsThaumaturgis@9293f80
Hello! I noticed that this plugin does not have a license associated with it. Please consider adding one, as otherwise you retain all Copyrights, which prevents modification and distribution of the code.
When doing the following (no extra steps in between):
.. I get an .egg file with absolute texture paths. Of course that will horribly break on any player's computer. The original .OBJ has relative paths only (I can open it up in a text editor to check the actual source) and the resulting .egg only has fully absolute paths (again verified by opening it with a text editor).
Since this means that all texture references are useless, is there some good way to avoid this?
YABEE doesn't support a feature which I was told in the blender chat is named "split normals".
To test, put up a sphere and then select all edges and set them to smooth, then pick a single pair of connected edges and set to sharp, then enable Object Data > Normals > Auto Smoothing. Sadly, this result won't be exported properly unless you use an edge split modifier - however, that is impossible for export when any shape keys are in the model due to blender limitations I don't understand.
Hi,
I'm trying to play an animation exported from blender ussing YABEE I'm on blender 2.74,
The actor loads ok but when i play the animation the model is deformed
Model.blend
https://mega.co.nz/#!kEgikRxB!CpXRjFL8CgNhO-TmpR7GyNs9x8eyuudc0MKgdzgD6sA
Model.egg
https://mega.co.nz/#!wUwWmKoS!0CMHFLMCR8J58PnKlYAJEqAnkjsMASYtWHa4JVUy6vw
Animation.egg
https://mega.co.nz/#!JVoEXZZa!blL0LiU3aXF0J5JbXH6tdg4PsLMPfWILwDzsqZPagHM
Custom properties are another way (in addition to game properties) to add arbitrary information to objects. With the game engine being removed in 2.80, custom properties will become the only way to get custom data to export as tags. Custom properties also exist in 2.7x, so support can be added in anticipation of 2.8x support.
Now, you might not understand what I mean, but what I'm trying to request is that it would probably be helpful for users like me to export a model that only has the texture attribute instead of having both the texture attribute and the material attribute, which by means that it would be helpful to export a model that only includes the Texture from the Material itself rather than including both the Material and the Texture, now that's an optional suggestion to be honest, but I would really like to see it being an option with YABEE, thanks in advance.
When creating a large level in blender, sometimes it is impractical to assign a new Material for each different texture because you use so many different ones throughout the level.
For this case, blender has a material option called "Face Textures": http://www.homeofjones.de/temp/facetextures.png
When enabled, the texture is simply picked up from the UV assigned texture instead, which means that the Material itself has no texture assigned (or that assignment is simply ignored) but it shows up textured anyway as long as you chose a texture during UV mapping.
With this option, it is possible to use just one or a few materials while still having lots of textures which can save a lot of time because you don't need to create & assign a new material each time you want to use a different texture.
When exporting using blender's .OBJ exporter, this exports as intended. The exporter creates a new "sub material" for each different UV texture used together with a specific material, and assigns it the according texture.
However, YABEE doesn't seem to do this. While it doesn't hurt much for smaller models (like humanoids or small items), it is really bugging me for larger levels I create in blender. Any chance that support for this could be added?
"- Incomplete scene clearing. Whenever we are deleted our temporary scene,
Blender won't to delete other objects, created with the scene, so
we should do it by hand. I recommend to save the .blend file before
exporting and reload it after."
Please fix! Very unintuitive, and I never noticed and now that I checked, I have a lot of scenes but no idea which one was the original one, I can only guess. That is quite bad, what if I mess something up trying to fix this again. The exporter really shouldn't leave such a chaos after exporting!!
Hi,
after following documentation I've successfully exported animation into a file, however in order to use
it in P3D's Actor class I need separate animation files. Is anywhere described how to do that ?
(As far as I see, GitHub doesn't seem to allow pull requests for specific commits. So I hope that it's okay that I'm simply creating issues for my commits, and linking to them to reference the changes. >_<)
This allows an "occluder" or "portal" tag to be specified in Blender, and exported as expected by YABEE.
Commit reference: ArsThaumaturgis@bb89373
I try to export a 3D model with YABEE and I select "Bake" for the texture processing, the export breaks and the following is outputted in the console
Read new prefs: /home/bkeys/.config/blender/2.78/config/userpref.blend
BlenderExporter directory blenderExporter
Bam-Exporter: Loading Exporter ..
Bam-Exporter: Loading PBS ..
Bam-Exporter: Loading PBSEngine ..
read blend: /home/bkeys/Devel/Media/Porsche919HybridDLC/Porsche919HybridDLC_bake.blend
read blend: /home/bkeys/Devel/Media/assets-dmux/chassis/Porsche/Porsche919HybridDLC.blend
Objects for export: ['data']
WRITE main EGG to /home/bkeys/Devel/Media/Porsche919HybridDLC.egg
ID user decrement error: MAVehicle_Exterior_.002 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_.002 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_.002 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_.010 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_.010 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_.011 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_.011 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_.011 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_.011 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_.011 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_.011 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_.011 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_.011 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_.011 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_.012 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_.012 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_.013 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_.013 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_.013 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_.014 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_.015 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_.015 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_.016 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_.016 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_mm_b.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_mm_b.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_mm_b.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_mm_c.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_mm_c.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_mm_c.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_mm_c.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_mm_e.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_mm_e.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_mm_e.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_mm_e.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_mm_l.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_mm_l.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_mm_m.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_mm_m.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_mm_m.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_mm_m.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_mm_s.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_mm_s.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_mm_s.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_mm_s.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_mm_w.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_mm_w.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_mm_w.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Exterior_mm_w.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Interior.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Interior.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Interior.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Interior.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Interior_.003 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Interior_.004 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Interior_.004 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Interior_.005 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Interior_.005 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Interior_.005 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Interior_.005 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Interior_mm_e.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Interior_mm_e.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Interior_mm_e.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Interior_mm_i.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Interior_mm_i.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Interior_mm_i.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Interior_mm_m.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Interior_mm_s.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Interior_mm_w.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Interior_mm_w.001 (from '[Main]'): 0 <= 0
ID user decrement error: MAVehicle_Interior_mm_w.001 (from '[Main]'): 0 <= 0
ID user decrement error: ME919DL.001 (from '[Main]'): 0 <= 0
ID user decrement error: ME919DR.001 (from '[Main]'): 0 <= 0
ID user decrement error: ME919int.001 (from '[Main]'): 0 <= 0
ID user decrement error: ME919SW.001 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_DOOR_LEFT_D.005 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_DOOR_LEFT_D.006 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_DOOR_LEFT_D.007 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_DOOR_LEFT_D.008 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_DOOR_LEFT_D.009 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_DOOR_LEFT_DAMAG.001 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_DOOR_RIGHT_.003 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_DOOR_RIGHT_.004 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_DOOR_RIGHT_.005 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_DOOR_RIGHT_DAMA.001 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_FRONTBUMPER.000 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_FRONTBUMPER.001 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_FRONTBUMPER.005 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_FRONTBUMPER_DAM.001 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_HEADLIGHT_L.000 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_HEADLIGHT_L.005 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_HEADLIGHT_L.006 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_HEADLIGHT_L.007 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_INT_DOOR_LEFT_m.001 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_INT_DOOR_RI.001 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_INT_GLASS_C.003 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_INT_GLASS_C.004 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_INT_GLASS_C.005 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_INT_GLASS_CRACK.001 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_REARBUMPER_.001 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_REARBUMPER_DAMA.001 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_TAILLIGHT_L.000 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_TAILLIGHT_L.005 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_TAILLIGHT_L.006 (from '[Main]'): 0 <= 0
ID user decrement error: MELOD_A_TAILLIGHT_L.007 (from '[Main]'): 0 <= 0
ID user decrement error: MEP919H.002 (from '[Main]'): 0 <= 0
ID user decrement error: MEP919H.003 (from '[Main]'): 0 <= 0
I am unsure if I am doing anything wrong or if there is a bug in YABEE.
I suggest moving the current documentation format (YABEE_HowTo.odt and YABEE_HowTo.pdf) to markdown for convenience reasons.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.