Model imports from Blender as translucent. [SOLVED]

Hi, I’m still new to Panda3D, but I did the Panda Hello World tutorial and now I’m trying to see how some of my models look in Panda. They are all translucent. They look fine in Blender, so why is this happening? I already tried inverting normals, which seemed to help other people, but it doesn’t work for me. What should I do? Here’s a screenshot:

Just a guess, but check the alpha channel on your textures.
Also check the alpha of the vertex colors of your geometry (don’t know if this is applicable to Blender).

did you, by chance. use the “old” way of doing radiosity on your model? if so your vertex-alpha most likely exported with very transparent values. you can edit the chicken exporter to export all opaque vertex-colors by setting the alpha value to 1 (i belive)

Yes! :smiley: Adding turning on Texface and Alpha for every material works! Shame I have to do it for every object on every model that turns up translucent. :frowning: But I guess it’s worth it. Thanks guys!

EDIT: Wait, this is weird. I have a model that I rigged using the weight-paint method, and in Panda, not only are the changes the Armature is supposed to make not working, but the main part of the body is translucent! :frowning: I turned on ‘texface’ and ‘A’(for Alpha) which worked for my other model, but not this one. :confused: Whats wrong?

EDIT2: Well, using the X file format exports it correctly, but if you forget to copy over the textures the first time, you have to rename the model because Panda auto converts the model and stores it somewhere. :frowning: Basically, my new question is: How do I delete converted models from Panda’s cache? Becaue I can’t find it anywhere. :laughing:

EDIT3: Never mind, I found the cache. But everything gets a coded name that I can’t understand, so I have to delete the whole folder. How can I tell each bam file apart?

In addition to the question above: Is there a way to see the names of all the animations a model has? Because I can’t load an animation without knowing it’s name, and since I can’t export an animation to a separate file, having to use the DirectX file format, I have no idea how to name one myself.

You can try “print actor.getAnimNames()” or even just “print actor”.


The names are stored in the .boo file, in binary, so it must be read by BamCache.

I’ve created a GUI to manage cache :

drwr: When I load the model, I get told the model isn’t a character and “print actor.getAnimNames()” returns [].:frowning: I’m guessing I’m not exporting it correctly. What I do is: Select the mesh and its armature in Blender, then use the DirectX export script and make sure “Animation” is pressed. What am I doing wrong?

And ynjh_jo, even with wxpython, I’m having trouble getting that to work.

It sounds like you’re doing the right thing in export, but I don’t know anything about Blender, so I can’t say for sure.

One way to view the names of the files in the bam-cache is with the command “bam-info” where XXXXXX is the hash name of the index file. (And the name of the index file is contained in the file index_name.txt.) But to empty the cache, you might as well just delete the whole folder; it’s a lot easier than seeking out one particular file.


Okay, thanks drwr, I’ll just delete the whole cache from now on.

Is there any format besides .x and .egg that I can try? Let me add that the .egg has the correct animations, but its translucent, while the .x looks okay, but I can’t get the animations to work.

This is a lot of problems for a project that hasn’t even started yet. :unamused:

Welcome to the world of 3-D graphics, where you will always spend more time than you think you should on things that ought to be simple, like converting models. :confused:

I think you are more likely to find success with the Chicken exporter, which is designed to work specifically with Blender and Panda. The DirectX exporter isn’t. Of course, I don’t have personal experience with either one, so I can’t give you specific advice.

Still, I suspect you’re probably best off figuring out why Chicken is making your models transparent.


Alright, since I made this thread specifically for this problem, I’ll ask here: Why is Chicken making my models translucent, even when I explicitly turn off transparency? And why are only some parts of the same mesh translucent?

once more. i’d guess on transparent vertex color values. check your egg-files and look if there are vertex-colors.
if so,(and if they are indeed indicating transparency) you can simply change the chicken exporter to export the vertex-alpha as opque, instead of exporting the alpha-value found in the model. that’s like changing a single variable to a fixed number in the exporter-code.

I can’t find, within the Chicken settings or it’s source code or the egg file itself, any mention of vertex colors or vertex alpha. Plus, once I explicitly turned transparency off (“Something-something(M-none)”. It was a while ago.), and it was still transparent. I’m really stuck. :cry:

if you use the latest version of chicken (R91) open up the file in a texteditor.
line 1874 should look like this

col = [col.r, col.g, col.b, col.a]

simply change it to

col = [col.r, col.g, col.b, 255]

in case your transparency really is due to vertex-colors. that should do the trick

Sorry ThomasEgi, but it doesn’t work. :cry: It looks exactly the same.

Here’s a screenshot of the model, if it helps. Note that the colored parts and the translucent parts are parts of the same mesh. :confused:

hm. can you provide excerpts from the egg file which contain some vertexdata, and the materials? a blend file which is able to reproduce the problem would be even better, if possible.

Here’s the blend: It’s really shitty right now, but I don’t think I can continue until this problem is sorted out.

ah… now things become a bit more clear. although the textures are missing.
you’r propably not facing a transparency issue. but a draw-order issue caused by transparency modes.
i dunno why it exports like this. but in your egg file you can try replacing the alpha-modes (for me it exports as “BLEND_NO_OCCLUDE”) with a more robust one like DUAL,BINARY or some multisample mode.

Dual makes it looks the same, but Binary makes it even worse(completely transparent but for a few parts). What other modes are there?