Need advice on blender+panda

Hi (newbie here :blush: )

I’ve choosen blender to create my models to use in panda. I would thank blender+panda users on this forum if they gave me some advice on the best ways of exporting .blender to .egg and more important stuff I should know before I learn it the hard way.

Blender 2.4.2
Panda 1.3.2

The two ways of export I’m testing are:

  • exporting to .x and x2egg
  • chicken 1.0c python script


the chicken exporter is quite fine =) so if you dont have special need for x files you’r ok with “chicken’s eggs”

a few thing you should whatch out for are:
–>textures per mesh are limited (depends on the graficcard (between 1 and 128(on next-gen graficcards) usualy between 4 and 16)
so if you use more textures try to seperate the objects in blender (select the parts in editmode and press “p”. you can still export the several single parts as one model).
–>assign textures with the uv editor and leave the material settings empty (form my experience it’s simple and good)
–>dont reparent armatures(skeleton witih bones) to meshes or the other way round. use the modifiers instead. if you dont do your animation will be messed up

well this is what i figured out =) hope it helps.

Thanks for quick help :smiley:
I’ll use chicken as it’s easier too.

I have a couple of questions though,

  • I lost subsurfing in the exporting process, is this normal ? There is some way to get the cool rounded faces in the .egg file?

  • To make things error-safe I’ll keep 1 texture per object but most of the time I won’t need a whole image texture but just a coloured material. Here the exporting doesn’t seem to work because in pview my model results colourless white. I think you can make textures that are just colours, so this would work, do you colour things this way?

In Blender, select your model and press Alt-C. This converts the subsurfed model into a mesh. If you export your model now, you get all the faces you see in the view.

Yeah, now I can keep the subsurfing in the .egg, thanks.

Now I’ll be trying the things that I wrote concerning model colours.

Merry Christmas!!

you can use small textures (remember they need to be a power of 2 , so setting up a small color-table-like texture works quite fine)
for colors you could use the vertex-colors =) you can paint them in blender (verte-paint-mode). subsurf works on vertex-colors,too.

note- if you use armatures to animate your model AND have a sub-surf modifier apply the modifier in the modifier-tab instead of pressing alt-c. (not sure but it could happen that you apply the deformation of the modifier to the mesh if you use alt-c and you most likely dont want this to happen)

About materials not showing up, this is because Panda only shows materials when there is lighting. If you press L in pview you should see the exported materials.

A few more things about colors:

  • pview + LKEY lets me see materials, a pity that the material doesn’t show up when called within panda

  • my dummy model consists in legs (object 1) and arms+torso (object 2)
    when I use vertex color in object 1 it works in panda, but when I use it on both the exported model only show colors of object 1. By the way, coloring the vertices this way inserts in the .egg file a huge list of vertex-rgb color just to say

  • I have still not tested very much the 2x2 texture way, I think it could be more efficient, but I feel putting color in objects and keep it in the .egg should be as easy as it sounds.

So . . . How do you actually do what I want to do? I have tons of characters and buildings to model and I would want to make a start fair and square.

Thanks also for advice about animation, I think I’ll ask more about that when I reach that stage.

Materials show up in pview with the L key but not in Panda because surely you haven’t set up lighting in Panda. Check out a few of the samples for details on how to do that.

Today I tried the mini-texture files and it does work, I think I will stick with this method as I’m a bit fed-up with all this color stuff.

I didn’t found detailed examples useful to me, but I think not showing materials it’s not due to the lighting. For testing purposes I used the ralph roaming code included in panda release, just adding my object in the middle of the environment, sometimes with color (using mini-textures or single material exports) sometimes in plain white, but I never changed the lighting (I think there is any at all) and the other pieces of scenery look normal.

Likely I’ll start to mess with animation from now on. However, show me a blender model with colored materials looking good in panda after exporting with chicken and I’ll be happy to try it

I speak from experience; I had the same issues that you are having with materials and I wrote the exporter. If you want to see an example of models with materials that actually show up within Panda check out my site, where I have a couple of screenshots of a Pacman prototype I made; one of them shows every model in the scene with several different materials. Note that the version of the code that’s on there doesn’t work with the latest Panda (if anyone wants a fixed version, just ask and I’ll upload one), but my point stands, materials work only when proper lighting has been set up.

By the way, what do you think the L key does in pview? It sets up a basic lighting scheme.

The Roaming Ralph sample is not a counter-example to what I’m saying about materials because none of the objects in that sample have lighting or materials, just textures (which are separate concepts in Panda).


I copied the lighting code from another tutorial and the colors finally worked. Now I’ll try to animate things