#1
|
|||
|
|||
Multi-Texture in Landscape and tiling
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') land.texture(landTexture) landTexture.load('dirt21.jpg') Thanks eugcc
__________________
Eugene United Kingdom |
#2
|
|||
|
|||
Hi eugcc,
Vizard does support multi-texturing. Here's a simple example: Code:
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 land.texture(texture1) #Apply second texture to texture unit 1 land.texture(texture2,'',1) |
#3
|
|||
|
|||
Thanks.
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)? eugcc
__________________
Eugene United Kingdom |
#4
|
|||
|
|||
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. |
#5
|
|||
|
|||
Hi Eugene,
Thanks for the textures! You can download the plugin here: http://www.worldviz.com/download/files/textureblend.zip 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! |
|
|