WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 09-06-2006, 10:42 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

I'm not sure what you mean by "overlay". The examples you pointed to apply multiple textures to a mesh and blend them together. This technique is possible within Vizard. To apply multitple textures on a node just do the following:
Code:
node.texture(tex1,'',0) #Apply to texture unit 0 (default)
node.texture(tex2,'',1) #Apply to texture unit 1
In the examples they use different texture coordinates per unit. You either need to set these in your modelling program and make sure they are exported, or you can use a texture matrix to change the coordinates of a unit. In the examples you gave, they simply have the detailed textures repeat over the surface, so create a texture matrix that scales the texture coordinates:
Code:
m = viz.Transform.scale(20,20,1)
node.texmat(m,'',1) #Scale texture coordinates of unit 1 (detail texture)
For this to work you need to make sure that your detail texture is in repeat mode:
Code:
tex.wrap(viz.WRAP_S,viz.REPEAT)
tex.wrap(viz.WRAP_T,viz.REPEAT)
To blend the textures you can use the following example:
Code:
node.texblend(0.5,'',1) #Blend texture 1 50% with texture 0
I believe this is similar to what the first example does. The second example is a little more tricky. It would be easier to implement in a shader. If you don't have a card that supports shaders then I could create a simple plugin that implements that behaviour.

Hope this helps.
Reply With Quote
 

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 06:53 PM.


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