Yet Another Blender Egg Exporter (YABEE r13.1)

Return to Pipeline

Postby ninth » Thu Jul 07, 2011 6:09 am

coppertop, fixed UV image bug. I interpreted UV image as the texture, but UV image don't have a flag about the texture's type - i forgot about it.
Also added EXPORT_UV_IMAGE_AS_TEXTURE constant. To disable interpreting UV image as the texture set it to False.
I'll add the 'different files' feature in next revision - it's not too hard. )

drahun can you run Blender from console and inserted here the error message from console?
Vodka, bears, balalaika... hmm... sorry for my English =)
ninth
 
Posts: 479
Joined: Fri Jan 23, 2009 9:06 am
Location: Russia

Postby coppertop » Thu Jul 07, 2011 7:31 am

@Ninth

Thanks, that's great :D.
User avatar
coppertop
 
Posts: 527
Joined: Sat Apr 18, 2009 5:48 am

Postby drahun » Fri Jul 08, 2011 8:12 am

I run blender from command prompt. I try export animated model with the script. This the report:
read blend: D:\test-boks.blend
Traceback (most recent call last):
File "D:\test-boks.blend\blender25_egg_export.", line 889, in <module>
File "D:\test-boks.blend\blender25_egg_export.", line 879, in write_out
File "D:\test-boks.blend\blender25_egg_export.", line 101, in get_full_egg_str

File "D:\test-boks.blend\blender25_eqq_export.", line 86, in get_full_egg_str
File "D:\test-boks.blend\blender25_eqq_export.", line 588, in get_full_egg_str

File "D:\test-boks.blend\blender25_egg_export.", line 579, in get_joints_str
AttributeError: 'NoneType' object has no attribute 'data'

Well? I am not sure if it's what you want to know.
drahun
 
Posts: 26
Joined: Wed Jul 06, 2011 4:12 am
Location: Indonesia

Postby ninth » Sat Jul 09, 2011 11:53 pm

Hm, look like an armature hasn't any bones in the bone dict. What kind of bones type do you use?
---- edit
Ah, no, i was wrong. Error talk me, that object in the Armature modifier == None. Please, check it.
Image
Vodka, bears, balalaika... hmm... sorry for my English =)
ninth
 
Posts: 479
Joined: Fri Jan 23, 2009 9:06 am
Location: Russia

Postby drahun » Sun Jul 10, 2011 8:06 pm

Ah, no, i was wrong. Error talk me, that object in the Armature modifier == None. Please, check it.

You were right. After I check that, I successfully export the model. The texture, the animation, play nice in panda.

can't wait the script possible export more complex from blender.
drahun
 
Posts: 26
Joined: Wed Jul 06, 2011 4:12 am
Location: Indonesia

Postby ninth » Thu Jul 14, 2011 1:50 am

Update. Rev 10.
Changes:
- Models that are attached directly to bone without any modifiers are now exported as part of an animated mesh
http://www.panda3d.org/forums/viewtopic.php?t=11608
- First UV channel is now stored without name to use as default
- Auto-creating subdirs if not exists while writing egg file
- Copying texture images in the specified subdir, relative to the EGG file (not fully tested, may contain bugs - check console output)
- Recording the animation in separate files
- Setting the number of sign after point for store in the file
Vodka, bears, balalaika... hmm... sorry for my English =)
ninth
 
Posts: 479
Joined: Fri Jan 23, 2009 9:06 am
Location: Russia

Postby Anon » Thu Jul 14, 2011 2:31 am

Good progress.
Any plans for glow/gloss/normal/parallax maps support? And Im not sure if it already supports Empty objects?
Anon
 
Posts: 1559
Joined: Thu Oct 29, 2009 3:07 am

Postby ninth » Thu Jul 14, 2011 2:50 am

Any plans for glow/gloss/normal/parallax maps support?

Yes, i'll plan to work with textures type

And Im not sure if it already supports Empty objects?

Any unsupported (including Empty) objects are exported as empty group with transforms.
Vodka, bears, balalaika... hmm... sorry for my English =)
ninth
 
Posts: 479
Joined: Fri Jan 23, 2009 9:06 am
Location: Russia

Postby drahun » Thu Jul 14, 2011 7:05 am

I try to export a character with a bit complex polygon but no armature using YABEE rev 10, and got this: IndexError: tuple index out of range
What's happened? I try with rev 7 and successfully.
drahun
 
