View Full Version : Multi-Texture in Landscape and tiling

04-20-2004, 04:36 AM
Hi there,

Does vizard support multi-texturing? Like I have two textures that I want on a landscape that blends (alpha channels control where materials is located).

The other thing is, how do I tile a texture after loading it to the landscape?

land = viz.add('landscape.wrl')

landTexture = viz.add('dirt21.jpg')



04-20-2004, 09:32 AM
Hi eugcc,

Vizard does support multi-texturing. Here's a simple example:
texture1 = viz.add('dirt1.jpg')
texture2 = viz.add('dirt2.jpg')

land = viz.add('landscape.wrl')

#This will apply the texture to default texture unit 0

#Apply second texture to texture unit 1
land.texture(texture2,'',1)To perform tiling of your texture you need to modify the texture coordinates of your model in 3dmax. Once you have the texture tiled in 3dmax, then it should export the texture coordinates correctly to the vrml file.

04-21-2004, 02:37 AM

Is there a way you could control where the second or third textures is placed in the landscape? Something like Alpha Mapping (white to show where the second texture should be at and black to show where the transparency where the first texture is shown through)?


04-21-2004, 10:17 AM
Hi Eugene,

This functionality isn't built-in to Vizard, but if you supply me with sample textures I could go ahead and create a plug-in for Vizard that would do this. If you're intersted, send the files to my email address.

04-22-2004, 11:46 AM
Hi Eugene,

Thanks for the textures! You can download the plugin here:


I included the sample mask image you sent me in the example. Let me know if this is okay with you.

The mask image you sent me didn't have any alpha channel in it. So the plugin doesn't use an alpha mask, it uses a grayscale image mask. The white areas of the image represent where the first texture will show up. The black areas of the image represent where the second texture will show up. The gray areas of the image represent the percentage to blend between the first and second texture. Look at the sample script and the readme file for more information.

Good luck!