tile sheet->solved

hi, is there a way without writing a costum shader, to manipulate the uv coordinates? i tried that with texture stages, i dont know if this is a nice solution…

and which kind of blending mode is working, anyway which blending mode i use, there is all the time the root texture at the back. how can i clear this texture?

'''
Created on 19.01.2010

@author: dirk
'''
import direct.directbase.DirectStart
from direct.showbase.DirectObject import DirectObject
from pandac.PandaModules import TextureStage
from pandac.PandaModules import NodePath

class tileSHEET(object):
    '''
    classdocs
    '''

    def __init__(self):
        '''
        Constructor
        '''
        self.tile = loader.loadModel("countPLATE.egg")  
        self.tile.setPos(0,50,0)
        self.tile.setP(90)
        self.tile.reparentTo(render)
        ###########
        #set timer#
        ###########
        self.timer=0
        #####################
        #set offset texture #
        #####################
        self.offsetV = 0
        self.offsetU = 0
        self.u = 0
        self.v = 0
        ######################################
        #load texture and add a texture stage#
        ######################################
        
        self.tex = loader.loadTexture("tileSHEET.jpg")
        self.ts = TextureStage('ts')
        
        #######
        #speed#
        #######
        #< = maximum 
        self.speed = 10
        #######################
        #not repeating texture#
        #######################
#        self.tex.setWrapU(self.tex.WMBorderColor) 
#        self.tex.setWrapV(self.tex.WMBorderColor) 
        #self.tex.setBorderColor((1, 1, 1, 0))
        ###########
        #tile raws#
        ###########
        self.raws = 8.00
        self.size = 1.00/self.raws 
        ############
        #tile cells#
        ############
        self.cells = 8.00
        self.sizeCELLS = 1.00/self.cells
        
        taskMgr.add(self.anim,"anim")
        
    def anim(self,task):
        self.timer+=1
        ################
        #count of laser#
        ################
        count = 1
        self.tile.setTexScale(self.ts,1,count)
        ################
        #offset texture#
        ################
        self.tile.setTexOffset(self.ts,self.offsetU,self.offsetV)
        self.tile.setTexture(self.ts, self.tex)
        self.ts.setMode(TextureStage.MReplace)
        #######
        #speedwhie walk trough#
        #######
        if (self.timer > self.speed):
            self.timer =0
            self.offsetU+=self.size
            self.u+=1
            if (self.u >= self.cells):
                self.u = 0
                self.v+=1
                self.offsetU = 0
                self.offsetV+=self.size
            if (self.v >= self.cells):
                self.v= 0
                self.offsetV = 0
        return task.cont
t=tileSHEET()
run()


and here the egg file:
aries-lenov.com/projekte/PJR/countPLATE.egg

greetz
dirk