Posts: 26
Joined: Wed Jul 06, 2011 4:12 am
Location: Indonesia

Postby ninth » Thu Jul 14, 2011 8:07 am

Please, insert here full error text from console.
Vodka, bears, balalaika... hmm... sorry for my English =)
ninth
 
Posts: 479
Joined: Fri Jan 23, 2009 9:06 am
Location: Russia

Postby drahun » Fri Jul 15, 2011 12:48 am

Okay, here they are:
Code: Select all
found bundled python: D:\MMORPG~2\PROGRA~1\BLENDE~1\Blender\2.57\python
read blend: D:\tempat\Lat-001\models\sarah41.blend
Traceback (most recent call last):
  File "D:\tempat\Lat-001\models\sarah41.blend\yabee.py", line 33, in <module>
    write_out(FILE_PATH, ANIMATIONS)
  File "D:\mmorpg-project\Program Files\Blender Foundation\Blender\YABEE\yabee_l
ibs\egg_writer.py", line 891, in write_out
    file.write(get_egg_materials_str())
  File "D:\mmorpg-project\Program Files\Blender Foundation\Blender\YABEE\yabee_l
ibs\egg_writer.py", line 666, in get_egg_materials_str
    for name, path in get_used_textures().items():
  File "D:\mmorpg-project\Program Files\Blender Foundation\Blender\YABEE\yabee_l
ibs\egg_writer.py", line 622, in get_used_textures
    tex_list[f.image.name] = (uv.name, bpy.path.relpath(f.image.filepath))
  File "D:\MMORPG~2\PROGRA~1\BLENDE~1\Blender\2.57\scripts\modules\bpy\path.py",
 line 53, in relpath
    return "//" + _os.path.relpath(path, start)
  File "D:\MMORPG~2\PROGRA~1\BLENDE~1\Blender\2.57\python\lib\ntpath.py", line 6
22, in relpath
    raise ValueError(error)
ValueError: path is on mount 'E:', start on mount 'D:'
Traceback (most recent call last):
  File "D:\tempat\Lat-001\models\sarah41.blend\yabee.py", line 33, in <module>
    write_out(FILE_PATH, ANIMATIONS)
  File "D:\mmorpg-project\Program Files\Blender Foundation\Blender\YABEE\yabee_l
ibs\egg_writer.py", line 891, in write_out
    file.write(get_egg_materials_str())
  File "D:\mmorpg-project\Program Files\Blender Foundation\Blender\YABEE\yabee_l
ibs\egg_writer.py", line 666, in get_egg_materials_str
    for name, path in get_used_textures().items():
  File "D:\mmorpg-project\Program Files\Blender Foundation\Blender\YABEE\yabee_l
ibs\egg_writer.py", line 622, in get_used_textures
    tex_list[f.image.name] = (uv.name, bpy.path.relpath(f.image.filepath))
  File "D:\MMORPG~2\PROGRA~1\BLENDE~1\Blender\2.57\scripts\modules\bpy\path.py",
 line 53, in relpath
    return "//" + _os.path.relpath(path, start)
  File "D:\MMORPG~2\PROGRA~1\BLENDE~1\Blender\2.57\python\lib\ntpath.py", line 6
22, in relpath
    raise ValueError(error)
ValueError: path is on mount 'E:', start on mount 'D:'

importing obj 'D:\\mmorpg-project\\3d\\Garapan\\Sarah\\n901.obj'
        parsing obj file...
2.8910 sec
        loading materials and images...
        b'D:\\mmorpg-project\\3d\\Garapan\\Sarah\\n901.obj':b'Ke 0.0000 0.0000 0
.0000' (ignored)
        b'D:\\mmorpg-project\\3d\\Garapan\\Sarah\\n901.obj':b'Ke 0.0000 0.0000 0
.0000' (ignored)
        b'D:\\mmorpg-project\\3d\\Garapan\\Sarah\\n901.obj':b'Ke 0.0000 0.0000 0
.0000' (ignored)
        b'D:\\mmorpg-project\\3d\\Garapan\\Sarah\\n901.obj':b'Ke 0.0000 0.0000 0
.0000' (ignored)
        b'D:\\mmorpg-project\\3d\\Garapan\\Sarah\\n901.obj':b'Ke 0.0000 0.0000 0
