[SOLVED]Texturing Problem (tiling/rescaling)

Hi there.

I’ve moddeled a building in 3Ds max. And I applied a texture on it in max, and used some tiling to repeat my texture. But the model doesn’t appear the way I wanted in the panda engine. So i tried to rescale nd stuff within Panda. But still doesnt work What to do?

Code:

building1 = loader.loadModel("mystuff/building1")
building1tex = loader.loadTexture('textures/highrise1.jpg')
building1.setTexture(building1tex, 1)
building1.reparentTo(render)
building1.setScale(0.25,0.25,0.25)
building1.setPos(-8,42,0)
building1.setTexScale(TextureStage.getDefault(),0.25,0.25)

It just returns a blue model without a texture placed on it…! It didn’t return me any error. And when I dont add a texture in Panda, it shows a very ugly, stretched out texture.

how does your model look in pview? Could it be that it has 2 sets of texture coordinates? Make sure to remove any extra uv’s in max.

Well, it’s simply a block in the shape of a skyscraper and added 1 texture to it. Just simple. Looks good in Max, looks terrible in Panda

hmm Did you use any of the material auto texturing? Panda3d would not understand max uv material texturing very well. But if you properly uv’d your cube, what max plug in did you use? May we see the egg file?

What do you mean by auto texturing?

I don’t know if you use Max, but I just created a material in the material editor and dragged it into my building. Changed the Tiling values, created an .egg file and placed it into panda.

Euhm, I’d like to add my egg, but how? :stuck_out_tongue:

What you did is likely not to work. You have to UV the model with texture not just apply material too it.

There is many 3d editors out there and all of them do materials differently its very hard for an engine to be compatible with that. But they pretty much do uv’s uniformly so its best to just use that for every thing.

Ok, im currently working on a UV for my second building because it has an unusual shape. Thanks for the help :slight_smile:

I’ll let you know if it has worked.

Worked! Probs solved, thanks :slight_smile: