Hi everyone, first, I’d like to thank both the creators of Panda3d and the people who keep on improving it in any way, be it generating scripts or modifying the source or helping others to learn to use it.
This issue has probably been addressed multiple times, but I’ll ask it for this specific case. I’m using Blender 2.69 and YABEE r13.1 for blender 2.66, because it is the latest written exporter. In order to make a game I first want to ensure that all is well; that is, that I can:
- Export textured models that are static.
- Export textured models that are animated.
That is really all I ask, because the rest, viz programming, particles, collisions, physics, sound and networking are handled in Panda3d once the models have been imported. So those two things are really crucial in order to develop a smooth working pipeline.
That said I want to get done with it once and for all and to always use a pipeline that’ll work. Onto the issue, which at first handles loading static models:
-I have modeled using makehuman and some modifications in blender, a simple goblin/golemn character and applied a pinkish texture to it. I want to import it with the texture, to an .egg file. When I try importing it without the texture, everything works fine, except that it is white in color. I know how to change it’s color, this would be the code:
self.m=self.loader.loadModel("plain.egg") self.m.setColor(0.6, 0.6, 0.6, 1.0) self.m.setColorScale(0.6, 0.6, 1.0, 1.0) self.m.reparentTo(self.render)
The imported model is not shown when I do this. However, commenting the lines that set the color out does show the model, except it is just white:
self.m=self.loader.loadModel("plain.egg") #self.m.setColor(0.6, 0.6, 0.6, 1.0) #self.m.setColorScale(0.6, 0.6, 1.0, 1.0) self.m.reparentTo(self.render)
That shows the model, but white, because it has no color or texture set. Working with another model, modeled purely in blender and changing it’s color does work, however:
self.m=self.loader.loadModel("flowers.egg") self.m.setColor(0.6, 0.6, 0.6, 1.0) self.m.setColorScale(0.6, 0.6, 1.0, 1.0) self.m.reparentTo(self.render)
That properly colors the model that would have otherwise been white. So my first question is, why is this so? I have attached both models, the first one called “plain.egg” and the second one called “flowers.egg” onto this post. I have also attached the original .blend file for “plain.egg”, it’s called plain.blend. If someone could take a look at this, export it and try changing it’s color and telling me where something is going amiss that would be really helpful.
The next question is one of texturing. This doesn’t work at all. I’ve attached the textured .blend file, called FACE.blend along with the texture file called textf.png. Trying to export it, even using the “baked” option doesn’t yield anything. If someone could take a look at this file and export it with the texture to a .egg format and tell me the instructions to follow, that would be really nice.
Seeing as this is really the only issue with Panda3d, the problem when it comes to generating the actual models to be used in the game, once done, then everything, in terms of a pipeline, would be a breeze.
A last question is, is there a ,modelling and animation program somewhere that generates directly to .egg? Other than using Panda3d itself to make your custom geometry, is there something that offers this?
I think it’d be better if I just provided the resources themselves and have someone experienced in this show me how to export, so as to avoid any misunderstanding. All the resources (plain, flowers, FACE)are in a .zip file called “resources” attached to this post.
Thank you all for your time in advance, and if some part of my question(s) isn’t clear, please ask and I will clarify.
P.S. I know the poly count is high, but as I said this is just to first off check that, from a practical perspective, all is well and I can actually use Panda3d smoothly to make an online game. So I’ll use models with reasonable poly count in the actual game.
There seem to be an issue uploading the .zip file here, it just completes the upload but reloads the post-page…anyways, here is a link to the resources.zip file, where you’ll find all the resources referenced in this post: