Scroll Both Sides of a 2-Sided Line

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
LaundriTorture
Posts: 13
Joined: Mon Jul 25, 2005 3:48 pm

Scroll Both Sides of a 2-Sided Line

Post by LaundriTorture »

Was playing around with some of the ZDoom features and now I got to some point where I have a real problem: I have one 2-Sided Line and with the ACS command "Texture_ScrollBoth" (or whatever it is called) I can just scroll the Front side of the Line, not the backside.

Is there any way I can also scroll the backside with the opposite attributes (left = right, right = left) with ACS?

Greets,
LT
LaundriTorture
Posts: 13
Joined: Mon Jul 25, 2005 3:48 pm

Post by LaundriTorture »

Anyone?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Use it in a script with a negative line id and it scrolls the back side. I think this feature has not been documented.
LaundriTorture
Posts: 13
Joined: Mon Jul 25, 2005 3:48 pm

Post by LaundriTorture »

How? I gave the line an id of "2" with "Line_SetIdentification", then I added this to my script:

Code: Select all

Scroll_Texture_Both(2, 0, 120, 0, 0);
Scroll_Texture_Both("-2", 120, 0, 0, 0);
Or what do you mean?

*EDIT*
Okay, without the quotations it works fine! Though I have another problem, but it is hard to explain:

I have texture, its length is 636 and it is applied to several 2-sided linedefs wich have together also a length of 636, a circle, so the texture wraps around that perfectly fitting. Same goes to the backside of this lines.

Now I want to scroll the front and the back of both of the lines, the front to the left, the back to the right (the textures are translucent, so it should look as this circle is actually moving).

Ingame, the front and back of these textures are perfectly aligned, so the back structure applies to the front structure of the transparent sprites and vice versa. Same goes to DB-3DMode!

But now, when I start the scrolling via ACS, something strange happens and the whole front texture y-alignment moves up about 32 pixels or moves right about 128 pixels, so the alignment of back and front doesn'T fit anymore. No idea what is happening here.

@Zahl - This is a problem for you I think ;) If you need the map as a demo, I could send it to you, but it is big!
LaundriTorture
Posts: 13
Joined: Mon Jul 25, 2005 3:48 pm

Post by LaundriTorture »

Here some demo image:
Image
This image is taken when the scroll effect has already been started. The right side is still aligned correctly till the "misalignment". The left side is misaligned but the backside is also aligned correctly as you can see on the image. The "misalignment" scrolls slowly through the whole front texture until every line and front side of this "part" of the circle is misaligned.
Ajapted
Posts: 71
Joined: Sat Apr 16, 2005 3:50 am
Location: Tasmania

Post by Ajapted »

Your texture may have to be a power-of-two width to scroll correctly (e.g. 256, 512, 1024).

In original Doom textures needed to be a power-of-two to repeat properly on walls longer than the texture, I'm guessing this still applies to ZDoom since it would explain your problem.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Send it. My email account can handle large mails without problems.
LaundriTorture
Posts: 13
Joined: Mon Jul 25, 2005 3:48 pm

Post by LaundriTorture »

@Ajapted - I really don't hope that's true because it would mean a lot of extra work for me :(

@Graf - Thx and sending!
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

The texture rendering code doesn't properly handle negative scroll offsets. For efficiency reasons the rendering code works with unsigned variables. For Power-of-2 textures this doesn't matter but for all others negative offsets will produce incorrect results.

We have to see what Randy thinks about this but right now it's not possible to make this work properly. You might try to fiddle with negative texture offsets but if this is eventually fixed that solution will screw up for sure - and ZDoomGL can handle this properly.
User avatar
Bio Hazard
Posts: 4019
Joined: Fri Aug 15, 2003 8:15 pm
Location: ferret ~/C/ZDL $
Contact:

Post by Bio Hazard »

LaundriTorture's custom title wrote:Sort of N00b
LaundriTorture wrote:*Advanced editing stuff*
You don't seem so N00b to me...
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

Trying replicate LOTR, Laundri? :P
LaundriTorture
Posts: 13
Joined: Mon Jul 25, 2005 3:48 pm

Post by LaundriTorture »

Well, yes and no :) I always admired the scene in LotR but I never thought that something of this is possible in ZDoom ... until I tried it. It is very atmospheric and has such an typical armageddon effect :)
Locked

Return to “Editing (Archive)”