0 registered members (),
677
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
"linked portal door"
#457290
01/11/16 22:27
01/11/16 22:27
|
Joined: May 2009
Posts: 5,370 Caucasus
3run
OP
Senior Expert
|
OP
Senior Expert
Joined: May 2009
Posts: 5,370
Caucasus
|
Does anyone have an idea, how to create seamless portal effect (linked portal door)? I have a raw idea, to do everything by hand, but it's very dirty Anyway, I found a nice video demostraiting what I want to archive: World Portals - What's the big deal? And one thread from blender forums (with some little explanation, which is close to what I have in my mind): Seamless transition between scenes Any ideas are welcome! Best regards! Edit: I found old posts made by Rackscha, he used to play with portals as I can see, and well as far as I see transition made the way I see it too, but he used shader to draw the portals if I got it correctly. And he used clipping shader, to cut off part of the model that went through the portal.
Last edited by 3run; 01/11/16 22:56.
|
|
|
Re: "linked portal door"
[Re: 3run]
#457295
01/12/16 06:30
01/12/16 06:30
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
I once played around with it aswell. If you're aiming for portals that can NOT be dynamically placed by the player like in Valve's 'Portal' it shouldn't be too hard (collision is going to be muuuch easier).
For it to work you basically have to render two scenes, one for the portal view and one from the player's perspective.
POTATO-MAN saves the day! - Random
|
|
|
Re: "linked portal door"
[Re: Kartoffel]
#457296
01/12/16 09:19
01/12/16 09:19
|
Joined: May 2009
Posts: 5,370 Caucasus
3run
OP
Senior Expert
|
OP
Senior Expert
Joined: May 2009
Posts: 5,370
Caucasus
|
This is how I see it (transition): So when I move player to the linked portal, I set his new position to the linked portal position, but with offset which is relative to the first portal (so it's like mirroring his position relative to the portals, cause they are the same). BUT I have two problems in my head with all this... FiRST - how do I transit other objects, I mean how to handle visual part? I need to duplicate them, so it looks like object actually passing through the portal. To do this, I need to cut the object which penetrates the portal, and the rest of it in the linked portal as well (part which still didn't go through the portal yet). Take a look at this picture. Sure, I won't need this for the player (as he won't see himself in the game mechanics that I'm thinking off), but for other objects I will need them, especially in situations when the portal let's say placed in the middle of the room, so it's backside is visible. SECOND - is performance. I imagine this like: view for each portal, view that shows what linked portal currently sees (relative to it's position and angle). But this is going to be pretty slow I guess... What do you guys think?? Best regards!
|
|
|
Re: "linked portal door"
[Re: Wjbender]
#457299
01/12/16 11:24
01/12/16 11:24
|
Joined: May 2009
Posts: 5,370 Caucasus
3run
OP
Senior Expert
|
OP
Senior Expert
Joined: May 2009
Posts: 5,370
Caucasus
|
Will this article about opengl help me, since acknex uses direcx? Edit: also I found out that using same model for two portals will lead into a problem with setting different views on skin of the each model, cause it seems that the skin of the second portal automatically changes by the skin of the first one. Using 'ent_clone' or 'ent_clonesk in' did not help so far. Edit2: actually it seems, that I used 'ent_cloneskin' wrongly It works now. Edit3: For it to work you basically have to render two scenes, one for the portal view and one from the player's perspective. Kartoffel, can you explain more? I got views showing what linked portal see, but I need to add 'scene from player's perspective' I guess.
|
|
|
Re: "linked portal door"
[Re: sivan]
#457301
01/12/16 14:14
01/12/16 14:14
|
Joined: May 2009
Posts: 5,370 Caucasus
3run
OP
Senior Expert
|
OP
Senior Expert
Joined: May 2009
Posts: 5,370
Caucasus
|
I'm sure someone implemented it with 3dgs, then switched to Unity. You can see that Rackscha got it working, here take a look at this video: 3D Gamestudio A8 Seamless Portal I want to understand how it works but myself, but unfortunately I'm not that good as I expected. I can't get math part to work (adding player's perspective to the view angles/positions). I've read this old thread, and got angles working (thanks to Uhrwerk), but I can't get vector calculations.. the way they should work. And I can't pick right words to search internet for proper algorithm... Best regards!
|
|
|
Re: "linked portal door"
[Re: 3run]
#457326
01/13/16 10:16
01/13/16 10:16
|
Joined: Mar 2012
Posts: 927 cyberspace
Wjbender
User
|
User
Joined: Mar 2012
Posts: 927
cyberspace
|
well , clipping planes aren't an opengl principle , thought you might start with research ,through questions from others with the same topic..
anyway directx has this https://msdn.microsoft.com/en-us/library/windows/desktop/bb174426(v=vs.85).aspx
but I am sure you need a shader , maby contact that guy .
Compulsive compiler
|
|
|
Re: "linked portal door"
[Re: Wjbender]
#457327
01/13/16 10:24
01/13/16 10:24
|
Joined: May 2009
Posts: 5,370 Caucasus
3run
OP
Senior Expert
|
OP
Senior Expert
Joined: May 2009
Posts: 5,370
Caucasus
|
but I am sure you need a shader , maby contact that guy . Thank you for links man, yes I wrote him a PM. My best regards!
|
|
|
Re: "linked portal door"
[Re: 3run]
#457352
01/14/16 20:02
01/14/16 20:02
|
Joined: Feb 2012
Posts: 371
Dico
Senior Member
|
Senior Member
Joined: Feb 2012
Posts: 371
|
i like portale style games , this method i tried to create it before but i stuck in views , i do all calculation for the mouvement exept the views i get problem in it . i think the view need special shader This is what i did before : so the camera portal 1 it move and rotate a l aid of player view . i ask Rackscha before about the method and this what he say : visual: cameras are not rendered on a entity texture. entity renders a special color into the buffer for a screenshader to replace these pixels with the camera
the camera needs to keep an eye on the player and stay on the same line as the portal. so it moves along it.
and it is required to translate a relative point from one portal to another. which means making a position relative to a portal, rotating it back, then rotating it by the other portal and making it absolut again. Sabe goes for rotations
|
|
|
|