Looking for a good portaling tutorial, suggestions?

Discuss stuff related to HaloCE (for modding, go to the HEK General forum).
Post Reply
Krush





Posts: 174
Joined: Mon Mar 08, 2004 4:33 am
Location: Detroit

Looking for a good portaling tutorial, suggestions?

Post by Krush »

Hey guys, I've made a transition from PC to CE over the last few years and I'm really getting my bsp modeling skills down. I've imported multiple maps into CE but they've all been reasonable sizes. Now, I'm going for a map I plan to release and its currently about 33,000 polies. Obviously, that requires some portaling to keep it running smoothly and make sure no polies are disappearing in front of your eyes. So, with that being said, does anyone know of a good tutorial that goes through the steps for portaling a map? This would be much appreciated, thanks. :wink:
Image
User avatar
Cryticfarm





Posts: 3611
Joined: Sat Dec 09, 2006 7:23 pm
Location: canada
Contact:

Post by Cryticfarm »

There one on the gearbox forums.
Krush





Posts: 174
Joined: Mon Mar 08, 2004 4:33 am
Location: Detroit

Post by Krush »

I've been browsing the tutorial resource thread on Gearbox and I'm not seeing anything. I don't see one under TheGhost's tutorials either. You possibly have a link?
Image
Matooba





Posts: 186
Joined: Thu Jan 05, 2006 2:51 am
Location: North East U.S.
Contact:

Re: Looking for a good portaling tutorial, suggestions?

Post by Matooba »

Placement of Portals

The final step to completing a level is the addition of surfaces or planes that define portals. These portals are used by the engine for several purposes.

The primary function of these portals are as "visibility portals", portals that the Halo game engine uses to try and cull out objects that cannot be seen to improve performance by not rendering such objects.

The portals in general help break up the level so that it can be handled in parts to help performance in general. Attributes can also be set for portals, such as ambient sounds to play in the portal as well as environmental audio effects. Portals can also be used to define weather volumes and fog volumes.

There are 2 kinds of portals that are defined, "portals" and "exact portals". The following are descriptions for each:

1) Exact Portals: (Material name: +exactportal)
These are portals defined by surfaces or planes with the +exactportal material applied to them. Exact portals are created such that the faces (edges and vertices) match the surrounding geometry (edges and vertices). These faces in effect create a "seal". The volume that is between these surfaces or planes is an exact portal. The direction of the normals of the faces helps determine how the portal is defined.

2) Portals: (Material name: +portal)
These are portals defined by surfaces or planes with the +portal material applied to them. These portals are created by faces or planes that are used to divide the game environment. These planes must create a seal with the level, but do not have to match vertices and the associated edges with the surrounding geometry. These planes are much more loosely defined and placed in the level and are used to break or divide the level up into sections. The direction of the normals for the faces helps determine how the portal is defined.

A volume defined as an Exact portal CAN have standard Portal areas defined within it and vice versa as long as the above rules outlined in their definitions are satisfied. However, an open ended or non-enclosed Portal cannot intersect an Exact portal, a "vis error" or rendering anomaly will occur. In other words, be careful to not let a Portal plane improperly divide or bisect an Exact portal volume. Portals can be used to help portal horizontally (looking left and right in the XY plane) AND vertically (looking up and over objects or geometry that vary in the Z-Axis). Later, when the level is running in the Sapien or the game, use rasterizer_wireframe 1 to view the level and exit and enter the doorways to see how the level geometry and objects are not drawn from the player view as this portal volume is entered and exited.

Notes:

Exactportals,

Make sure the normals for the faces point outwards, this will help define the volume between the faces. the normals can be viewed by clicking on the Show Normals check box under Selection. If the normals are not easily visible, the lengths of the visual representations of the normals can be increased using the Scale value. Once this is complete, assign the +exactportal material to the faces by selecting all the faces and setting the Material ID to that of the exactportals.

Portals,
Under Create click on Plane.
Enter the following values in the listed fields, Length Segs: 1 and Width Segs: 5
Create the plane such that the edges extreme edges extend past the extents of the level.
Take this plane and create 3 more planes for a total of 4 planes that run lengthwise "North" to "South".
Convert all the planes into an Editable Mesh (Edit Mesh) and Attach all the planes into 1 object called "terrain portals".
Planes and faces should be aligned to try and divide the level evenly. Vertices and the associated edges and faces should be aligned along major edge boundaries in the level.

Faces running "West" to "East" should be created using the existing vertices and edges for the planes. Only the middle 4 edges and associated vertices should be used. In addition, the edges should be extended past the level boundaries. Make sure that the normals are consistent for all the faces, this will determine how the portal volumes are created. In the example, the faces running "East" to "West" have their normals pointing North, while the faces running "North" to "South" have their normals facing "East".

Link the "terrain portals" object to the reference frame "frame" object.
The level has now been portalled. :P


For some additional tips, see this post: http://gbxforums.gearboxsoftware.com/sh ... 734&page=2

Hope that helps, peace :D
Image
Post Reply