Please or Register to create posts and topics.

trap and detector

I encountered problem on my map. You can easily trap yourself there. I have played with portal detectors, and noticed that there is no option like "OnPortalNotTouching". Is there any way to fake that? The situation is like that:

Edit: LOL my ascii drawing fuckt up when I sent it :S

So you can leave your cube at the upper room (right pic.) and go yourself to lover room (left pic.) You can't shoot portals from lower room to upper room. How can I make it like that, that when the cube is at upper room, you at lower room and no portals at upper room, then thing X happens?

If I recall correctly, chamber 13 has a similar safeguard. When you manage to move all of the boxes into the first room and get into the second room AND have both portals in the second room, there is some smart-ass comment by GlaDOS followed by the door between the rooms opening.

Here's how I think they made that:

  • There is a trigger in the second room that checks for boxes. It controls a logic_branch entity via OnStartTouch (off) and OnEndTouchAll (on).
  • There are also two func_portal_detectors, one for each room. The one in the first room turns a second logic_branch off when a portal is placed there. The one in the second room turns that same logic_branch on when both portals are placed there . (OnStartTouchBothLinkedPortals, if I remember correctly.)
  • A third logic_branch is on whenever the door is closed.
  • A fourth logic_branch is on whenever the player is in the second room.
  • When all four of these are true, the player is trapped and a logic_branch_listener triggers the safeguard.

I just made this up out of the top of my head. You may want to look at the actual map using gcfscape / entspy.

Sendificate series: Sendificate | A Beam Too Far | Airtime | 302
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic

I checked the valves map and it uses the logic relays, triggers and math counters :| But now I encountered another problem, I got very strange things happen in map. First of all, my shadow went more sharp and darker on my map. And I got a strange color cast areas on some places, also few my walls (around goo) goes black when looking them thru portal from specific angle. And the worst of all: When I load (or quick load) my map in game I got very slow fps rate and got some strange yellow color cast on button bases (see the pic.) I haven't change any lights or cubemaps or sky, this all happened after I added more than one color_corrections (disabled at start, used for one short time special effect) I also added explosions (copied straight from valves map chamber 14 from exploding door) and point_clientcommand to enable cheats and slow down the timescale for little time. I also named all my lights and made them shut down for sec with logic_relay (tis one is too for that special effect) I also added two env_fades (flag "fade from", white color) they are used once too (0,5 sec both) and finally I added env_shake and sparks. Anyone can help me with this?

One new problem! See the picture. Can it be because my map is is too memory hungry? I got normally lower fps rate than on valves maps...

I hate to say it, but you are probably using too many different textures. There is a limit to the number of textures that can be loaded into the game at any one time. The only solution to this is to reduce the number of materials used in your map.

This is just one of the stages of learning how to make great maps: you get better at adding lots of detail, then the game engine collapses, then you have to learn to add just enough detail so that it looks cool and still runs properly. Been there, done that. :P

As far as the strange lighting goes, I have no idea, but that could also be related to resource depletion. (Light maps are textures too...)

Sendificate series: Sendificate | A Beam Too Far | Airtime | 302
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic

🙁 I try to lower textures and lightmaps. And BTW I forgot to say that the yellow button thing and lower fps happens even I only minimaze the game for few secs...

Wait I send compile log here

Okay, here is the console after running the map:

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

Initializing renderer...
Sending full update to Client ajaton
Set Gravity 600.0 (0.250 tolerance)
Signon traffic "CLIENT": incoming 28.403 KB, outgoing 1.490 KB
WARNING: Level contains NPCs but has no path nodes
Soundscape: portal_testchmb.explore_space
Redownloading all lightmaps
R_RedownloadAllLightmaps took 130.428 msec!
Soundscape: portal_testchmb.goo_pit
Soundscape: portal_testchmb.cleanser
Soundscape: portal_testchmb.cleanser
Soundscape: portal_testchmb.cleanser
Soundscape: portal_testchmb.cleanser
No caption found for 'portal.ding_on'
Soundscape: portal_testchmb.cleanser
Soundscape: portal_testchmb.cleanser
Soundscape: portal_testchmb.cleanser
Soundscape: portal_testchmb.goo_pit
Soundscape: portal_testchmb.explore_space
Soundscape: portal_testchmb.goo_pit
No caption found for 'portal.ding_off'
Soundscape: portal_testchmb.explore_space
Soundscape: portal_testchmb.goo_pit
Soundscape: portal_testchmb.explore_space
Dropped ajaton from server (Disconnect by user.)
Loading game from SAVEquick.sav...
---- Host_NewGame ----
Spawn Server: mp3_new_trapfix4
Loading game from //MOD/SAVE/mp3_new_trapfix4.HL1...
execing skill_manifest.cfg
execing skill.cfg
Set Gravity 600.0 (0.250 tolerance)
Can't find soundscape: portal_testchmb.explore.space
Invalid file size for motd.txt
Created class baseline: 24 classes, 5728 bytes.
Game started

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