.0000' (ignored)
2.3120 sec
        building geometry...
        verts:16493 faces:24005 materials: 6 smoothgroups:19 ...
finished importing: b'D:\\mmorpg-project\\3d\\Garapan\\Sarah\\n901.obj' in 7.454
0 sec.
blend_file_thumb failed to create thumbnail: unknown
Traceback (most recent call last):
  File "D:\mmorpg-project\3d\Garapan\sarah41.blend\yabee.py", line 33, in <modul
e>
    write_out(FILE_PATH, ANIMATIONS)
  File "D:\mmorpg-project\Program Files\Blender Foundation\Blender\YABEE\yabee_l
ibs\egg_writer.py", line 891, in write_out
    file.write(get_egg_materials_str())
  File "D:\mmorpg-project\Program Files\Blender Foundation\Blender\YABEE\yabee_l
ibs\egg_writer.py", line 670, in get_egg_materials_str
    if path[2] != 'MODULATE':
IndexError: tuple index out of range
Traceback (most recent call last):
  File "D:\mmorpg-project\3d\Garapan\sarah41.blend\yabee.py.001", line 33, in <m
odule>
  File "D:\mmorpg-project\Program Files\Blender Foundation\Blender\YABEE\yabee_l
ibs\egg_writer.py", line 891, in write_out
  File "D:\mmorpg-project\Program Files\Blender Foundation\Blender\YABEE\yabee_l
ibs\egg_writer.py", line 670, in get_egg_materials_str
IndexError: tuple index out of range
read blend: D:\mmorpg-project\3d\Garapan\Sarah\sarah41.blend
Traceback (most recent call last):
  File "D:\mmorpg-project\3d\Garapan\Sarah\sarah41.blend\yabee.py", line 33, in
<module>
    write_out(FILE_PATH, ANIMATIONS)
  File "D:\mmorpg-project\Program Files\Blender Foundation\Blender\YABEE\yabee_l
ibs\egg_writer.py", line 891, in write_out
  File "D:\mmorpg-project\Program Files\Blender Foundation\Blender\YABEE\yabee_l
ibs\egg_writer.py", line 670, in get_egg_materials_str
IndexError: tuple index out of range
Traceback (most recent call last):
  File "D:\mmorpg-project\3d\Garapan\Sarah\sarah41.blend\yabee.py", line 33, in
<module>
    write_out(FILE_PATH, ANIMATIONS)
  File "D:\mmorpg-project\Program Files\Blender Foundation\Blender\YABEE\yabee_l
ibs\egg_writer.py", line 891, in write_out
  File "D:\mmorpg-project\Program Files\Blender Foundation\Blender\YABEE\yabee_l
ibs\egg_writer.py", line 670, in get_egg_materials_str
IndexError: tuple index out of range
Traceback (most recent call last):
  File "D:\mmorpg-project\3d\Garapan\Sarah\sarah41.blend\yabee.py.001", line 33,
 in <module>
  File "D:\mmorpg-project\Program Files\Blender Foundation\Blender\YABEE\yabee_l
ibs\egg_writer.py", line 891, in write_out
  File "D:\mmorpg-project\Program Files\Blender Foundation\Blender\YABEE\yabee_l
ibs\egg_writer.py", line 670, in get_egg_materials_str
IndexError: tuple index out of range
drahun
 
Posts: 26
Joined: Wed Jul 06, 2011 4:12 am
Location: Indonesia

Postby ninth » Fri Jul 15, 2011 3:37 am

It's not rev 10. Try to download the script again, and fully replace old script.
Vodka, bears, balalaika... hmm... sorry for my English =)
ninth
 
Posts: 479
Joined: Fri Jan 23, 2009 9:06 am
Location: Russia

Postby hawginsck » Mon Jul 18, 2011 12:42 pm

will this work with blender 2.58? I may be using it wrong because when i run the script I get no errors but nothing is exported to my specified location. I'll keep on trying in the meantime. thank you
mellifluous drifter
hawginsck
 
Posts: 4
Joined: Sun Oct 18, 2009 4:34 pm

Postby ninth » Mon Jul 18, 2011 1:56 pm

It's should work with 2.58.
If you used last revision (10), then you may check the console. The script should display the full path where he writed file: "WRITE main EGG to ..."
Also it can be a problem with permissions to the output folder.
You can specify relative path to output egg: './my_file.egg'/ In this case script should write file to the user's home directory, for example 'C:\Documents and settings\user_name\my_file.egg' for XP/2000 or '/home/user_name/my_file.egg' for linux.
And lastly, if you set ANIM_ONLY = True and you have no animated model, then there is nothing to write )
Vodka, bears, balalaika... hmm... sorry for my English =)
ninth
 
