[Added] Wall portals

Moderator: GZDoom Developers

Re: Wall portals

Postby Gez » Thu Oct 30, 2014 9:17 am

Here's a modified test file. It features pretty much all the test files in one, plus more fun. Weapons are provided to test them a bit through the portals. This includes altfires for the rocket launcher (grenades), plasma rifle (railgun) and BFG 9000 (press release plasma spam).

Navigating through the level is easy yet possibly confusing. :wink:
Last edited by Gez on Sun Nov 02, 2014 11:47 am, edited 1 time in total.
Gez
 
 
 
Joined: 06 Jul 2007

Re: Wall portals

Postby ZZYZX » Thu Oct 30, 2014 9:47 am

Your mirror in the tram shows me that it's actually broken, not the lines around it :) TY, now I know what to look for and where to test it.
Also in the zombie hallway there's a portal that I couldn't pass through (and rockets don't pass through, either, but hitscan passes through). Is that a bug or intended? (don't have DB here right now)

update: seems to be a bug, things passing through the portal get obstructed by lines BEHIND the RECEIVING portal plane... will fix
update #2: fixed/broke collision behind portals again, zombie hall works correctly (but I might have killed something useful somewhere), mirror is still buggy and I don't know what's up with it
update #3: in your map, the portal that switches on/off... it's exit point in the hallway is broken (after I turn the portal off and on again, it links with WRONG portal and the original endpoint remains turned off).
User avatar
ZZYZX
le chat du rabbin
 
 
 
Joined: 14 Oct 2012
Location: Ukraine
Discord: ZZYZX#1394
Github ID: jewalky

Re: Wall portals

Postby Gez » Sun Nov 02, 2014 11:50 am

Yeah, the switches were broken because I waffled a bit about how to renumber the lines and the script may have been partially reverted at some point.

I have fixed it and made the level a little bit more confusing. :P

I figure the polyobject rave floor can be useful for testing being swallowed by polyportals. In the meanwhile, it's a good way to get dizzy.

Edit: updated file with some 3D floors because why not. There's some funkiness going on with the sides of 3D floors. Looks like when a portal has a height difference, the 3D floor isn't shifted appropriately. And/or maybe a 3D floor gets drawn only once?
Gez
 
 
 
Joined: 06 Jul 2007

Re: Wall portals

Postby mallo » Sun Nov 02, 2014 3:34 pm

I just tried out Gez's demo and it crashed after nth going through a portal :/ Also, when a cacodemon and zombieman tried to go trough a portal at the same time, they started flickering stupidly and were stuck in place.
User avatar
mallo
GO TO NEXT SECTOR.
 
Joined: 22 May 2010
Location: Once upon a land in a far off time

Re: Wall portals

Postby Gez » Mon Nov 03, 2014 6:23 am

For some reason, it's the shotgunner's portal that crashes the most often for me. At one point it happened everytime I went though it after having cleared the Pac-Man stage, though lately it hasn't been as regular an occurrence.
Gez
 
 
 
Joined: 06 Jul 2007

Re: Wall portals

Postby ZZYZX » Mon Nov 03, 2014 8:12 pm

Gez wrote:Edit: updated file with some 3D floors because why not. There's some funkiness going on with the sides of 3D floors. Looks like when a portal has a height difference, the 3D floor isn't shifted appropriately. And/or maybe a 3D floor gets drawn only once?

There's some funkiness going on with the planes of 3D floors as well... It's pretty surprising that kgsws stored player's view height somewhere else aside from global viewz variable (which I change when rendering portals). holy shit, this seems to be caused by the fact that 3D floors are drawn within R_DrawMasked that happens AFTER everything else (including viewz changes). :bang:
Also the crashes, I've been getting them as well yet too rarely to debug in any way. Of course going to find the cause and fix, just not sure when.
Oh, and Ive also noticed that sprites inside portals are mysteriously disappearing on this new test map.
User avatar
ZZYZX
le chat du rabbin
 
 
 
Joined: 14 Oct 2012
Location: Ukraine
Discord: ZZYZX#1394
Github ID: jewalky

Re: Wall portals

Postby Gez » Thu Nov 06, 2014 9:28 am

