PDA

View Full Version : TUTORIAL:  See-through warp portals


Schmerm
04-01-2001, 04:05 PM
Here I'll show you how to make one of those see-through portals like the one in the Karnak level, where you teleport back to the ankh pool.  It will be a simplified version (no teleporter yet,  just the viewing part), but should give enough information so you can apply it to more complex situations.

This assumes you have basic knowledge of the Serious Editor, like creating rooms/primitives and adding entities and changing their properties.

Step 1: Creating the geometry

1) Fire up SEd and open a new map.  Create a conus primitive, this will be our first room.  Give it dimensions 8x16x8 and check the Room flag.  CSG-Add it to the world.

2) Press H to turn off lighting, so you can see your room.  Texture the room however you like, it's not important.

3) Open the Entities browser thingy, and drag a MovingBrush into one of your views.  This will be our "viewer" brick.  While the movingbrush is still selected (it should be right after you create it), press the Conus primitive button.  Give it dimensions 4x1x6, no Room flag, and position it at one end of the hallway-like room we already have, resting on the ground.  CSG-Add it.

4) This finishes the geometry for our first room, and now we have to make the second room to warp to.  Create another Conus primitive, dimensions 16x16x8, room flag turned On.  Position it away from your first room.  Now instead of Adding it like with the other primitives we've made, press the Link Layers button (or press L) to create this room as its own seperate entity.  Texture it however you like, preferrably different than the first room so you can see a difference.

Step 2: Creating the entities

1) Add a playerstart entity in the first long room we made.  You gotta start somewhere right?

2) Add a MirrorMarker entity (the one that looks like a brown mirror thingy), place it in the second square room, somewhere in the middle, and halfway between floor and ceiling.

3) While the MirrorMarker is still selected, press D to drop a marker in that location.  The marker will be the actual viewer entity.  It's currently the MirrorMarker's target, and whatever is the MirrorMarker's target becomes the viewer entity.  This means you can probably target moving objects with the MirrorMarker and get a steadily changing view.  Anyways...

4) Move the mirrormarker INSIDE the MovingBrush we made earlier.  It has to be at its EXACT same coordinates, or weird stuff happens (try moving it sometime).  Press Q on the MovingBrush and the MirrorMarker to find/set the right coordinates if you have to.

5) Select the MovingBrush in entity mode, and set its 'Mirror 0' property to the MirrorMarker.  This registers the mirrormarker a possible mirror viewer for the movingbrush.

6) In Polygon mode, select all the faces of the MovingBrush entity and press Q.  In the Polygon tab, select the MirrorMarker under the Mirror selection list.  In the Shadow tab, check off Full Bright (and Don't Cast if you don't want it to cast shadows).  Finally, in the Texture tab, set the Blend mode to Blend (Shade and Add work too), and reduce the Alpha of the texture to a very small value.  The alpha can be set with the color box second from the right.  A value of 20 or so is good.


And that's it!  Press T to test your level, and you can see the MovingBrush now views into the other room.  If you see any red splotches while viewing the other room, fiddle around with the position of the Marker in the second room.  You can change the viewing angle by rotating the Marker or the MirrorMarker (the Marker is preferred, because it makes more sense).



Feedback?

Bwian
04-01-2001, 04:34 PM
Sounds great Schmerm! I'll probably be using this sometime for control-panel type veiwing, or getting started on portal warps.

Good Job. :)

Schmerm
04-01-2001, 04:47 PM
Update:

I managed to make an empty MovingBrush(no solids attached) moving around in the second room in a circular pattern.  The MirrorViewer now targets this movingbrush instead of a stationary Marker.  I added a teleporter as well, that teleports to the MovingBrush's location.

Basically,  you get a moving teleport target that you can also see what's on the other side of!

Bwian
04-01-2001, 07:12 PM
WOW! Now you could easily do realtime 'security' cameras that show right on the screen. :biggrin:

Smithboy
04-01-2001, 08:08 PM
Would it be possible to put these mirrormarkers or whatever on players, so that a person could go to a room and see through the person's screen? Maybe even teleport to his location?

Schmerm
04-01-2001, 08:45 PM
Hmm... players are entities right?  Maybe there's a way to target them.  This can't be done in the editor, so there has to be a way to set the Target of the MirrorMarker to an in-game entity (the player) while the game is running.

I'll look into it.

solidad
04-04-2001, 12:14 PM
I like the tutorial but, erm I somehow got it wrong.... Did all the steps as best as I could but all I get is a red block where the mirror should be.  Not really sure how to describe it.

solidad
04-04-2001, 12:44 PM
figured it out.  I had to do the fullscreen test mode (numpad 6 for fullscreen numpad 0 to get back to split view).  Even testing the game in the split screen wont show the mirror.  Also the mirror entity in the second room has to be the same height as the mirror marker in your first room or you get a weird red thing happening in the mirror or at least thats what happened to me.  Please tell me if any of this is wrong hehe.  ugh being a newbie can suck.

solidad
04-04-2001, 12:49 PM
ok disregard the thing about same height.  all you have to do is keep fiddling around with the mirror marker till any anomolies go away (like was said in the tutorial heh).  

Walt
11-28-2001, 06:51 PM
This seems to work fine, but when I created a portal that showed a room filled with glass a very strange bug occured where I couldn't see through to the skybox but once in a while. The room is in the same general area as the mirrormarker, but not in the same sector. You can see the windows above the portal while still looking through the portal...well perhaps you should see for yourself what the bug is.

http://www.nilspack.com/badbug.gif
http://www.nilspack.com/badbug2.gif

forgive if you can't see the pics, I have to fix up Nilspack sometimes...

P.S.
The bug exists even when you can't see the windows in the upper room.

(Edited by Nilspack at 5:59 pm on Nov. 29, 2001)

Cable
11-29-2001, 10:28 AM
Err... that tutorial is the same tutorial as in the STP editing. I've just made that tutorial, BUT I've read it in STP Editing.
No offense, but you really are stealing things from others.

Cable
11-29-2001, 10:42 AM
Oooops! Sorry schmerm, I just realized it was you who made it there. So I apologize. Forget the last post.

getodac
11-29-2001, 10:46 AM
Now, who is responsible for reviving this old old thread?

addman
11-29-2001, 03:02 PM
*cough* *cough* NILSPACK!!!! *cough* *cough*

Walt
11-29-2001, 03:54 PM
I did because I have a question and it'd be pointless to start a new thread

LSD
11-30-2001, 09:29 AM
in that case... the sky counts as a portal viewer, which if you remember can't have two at once. that is why it keeps cutting out when you look thru a portal at it.

LA Smog
12-04-2001, 05:54 AM
But in the Karnak level, the sky is visible through the portal, isn't it?