Posts: 479
Joined: Fri Jan 23, 2009 9:06 am
Location: Russia

Postby hawginsck » Mon Jul 18, 2011 5:07 pm

works like a charm, I had forgotten to select the object and changed the location to a more sense making one. Thank you very much ! :D
mellifluous drifter
hawginsck
 
Posts: 4
Joined: Sun Oct 18, 2009 4:34 pm

Postby j.edgar » Wed Jul 27, 2011 7:59 am

I can't seem to get yabee 7 or 10 to install in Blender 2.58. If I place it in my addons folder and use ctrl-alt-u it doesn't show up in the list. If I manually install it I get no error warnings but it doesn't appear in my export dialog.

I would just go back to Blender 2.4x and use chicken but it's too deprecated for my current project. Also, using the X format and converting through Panda works but the file size and computational expense makes that method impractical when dealing with complex models.
j.edgar
 
Posts: 24
Joined: Thu Sep 16, 2010 7:18 am
Location: missouri

Postby ninth » Wed Jul 27, 2011 10:06 am

See instructions in first post. I do not do the installation / integration as I continue to make changes to the script.
Vodka, bears, balalaika... hmm... sorry for my English =)
ninth
 
Posts: 479
Joined: Fri Jan 23, 2009 9:06 am
Location: Russia

Postby j.edgar » Fri Jul 29, 2011 5:46 pm

Ninth, would you have any objections to me posting a temporary gui and installer for Yabee rev 10? I made it for my own personal use but I thought others as lazy as myself might be interested.
j.edgar
 
Posts: 24
Joined: Thu Sep 16, 2010 7:18 am
Location: missouri

Postby sukiwater » Sat Jul 30, 2011 7:11 pm

Quick Question: How do we actually use this?
I am a complete newbie and I have absolutely no Blender .egg exporting/script using knowledge in Blender.
sukiwater
 
Posts: 1
Joined: Sat Jul 30, 2011 7:06 pm
Location: Houston, TX

Postby ninth » Sat Jul 30, 2011 11:27 pm

j.edgar, You are free to make any changes and publish them :)

sukiwater, script does not require installation. Just open it in th Blender's text editor and run them
Image
Vodka, bears, balalaika... hmm... sorry for my English =)
ninth
 
Posts: 479
Joined: Fri Jan 23, 2009 9:06 am
Location: Russia

Postby j.edgar » Sun Jul 31, 2011 2:16 am

If anyone wants it, here's a link to a bare bones gui/installer for rev 10.

http://sites.google.com/site/gf4f56d4g6fds4g654fd65g/junkdrawer/Yabee_10_UI.py

Place it in the same folder as 'yabee.py'. In Blender hit crtl+alt+u (or select user prefs from file menu). Select the addons tab and click the install-addons button. Select 'Yabee_10_UI.py" and click the checkbox to enable it.

As you can see below, it's nothing fancy.







Image
Last edited by j.edgar on Mon Aug 15, 2011 9:59 am, edited 1 time in total.
j.edgar
 
Posts: 24
Joined: Thu Sep 16, 2010 7:18 am
Location: missouri

Postby ambyra » Fri Aug 12, 2011 12:27 pm

Change the url to http:// from https:// otherwise no one will be able to download. Good work on the script though!
ambyra
 
Posts: 130
Joined: Sat Sep 20, 2008 5:47 pm

Postby guard » Thu Aug 18, 2011 9:36 am

the latest script (UI) is not downloadable neither with http nor https

could you please re-upload it somewhere in a more reliable place?

UPD: well, worked on 10th attempt
guard
 
Posts: 5
Joined: Thu Aug 18, 2011 3:23 am

Postby ThomasEgi » Sat Aug 27, 2011 6:42 am

first off, great thanks for writing the exporter :) it allows me to finally work with 2.5.

one thing i noticed tho. in the eggwriter. you use a lot of string operations that end up as.. pretty big strings in the end. while this works ok for smaller models, it totaly breaks the export of big ones. trying toexporting a 70k mesh object... well i killed blender after it froze up for more than 20 minutes.
working with not so epic-long strings and writing them out to disk is a lot faster.
User avatar
ThomasEgi
 
