Game Development Community

Portals/Visibility Clarification?

by Scott Holliday · in Torque Game Engine · 06/12/2004 (7:12 am) · 3 replies

I am trying to better understand how the .dif interior portals work. I've read through the forums, tools, and tutorials (including Desmond Fletcher's excellent resource).

My biggest question is how does the engine determine whether or not to render an interior? I understand that if the portal is visible, the rest of the interior is rendered. But what determines whether the portal is visible (or not)?

1) The current camera(s) are pointed toward that portal?
2) There are no intervening .difs?
3) There are no intervening .dtss?
4) There is no intervening terrain?
5) There portal is within sight distance?

The question arises because I want to have several difs lined up portal to portal to portal. Can I use .dts doors (or separate .dif doors) to limit the number of interiors to be rendered? Or will they be ignored by the engine?

About the author

Recent Threads

  • DIF maximum?

  • #1
    06/12/2004 (8:49 am)
    They will be ignored, as the portal determinations are done without much regard for anything beyond the scene and other portals.

    You could modify the engine so you can "switch" portals on and off. Quake 2 did that to excellent effect.
    #2
    06/12/2004 (1:32 pm)
    To reword your answer, the engine renders:

    1) the inside of all interiors whose portals are not occluded by their own external features.
    2) the inside of all interiors whose portals are not occluded by the interior features from portals already rendered.

    I assume that both cases take into account the camera's current position. If the player is further from a portal, the engine doesn't need to render branching pathways thereafter.

    I wish there was some way to test this so I could understand it better. Is there a tool that will count the number of currently rendered interiors?
    #3
    06/16/2004 (11:09 am)
    Have you tried turning on wireframe mode? :)