At the beginning it has problem on the tangents and binormals, because it is too complicated and vertexes are merged together. Somehow in the new model the problem goes away. So I export it with tangents and binormals. This model also has normal maps and specular maps defined.
If I turn on the autoshader, an error message is shown:
:gobj(error): created-shader: (51) : error C1008: undefined variable “tot_diffuse”
If it is off, everything is ok. What’s wrong ?
============
Also, I find that the scene graph of the actor is like this:
Armature -> Character -> GeomNode
The human model actually has:
Body + Head - has color maps, bump maps, and specular maps
Tongue - only color map
Teeth - color map and bump maps
Eye - color map and specular maps
I have to write a skin shader for this model, an eye shader for the Eye, but there is only on GeomNode in the scene graph, how can I write it with the proper reference to the corresponding textures for each vertex group?
I am still at 1.5.4. The files are very big, I will package it and update you later.
How about the second question ? If I have such a complicated model, how to have various shaders interfaces various vertex groups with various materials defined in the egg file ?
I’m about to freeze 1.6.1, so if you want to get it fixed in 1.6.1 still, send me something that errors.
Probably you can get the same error by reducing the geometry to 1 polygon, not changing the materials - then the files will be smaller.
The zip file named “david”? I had no errors generating a shader for that model. Must have been already fixed in 1.6.0 (I recall fixing a bug with that error message).
As for your other problem: no idea, maybe it’s related to a NaN entry in the animation? (Or, try enabling double-sided and see if the error goes away.)
Do you mean to split them in the original model or split them in Panda ?
I have not yet figured out how to do it in either way. Can you give more advice ?
But my original model is already composed of several separated meshes, say the body, eye, teeth, tongue. They are connected through the same armature. I still see only one geomnode after it is loaded.
(may be you can cross check in david1.egg)
For a character model, the geoms are automatically combined together at load time by default. To avoid this, use “egg-optchar -flag” and give a different name to each of the pieces you wish to use individually.
Well, not completely–they will remain separate Geoms, because they have to be, but they will probably still end up in the same GeomNode, and it will be difficult to tell which Geom is which (because they will be stored in arbitrary order). So using the -flag option is the most reliable way to make a particular piece findable at runtime.