|
From: Lane R. <la...@if...> - 2004-06-15 01:45:46
|
Nanosaur for Windows exhibits this very problem... although I think in
the latest version of Quesa this particular problem may have been solved
for Nano. (other problems replaced it).
At one point I had removed this feature from Nanosaur because of the UV
scrolling problems. Not sure if I ever put it back in actually ...
on Mon, Jun 14, 2004 Keith Wiley may have said:
>I am doing a simple texture "animation" by scrolling the UV coordinates
>of a texture, exactly as per the Nanosaur public code. I got it to work
>without a problem, except there's a problem. I have a couple models in
>the world right now. It's a test world so it's not very interesting,
>just a place to screw around. The texture and object in question
>animate perfectly, a really cheap looking waterfall which I will make
>fancier when the time comes. Here's the thing. Some of the other
>objects in the world are displaying texture scrolling as well, but yet
>some other objects aren't. I didn't want anything to scroll that I
>don't explicitly designate as such of course. I can't figure out why
>some unintended objects and textures are scrolling while others remain
>normal.
>
>Bear in mind that each of these objects came from a separate 3DMF file
>with its own texture and basically totally separate from all the other
>models in every way I can imagine.
>
>What could possibly cause this? Here's my code. It's ridiculously
>simple, because as far as I can tell, scrolling the texture isn't very
>hard. (This code is written with the Queeg framework, with necessary
>accessors added to the associated classes, and the function below is
>called from the Queeg Update function).
>
>Any help appreciated. Thanks.
>
>void AnimateWaterfallTexture()
>{
> TQ3Matrix3x3 uvTransformMatrix;
> Q3Matrix3x3_SetTranslate(&uvTransformMatrix, gH, gV);
> gH += 0;
> gV -= .003;
>
> QGTriMesh* triMesh = gWaterfall->GetFirstTriMesh();
>
> TQ3TriMeshData triMeshData;
> triMeshData = triMesh->GetTriMeshData();
>
> TQ3SurfaceShaderObject shader;
>
> if (triMeshData.triMeshAttributeSet)
> {
> if (Q3AttributeSet_Contains(triMeshData.triMeshAttributeSet,
>kQ3AttributeTypeSurfaceShader))
> {
> Q3AttributeSet_Get(triMeshData.triMeshAttributeSet,
>kQ3AttributeTypeSurfaceShader, &shader);
> Q3Shader_SetUVTransform(shader, &uvTransformMatrix);
> Q3Object_Dispose(shader);
> }
> }
>}
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Lane Roathe, President Ideas From the Deep
<mailto:la...@if...> <http://www.ifd.com>
___________________________________________________________________
Life is cheap, but the accessories will break you.
|