View Single Post
  #3  
Old 09-06-2006, 05:40 PM
k_iwan k_iwan is offline
Member
 
Join Date: May 2006
Posts: 115
Unhappy tiling doesn't work?!? could be a mistake from my end

Hi,

Firstly, thanks for the reply. In order to attempt this blend-multi texture, I created a model out of Candor Canyon on mars, and I textured it.

The blending does work, but the repeating texture does not. for the detail texture I used a 64 x 64 image. I was hoping this small texture would repeat itself over large terrain.

There are 2 screenshot attached;
no_detail.jpg - plain texture.. no additional texture applied
not_tiled.jpg - I could see here that my 64 x 64 texture is fully streched across the terrain.

the terrain has only 1 UV map applied to it.

I attached my script, I couldn't figure out what did I do wrong??? could you have aa look and see why I couldn't repeat my small texture across the terrain?

#---------------------------------------------------------------------
import viz

viz.go()

viz.enable(viz.CULL_FACE)
viz.enable(viz.CULLING)

#loading textures
tex1 = viz.add('texModified.jpg')
tex2 = viz.add('detail.jpg')
tex2.wrap(viz.WRAP_S,viz.REPEAT)
tex2.wrap(viz.WRAP_T,viz.REPEAT)

#loading the objects
stage = viz.add('output.osg')
stage.enable(viz.CULL_FACE)
stage.enable(viz.CULLING)

stage.texture(tex1,'',0) #Apply to texture unit 0 (default)
stage.texture(tex2,'',1) #Apply to texture unit 1
stage.texblend(0.8,'',1) #Blend texture 1 50% with texture 0

#loading the skybox
env = viz.add(viz.ENVIRONMENT_MAP,'mars_sky\mars_sky.jpg ')
sky = viz.add('skydome.dlc')
sky.texture(env)
#---------------------------------------------------------------------

Thanks for your help! Have a great day.

Regards,
Iwan
Attached Thumbnails
Click image for larger version

Name:	no_detail.jpg
Views:	1211
Size:	63.9 KB
ID:	108   Click image for larger version

Name:	notTiled.jpg
Views:	1255
Size:	41.6 KB
ID:	109  
Reply With Quote