Here is the compile log:

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

** Executing...
** Command: "c:program filessteamsteamappspenapappasourcesdkbinorangeboxbinvbsp.exe"
** Parameters: -game "c:program filessteamsteamappspenapappaportalportal" "D:hammermp3_new_trapfix4"

Valve Software - vbsp.exe (Mar 11 2008)
2 threads
materialPath: c:program filessteamsteamappspenapappaportalportalmaterials
Loading D:hammermp3_new_trapfix4.vmf
"materials/glass/glasswindow_refract01.vtf": cached version doesn't exist
fixing up env_cubemap materials on brush sides...
ProcessBlock_Thread: 0...1...2...3...4...5...6...7...8...9...10 (1)
ProcessBlock_Thread: 0...1...2...3...4...5...6...7...8...9...10 (0)
Processing areas...done (0)
Building Faces...done (0)
Chop Details...done (0)
Find Visible Detail Sides...
Merged 654 detail faces...done (0)
Merging details...done (0)
FixTjuncs...
PruneNodes...
WriteBSP...
done (1)
writing D:hammermp3_new_trapfix4.prt...Building visibility clusters...
done (0)
Creating default LDR cubemaps for env_cubemap using skybox materials:
skybox/sky_wasteland02*.vmt
! Run buildcubemaps in the engine to get the correct cube maps.
Creating default HDR cubemaps for env_cubemap using skybox materials:
skybox/sky_wasteland02*.vmt
! Run buildcubemaps in the engine to get the correct cube maps.
Finding displacement neighbors...
Finding lightmap sample positions...
Displacement Alpha : 0...1...2...3...4...5...6...7...8...9...10
Building Physics collision data...
done (2) (1225352 bytes)
Placing detail props : 0...1...2...3...4...5...6...7...8...9...10
Compacting texture/material tables...
Reduced 3393 texinfos to 1531
Reduced 465 texdatas to 358 (24772 bytes to 19243)
Writing D:hammermp3_new_trapfix4.bsp
22 seconds elapsed

** Executing...
** Command: "c:program filessteamsteamappspenapappasourcesdkbinorangeboxbinvvis.exe"
** Parameters: -game "c:program filessteamsteamappspenapappaportalportal" "D:hammermp3_new_trapfix4"

Valve Software - vvis.exe (Mar 11 2008)
2 threads
reading d:hammermp3_new_trapfix4.bsp
reading d:hammermp3_new_trapfix4.prt
473 portalclusters
1089 numportals
BasePortalVis: 0...1...2...3...4...5...6...7...8...9...10 (0)
PortalFlow: 0...1...2...3...4...5...6...7...8...9...10 (4)
Optimized: 243 visible clusters (0.00%)
Total clusters visible: 44586
Average clusters visible: 94
Building PAS...
Average clusters audible: 255
visdatasize:44156 compressed from 60544
writing d:hammermp3_new_trapfix4.bsp
4 seconds elapsed

** Executing...
** Command: "c:program filessteamsteamappspenapappasourcesdkbinorangeboxbinvrad.exe"
** Parameters: -game "c:program filessteamsteamappspenapappaportalportal" "D:hammermp3_new_trapfix4"

Valve Software - vrad.exe SSE (Mar 11 2008)

Valve Radiosity Simulator
2 threads
[Reading texlights from 'lights.rad']
[53 texlights parsed from 'lights.rad']

Loading d:hammermp3_new_trapfix4.bsp
Setting up ray-trace acceleration structure... Done (2.95 seconds)
6163 faces
214271 square feet [30855102.00 square inches]
0 Displacements
0 Square Feet [0.00 Square Inches]
6163 patches before subdivision
74827 patches after subdivision
542 direct lights
BuildFacelights: 0...1...2...3...4...5...6...7...8...9...10 (38)
BuildVisLeafs: 0...1...2...3...4...5...6...7...8...9...10 (27)
transfers 17927067, max 1223
transfer lists: 136.8 megs
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #1 added RGB(855669, 685607, 541978)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #2 added RGB(256632, 199936, 152512)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #3 added RGB(79137, 57564, 40564)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #4 added RGB(25469, 17837, 12105)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (2)
Bounce #5 added RGB(8240, 5416, 3447)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #6 added RGB(2726, 1715, 1052)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #7 added RGB(906, 538, 314)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #8 added RGB(305, 174, 98)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #9 added RGB(104, 56, 30)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (2)
Bounce #10 added RGB(36, 19, 10)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #11 added RGB(12, 6, 3)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #12 added RGB(4, 2, 1)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #13 added RGB(2, 1, 0)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #14 added RGB(1, 0, 0)
Build Patch/Sample Hash Table(s).....Done<0.0377 sec>
FinalLightFace: 0...1...2...3...4...5...6...7...8...9...10 (20)
FinalLightFace Done
125 of 512 (24% of) surface lights went in leaf ambient cubes.
ThreadComputeLeafAmbient: 0...1...2...3...4...5...6...7...8...9...10 (37)
Writing leaf ambient...done
Ready to Finish

