Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
142

What is the Best Way to let players "See Through" Portals / Surfaces? [closed]

Asked by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
10 years ago

I am referring to the portals in the valve game, although they work like you'd expect -- through a particular space on a portion of a wall, a difference scene is visible through.

(This is a large project and I don't at all expect a code answer, just ideas and suggestions from other scripters who have different perspectives)

image

This is a feature which I really want in my Portal game which unfortunately I don't think will be able to come with high enough quality to make me happy.

I'm open to suggestions here to see if I can get any further on it. Here are the things I have tried or are thinking about trying:

1) Render a number of Decals and select among the best fit based on portal locations This works from a gameplay perspective -- it helps you line up and figure out what's on the other side. It won't be even close to seamless and will still require the transition. Curating, labeling, and uploading large numbers of decals is intractable. One solution is to use SurfaceGuis to piece together scenes, which might work pretty well and could even perhaps have DOOM style 3D to improve it. Depending on how static I want it to be it could be camera independant and so only needs to be computed once.

2) Use raycasting to render a rasterized scene onto a surface GUI. This would capture the same as above, would better fit the scene's positions but be much lower resolution, however the lighting & texturing fit would be even worse. It's probably intractably slow to actually accomplish. Again, could be static since it would be not seamless anyway.

3) Use projection to render a polygon based scene onto a surface GUI. This would be faster for "perfect" resolution, but for complex maps could be very slow. Again, lighting & texturing would be impossible to do perfectly, so there would still be a transition. Again, might be static to save processing time since it wouldn't be seamless.

4) Use projection to render polygons parts Same as above, but perhaps some better quality. Almost surely slower.

5) Project the chamber to the behind of the portal, cut out portal. Cutting out the portal is difficult / possibly impossible when trying to preserve textures. Portals would need to be square or aligned to a grid or perhaps both. To be static this significantly restricts the complexity of chambers as they must be wholly or essentially wholly convex.

6) Project the chamber to the back, but cull This allows the chamber to be not convex, but it involves hiding "real" parts through the viewport of the portal and hiding "fake" parts that are not through that area on the screen. In addition to that it would require cutting large bricks to fit within the correct view regions. The constant projection and modifying of parts could / will be very slow.

7) Project the chamber to the camera, make tiny. I have done this, and it works. It's just extremely slow and still requires culling of the close-up chamber.

I don't know if this is the correct venue for this sort of discussion, but I thought I'd give it a try. What do you all think might work for this sort of thing? Obviously I don't expect full code answers, but what methods could be employed here that I have not thought of, or to improve upon the suggestions I have?

Thank you.

2
I haven't played Portal yet, do the portals basically just put a hole in the wall? That's what it looks like from the image that you provided. TheGuyWithAShortName 673 — 10y
7
They act as surveillance cameras, showing the way out of the other one. Here's a better illustration: http://media.moddb.com/images/mods/1/18/17776/vault.jpg BlueTaslem 18071 — 10y

Locked by Thewsomeguy and Articulating

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

5 answers

Log in to vote
4
Answered by
duckwit 1404 Moderation Voter
10 years ago

I appreciate the raw gumption it must take to be thinking about a spatial problem like this in the context of ROBLOX, but it does appear to me (at least without thinking about it too rigorously) that achieving a solution with sufficient quality, given the limitations of such an environment, is beyond reasonable expectation.

I understand that this is likely not an answer to your problem that you'd like, but perhaps you're using the wrong tools. It might be worth, if you are interested in game design avenues outside of the blanketed world of ROBLOX, to investigate other engines (such as Unity or Unreal Engine).

Now, more along the lines of the spirit of your enquiry, the first thing that comes to mind are Local Parts. There have been a few experiments with them recently, such as this one and this one.

It may be possible to duplicate each chamber (or section of a chamber) and render it similarly to the above experiments but by altering the rotation depending on the positioning of the other portal and such.

3
Duplicate chambers is actually how the Source engine renders the portals. adark 5487 — 10y
1
Really? Do you have a source that describes that? I thought they would have just rendered a shot from the same chamber with a different camera onto the surface. duckwit 1404 — 10y
Ad
Log in to vote
2
Answered by 10 years ago

You COULD just make another copy of the room and the player. Like how the Mirror Game worked in Roblox.

Log in to vote
-3
Answered by
Kilk3 0
10 years ago

If you mean like a stationary portal, then you could try making a life-sized replica of the area behind the portal, so it looks like the person is about to fall through the portal and land in the replica, but they actually teleport to the real thing.

Log in to vote
-4
Answered by
Reverge -1
10 years ago

A possible way to do this is by making one big wall with a decal that has a hole image in it... And cframe bricks around it that are transparent. Only so you can walk through that hole.. And the surroundings are blocked.

1
Can you please clarify what you mean by that...? Note for that my purposes I don't really care about objects being able to move through, just looking through is enough. BlueTaslem 18071 — 10y
2
Ah.. If you click the part, view property... You will be able to see transparency.. Once you've located that.. Just change it to 1. But.. You must have a decal. Kind of like this one: http://www.google.com/url?sa=i&source=images&cd=&cad=rja&uact=8&docid=JC1x5R7nloncpM&tbnid=aWLR8d-QIc9HzM&ved=0CAgQjRw&url=http%3A%2F%2Fdepositphotos.com%2F8176645%2Fstock-photo-Destruction-of-a-brick-wall.html&ei=t Reverge -1 — 10y
4
No offense, but I'm pretty sure BlueTaslem knows about Transparency and Decals. TheGuyWithAShortName 673 — 10y
Log in to vote
-15
Answered by 10 years ago

Put the transparent settings on...~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~

57
Thanks, I never thought of that before http://i.imgur.com/DGHX92L /s BlueTaslem 18071 — 10y
12
Your welcome, no script needed for that. CrazyRocker60 17 — 10y
25
lmao yurhomi10 192 — 10y