PDA

View Full Version : script driven texture panning


conscripted
26th May 2004, 07:43 AM
Im trying to acheive a wipe effect on a charactor of a texture moving across the top of second texture. I had planned on using the texpanner and combiner, but texpanner doesn't seem to handle anything other than continuous looping (the speed can be changed but not a defined transform or step so to speak)

I was wondering if anyone knew of a way to move the top texture along via script?

the other idea I had was material sequence which steps through different 'frames' of the wipe

thanks in advance for any help

EvilDrWong
26th May 2004, 01:42 PM
check out SetupTreads() on the goliath maybe?

Mychaeel
26th May 2004, 02:52 PM
In case you just want to move the texture laterally (but script-driven), you could use a TexScaler and adjust its UOffset/VOffset properties in UnrealScript.

conscripted
27th May 2004, 12:21 AM
thanks for the suggestion EvilDrWong, I shall, it should come in handy with Mychaeel's idea, for a practical example. great
That might be a good way to get it working like I want, Mychaeel, thanks. Yes its a lateral only movement, and I can make the texture bigger than initial thoughts, to cope with the (probable) tiling so the loop has a large transparent section so it looks like a wipe.

great suggestions you two, I should be able to get it working from these

conscripted
30th May 2004, 04:22 AM
or at least I'm part way. I have the shader doing exaclty what I want, which is great, but Im having a little trouble with this bit

function calcGraph()
{
local TexScaler TexScal;
foreach AllObjects(class'TexScaler',TexScaler)
TexScaler.UOffSet +=5; //flaskValOffset();
}


compile error is Error, 'Foreach' : an iterator expression is required

Im trying to just move all texScalers across with this script as there's only one in use.
Ive read a few other threads and wiki and udn, but Im obviously missing something here. Can anyone see what Im doing wrong?

Shambler[Bishop
30th May 2004, 09:19 AM
Yes you have
local TexScaler TexScal;

and your loop says AllObjects(Class'TexScaler', TexScaler) instead of AllObjects(Class'TexScaler', TexScal)

conscripted
31st May 2004, 01:40 AM
damnit,.. ive been staring at that code for to long, i pasted the wrong one...sorry bout that, this is the code Im useing, which doesn't work

function calcGraph()
{
local TexScaler TexScal;
foreach AllObjects(class'TexScaler',TexScal)
TexScaler.UOffSet +=5; //flaskValOffset();
}

with the error being the same

'Foreach' : an iterator expression is required

Shambler[Bishop
31st May 2004, 09:06 AM
That is exactly the code I used and it compiles for me??

EDIT:
I had to add "var TexScaler TexScaler;" because I assumed that is what you are doing

conscripted
31st May 2004, 10:19 AM
yeah, its declared local in the function. final thing, this is in the unrealengine2 runtime, but that shouldn't make a difference. maybe it is? although theres plenty of examples of foreach functions on udn, and this is not that strange a function to do...

Shambler[Bishop
31st May 2004, 02:02 PM
Yes that compiled for me in UT2k4, you must be doing something wrong.

conscripted
31st May 2004, 10:31 PM
obviously ;)
thanks for your help in this. more investigation needed I guess...