Object names Objects/Maxobjs Memory / Maxmem Fullness
------------ --------------- --------------- --------
models 229/1024 10992/49152 (22.4%)
brushes 3456/8192 41472/98304 (42.2%)
brushsides 23670/65536 189360/524288 (36.1%)
planes 6904/65536 138080/1310720 (10.5%)
vertexes 11246/65536 134952/786432 (17.2%)
nodes 3574/65536 114368/2097152 ( 5.5%)
texinfos 1531/12288 110232/884736 (12.5%)
texdata 358/2048 11456/65536 (17.5%)
dispinfos 0/0 0/0 ( 0.0%)
disp_verts 0/0 0/0 ( 0.0%)
disp_tris 0/0 0/0 ( 0.0%)
disp_lmsamples 0/0 0/0 ( 0.0%)
faces 6163/65536 345128/3670016 ( 9.4%)
hdr faces 0/65536 0/3670016 ( 0.0%)
origfaces 5224/65536 292544/3670016 ( 8.0%)
leaves 3804/65536 121728/2097152 ( 5.8%)
leaffaces 7314/65536 14628/131072 (11.2%)
leafbrushes 5413/65536 10826/131072 ( 8.3%)
areas 4/256 32/2048 ( 1.6%)
surfedges 50541/512000 202164/2048000 ( 9.9%)
edges 30422/256000 121688/1024000 (11.9%)
LDR worldlights 542/8192 47696/720896 ( 6.6%)
HDR worldlights 0/8192 0/720896 ( 0.0%)
leafwaterdata 3/32768 36/393216 ( 0.0%)
waterstrips 666/32768 6660/327680 ( 2.0%)
waterverts 0/65536 0/786432 ( 0.0%)
waterindices 11313/65536 22626/131072 (17.3%)
cubemapsamples 33/1024 528/16384 ( 3.2%)
overlays 118/512 41536/180224 (23.0%)
LDR lightdata [variable] 10301544/0 ( 0.0%)
HDR lightdata [variable] 0/0 ( 0.0%)
visdata [variable] 44156/16777216 ( 0.3%)
entdata [variable] 131134/393216 (33.3%)
LDR ambient table 3804/65536 15216/262144 ( 5.8%)
HDR ambient table 3804/65536 15216/262144 ( 5.8%)
LDR leaf ambient 10411/65536 291508/1835008 (15.9%)
HDR leaf ambient 3804/65536 106512/1835008 ( 5.8%)
occluders 0/0 0/0 ( 0.0%)
occluder polygons 0/0 0/0 ( 0.0%)
occluder vert ind 0/0 0/0 ( 0.0%)
detail props [variable] 1/12 ( 8.3%)
static props [variable] 1/13104 ( 0.0%)
pakfile [variable] 3082818/0 ( 0.0%)
physics [variable] 1225352/4194304 (29.2%)
physics terrain [variable] 2/1048576 ( 0.0%)

Level flags = 0

Total triangle count: 17118
Writing d:hammermp3_new_trapfix4.bsp
2 minutes, 23 seconds elapsed

** Executing...
** Command: Copy File
** Parameters: "D:hammermp3_new_trapfix4.bsp" "c:program filessteamsteamappspenapappaportalportalmapsmp3_new_trapfix4.bsp"

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

And here's map information:

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

Solids: 3456
Faces: 21103
Point entities: 543
Solid entities: 658
Unique textures: 74
Texture memory: 37490688 bytes {36,61 MB}

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

I have only one more textures than valves map chamber 18 (about 1 MB more texture memory) This starts to goes very gay 🙁

I don't see anything strange in your compile log. Also, 74 textures shouldn't be too many.

Sometimes the problem is not the absolute number of textures, but that the game engine needs to switch between them a lot while rendering one frame. This happens when the BSP structure of your map is very complicated.
Perhaps you need to turn more static geometry into func_detail. For my own maps, I estimate that around 80% of all static brushes are func_detail and only the large walls, floors and ceilings remain as "normal" brushes. (And water of course, except for fish-tank-like water with func_water_analog.)

penapappa wrote:
I also named all my lights and made them shut down for sec with logic_relay

I read over this the first time. If you make your lights switch-able, VRAD skips radiosity calculation on them. This explains why your shadows have gone darker. If you want the light to flicker in the whole map, you'd better use just an env_fade and/or other screen effects. (This is what Valve does.)

Sendificate series: Sendificate | A Beam Too Far | Airtime | 302
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic