Editing Bethsoft Tutorial Optimization

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
[[Category:Tutorials]]
[[Category:Solutions]]
[[Category:Building_and_Editing]]
[[Category:Building_and_Editing]]
[[Category:Getting Started]]
[[Category:Getting Started]]
Line 17: Line 17:


===Room Marker===
===Room Marker===
<span class="pops">[http://geck.bethsoft.com/youtube_age_redirect.php?fil=vRP_G5BnglQ Tutorial Video]</span>


A room marker is a box used to encapsulate objects you want to belong to that room marker.  For example, say we made a room marker that surrounds a hallway.  Inside that hallway we've placed a bunch of objects (chairs, tables, debris, etc). If we went in game and stood inside that hallway, we would see all of the objects.  However, as soon as we stepped outside of the hallway, then all of the objects inside the room marker would be culled (disappear).
A room marker is a box used to encapsulate objects you want to belong to that room marker.  For example, say we made a room marker that surrounds a hallway.  Inside that hallway we've placed a bunch of objects (chairs, tables, debris, etc). If we went in game and stood inside that hallway, we would see all of the objects.  However, as soon as we stepped outside of the hallway, then all of the objects inside the room marker would be culled (disappear).


<blockquote>
<blockquote>
The boxes '''"A"''' and '''"B"''' in the diagram represent two Room Markers.  The black dot is the player, and the shaded triangle illustrates the player's field of vision.  Because the player is within Room Marker '''"A"''', only objects contained within '''"A"''' will render.
The boxes '''"A"''' and '''"B"''' in the diagram represent two Room Markers.  The black dot is the player, and the shaded triangle illustrates the player field of view.  Because the player is within Room Marker '''"A"''', any objects contained within '''"A"''' will render.
</blockquote>
</blockquote>


Line 27: Line 29:


===Portal===
===Portal===
<span class="pops">[http://geck.bethsoft.com/youtube_age_redirect.php?fil=r2Wu75-IN44 Tutorial Video]</span>


A portal connects two Room Markers together.  Think of a portal as a doorway into a room marker.  If there were two room markers next to each other with no portal in between, then we could not see the objects in the room markers unless we were inside them.  If a portal were placed between them, then we could see the objects in each of the room markers, assuming we're looking through the connecting portal.
A portal connects two Room Markers together.  Think of a portal as a doorway into a room marker.  If there were two room markers next to each other with no portal in between, then we could not see the objects in the room markers unless we were inside them.  If a portal were placed between them, then we could see the objects in each of the room markers, assuming we're looking through the connecting portal.
Line 32: Line 36:
<blockquote>
<blockquote>
In the diagram to the right, the orange line labeled '''"a"''' represents a portal linking Room Markers '''"A"''' and "'''B"'''.  The portal '''"b"''' represents a portal to the the unbounded area.
In the diagram to the right, the orange line labeled '''"a"''' represents a portal linking Room Markers '''"A"''' and "'''B"'''.  The portal '''"b"''' represents a portal to the the unbounded area.
Because the '''a''' portal is within the player's field of view, the contents of both '''"A"''' and '''"B"''' will render.  Because portal '''"b"''' cannot be seen by the player, objects beyond it will be not rendered (occluded).
Because the '''a''' portal is within the player's field of view, the contents of both '''"A"''' and '''"B"''' will render.  Because portal '''"b"''' cannot be seen by the player, objects beyond it will be occluded/not render.
</blockquote>
</blockquote>


Line 42: Line 46:


==Step 1: Create Three Room Markers==
==Step 1: Create Three Room Markers==
<span class="pops">[http://geck.bethsoft.com/youtube_age_redirect.php?fil=vRP_G5BnglQ Optimization Tutorial Video (part 1) at YouTube]</span>
----


In this tutorial we're going to optimize the first section of our vault using Room Markers and Portals.  We will not be placing any Multibounds or Occlusion Planes.   
In this tutorial we're going to optimize the first section of our vault using Room Markers and Portals.  We will not be placing any Multibounds or Occlusion Planes.   
Line 109: Line 109:
</blockquote>
</blockquote>


So, make sure to scale each room marker to fit the dimensions of each area and make sure the edges of your room markers snap together.  Make sure grid-snap is toggled on [[Image:Jbrowne_IconSnapGrid.jpeg]], and try to work with a fairly large grid size, to reduce the chance of mistakes.  When you're finished, your three room markers should look like the ones in fig 3c below.
So, make sure to scale each room marker to fit the dimensions of each area and make sure the edges of your room markers snap together.  Make sure grid-snap is toggled on[[Image:Jbrowne_IconSnapGrid.jpeg]], and try to work with a fairly large grid size, to reduce the chance of mistakes.  When you're finished, your three room markers should look like the ones in fig 3c below.


<gallery>
<gallery>
Line 118: Line 118:


==Step 2: Create Two Portals==
==Step 2: Create Two Portals==
<span class="pops">[http://geck.bethsoft.com/youtube_age_redirect.php?fil=r2Wu75-IN44 Optimization Tutorial Video (part 2) at YouTube]</span>
----


Now that we have our room markers set up, we need to create portals between each room marker so the renderer understands how the rooms connect to each other.
Now that we have our room markers set up, we need to create portals between each room marker so the renderer understands how the rooms connect to each other.
Line 180: Line 176:
Now we have two portals, one lined up and another off to the side. We need to attach these portals to the room markers. First, let's line up the portal that we put off to the side.   
Now we have two portals, one lined up and another off to the side. We need to attach these portals to the room markers. First, let's line up the portal that we put off to the side.   


Move it to the doorway between the vault entrance room and the hallway, as shown in fig 5a.  You'll need to rotate it. You can toggle Snap Rotation on and rotate it that way or you can freely rotate it and change it's rotation properties by hand. But remember, portals need to be flush with room markers.  Your portals will most likely have a Z rotation of 0, 90, -90, -180, or 180.
Move it to the doorway between the vault enrance room and the hallway, as shown in fig 4a.  You'll need to rotate it. You can toggle Snap Rotation on and rotate it that way or you can freely rotate it and change it's rotation properties by hand. But rememeber, portals need to be flush with room markers.  Your portals will most likely have a Z rotation of 0, 90, -90, -180, or 180.


You'll notice that my portal still has a white line pointing to the cave room marker.  Don't worry about that now, we'll take care of that in a bit.  Right now, we need to scale our portal to fit the doorway.  Go ahead and scale yours if you haven't done so already.  Compare your portal to the one in 5b. (I've hidden the vault door so you can see my portal dimensions easier).
You'll notice that my portal still has a white line pointing to the cave room marker.  Don't worry about that now, we'll take care of that in a bit.  Right now, we need to scale our portal to fit the doorway.  Go ahead and scale yours if you haven't done so already.  Compare your portal to the one in 4b. (I've hidden the vault door so you can see my portal dimensions easier).


Now that we have our two portals in position, we need to attach them to the correct room markers.  Let's start with the portal we just moved and rotated.  Notice that the portal still has a white line pointing to the cave room marker.  That means it is attached to that room marker.  That is '''not''' what we want - that link is left over from our duplication.  
Now that we have our two portals in position, we need to attach them to the correct room markers.  Let's start with the portal we just moved and rotated.  Notice that the portal still has a white line pointing to the cave room marker.  That means it is attached to that room marker.  That is '''not''' what we want - that link is left over from our duplication.  


We need to break the link. To do that, enter Portal Mode [[image:jbrowne_Icon_PortalMode.jpeg]] and select the portal we're working with. Once you have that portal selected, you need to toggle Portal Mode off [[image:jbrowne_Icon_PortalModeOff.jpeg]].  CTRL+Left-Click to select the cave room marker.  So now you should have a portal AND the cave room marker selected, as in Fig 5c.
We need to break the link. To do that, enter Portal Mode [[image:jbrowne_Icon_PortalMode.jpeg]] and select the portal we're working with. Once you have that portal selected, you need to toggle Portal Mode off [[image:jbrowne_Icon_PortalModeOff.jpeg]].  CTRL+Left-Click to select the cave room marker.  So now you should have a portal AND the cave room marker selected, as in Fig 4c.


To break the link, click the Break Portal Link Icon [[image:jbrowne_Icon_PortalUnLink.jpeg]].  The white line should disappear.
To break the link, click the Break Portal Link Icon [[image:jbrowne_Icon_PortalUnLink.jpeg]].  The white line should disappear.


Now we need to select the portal again along with the hallway room marker.  Remember; enter Portal Mode [[image:jbrowne_Icon_PortalMode.jpeg]], select the portal, exit Portal Mode [[image:jbrowne_Icon_PortalModeOff.jpeg]], CTRL+Left-Click to select the hallway room marker.  You should now have the portal and hallway room marker selected, as in fig 5d.
Now we need to select the portal again along with the hallway room marker.  Remember; enter Portal Mode [[image:jbrowne_Icon_PortalMode.jpeg]], select the portal, exit Portal Mode [[image:jbrowne_Icon_PortalModeOff.jpeg]], CTRL+Left-Click to select the hallway room marker.  You should now have the portal and hallway room marker selected, as in fig 4d.


<gallery>
<gallery>
image:jbrowne_Optimize_Step05a.jpeg|Fig 5a: Lining up a portal between Room Markers
image:jbrowne_Optimize_Step05a.jpeg|Fig 4a: Lining up a portal between Room Markers
image:jbrowne_Optimize_Step05b.jpeg|Fig 5b: White/blue line indicates portal link to room
image:jbrowne_Optimize_Step05b.jpeg|Fig 4b: White/blue line indicates portal link to room
image:jbrowne_Optimize_Step05c.jpeg|Fig 5c: Preparing to break a bad link.
image:jbrowne_Optimize_Step05c.jpeg|Fig 4c: Preparing to break a bad link.
image:jbrowne_Optimize_Step05d.jpeg|Fig 5d: Preparing to link the hallway room to the appropriate portal
image:jbrowne_Optimize_Step05d.jpeg|Fig 4d: Preparing to link the hallway room to the appropriate portal
</gallery>
</gallery>


To create a link, simply press the Portal Link Icon [[image:jbrowne_Icon_PortalLink.jpeg]].  A white line should now appear from the portal to the hallway room marker, as in 6a below.
To create a link, simply press the Portal Link Icon [[image:jbrowne_Icon_PortalLink.jpeg]].  A white line should now appear from the portal to the hallway room marker, as in 5a below.


Repeat the process and link the portal to the vault room marker. When you're finished, it should look like Fig 6b.
Repeat the process and link the portal to the vault room marker. When you're finished, it should look like Fig 5b.


<blockquote>
<blockquote>
Line 207: Line 203:
</blockquote>
</blockquote>


Link the portal near the cave to the two adjacent room markers ''(the vault and cave room markers)''. When finished, you should have two portals and three room markers linked up, as in 6c.  You can also get a clearer view of your room/portal connections by using '''"SHIFT+C"''' to hide all statics, then selecting all portals (made easier using the filter) to display link-lines.  You can see an example of this technique in 6d.
Link the portal near the cave to the two adjacent room markers ''(the vault and cave room markers)''. When finished, you should have two portals and three room markers linked up, as in 5c.  You can also get a clearer view of your room/portal connections by using '''"CTRL+C"''' to hide all statics, then selecting all portals (made easier using the filter) to display link-lines.  You can see an example of this technique in 5d.


<gallery>
<gallery>
image:jbrowne_Optimize_Step05e.jpeg|Fig 6a: Hallway Room & Portal Linked
image:jbrowne_Optimize_Step05e.jpeg|Fig 5a: Hallway Room & Portal Linked
image:jbrowne_Optimize_Step05f.jpeg|Fig 6b: Two links from the portal to adjacent  
image:jbrowne_Optimize_Step05f.jpeg|Fig 5b: Two links from the portal to adjacent  
image:jbrowne_Optimize_Step05g.jpeg|Fig 6c: White links show that our rooms/portals are all linked
image:jbrowne_Optimize_Step05g.jpeg|Fig 5c: White links show that our rooms/portals are all linked
image:Optimize_AddendumImg01.jpg|Fig 6d: Using SHIFT+C and selecting all portals is a useful debugging view for optimization
image:Optimize_AddendumImg01.jpg|Fig 5d: Using CTRL+C and selecting all portals is a useful debugging view for optimization
</gallery>
</gallery>


Line 263: Line 259:
</blockquote>
</blockquote>


<blockquote>WARNING: Havok physics and the room markers do not play well together. Avoid placing Havokable objects near portals that they might be knocked through.
'''[If an object is in, say, room A, then drawing of that object is restricted to people who are in room A, or who can see the object through a portal to room A. If the Havok engine causes the object to move (because the player picked it up with the Z key, or an explosion threw it) then the object will continue to be drawn so long as the object is in the motion under the control of the Havok system. However, once the object comes to rest, it is passed back to the normal renderer, and is once again drawn only for people in room A... even if it is now in room B. If you are in room B, with the object, it will be invisible to you.]'''</blockquote>


[[Bethsoft_Tutorial_Lighting|<<<BACK]]'''|---|[[Bethsoft_Tutorial_Finalize_and_Connect|NEXT>>>]]
[[Bethsoft_Tutorial_Lighting|<<<BACK]]'''|---|[[Bethsoft_Tutorial_Finalize_and_Connect|NEXT>>>]]
{{Template:Bethsoft_Tutorial_TOC}}
{{Template:Bethsoft_Tutorial_TOC}}

Please note that all contributions to the Fallout3 GECK Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see GECK:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Templates used on this page: