Mapping with portals

4 replies [Last post]
lectorgc_
lectorgc_'s picture
Offline
Joined: Aug 2010
Posts:

Here is short tutorial about how to make maps for portal server.

Texturing

All textures and shaders available in testrooms.pk3. Surfaces for portals should be textured with "wall_p" or "floor_p" shader. These shaders contain "nomarks" flag so game will determine that this surface is for portals. All other surfaces aren't for portals. Also you must add "testroom" prefix to your map name. Otherwise you will be able to put portals on every surfaces. Don't forget to dock wall textures with floor and ceiling textures.

New entities

target_removePortal - remove activator's portals.
target_kill2 - instantly kill the activator.
target_startTimer - start the timer for activator.
target_checkpoint - center print the time elapsed since the start for activator.
target_stopTimer - stop the timer, print result for activator. Save in high scores.
target_gravity - when activated, gravity changes to 0 and returns to 800 on deactivation.
All these entities are triggerable by trigger_multiple.

About blue and red shields

Blue shield consist of: 1) curve with "portal_room/weaponclip" texture for one side, 2) curve with "portal_room/noise2_s" texture for another side 3) brush with "common/nodraw" texture in main and "portal_room/noise_s" texture on two sides, 4) trigger_multiple brush which points to 5) target_removePortal entity 6) two borders. When you move/rotate/stretch shield, you should do it for all these components (except entity). And last thing is about blocking the fire. Such shader doesn't exist in game, but you can create it manually. You should open your compiled map (.bsp) in hex editor and find two shaders "textures/portal_room/weaponclip" and "textures/portal_room/noise2_s" (all shaders listed at the begining of file). Then replace last byte of these two shaders from 0 to 4 (see pic: http://i020.radikal.ru/1111/f3/4bc22f8c8799.png). You don't need to do it for any build when testing, Just do it for final bsp.

Red shield contains: 1) curve with "portal_room/noisekill2_s" texture 2) brush with "common/nodraw" texture in main and "portal_room/noisekill_s" texture on two sides, 3) trigger_multiple brush which points to 4) target_kill2 entity 5) two borders.

Some tips

When you locate func_train, don't forget it should be located in same position as first path_corner and the origin key of first path_corner must be copied to func_train. Then the platform will be spawned in correct place.
Fog brushes should have only one free side
Rounded door (with part of wall) contains 13 pieces. Don't forget any of it.
Vertical door contains 4 pieces.
Plasma target contains many small pieces. Don't even try to select them all one by one.

Optimization

Don't forget to caulk all not visible surfaces. Use areaportal's in every door, where it isn't cause bugs. Use hint's in turns. This is important because modified client needs much more power to render many portals.

Almost all objects I included in example map. You can copy-paste them to your map.
[Edit3]
https://dl.dropbox.com/u/85790592/q3/example.rar

I have the enemy flag!

* lectorgc_ rolls the dice 2 times ⚅ ⚅ and gets 12

*ZMB*KENSHIRO*
HK_Kenshiro's picture
Offline
Joined: Dec 2005
Posts:
FR France
Re: Mapping with portals

Thanks to you lectorgc_.

Theses new classname entities needed to be explain. Let's mapping e+ mappers! Happy

You 're already dead!

*ZMB*KENSHIRO*
HK_Kenshiro's picture
Offline
Joined: Dec 2005
Posts:
FR France
Re: Mapping with portals

Huuuuum,
about noise_s shader : here

textures/portal_room/noise_s
{	
            cull none	
            surfaceparm nolightmap
//	    surfaceparm weaponclip	
            surfaceparm nomarks	
            surfaceparm nodlight
            noPicMip
	    tessSize 32	
            deformVertexes wave 100 sin 2 4 0 .5
	    qer_editorimage textures/portal_room/noise.tga	
            qer_trans 0.4	
            {		
 
                 map textures/portal_room/noise.tga		
                 blendfunc add [....ect]

We don't have nosolid?

Also on compilation :

 
entering scripts/portalrooms.shader
WARNING: Unknown surfaceparm: "weaponclip"
WARNING: Unknown surfaceparm: "weaponclip"
WARNING: Unknown surfaceparm: "weaponclip"

You 're already dead!

lectorgc_
lectorgc_'s picture
Offline
Joined: Aug 2010
Posts:
Re: Mapping with portals

Yes, maybe you are right and nosolid should be here. But I textured whole brush with nodraw shader, so it is not solid. And two surfaces of this brush, which i textured with noise_s, don't affect the brush.

Surfaceparam 'weaponclip' is just a reminder here. You should manually correct these shaders in compiled bsp as I said in topic.

I have the enemy flag!

* lectorgc_ rolls the dice 2 times ⚅ ⚅ and gets 12

cml
Forum moderator Rank moderator LIVING LEGEND
camel-xp's picture
Offline
Joined: Mar 2006
Posts:
Re: Mapping with portals

this is a portal shit Tongue
http://q3a.ath.cx/map/portalshit/