Announcement

Collapse
No announcement yet.

Portal Tutorial

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Portal Tutorial

    Heres a quick step by step guide I've thrown together for people that want portals in their map.

    If you have any questions I'm happy to help.




    BASIC BSP

    File > New
    Select Subtractive.

    Subtract a 1024x640x384 cube and duplicate another 64 units away.
    Connect these two rooms with a corridor 192x64x384.
    Add 2 64x64x384 pillars in each room which will act as your portals doorway.


    ------------------------------------------------------------------------------------

    The portal I am creating is going to be accessible from both sides.
    But will always teleport you coming out the right direction.

    If your portal is inaccessible from the rear then you can ignore portals 2,3,6 and 7.


    ------------------------------------------------------------------------------------

    ADDING PORTALS

    Open the generic browser and under the 'actor classes' tab expand:
    SceneCaptureActor > SceneCaptureReflectActor > SceneCapturePortalActor > PortalTeliporter
    and select UTPortal.

    Right click in your map and select: Add UTPortal here.

    The first thing you will notice is that its invisible.
    So straight away go back to your generic browser and under the groups tab click:
    Edit > New and name your Group Portals.
    You should have UTPortal PersistentLevel.UTPortal_0 in your Portals group.

    Go back to your top viewport and duplicate your Portal so you have 8 of them.
    Hold Alt and drag the red movement arrow to make a duplicate.
    If you keep your groups tab open you will see them appear.

    One by One select Portals 4,5,6 and 7 in your groups tab by double clicking on them,
    then drag them to the doorway on the right.

    Arrange the portals into order as i have in img_2.



    ------------------------------------------------------------------------------------

    PORTAL PROPERTIES

    Close out the generic browser and instead click on the binoculars(Search for actors)
    Search For: UTPortal.

    This gives you a list of your portals so you can select and change all the properties at once.

    Each portal has 2 sides.
    The front side: which displays the portal effect.
    The rear side: which is invisible in-game.

    What we want to do is turn our portals so the ones in the middle face outwards,
    and the outermost ones face inwards.

    Hold Ctrl and select Portals 0,2,4 and 6 in your 'search for actors' window then click Properties.
    Change: Movement > Rotation - Set Yaw to 180.

    Hold Ctrl and select Portals 0,3,4 and 7 in your 'search for actors' window then click Properties.
    Change: Display > bHidden - check this box


    ------------------------------------------------------------------------------------

    PLAY TEST


    Add some lights, click build all and then SAVE YOUR MAP

    DM-PortalTest (make sure you include the DM-)

    Right click in your map and select 'play from here'
    You should have what appear to be 2 large mirrors.



    ------------------------------------------------------------------------------------

    TELEPORTING

    Hold Ctrl and select Portals 0,1,2 and 3 in your 'search for actors' window then click Properties.
    Check the padlock in the top left of the properties window which should read UTPortal Properties (4 selected)
    Expand: PortalTeleporter

    Now go back to your 'search for actors' window and double click on UTPortal_5

    Now back in your PortalProperties under >PortalTeleporter
    In the list is 'SisterPortal' currently set to 'None'
    If you click on the green arrow this should change to
    UTPortal'Package_2.TheWorld:PersistentLevel.UTPort al_5'

    IMPORTANT
    Now uncheck the padlock in the top left




    Back in the 'search for actors' window select Portals 4,5,6 and 7 then click properties.
    Check the padlock in the top left of the properties window

    Now go back to your 'search for actors' window and double click on UTPortal_1

    Now back in your PortalProperties under >PortalTeleporter
    Again click the green arrow next to 'SisterPortal' and 'None' should change to
    UTPortal'Package_2.TheWorld:PersistentLevel.UTPort al_1'


    IMPORTANT
    Now uncheck the padlock in the top left

    ------------------------------------------------------------------------------------

    PLAY TEST

    You will notice you can run through your portals now.
    Shooting them hower is rather unpredictable and hit scan weapons will crash the editor.

    ------------------------------------------------------------------------------------

    You can fix this by creating a 1x256x384 cube that fits your doorway
    Add these between your portals and change its surface to a transparent texture.
    This stops shooting through them and saves you from crashing.




    You may also want to adjust the size of your portal, you have to play around with this in the drawscale settings.
    Make sure the center point of each portal is the same distance from the floor.
    Otherwise you will walk through and come out at the wrong hight.

    Final effect in a VCTF map im currently working on.

    #2
    Very cool tutorial but I didn't get the ideia of creating those 4 static meshes for just one 2-side portal. Why do you have to have some many static meshes?

    shade.pt

    Comment


      #3
      I don't have much experience in this.

      You said something about importing static messes so you can see them. Can you give a quick example of how to do this and which static mesh would be useful for just placing the portal. I've managed to group them.

      Nvm. You can playtest the map to see the portals and they fit in nicely between the pillars. Also when you select the portal you basically selecting the dot right in the middle of it so just place this dot in the middle of the pillars.

      Comment


        #4
        the good news is i just got projectle weapons to shoot through portals perfectly
        the semi good news is hitscan weapons doesnt crash the editor
        the bad news is the hitscan weapons doesnt want to shoot through portal

        set the collision to 0 and 3 to "blockall"
        set the collision to 1 and 2 to "no collusion"

        with other portal

        set the collision to 4 and 7 to "blockall"
        set the collision to 5 and 6 to "no collusion"

        delete the wall you might of added between the portals if you added it

        Comment


          #5
          Ok just played around a little bit more. Hitscan weapons actually does shoot through. You just dont see the beam of the shock rifle for instance but you can do shock combo through portal. Just to let you know. It works just can't see it...

          Comment


            #6
            Tried it out and shooting still doesnt work. Stand in the connecting passage and shoot either portal with the flack cannon.
            You will see the flack shrapnel fly between the two portals through the dividing wall. It doesnt come out the other side like its suposed to.



            AHHHHH ok, i moved the portals so they are only 1 unit appart and now you can shoot through perfectly.
            The problem was it was going through P0 coming out of P5 going straight into P4 to P1 back to P5 and staying in that infinite loop.

            Comment


              #7
              Originally posted by HideInLight View Post
              I
              You said something about importing static messes so you can see them. Can you give a quick example of how to do this and which static mesh would be useful for just placing the portal. I've managed to group them.
              Yeah you cant assign a static mesh to them as such, i just put some meshes in the top viewport so you could see thats where to put the portals.

              Comment


                #8
                think i messed up the portal in one side to a point it's working.

                heres my testmap so you can attempt figure out why it's working, because I'm not sure anymore.

                http://www.sendspace.com/file/1uam9d

                Stand in the corridor and shoot with the flak at the portal with the shockrifle near it.And also attempt a shock combo through that one.

                slomo 0.1 helps.

                On another note found this in the scripts

                PortalTeleporter.uc
                Code:
                /**
                 * Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.
                 */
                class PortalTeleporter extends SceneCapturePortalActor
                	native
                	abstract
                	notplaceable;
                
                /** destination portal */
                var() PortalTeleporter SisterPortal;
                /** resolution for texture render target; must be a power of 2 */
                var() int TextureResolutionX, TextureResolutionY;
                /** marker on path network for AI */
                var PortalMarker MyMarker;
                /** whether or not encroachers (movers, vehicles, and such) can move this portal */
                var() bool bMovablePortal;
                /** if true, non-Pawn actors are always teleporter, regardless of their bCanTeleport flag */
                var bool bAlwaysTeleportNonPawns;
                /** whether or not this PortalTeleporter works on vehicles */
                var bool bCanTeleportVehicles;

                Comment


                  #9
                  Ohhhhhh.... my
                  If you check moveable you can attatch them to a mover.

                  So now... the gate looks normal until you walk up to it and when you stand on the disc the portal appears so you can walk through it, then disapears shortly after.... this is mega sweet. Haha amazing myself here.

                  Comment


                    #10
                    i have played your map but i can only exit on the place were there is no shock rifle
                    so does not mather were i go in i exit always on the same spot.

                    Comment


                      #11
                      Nice tuturial. The only problem im having is how do you see them in your view ports to line them up properly? I have some teleporters in my map that im making and tried to replace them with these reflective portals but i cant see them to rotate and line them up! Any ideas?

                      Comment


                        #12
                        I thought there is no WarpZone or it's analogues. Very nice tutorial!

                        Comment


                          #13
                          Originally posted by spinspinsugar View Post
                          Nice tuturial. The only problem im having is how do you see them in your view ports to line them up properly? I have some teleporters in my map that im making and tried to replace them with these reflective portals but i cant see them to rotate and line them up! Any ideas?
                          To line them up you need to select them individually from your searchforators list. Then using the widget as a guide move it roughly into the middle of the doorway where you want it. Then do a right click 'play from here' to see what it looks like. If it doesnt fit, scale it with the drawscale then do another play test until it it fits.

                          As for rotating, you have to hit F4 and change the rotation value. Properties: Rotation > Yaw -insert value-

                          Comment


                            #14
                            Great, thanks for the tutorial. This will come in handy (hopefully) for my inside room is bigger than the outside house idea.

                            Comment


                              #15
                              whoa, i decide to log in and find this. it should work perfectly for an idea i had earlier today for a map

                              Comment

                              Working...
                              X