Page 1 of 1
tcMod scroll
Posted: Thu Mar 06, 2008 1:25 am
by Killerdude
I made a shader with a scrolling texture using tcMod scroll, however I can not get it to scroll around the brush. The back side of the brush scrolls in the same direction as the front. I tried ctrl+shift and applying a rotation of 180 degrees to the back side, but it does not help. Is there a way to do this? I figure I can always double up a brush to do this, but would be nice if I could do it with one brush in a seamless mannnor.
Posted: Thu Mar 06, 2008 1:43 am
by Killerdude
This is a quick reply to my own post, but I am guessing (after a little experimenting) that I will have to make another shader for the back side.
Maybe?
Posted: Thu Mar 06, 2008 1:59 am
by Killerdude
Nope, a second shader with the speed reversed didn't help.
tcMod scroll 1 0 // <-- first shader
tcMod scroll -1 0 // <-- second shader
they both rotate the same way
Guess I'll wait for some professional help!
Posted: Thu Mar 06, 2008 2:43 am
by Killerdude
Well, I got it working with two brushes. I made a brush and textured it with the scrolling texture. Then I copied the bush. The brush was then rotated, not the texture. The two brushes were then assembled as shown in the image below and the texture scrolls around the brush.
It would be nice to know if this can be done with one brush.
Posted: Thu Mar 06, 2008 7:47 pm
by jv_map
Can you post your entire shader?
Posted: Thu Mar 06, 2008 11:28 pm
by Killerdude
Well I must admit, it's more copy and paste with my image file. I am not sure what the normal behavior for a brush with scrolling texture is supposed to be. This texture does scroll, but I was trying to get it to scroll seamlessly around a brush.
btw I had to remove this from my main folder as it messed up some of the grass textures ???
Code: Select all
textures/test1
{
qer_keyword signs
surfaceparm metal
surfaceparm nomarks
{
map textures/test1.tga
depthWrite
tcMod scroll 1 0 //adjust this line for direction and speed
tcMod scale 1 1
}
{
map $lightmap
rgbGen identity
blendFunc GL_DST_COLOR GL_ZERO
depthFunc equal
}
}
This may be a mute point because I started thinking more about my proposed application of this and while it will give the visual effect I am looking for, it will not interact with the player without some ingenuity. I was hoping to make a conveyor belt. I was going to have a trigger on the rotating texture surface and just move the player via waypoint scripting. However, I don't think that the player will be able to run up or down the conveyor belt while the moveto command is relocating the player. Technically, the players speed should be faster when running with the belt and slower when travelling against the belt.
Then I was thinking maybe the brush has to actually move. Could a bush be move slightly then shrink the end that is beyond the belt and expand the brush on the end that is now short of the belt. Then loop through continuously. I am not sure if that would give a smooth scrolling effect.
If anyone has an idea of the direction I should go in, I would love to hear your thoughts.
scrolling shader
Posted: Fri Mar 07, 2008 4:19 am
by Wierdo
Why not just select the back side of your brush and use the "Flip X" and "Flip Y" buttons in MOHradiant?
Re: scrolling shader
Posted: Fri Mar 07, 2008 11:03 am
by Killerdude
Wierdo wrote:Why not just select the back side of your brush and use the "Flip X" and "Flip Y" buttons in MOHradiant?
Ummm ... IDK
Thanks wierdo simple. It works great. I always have a tendency to make things over complicated !!
Posted: Fri Mar 07, 2008 1:55 pm
by jv_map
Nice

.
Regarding the conveyor belt, I'm afraid that will be difficult to map or script nicely in the moh engine.

The conveyor move effect.
Posted: Fri Mar 07, 2008 9:15 pm
by Wierdo
To get the effect of the belt moving the player back, why not make a trigger-push?
It could be the same size as the belt is wide, and place it above the belt, then set the "wind" directon to the correct angle and "speed". The player would feel the effects of running in a "strong wind", as the entitiy window says.
Now, for the rounded end:
Make one additional brush into a cylinder and rotate it to fit. Then, using the fit for cylinders, apply your texture. You can either use the flip buttons or the "cycle" and "Rand" to make it fit in.
You could also use a 16 or 32 arbitrary sided brush to simulate a cylinder. This will allow you to place a metallic cap texture on the ends.
Posted: Sat Mar 08, 2008 4:08 am
by Killerdude
I have used push triggers before to blow people around by fans. I have found that at slower wind "speeds" the feel can be jagged.
My effort so far has been moving the player with a trigger multiple just above the conveyor and tweaking the vector shown below and the trigger wait. Still has a jagged effect and I am fearful that 3 of 4 conveyor belts might cripple the cpu
Code: Select all
beltmover:
while (1)
{
$trigger_beltmover waittill trigger
local.player = parm.other
local.player.origin -= (1 0 0) // hard coded vector for now
waitframe
}
tomorrow I will try the push triggers and see if I can sync the force with the scrolling texture.
Thanks again

Posted: Sun Mar 09, 2008 5:56 pm
by Rookie One.pl
Hmm. I have an idea, but it's kind of hackish.
How about making an actual belt by dividing it into segments and having them move? When a segment reaches the end of the belt, it is teleported to the other end, re-emerges and moves along once again.
It's hackish because it would require some witty scripting in order to wrap the belt nicely at the ends.
Posted: Sun Mar 09, 2008 10:58 pm
by Killerdude
I did think of that before, but didn't follow up on it. I'll give it a try Rookie
