This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > VRML > August 2005 > Animated textures with transparency?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Animated textures with transparency?
Dknight

2005-08-23, 8:23 pm

For example, I need to create a fire(or something else) using billboard
and I need an animated texture with transperensy.

I tried to use sequence of separete PNGs but effect was unsatisfactory,
they load into memory with delay. Maybe there is a way how to cache the
images?

Is there a way in VRML to realize the animated textures with
transparency (for example using MovieTexture) as alpha channel?.



Thank you in advance.
Dmitri

Wildpeaks

2005-08-23, 8:23 pm

>For example, I need to create a fire(or something else) using billboard
>and I need an animated texture with transperensy.


Here is an example:
http://www.wildpeaks.com/protos/Mov...orm/example.wrl
Basically, it has every frame of the animation in one png and animates
the textureTransform field of the appearance in order to give the
impression of an animation. The good point is that the whole animation
texture is only loaded once, the bad thing is that is makes big
texture(s).

PS: yes, the site's design is (very) bad, I really should update it.

fabricator

2005-08-26, 7:28 pm

I'll explain just how easy this is to implement, rather than wildpeak's
proto which is complex looking.

say we make a texture with 4 frames, which run in the x direction.

appearance Appearance {
texture ImageTexture { url "tex.jpg"}
textureTransform DEF TT TextureTransform {
scale 0.25 1 # x=1/number of frames y=1
translation 2 0 # frame 2
}
}

just attach a Script node to the TT node using ROUTEs or directly as a
field. IE you need to alter TT.translation

Paul Aslin
http://www.vrmlworlds.com/

Brian Hay

2005-08-27, 4:17 am

On 27/08/2005 2:29 AM, fabricator wrote:
> I'll explain just how easy this is to implement, rather than wildpeak's
> proto which is complex looking.
>
> say we make a texture with 4 frames, which run in the x direction.
>
> just attach a Script node to the TT node using ROUTEs or directly as a
> field. IE you need to alter TT.translation


Um, that's exactly what Cecile's PROTO does - same technique. It just
has more options and flexibility.

By the time you encapsulate the above in a PROTO add a Script,
TimeSensor and expose the relevant fields you have Cecile's PROTO.

:-)
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews