Warp on Portals
Moderator: GZDoom Developers
- 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
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?
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)?
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)?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49073
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Warp on Portals
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.
- 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
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?
I'm guessing the post-processing that's doable is limited to tint effects then?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49073
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Warp on Portals
Effectively yes. Currently it's only doing SSAO but in a way that's also just a selective tint.
Re: Warp on Portals
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?
Or I think about wrong portal type?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49073
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Warp on Portals
That won't look like a portal.
Re: Warp on Portals
Why? I miss something?
Re: Warp on Portals
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.
And if you do move the camera along with the player, then it'll only work in single player.
Re: Warp on Portals
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.
Re: Warp on Portals
Oh yes I see... And gzdoom cant draw different textures for different players, right?!Gez wrote:multiplayer
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...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.
Re: Warp on Portals
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.
- 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
Chroma keying?! Seriously Gez, you know that's not my cup of tea!
Spoiler:
Re: Warp on Portals
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.
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.
Re: Warp on Portals
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.Pixel Eater wrote:Chroma keying?! Seriously Gez, you know that's not my cup of tea!
- 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
@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
@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
@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