Posts: 2149
Joined: Fri Jul 28, 2006 10:43 am
Location: Germany,Koblenz

Postby Manou » Sun Aug 28, 2011 6:30 am

Hey, I was struggling with a model I couldn't export (script error), I had to convert quads to tris to make it work. Maybe it can help you !
User avatar
Manou
 
Posts: 144
Joined: Thu Jun 16, 2011 1:15 pm
Location: France

Postby ThomasEgi » Sun Aug 28, 2011 1:06 pm

ok while.. i poked around a bit, reducing += string operations given those mechanisms http://wiki.python.org/moin/PythonSpeed/PerformanceTips#String_Concatenation
it reduced the export time from 200 to 180 seconds.
appears that the tangent and binormal generation take the lion share and i cant find any 2.59 references for tangent calculation code. altho blender sure is capable on c level as it. so.. until blender wraps up the tanget calc , disregard my performance advice above. btw. respect for caculating tangets and binormal manually.

i would favor a switch to turn tangets and binormal calculation off. Unless one uses normal maps those may not be necessary.
User avatar
ThomasEgi
 
Posts: 2149
Joined: Fri Jul 28, 2006 10:43 am
Location: Germany,Koblenz

Postby ninth » Tue Aug 30, 2011 9:23 am

Thank you for your comments. I was planning to enter the variable to disable the calculation of TBN.
I did not find information on how to calculate the TBN in Blender too, so i had to reinvent the wheel.
btw. TBN is not my merit - I just translated the the C++ code, which i found through Google.

last month I was on vacation and resting from computer =) So, now i plan to continue work with exporter
Vodka, bears, balalaika... hmm... sorry for my English =)
ninth
 
Posts: 479
Joined: Fri Jan 23, 2009 9:06 am
Location: Russia

Postby redpanda » Wed Aug 31, 2011 4:15 am

nice :)
redpanda
 
Posts: 425
Joined: Wed Aug 03, 2011 6:34 am

Postby coppertop » Wed Aug 31, 2011 6:53 am

I've found that Yabee doesn't seem to export vertex colors. Is that correct? And if so, I'd like to make a request for this feature :).

last month I was on vacation and resting from computer =) So, now i plan to continue work with exporter

Welcome back, then :). I can't wait for the new updates.
User avatar
coppertop
 
Posts: 527
Joined: Sat Apr 18, 2009 5:48 am

Postby powerpup118 » Tue Sep 06, 2011 11:08 am

Hi,

Really good work here, I've wanted to upgrade to 2.5 more or less for the gui for a long time now, I'm glad someone managed to create an export script for it!

I've got a bit of a weird problem though, I built an animated character using an armature + armature modifier + weight paint (on 6 different blender nodes/models, ex. left & right feet, hands, body, and tail, are all seperate)

when I export it (with separate animation files on, mind you), I get a strange behavior

Viewing the model in pview, ex "pview pico.egg pico-walk.egg", works perfectly.

However, viewing the model as a simple panda3d Actor class, fails miserably and only shows his right shoe, clearly I want his whole body shown,

This is the code I am using:
Code: Select all
from direct.directbase import DirectStart
from direct.actor.Actor import Actor

print 'For some magical reason, loading the animation as an Actor class, is failing miserably'
print 'and only shows his right shoe, however, try running the following to preview it in pview:'
print '    pview pico.egg pico-walk.egg'

m = Actor('pico', {'startWalk': 'pico-startWalk', 'walk': 'pico-walk', 'stopWalk': 'pico-stopWalk'})
m.reparentTo(render)
m.loop('walk')

run()


I wrapped all of this, minimal textures, code in "err.py", and the egg and blender versions of the model, I am using r10 of the script, there are no errors exporting as far as I've seen, and again, it views perfectly in pview, just has problems in python's Actor class

in this zip file here:
http://www.mediafire.com/?p90t66p55t35m5t
it's < 1mb so you should have no problems getting it, if you need me to upload it somewhere else or email it to you let me know,

I really appreciate any help or clarification on what's going wrong with it :D

~powerpup118
User avatar
powerpup118
 
Posts: 325
Joined: Sat Apr 17, 2010 11:59 pm

PreviousNext

Return to Pipeline

Who is online

Users browsing this forum: No registered users and 0 guests