I tried and failed to create an infinite stairway effect with portals -- you go and go but stay in roughly the same place and you can still get out of the loop by going back. Instead, I've mostly managed to create infinite stairways that went the other way I wanted, shortened stairways, and HOMs. :( Looks like this trick will remain a silent teleport exclusive.

Question: would it be feasible for portals to be translucent? Give them a flag and then one of the parameters work as alpha value for the portal scene, with the "real" geometry behind blending in (possibly including the linedef itself, if it has a texture).
You do not have the required permissions to view the files attached to this post.
Gez
 
 
 
Joined: 06 Jul 2007

Re: Wall portals

Postby Graf Zahl » Thu Nov 06, 2014 9:46 am

ZZYZX wrote:There's some funkiness going on with the planes of 3D floors as well... It's pretty surprising that kgsws stored player's view height somewhere else aside from global viewz variable (which I change when rendering portals). holy shit, this seems to be caused by the fact that 3D floors are drawn within R_DrawMasked that happens AFTER everything else (including viewz changes). :bang:
Also the crashes, I've been getting them as well yet too rarely to debug in any way. Of course going to find the cause and fix, just not sure when.
Oh, and Ive also noticed that sprites inside portals are mysteriously disappearing on this new test map.



Welcome to the fun that is ZDoom's software renderer. I have long given up to try to understand this mess...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Wall portals

Postby ZZYZX » Fri Nov 07, 2014 6:45 am

Gez wrote:I tried and failed to create an infinite stairway effect with portals -- you go and go but stay in roughly the same place and you can still get out of the loop by going back. Instead, I've mostly managed to create infinite stairways that went the other way I wanted, shortened stairways, and HOMs. :( Looks like this trick will remain a silent teleport exclusive.

I will just remove the check for Line_SetPortal destination being a Line_SetPortal. It doesn't make much sense anyway, should be replaced with a proper check for actor not being blocked by the receiving line.

Gez wrote:Question: would it be feasible for portals to be translucent? Give them a flag and then one of the parameters work as alpha value for the portal scene, with the "real" geometry behind blending in (possibly including the linedef itself, if it has a texture).

I believe it's relatively easy to make portals translucent.
Basically, this is how I see it:
1) skip translucent portals in normal portal cycle
2) draw them in R_DrawMasked instead (since I'm already working on moving R_DrawMasked call into R_EnterPortal/R_EnterMirror, this shouldn't be a problem)
3) for each translucent portal, we have left/right x coordinates and top/bottom y clipping lines. These lines can be used to save the corresponding shape of already rendered map behind the portal, then display the portal, then restore the shape and render the portal on top of it via translucency table.

The only problem here is performance loss. No, PERFORMANCE LOSS. Basically we will be copying the shape about 5 times (original -> buffer1, portal -> screen, screen -> buffer2, buffer1 -> screen, buffer2 -> screen (+translucency))
This will be much faster if I just render to offscreen surface, but I haven't ever tried to do that (and not doing it anytime soon until the more important rendering glitches aren't fixed).

Graf Zahl wrote:Welcome to the fun that is ZDoom's software renderer. I have long given up to try to understand this mess...

Also the software renderer isn't really that much of a mess once I try to read and understand it (or at least read and understand how to reuse it).

ALSO I suddenly got a crash inside P_ActivateLineSpecial on either thing->Activate(trigger); or thing->Deactivate(trigger);
Spoiler: Technical mess
Last edited by ZZYZX on Fri Nov 07, 2014 7:19 am, edited 2 times in total.
User avatar
ZZYZX
le chat du rabbin
 
 
 
Joined: 14 Oct 2012
Location: Ukraine
Discord: ZZYZX#1394
Github ID: jewalky

Re: Wall portals

Postby Gez » Fri Nov 07, 2014 7:03 am

ZZYZX wrote:I will just remove the check for Line_SetPortal destination being a Line_SetPortal. It doesn't make much sense anyway, should be replaced with a proper check for actor not being blocked by the receiving line.

Good that'll allow cool tricks like linking a real portal with a visual portal, or having monsters crawling out of the walls.

ZZYZX wrote:I believe it's relatively easy to make portals translucent. <snip> The only problem here is performance loss.

Okay, not something to use like I did on the polyobject disco floor (at least not until optimizations are done). Still it'll be extremely cool to see.

Speaking about bugs and glitches, I often get freezes here:

To reproduce, go to that room, look at the "broken mirror" portal (it's broken because it doesn't reflect like the line mirror effects besides it, get it :V) and strafe left and right a bit.
Spoiler:

The slime trail appears a bit earlier than the freeze, but it's always present when it freezes. It actually very slowly grows during the freeze, after a few minutes it looks like this:
Spoiler:

Then eventually the program aborts, if you haven't stopped it first:
Code: Select allExpand view
Execution could not continue.

Could not realloc 268435456 bytes

So it looks like there's potential for an infinite loop somewhere?


Hey, couldn't portal planes beyond the recursion limit be filled by a solid color (probably black)? It'd avoid HOMs in infinite hallways with low portal recursion.
Gez
 
 
 
Joined: 06 Jul 2007

Re: Wall portals

Postby ZZYZX » Sat Nov 08, 2014 4:21 am

Update (and also a commit).

Separated R_DrawMasked among portals (well, actually, the global vissprite and drawseg list is still there, it's just that I'm calling R_DrawMasked multiple times and pretend that vissprites/drawsegs don't exist if they aren't from the current portal).
This fixed multiple issues, including sprite clipping in Z portals (i.e. sprite clipping against normal, 2D height differences), middle texture rendering in Z portals and 3D floor rendering in Z portals.

The P_ActivateLineSpecial crash is still there, as well as Gez's slime trail.
By the way, Gez, could you test it on your PC with this new binary? Because for me it doesn't lag for minutes, it just displays the trail and then crashes within a second. Not sure if this is caused by the new code or by my RAM amount :/
User avatar
ZZYZX
le chat du rabbin
 
 
 
Joined: 14 Oct 2012
Location: Ukraine
Discord: ZZYZX#1394
Github ID: jewalky

Re: Wall portals

Postby Gez » Sat Nov 08, 2014 4:37 am

I got a crash in the first room as I was turning to choose my direction. "Code: C0000005 (Access Violation - tried to read address 0000000C) Address: 005439DF"

Didn't happen the second time. I got to move around a bit, see that there's still massive problems with 3D floors, and then I went to the "broken mirror". Caught a glimpse of the slime trail for a short fraction of a second, then nothing, then crash. "Code: C0000005 (Access Violation - tried to read address 03223024) Address: 005439DD" No freeze anymore, it crashes.

Oh yeah, I said the 3D floors still had problems: sometimes their side textures are drawn as a solid wall. (I should put some translucent 3D floors and see what happens.)
Spoiler:

Note that most of those are 3D floors seen directly, not through a portal. Third pic caught an error in the rendering of a 3D floor through a portal.

It also happens through portals, though:
Spoiler:

The view flickers back and forth between these two incorrect renderings.
Gez
 
 
 
Joined: 06 Jul 2007

Re: Wall portals

Postby ZZYZX » Sun Nov 09, 2014 2:05 am

Fixed 3D floor rendering. I think that translucent 3D floors shouldn't be a problem now as well. With the previous binary some floors were drawn multiple times.
User avatar
ZZYZX
le chat du rabbin
 
 
 
Joined: 14 Oct 2012
Location: Ukraine
Discord: ZZYZX#1394
Github ID: jewalky

Re: Wall portals

Postby Gez » Sun Nov 09, 2014 2:54 am

Got a crash when approaching the portal on the south-east of the start room leading to the polyobject disco room. ("tried to read address 0000000C") Pretty frequent crash in the disco room itself.

3D floor rendering seem to work fine now though. :)
Gez
 
 
 
Joined: 06 Jul 2007

Re: Wall portals

Postby StrikerMan780 » Tue Nov 11, 2014 4:42 pm

I have to say this is very, very cool and impressive. Good work. I can only imagine the mapping possibilities with this being fully implemented.
User avatar
StrikerMan780
Struggling but getting by. For now.
 
Joined: 29 Nov 2005
Discord: StrikerTheHedgefox#6299
Github ID: StrikerMan780
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

PreviousNext

Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests