Jump to content

Issue: portal within Anchored Portal


Mordeth

Recommended Posts

I've been experimenting with Anchored Portals to add some 3D visual fluff to levels, for example a broken floor with the player able to see architecture stretching underneath the floor while standing in the hole. I can also make this reciprocal, so Anchored Portals become 2-way 'windows'.

So far so good. A player standing inside such a Anchored Portal area can see the linked-from area, PLUS any additional LINKED Portals connected to the linked-from area.

But if the additional portal is not a Linked Portal but an Anchored Portal it won't render..!

Is this a limitation? Is there a way to get around that?

Share this post


Link to post

Be sure to use "two-way" portal types if the area you can see in the portal has a portal leading back to the area with the first portal. Otherwise you can get into some bad situations with unbounded drawing. I am not sure that's what's going on here, but, you didn't state you were using two-way portal specials so I have to ask that first.

Share this post


Link to post

Are these two-way? If not, which are?

295 Apply anchored portal to the ceilings of all tagged sectors
296 Apply anchored portal to the floors of all tagged sectors
297 Apply anchored portal to the floors and ceilings of tagged ectors
298 Anchor line (for specials 295 and 297)
299 Anchor line (for special 296)

Share this post


Link to post

   { 344, "Portal_TwowayCeiling" },
   { 345, "Portal_TwowayFloor" },
   { 346, "Portal_TwowayAnchorLine" },
   { 347, "Portal_TwowayAnchorLineFloor" },

Share this post


Link to post
printz said:

Did I forget to list those?

I think they've been documented forever. And talked about multiple times on the forums here. They were created like in 2007 or so to fix problems with anchored portals that could cause infinitely recursive rendering.

SoM changed something again around the time that overlays were added which makes regular anchored portals even more strict about not recursing than they used to be. Two-way portals are supposed to be used in all such situations.

Share this post


Link to post

Bump. Let me show what I'm trying to do.

Platform:


Under platform:


The first screenshot shows a normal room, with a raised platform. In front of that platform is a tiny raised sector with missing lower textures, used to fix an anchored portal (296). The anchored portal shows up as the space underneath the platform.

This portal has a view leading back to the main room, using the reverse. This is what you see in the second screenshot.

Big problem: I can't do the same with another platform nearby, because the space under a second platform can't be rendered when viewed from underneath the first one.

I've tried, but can't seem to duplicate this with 2-way anchored portals nor linked portals which would (probably) do render all attached portals from wherever. Well, not without dividing the main room in two layers, which kinda defeats the purpose (linked portals currently don't allow player to travel up that ladder between the two parts).

Suggestions very welcome ;)

Share this post


Link to post

Well, I am working on the clipping code for linked portals as we speak ;)

Other than that, can you post a screenshot and explanation of the situation that isn't working? Maybe I can think of something...

Share this post


Link to post

Great news on the clipping code ;)

The reason I'm using 1-way anchored portals is because of that are far more lenient in their use, and can be tricked into doing the things seen in those two screenshots. And it works.

However, you can't "see" inside a different anchored portal when you're standing inside another one. It won't render. The obvious solution is to avoid that situation, but in some cases that hinders a particular level layout.

If I could manage to do the same with 2-way anchored portals or even linked portals, this problem disappears. But that seems not possible.

Share this post


Link to post

HOM. Which is 'as intended', since it's a 1-way portal viewed from another 1-way portal. So basically I'm looking for a way to do the same with a 2-way or linked portal.

Share this post


Link to post

So wait, are you viewing a portal through a portal... does the inner portal link back to the original area?

Share this post


Link to post

Pretty much. From the 'main room' a 296 anchored portal enables the 'under platform' view, from 'under platform' another 295 anchored portal leads back to the 'main room'. So sketching it out:

[linked portal] <> [ main room ] <> [ anchored portal A ]
          ok   <----  Player    ---> ok
          ok   <----    ok      <--- Player
But:
[anchored portal B] <> [ main room ] <> [ anchored portal A ]
          ok    <----  Player       ---> ok
          HOM   <----    ok         <--- Player

Share this post


Link to post

They are in the same relative position as their anchor points from the main room. Keep in mind, those anchored portals are the 1-way kind.

Share this post


Link to post
Mordeth said:

They are in the same relative position as their anchor points from the main room. Keep in mind, those anchored portals are the 1-way kind.


So the camera starts inside the player, then goes to another place, then the inner portal sends the camera back to inside the player. When the inner portal renders, the first thing that gets rendered is the surface the first portal is applied to, which makes it render the first portal again. This creates a recursive portal rendering which there is currently no way to fix.

Share this post


Link to post

Yeah I know. But that wasn't really the question :) I'd like to use a different portal (2-way, or linked) to create the same effect but which doesn't have this problem. And that seems not possible. So far at least :)

It allows for on-the-spot creation of a 3D visual effect (eg. a suspended crate or the underside of a vehicle) without having to slice up the main room into several (linked) portal layers. Which btw, also isn't really feasible right now due to the clipping/movement issues between portals.

If the thin 'effect' sector with its missing lower textures is affected by a 2-way portal, the only way it mimics the above setup is if the 'effect' sector is below player viewpoint. That would limit its use to eg. render undersides of vehicles. And still, the recursive bit I can't seem to do: I cannot make the effect so that you can eg. look underneath a vehicle and see the main room behind it.

Share this post


Link to post

You could make a replica of your main area that could be seen through the other side of the first portal.

So instead of: Main area->Portal Area->Main Area
you would go: Main area->Portal Area->second portal area

That would work. You can't use portals to see back into the area you are in. That's why I'm not allowing linked portals on sloped surfaces.

Share this post


Link to post

SOM: that's how I currently do small-scale stuff like 'underside of vehicles' scenarios. Basically the illusion that you can see all the way underneath a structure back into the same room, while in fact it's just a portal copy. But that's pretty limited in use.

But hey, if I ever find a trick around this, I'll post it here ;)

Scuba Steve: not 16 years of development, but 16 years of honing skills :) Goddamn I feel old now.

Share this post


Link to post
Mordeth said:

SOM: that's how I currently do small-scale stuff like 'underside of vehicles' scenarios. Basically the illusion that you can see all the way underneath a structure back into the same room, while in fact it's just a portal copy. But that's pretty limited in use.

But hey, if I ever find a trick around this, I'll post it here ;)


I don't think there is one, and yeah, it's limited in use. Portals are mostly good for ROR scenarios. Cars and other 3D structures are an example of things that 3d floors are better at. Too bad I'm not implementing 3d floors ;)

... again :(

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...