multitexture models...

So I have a model with 2 textures.I want to animate the UV of one of the 2 textures.
from the manual:


Thats pretty much my case, but if I will have them seperate, I will get rendering ‘artifacts’ like here:

Any other ways of doing this?

PS. I have the textures applied in Blender, not in Panda with setTexture

When normals are set automatically by the modeling program, it averages the normals at each vertex so the shading is smooth from one face to the next, but this is not happening because the vertices are not connected.
I don’t know how to do it in Blender, but looks like you need to manually set the normals at the seam where the two meshes meet.

Blender exports the normals correctly - I’m afraid the change you are seeing there would have to be caused by the egg-optchar program. However, I’ld try not using egg-optchar and having a look at the hierarchy - if they have different textures Chicken exports the parts of the model with different node names anyway, and this will probably be preserved on import. If not then I have no idea. (See the manual for the naming scheme.)

So I shouldn’t use egg-optchar? Its the same.

You mean if a single object has 2 textures then the faces using different texture are seperated automatically?
If so, what name is assigned?

Firstly, egg-optchar should work - I don’t know why its doing what its doing. As for naming, I can’t remember off the top of my head - its in the manual as I said, but it will be something like modelname_materailindex_materialname - that way you can search children of the modelname node with either the material index (Which is always two digits, starting at 00) or the material name. Just do a ls() and have a look to find out.

Are you sure? egg-optchar doesn’t do anything to a model’s normals, so it would be strange if it introduced an artifact like this.


OK, heres the actual files:

OK, so the above file I uploaded… the model consists of 2 pieces (not joined), so I can access the eye object with

eyes = character.find("**/eye")

But in this case I get that rendering effect. Sorry if there was a confusion.
But if I will merge the eye object with the body object, and try to access the eye with

eyes = character.find("**/Material1_00_Tex2")

and try changing the texture I will get an nodepath_is_empty error.

import direct.directbase.DirectStart
from pandac.PandaModules import *
from direct.filter.CommonFilters import CommonFilters

filters = CommonFilters(,

character = loader.loadModel('bunny')
character.setAttrib(LightRampAttrib.makeDoubleThreshold(0.4, 0.4, 0.7, 0.4))

dlightnode = DirectionalLight('dlight')
dlight = render.attachNewNode(dlightnode)

alightnode = AmbientLight("ambient light")
alight = render.attachNewNode(alightnode)

eyes = character.find("**/Material1_00_Tex2")

tex = loader.loadTexture('eye2.png')
eyes.setTexture(tex, 1)


I also tried with egg-optchar inside Chicken:

-d -flag eye=eye … of_a_Model