Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

3 Dimensional Chat / Confuzed about texture scrolling

Author
Message
AluminumPork
21
Years of Service
User Offline
Joined: 28th Oct 2003
Location: Duluth, MN, USA
Posted: 19th Feb 2004 08:23
I'm trying to do what I'd think to be a simple effect. I have a single water texture stretched over a single plain. I want the effect of moving water, and have tried the scroll texture command, but can't seem to figure it out. How does it connect with the uv data for the model?

Thanks

P4 2.4Ghz HT, 512MB RAM, ATI Radeon 9600 128MB, 19" Viewsonic, 80GB HD

Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 19th Feb 2004 10:20
UV data is based on a 0.0-1.0 scale with floating point values. If you were manually setting a uv coordinate, you'd work out the floating point position of the area on the texture that you want to show. If your texture is 256x256 pixels, UV location 0.5,0.5 would be dead centre. It works like this to allow sub-pixel accuracy and so that different resolution textures can be used without the need to retexture.

When scaling or scrolling the texture, your using those miniscule floating point numbers, so scrolling a 256x256 texture by 0.01 will scroll it by 2.56 pixels - which is ok for the effect you want, nice smooth scrolling (e.g. SCROLL OBJECT TEXTURE Objno,0.01,0.01).


Van-B


The nature of Monkey was irrepressible!.

Login to post a reply

Server time is: 2025-06-28 04:26:15
Your offset time is: 2025-06-28 04:26:15