Yet Another Blender Egg Exporter (YABEE)

This is awesome! You’ve addressed precisely the issues that bugged me the most when using YABEE. Thank you so much for your work!

Especially if I have a flamethrower )

Meantime I playing with Blender this way and that and came to conclusion, that it can ((?)should) become a map editor for Panda. Blender has own game engine and therefore has many settings and features relating to games.

So what I want to say, I already have some experimental results - very basic, but something better then nothing. I think in nearest future I can show it here.

Ok I am just getting back into using Panda3d after years away. I am also a blender 3d user. I have blender 2.72 installed on a Window7 64 bit Home Premium machine.

I would like to comment on the installation process of yabee.

If you click on the link mentioned in this first post to get to github you will see this screen:

If you click on the button that says “Download Zip” You will be asked to download a file called YABEE-master.zip
Alternately you could just click on the link in the first post of the thread and you will directly download YABEE-master to your computer.

Now here comes the confusing part and the reason that I am writing this post.
If you double click YABEE-master.zip you will see that inside the archive is ANOTHER folder called YABEE-master. Extract that folder to a location that you can remember and can get to. If you are using windows then I would reccomend extracting it to your desktop. After extracting you can delete YABEE-master.zip or just keep it as a backup.

Double clicking the YABEE-master FOLDER you will see the following: a folder named yabee_libs, Two python files name init.py and yabee.py
a pdf file named YABEE_HowTo.pdf An ODT file name YABEE_HowTo.odt, A text file named release.txt, And a file named README.md

If you read the odt file or the pdf file the second paragraph says “You can install YABEE in two ways.
The first way: unpack io_scene_egg into <blender_dir>/<blender_version>/scripts/addons.
Run Blender.” That is WRONG and probably from and older version of the documentation that has not been updated.

the problem is that there is not io_scene_egg folder in that folder or in the zip file. You have to navigate to the blender addons directory and create a folder named i0_scene_egg. Once you do that copy init.py , yabiee.py and the yabee_libs folder to the io_scene_egg folder in the blender addon directory. Then open blender and add the addon thru the user preferences dialog just as it says in the two YABEE_HowTo files.

I know some of you panda3d geniuses and programming verteran and even programming neophytes might thing that these instructions are obvious. But while it might seem obvious to you it might not seem obvious to everyone. It is better to be clear and explicit then to have to answer the same question multiple times becasue you thought something did not need explaining. This would have avoided Thor’s question a few post above this one.


1 Like

In the latest commits I removed dependency from ‘io_scene_egg’, so you easily can point to downloaded YABEE-master.zip in the Blender’s “Install from file” dialog. You can also use drag-n-drop to put YABEE-master directory from opened zip file directly to addons directory.

Please, tell if this does not work in your case.

And yes, documentation is outdated a bit.

Hey ninth! I’ve got another patch for you.

It seems that a common mistake is that people leave the texture coordinate mapping to the default, “Generated”, instead making an UV map. So, this patch actually adds support for “Generated” texture mappings. It does this by automatically generating an UV set called “ORCO” that contains the computed texture mappings when it detects that at least one of the textures is set to “Generated”.
Only the default “Flat” projection is supported so far.

It’s a patch created by “git format-patch”, you should be able to apply it with “git am”. Thanks!
0001-Automatically-calculate-Generated-ORCO-coordinate-se.patch (4.88 KB)

Thanks! Pushed.
I even did not thought that generated texture mapping can be reimplement in exporter, I belived that it should be done by engine or something so ). Please share if you have links on material about different Blender’s texcoord algorithms.

I first considered adding an object-relative TexGen mode to Panda3D, and I talked about it with David. The issue here is that in Panda, it’s not really well-defined what “coordinates relative to the object” means - to the GeomNode? To the root of the model? And it would break as soon as you try to flatten something, since suddenly the coordinates would be in a different coordinate space. (This is why we have texture projectors, so that we can clearly define the coordinate systems of the texture coordinate generation.)

Also, the “Generated” mode algorithm is awfully specific to Blender. It stretches the texture across the model’s bounding box, and while that can be useful in a few cases, I don’t think it is generic enough to warrant adding it as a specific mode to Panda. That’s why I think that for this mode, generating the coordinates at export time is the best option. (I think “Generated” is also one of the only modes where the coordinates remain constant even if you move the model around or change the camera angle, so it’s one of the few modes where we can do this.)

For most other modes, it makes sense to do it in Panda. We do implement the “Global” mode already (which YABEE already exports). Other modes, like “Window” and “Object” can be implemented using specific TexGen modes or texture projectors in Panda (although we don’t have a syntax for texture projectors in .egg yet), but I don’t think the other modes are used as often and therefore it’s probably not worth it to spend too much effort on it.

Thanks for pushing. )

Hi i want to thank you for your work and i forked yabee in github because i needed some function that probably only i find useful, so i hope you don’t mind

Is there a way to get YABEE to mark a node as a “” or “” node on export?

I have some models that contain parts which I want to be able to search for at run-time, even after flattening, and, while I believe that I can use egg-optchar for this purpose, it would be convenient to be able to assign these tags in Blender.

I created an Empty in Blender, exported it to .egg, opened it in pview, and pressed shift+L: the node was still intact. In what scenario does the lack of DCS tag create a problem, I wonder?

If the lack of the tag doesn’t create problems, then is it vestigial?

