Warp on Portals

Moderator: GZDoom Developers

Post Reply
User avatar
Pixel Eater
 
 
Posts: 667
Joined: Wed Aug 02, 2017 12:31 am
Location: In between the Moon and you, between the buried and me.

Warp on Portals

Post by Pixel Eater »

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49053
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Warp on Portals

Post by Graf Zahl »

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
Pixel Eater
 
 
Posts: 667
Joined: Wed Aug 02, 2017 12:31 am
Location: In between the Moon and you, between the buried and me.

Re: Warp on Portals

Post by Pixel Eater »

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49053
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Warp on Portals

Post by Graf Zahl »

Effectively yes. Currently it's only doing SSAO but in a way that's also just a selective tint.
User avatar
Apeirogon
Posts: 1605
Joined: Mon Jun 12, 2017 12:57 am

Re: Warp on Portals

Post by Apeirogon »

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?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49053
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Warp on Portals

Post by Graf Zahl »

That won't look like a portal.
User avatar
Apeirogon
Posts: 1605
Joined: Mon Jun 12, 2017 12:57 am

Re: Warp on Portals

Post by Apeirogon »

Why? I miss something?
Gez
 
 
Posts: 17831
Joined: Fri Jul 06, 2007 3:22 pm

Re: Warp on Portals

Post by Gez »

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.
User avatar
Rachael
Posts: 13527
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Warp on Portals

Post by Rachael »

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
Apeirogon
Posts: 1605
Joined: Mon Jun 12, 2017 12:57 am

Re: Warp on Portals

Post by Apeirogon »

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...
Gez
 
 
Posts: 17831
Joined: Fri Jul 06, 2007 3:22 pm

Re: Warp on Portals

Post by Gez »

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.
User avatar
Pixel Eater
 
 
Posts: 667
Joined: Wed Aug 02, 2017 12:31 am
Location: In between the Moon and you, between the buried and me.

Re: Warp on Portals

Post by Pixel Eater »

Chroma keying?! Seriously Gez, you know that's not my cup of tea! :P
PortalWorp.pk3
(5.3 KiB) Downloaded 40 times
Spoiler:
User avatar
Apeirogon
Posts: 1605
Joined: Mon Jun 12, 2017 12:57 am

Re: Warp on Portals

Post by Apeirogon »

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.
Gez
 
 
Posts: 17831
Joined: Fri Jul 06, 2007 3:22 pm

Re: Warp on Portals

Post by Gez »

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:
User avatar
Pixel Eater
 
 
Posts: 667
Joined: Wed Aug 02, 2017 12:31 am
Location: In between the Moon and you, between the buried and me.

Re: Warp on Portals

Post by Pixel Eater »

@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 :)
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”