materials show in pview but not in panda3d

So I got panda3d all installed and ran all of the samples. Yay!

Then I went over to blender and made a “dude”
VERY crude low-poly person model, and mapped some basic color textures to the faces of the dude. Basically blue for pants, red for shirt, brown for shoes, etc… I even animated him with a few basic actions.

So I get Chicken all installed, and finally figure out how to export the character and his animations. All is well.

So I load him up in pview, and he is textureless… I have to hit the ‘l’ (L) key to turn on lighting, I guess… Now he looks fiine, and his animations even play in pview. Cool.

Now I take the tutorial from the manual, where you load up the little clearing in the jungle, rotate the camera around it, and put the panda bear in it walking back and forth… And I basically remove the reference to the panda model and instead reference my simpledude model (and animation) instead. After a little bit of fumbling around, I got him scaled and positioned correctly, and he shows up, doing his little walk animation. Life is mostly good.

Now here is the problem:
The guy has no textures. He’s just “white” (er whatever shade textureless is --some sort of light grey) There’s no “L” key to turn on lighting (duh). It occurs to me that I probably have to install a light in the scene…

  1. Will just installing some light in the scene (that shines on the dude) make his textured faces show up?

  2. Why does the environment appear in color, and when you load the panda model it appears in color, without hitting the L key in pview?

  3. Should I have done something in blender, or in chicken to ‘relight’ the guy before or during export time?

  4. Am I missing something else really obvious?

This is my first post to Panda, and i’ve dinked around with some other engines before, but i’ve been extremely pleased with how quickly i’ve been able to pick up and implement panda. Really, it was just a few hours from starting the install to having my own animated mesh created, exported, loaded up and somewhat displaying. (and most of that time, I think, was dinking around in Blender, making the model, and figuring out how to get it exported) outstanding!!!

Thanks!

oooh…
Windows XP
Panda3d-1.5.2
PyPE-2.8.8
chicken_export 1.0
Blender 2.45
Python looks like it’s 2.5

Thanks again!

If the colors don’t appear until you turn on lighting, it means the colors have been implemented via a entry in the egg file, rather than via entries on each polygon.

The entry creates a MaterialAttrib, which defines the color in the presence of lighting. This allows for greater flexibility in the color definition–you can define the diffuse color, the ambient color, the specular color, and so on–but all of this only makes sense in the presence of lighting.

There might be an option in the Chicken exporter to create egg files with plain old entries instead of entries. I know little about Chicken, however.

In the meantime, enabling a light in the demo is easy to do, and will make your character appear colored. You probably want a light anyway, if you haven’t painted any UV mapped textures for him, since without a light he will be pretty flat and featureless.

David

Thanks, that makes plenty of sense…

I’m not sure I see any way to make blender/chicken export without the material tag, but like you said, that’s largely irrelevant later on…

Is there another tool that “most” people are using to model that do this?
Maya maybe?
Others? Free/cheap ones?

Seems like procedural creation would probably do it as well, but I haven’t tried that just yet.

Did you try putting ambient lights?

It Solved my problem of textures, and btw I use Blender w/ chicken export, works well.

Hmm… How did you map the textures in Blender? Did you use the automatic material system (as accessed by the little ball icon in the “Buttons Window”, or did you use the UV editor and an image? If the former, then try the latter (select “UV edit mode” in the mode menu of a 3D view in older versions, or simply enter edit mode in the latest version, at least - either way, also set another view to show the UV/Image Editor view).

As I recall, I’ve successfully exported textured objects from Blender whose textures showed up without lights, and did so using UV-mapping with images applied to the models.

Oh, and if you want to use Blender’s procedural material generation, I seem to recall that you can bake the results to a texture, although you may find that a little cleanup is called for at the edges (although this may have been improved since last I used that feature).

I just use the UV/Image editor with images, in edit mode, it’s quite simple to undertsand, but I recommend reading on the internet and the Panda manual on textures first, it will help alot.

Specifically, if I may recommend the Wikibook Blender 3D: Noob to Pro. I don’t recall the quality of its UV section specifically, but I seem to recall that I’ve found it to be quite useful in general. :slight_smile: