i know how to use texture animator to change texture for a model
however, this time i need to make a whirlpool
it is better to alter its UV coordinates instead of switching among textures
is it possible to animate texture coordinates of a model?
how to animate texture coordinate?
-
- Posts: 51
- Joined: Thu Sep 11, 2008 2:24 pm
- Location: Hong Kong
- Contact:
-
- Posts: 51
- Joined: Thu Sep 11, 2008 2:24 pm
- Location: Hong Kong
- Contact:
thanks for your suggestionhybrid wrote:Yes, of course. Since your tc transformations are probably possible with a texture matrix it's most efficient to use it as the animated object. Simply set the new matrix values instead of the next texture in your animator.
i have tried to use the texture matrix
here's my code:
Code: Select all
_sceneNode->getMaterial(1).getTextureMatrix(0).setTextureTranslate(time*0.0,time*0.0001);
it seems jittered and has some kind of "glossy" effect
what's wrong with this line of code?
another question, what is the difference between setTextureTranslate and setTextureTranslateTransposed?
a shader can also do that quite easy in fact... the realisticWaterScene node for example moves the bump linear, but I guess if you move 2 or 3 good layers blended (one layer with sudden changes for bubbles and one smooth foam and somehow out.color multipield or added... try) it would look quite nice for a whirlpool
-
- Posts: 51
- Joined: Thu Sep 11, 2008 2:24 pm
- Location: Hong Kong
- Contact:
i will try. thanks for your suggestionzillion42 wrote:a shader can also do that quite easy in fact... the realisticWaterScene node for example moves the bump linear, but I guess if you move 2 or 3 good layers blended (one layer with sudden changes for bubbles and one smooth foam and somehow out.color multipield or added... try) it would look quite nice for a whirlpool
just because i don't want to change the x value.hybrid wrote:time*0.0 seems more than odd...
same as 0
-
- Posts: 51
- Joined: Thu Sep 11, 2008 2:24 pm
- Location: Hong Kong
- Contact: