instantreality forum
news: Welcome to the instantreality forums!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
January 17, 2018, 08:22:06 am


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Blending two textures  (Read 2205 times)
Invirt
Newbie
*
Posts: 3


View Profile
« on: March 31, 2011, 11:37:48 pm »

Hello,

in a 3 years old InstantReality-application I used an animated "alpha"-value of a Multitexture-Node successfully to blend between two textures.

Now Im updating the app - but the blending value remains randomly fixed on startup and does not update on "set_alpha" events.

Any idea what has been changed since 2008?

Thanks,

  Rolf
Logged
Invirt
Newbie
*
Posts: 3


View Profile
« Reply #1 on: May 15, 2011, 06:51:58 pm »

Meanwhile Patrick suggested 2 alternative workarounds:

1. deactivate the texture cache at startup:
  sav --texCache=false AlphaBlend-Test.wrl

2. adding a material-node and animate its transparency-value (instead of the alpha of the multitexture-node, Note: transparency = 1 - alpha). Additionaly the mode-field of the multitexture-node has to be changed:

...
appearance Appearance {
    material DEF mat Material {}
    texture DEF MTEX MultiTexture {
        mode ["REPLACE,SELECTARG2","BLENDCURRENTALPHA,REPLACE"]
        ...
    }
}
...
ROUTE IP.value_changed TO mat.set_transparency
...

I chose the second solution.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.15 | SMF © 2011, Simple Machines