Log On
     
 





Tutorial: Sky Portals

Part 2

So you have the sky portal origin concept in your mind, its now time to place it and use it.

It's quite simple, actually. Just create a new room outside of the current area, someplace off to the side, and stick the new ent in it from where you want the 'eye' to be.

 

Now go to the room where you wish for the new sky room to be visible, and apply the caulk texture to the walls. (This is for an understanding of what it's doing, we aren't going to be lighting this room yet) and note the presence of the misc_portal_sky_surface ents. This just needs to be viewable by the player when the sky surface is viewed if you checked the spawnflag in the misc_sky_portal entity.

Compile, and see what you have.

That's it! It simply draws what's inside that room instead of a HOM. Here's a picture of the scale.

Note: You can't have ents inside this room be visible to the 'eye' unless the 'inskyroom' '1' key/value is set. So no, you can't have a secret teleporter there so you can appear a god to the peons on the map.

Now we come to the point of why the need for the misc_portal_sky_surface ents. In some levels, you are going to have 'sparklies', or 1 pixel hom's that you would never, ever see. But now instead of those little hom's, you will now have a sky portal reference and those pixels can become bright, very bright depending on your sky portal room. So, either spend the time to fix t-junctions, or only segregate those areas and use the entity.

What if we wish to light it? Well, you know that you can't have a nodraw surface emit light, but you -can- have one emit sun. So, onto the hack for lighting the level with a custom shader.

Next: Lighting