I suppose that I’m acting under the impression that using “Model” or “DCS” nodes is the “correct” way to preserve nodes against flattening, and that the use of empties is a work-around for a (presumed) lack of exportation support in YABEE. It also seems a little cleaner than proliferating empty nodes, even if only a few.

OK, sorry - I thought that by “flattening” you meant the flatten that was being done on .egg load, which isn’t as aggressive as flattenStrong(). In particular, it doesn’t combine siblings unless they are within a certain distance of each other (set by egg-flatten-radius, default is 0).

The or node is there to preserve nodes across even a flattenStrong() operation. You can add a DCS or Model tag to your node by going to the Logic panel, creating a String Game Property called “ObjectType”, and setting it to “model” or “dcs”.

You can of course also just add the appropriate or to your custom object type definitions in your .prc file.

For the sake of clarity, I was referring to the flattening that’s done when creating a distributable build via packp3d (I think that it was in this step that I saw it). I’m honestly not sure of which form of flattening that is.

Ah, I see–thank you for that clarification! :slight_smile:

(Even if the flattening done during a build is the light form, I’ll probably still add those tags: it’s important to me that these nodes be searchable, so I want to be confident that any flattening applied will skip them, even if parameters are changed.)

Ah, thank you–that seems simple enough! :slight_smile:

Those are interesting… That feature seems familiar, but if so then it seems that I had completely forgotten it! A bit of quick searching informed me, however; it might well be worth considering. Thank you again! :slight_smile:

Good day all. I have a question about the YABEE exporter that I hope someone can answer. I am trying to do little tests to see what I can export, unfortunately I don’t understand how to properly export shape key animations. :blush: They don’t play in pview and I am not sure if I have to manually control them in panda3d itself. I can do armatures and driven bones but shapekeys of every sort I kind of just don’t get. I think I read somewhere about using control joints and I was just wondering if this was what I needed to do. Any info would be helpful. Thanks :smiley:

Shells

I’ve attached archive with example. It contains the .blend file and the exported .egg
Here you can see how to do animate with shape keys in Blender:
oneminutevideotutorials.com/anim … lender-3d/

If you wish to manually control shape keys in Panda you should do something like this:

myKey = myActor.controlJoint(None,"modelRoot", spapekeyName)
myKey.setX(myVal)

shapekey.zip (68.7 KB)

If you have created several actions and you just want to export one I have found that YABEE exports the one that is currently selected and displayed in the Action Editor window.

Is it possible to export the ‘sum’ of several Actions, ie the net effect of multiple Actions?

Also, if you export an animation within the main egg file, along with the model geometry, then pview will only recognise the animation if you give the animation the same name as the Object that is being animated.

In the latest YABEE there is an option to export every action as a separate animation, rather than only exporting ranges from the active action.

I’m not really sure if I understand your use case. Do you mean to blend multiple animations together that play simultaneously?

Not if you run pview with the -i option (which is what recent YABEE versions will do automatically if exporting animations inside the model file).

rdb, thanks for the reply regarding Actions and Yabee. I now see that I was using an older version of Yabee. I updated to master.zip from github and there is indeed now an option to export “All actions as animations”. I was using YABEE_r13_1_b266 and I had seen nothing suggesting that Yabee had progressed beyond version 13.1. Where is it made clear the current version number? I have looked at page 1 of this thread and the Github Yabee page and within the major files inside the yabee .zip and so far found nothing that gives a version number past 13.1.

My other question was regarding the use of the NLA but I am now happy: it seems that when I use the NLA to blend two Actions together, Yabee exports the resultant combined actions as just one egg animation, which is what I wanted. (unless I tick the “All Actions as animations” box, which then exports each action as a separate .egg) It seems that Yabee detects the use of the NLA and then defaults to exporting from the main timeline rather than whichever Action is active in the Action Editor.

Somehow a model exported from Blender is rendered glossy in pview. It looks like it’s in a plastic doll, which is not how it should look like.

In the YABEE export options under Tex. Processing I choose the Bake -method, and ONLY export Diffuse! But even then, the model is rendered glossy via pview when light is enabled (with the L button). If light is not enabled, the model looks fine.

I thought that if I do NOT export Gloss, then the model should be rendered matte in pview. But how is it rendered glossy now? Can somebody please explain how can I make it render matte? What did I do wrong in Blender?

Second problem is that the Simple -method in Tex. Processing does not work at all! If I use this method, most of the surface textures are rendered black. I do not know why this is, might be something wrong with the exported model, and I would like to know what it is. Can somebody also figure out why does the Simple -method not work in exporting?

The model I used for this specific text is imported from FBX, which was generated by the Mixamo online service. I use this service because I’ve absolutely no modeling experience, and I want to get started learning via a decent base model. I also imported 2 actions from animation FBX files. In Blender the model looks just fine, renders fine (via Blender Render), animation works, no problems. Problems only manifests in pview after exporting to egg.

Blender version is 2.78
YABEE version is 13.0
The .blend file I export from is available here: drive.google.com/open?id=0B3u1M … ERaWnZocVU

This all comes from the material settings. If you have to gloss map, it is equivalent to having a completely white gloss map, I believe.

If you want to give a model no specular reflection at all, you need to set its material’s specular color to black. If, however, you just want it to be less shiny, you should reduce the specular hardness.