0

so I'm quite the noob when it comes to texture based things...
how would I apply a material that contains more than 1 texture to an object??

my current code:

        if SDType=="_Mesh":
            __GL.glLineWidth(1.0)

            MaterialName,AddOn,MatColors,Textures,R1,R2 = Libs[4][SDData1] if type(SDData1)==int else [
                "UMC_Def_Mat", '', [[1.0,1.0,1.0,1.0],[1.0,1.0,1.0,1.0],[0.5,0.5,0.5,1.0],[0.0,0.0,0.0,0.0],25.0], [], [], []
                ]

            MAR,MAG,MAB,MAA = MatColors[0]
            MDR,MDG,MDB,MDA = MatColors[1]
            MSR,MSG,MSB,MSA = MatColors[2]
            MER,MEG,MEB,MEA = MatColors[3]
            MSV = MatColors[4]

            #call from pre-defined textures here
            #glBindTexture(GL_TEXTURE_2D, __GL_TEX[] )
            for TexName,TexParams,ImageName in Textures:
                # Apply Texture(s)
                __GL.glTexEnvf(__GL.GL_TEXTURE_ENV, __GL.GL_TEXTURE_ENV_MODE, __GL.GL_MODULATE)

the UV's are handled using glMultiTexCoord2f() for 8 UV channels.
however, the model only uses 1 channel. meaning the material does all the work.

there IS a known problem with the structuring because finding info is hard and people don't like to help...
so I'm asking here to hopefully get somewhere >_>

any and all help is much appreciated ;)
thank you :)

1
Contributor
4
Replies
17
Views
3 Years
Discussion Span
Last Post by Tcll
0

oh nvm... the blue-ish color is correct... :P

R,G,B,A = 64, 128, 255, 128

0

so... back to my original Q...
is it just glBindTexture() called multiple times for the same object??
(of course with different settings to set the reflectivity and such for the gloss texture)

if not then could someone please answer me. :/

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.