WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 04-20-2004, 04:36 AM
eugcc eugcc is offline
Member
 
Join Date: Apr 2004
Location: United Kingdom
Posts: 9
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
Reply With Quote
  #2  
Old 04-20-2004, 09:32 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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)
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.
Reply With Quote
  #3  
Old 04-21-2004, 02:37 AM
eugcc eugcc is offline
Member
 
Join Date: Apr 2004
Location: United Kingdom
Posts: 9
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
Reply With Quote
  #4  
Old 04-21-2004, 10:17 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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.
Reply With Quote
  #5  
Old 04-22-2004, 11:46 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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!
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:34 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC