[No] Warp on Portals

Moderator: Developers

Warp on Portals

Postby Pixel Eater » Thu Sep 27, 2018 2:10 am

It would be awesome if we could apply either of the warp effects to a portal's visuals, or hell- why not the wipe effect? :lol:
And if it's even possible, I'm also wondering whether by using a generic mid-texture we could designate which portals to enable (like using F_SKY)?
User avatar
Pixel Eater
I sense evil I fear it here today, Like a bad dream that never goes away -MBerry
 
 
 
Joined: 02 Aug 2017
Location: In between the Moon and you, between the buried and me.

Re: Warp on Portals

Postby Graf Zahl » Thu Sep 27, 2018 6:14 am

Portals do not work like that. They get rendered directly into the scene. What's possible is to run some postprocessing over its pixels but not alter its shape or move contents around. For that you need an actual texture which does not exist.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Warp on Portals

Postby Pixel Eater » Thu Sep 27, 2018 7:38 am

Oh well, that's a shame. It would have looked nifty if possible!

I'm guessing the post-processing that's doable is limited to tint effects then?
User avatar
Pixel Eater
I sense evil I fear it here today, Like a bad dream that never goes away -MBerry
 
 
 
Joined: 02 Aug 2017
Location: In between the Moon and you, between the buried and me.

Re: Warp on Portals

Postby Graf Zahl » Thu Sep 27, 2018 7:47 am

Effectively yes. Currently it's only doing SSAO but in a way that's also just a selective tint.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Warp on Portals

Postby Apeirogon » Thu Sep 27, 2018 1:39 pm

What about "camera texture" hack? Place camera near both portal sides and then draw texture from it to portal line.
Or I think about wrong portal type?
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

Re: Warp on Portals

Postby Graf Zahl » Thu Sep 27, 2018 1:51 pm

That won't look like a portal.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Warp on Portals

Postby Apeirogon » Fri Sep 28, 2018 12:24 pm

Why? I miss something?
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

Re: Warp on Portals

Postby Gez » Fri Sep 28, 2018 1:24 pm

To make a camera texture that would be somewhat convincing as a portal, you'd need to move the camera to match the movements of the player (both translations and rotations). Otherwise, with a static camera, it'll look like a TV screen (which it effectively is inside the game world) rather than a window.

And if you do move the camera along with the player, then it'll only work in single player.
Gez
 
 
 
Joined: 06 Jul 2007

Re: Warp on Portals

Postby Rachael » Fri Sep 28, 2018 2:45 pm

Not only that, but you would also have to properly project to a flat surface, regardless of the player's angle. That pretty much means the entire effect has to exist on a sprite or the effect is dead.
User avatar
Rachael
QZDoom + Webmaster
 
Joined: 13 Jan 2004

Re: Warp on Portals

Postby Apeirogon » Mon Oct 08, 2018 10:28 am

Gez wrote:multiplayer

Oh yes I see... And gzdoom cant draw different textures for different players, right?!

Rachael wrote:Not only that, but you would also have to properly project to a flat surface, regardless of the player's angle. That pretty much means the entire effect has to exist on a sprite or the effect is dead.

Why? Yes, with default camera interpolations portal, as rift in level, would be visible. And the the goal is create warp effect for portal texture. Soo...
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

Re: Warp on Portals

Postby Gez » Mon Oct 08, 2018 11:24 am

You could try a different approach: in front of your portal, put a translucent, solid-colored texture outside of the game's color palette. So that everything seen through the portal is chroma-keyed with that color. Then a post-process filter can warp the chroma-keyed area and also change the hue to offset the coloration and hopefully restore the colors to something more natural.
Gez
 
 
 
Joined: 06 Jul 2007

Re: Warp on Portals

Postby Pixel Eater » Mon Oct 08, 2018 7:44 pm

Chroma keying?! Seriously Gez, you know that's not my cup of tea! :P

PortalWorp.pk3
(5.3 KiB) Downloaded 6 times

Spoiler:
User avatar
Pixel Eater
I sense evil I fear it here today, Like a bad dream that never goes away -MBerry
 
 
 
Joined: 02 Aug 2017
Location: In between the Moon and you, between the buried and me.

Re: Warp on Portals

Postby Apeirogon » Tue Oct 09, 2018 10:05 am

And what you have in mind?

Im not sure that drawed on screen "photo" of some place in the game world would be the same as if you look at it with you own "eyes".
I mean, gzdoom draw scene with effect similar with real world spherical aberration effect like
http://foto-like.ru/wp-content/uploads/sfer.jpg
in vertical, and a little bit in horizontal, dimensions.
Just carefully look around in any map to see this. With low res doom textures its not very noticeable, but with pbr materials/models/etc. you will see it in few seconds.
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

Re: Warp on Portals

Postby Gez » Tue Oct 09, 2018 12:36 pm

Pixel Eater wrote:Chroma keying?! Seriously Gez, you know that's not my cup of tea! :P

So a less extreme warping, perhaps just some sort of shimmering effect, and with a fade to black from the center so that the black borders appear natural, and making sure there are no additive translucency effects going on behind the portal view, and it would work okay. :wink:
Gez
 
 
 
Joined: 06 Jul 2007

Re: Warp on Portals

Postby Pixel Eater » Tue Oct 09, 2018 4:22 pm

@Apeirogon: I was thinking it could be possible to attach a dummy actor to each corner of the portal and then use those coordinates for the shader. But it was more of an academic thought than an 'I must go to there' moment. I'll stick with the chroma key for now, it might even make it's way into my Spooktober map :twisted:

@Gez: I definitely want to scale the effect into smaller tiles for a shimmery effect but I'm not familiar with how the warp code works, I just copied and pasted it from gzdoom.pk3. I also didn't think of fading it- and I might have a way how now that you mention it :)
User avatar
Pixel Eater
I sense evil I fear it here today, Like a bad dream that never goes away -MBerry
 
 
 
Joined: 02 Aug 2017
Location: In between the Moon and you, between the buried and me.


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: Google [Bot] and 0 guests