swd3dm2 beta 5 (742k)
swd3dm2 - never outgunned
Nice layout. I like the megasphere/RL bit, reminds me a little of DM4
Couple of problems I can see developing:
- Your ceilings are a little low - it might be smoother to navigate if you bump them all up 16-32 units or so.
- The mapās so open that a lot of the portals arenāt doing anything because the game thinks theyāre visible from both sides, so youāre potentially limiting the amount of detail/lighting you an add if you want to keep framerates high.
Ta for the comments.
On the portalling thing, I wonder if this is because of the shape of the map, or whether itās because Iāve placed the portals badly? Iām putting them flush with obvious doorways and such, but would I be better placing them tucked away or at angles? Iāve not seen any portal tutorials that explain how they should be placed in more complex structures than room-corridor-room. I was never much good at hinting in Q3 either
Hi!
Cool screenshot! Was it hard to learn mapping in doom3?
I see these screens and I read about the happy mappers that map in doom3 atm. My wish-lish:
- Freetime 6 months, to map doom3 mp maps.
- Peace on earth.
- More freetime, so I could create and release cool single-player levels for doom3.
- Cure for cancer.
- I win lots of cash on lottery.
// L.
Maybe a quick explanation of how portals work would helpā¦
In slightly simplistic terms, Doom 3 chops the world into areas using the portals you place, and draws everything in each area as one model. It knows to draw an area if it thinks you can see that area, and it works that out by doing a cheap 2D comparison in your screen space to see which portals overlap.
An easy way to think of portals is to imagine them as doors in a house - if youāre in a room, and you can see a door, two possibilities emerge: either the door is closed, and you canāt see the room beyond, or the door is open, and you can. If you position yourself so that you canāt see the door in the first place, itās even easier - whether itās open or closed, thereās no way you can see into the room beyond.
This extends into multiple rooms quite logically - imagine there are three rooms: A, B and C. Youāre in room A. Room A has a doorway into room B, which has a door leading into room C. All the doors are open.
If you position yourself in room A such that you can see the door into room B, the game will draw all of room B (it actually wonāt draw all of it, but more on this in a second), including the doorway from room B into room C. Because it knows thereās a door in room B into room C, and it knows you can see into room B, it checks to determine if you can also see into room C. It does this by looking to see if any part of the door into room C falls inside the visible area of the door into room B - in other words, can you see the door into room C from your current position? If you can, it draws room C, if not, it doesnāt.
Portals also do one other major thing - going back to the room/doorway example again:
If you look through a door into a room, you can only see so much of that room. The part you can see is bounded by the door frame - if you project that frame away from you into the room, the shape it makes will roughly correspond to the parts of the room you can see. Now (just to be difficult), imagine the view of the room is a picture, and the door frame is a frame youāve placed on top of the picture. If you were to cut out the whole picture around that frame, leaving just the part inside, the part you can see would look exactly the same. Thatās essentially what Doom 3 does to save drawing all the geometry outside the bounds of your portal.
Bear in mind my understanding of portals is as a level designer, not a coder, but the above load of crap works for me, so you might find it useful
@Loffy: Iāve been mapping in Q3 for a few years and have made around 20 maps, the fundementals are the same so the transition is failry quick. Iāve still got plenty to learn, but Iāve always tended towards functional over detailed due to the amount of time and effort I can commit to a hobby.
@Wils: Thanks. I think Iāll digest that, then perhaps come back with some specific questions.
Try r_showPortals 1, illustrates what Wils said very well (try with the stock MP maps)
Iāve played around with portals a bit and uploaded a new alpha to the same URL. I think itās an improvement, but in a number of places I seem to be seeing alot more portals than I think Iād like. Any suggestions or examples of where something could be portalled more efficiently? Is it just a case that I havenāt paid enough attention to vis when forming the structure (always a problem when you put gameplay firstā¦?)
That given, Iām also seeing something rgoer has mentioned before: that toggling r_showtris 2/3 and r_usescissor 0/1 gives interesting results. Is this related to your last example or is the scissor process something else? It looks to me that, though the portals indicate I should be generating a lot of overdraw, the tris still arenāt being drawn.
Misc things:
Is there any guidance on how many portals is too many? I noted that portal causes extra tris to be generated (logical after thinking about it). Any other factors with using lots of portals?
Can you have horizontal portals? I tried adding some but they didnāt seem to have any effect or appear with r_showportals
Iāve not really looked at the stock maps for portal usage as the single player structure works quite well with straightforward room-door-corridor. Are there any good examples of complex portal usage in the stock maps?
How does efficient portal placement effect lighting? Is this more of an issue that tris overdraw?
Yes, the scissor and portals are related. The scissor is a really basic function of every 2d/3d card : it will clip out ANYTHING outside of a specified rectangular area on your 2D screen. The scissor is a 2D clipping that doesnāt reduce the overhead of transforming/rotating your 3d polygons, but reduces pixel overdraw similarly to the Z buffer.
The scissor is set for each portal to the extents of the portal AS SEEN on your 2d screen. It is not really necessary because I think the Z buffer would prevent the cut off parts to show anyway, BUT the scissor will save pixel overdraw and there may be a few other technical advantages to it over the zbuffer (i.e. maybe the 3d card can detect if the bounds of a triangle are outside the scissorās recangular area and save some more GPU cycles, but Iā;m not sure, the Z buffer on the other hand only works on per pixel basis, look at the depth values).
Effectively scissors OFF + showportals ON will let you see better all the geometry that is transformed/rotated/lit.
Is there any guidance on how many portals is too many? I noted that portal causes extra tris to be generated (logical after thinking about it). Any other factors with using lots of portals?
(edited: yeah, the portals āsliceā through surroundng brushes and can create extra triangles, just watch for minimizing the cuts) There are some cpu calculations to figure out the visibility from one portal to the ones behind it, based on your view point (the red/green coloring with r_showportals). It also involves setting the scissors for each āgreenā portal before rendering whatās behin (that should be a minor cost).
Can you have horizontal portals? I tried adding some but they didnāt seem to have any effect or appear with r_showportals
You mean sitting on the XY plane ? Yes you can. Generally not useful in a large room cut accross its height, since you see everything anyway. But could be useful for really tall rooms, when the doorways leading to such rooms are low, because then from inside the hallways, you can not see the upper part of the main room because of the smaller vis portal between doorway and room. If the upper part of the room has lots of geometry, that could be useful.
How does efficient portal placement effect lighting? Is this more of an issue that tris overdraw?
A polygon is lit the same no matter what. A visportal that stands between a light and a polygon touched by the light, does not affect them. I think the engine looks at the polygon first, not the light. So if you ve got a truckload of polygons culled thanks to visportals, all the lighting that goes with it is also skipped.
I dont understand your second question there. Basically the number of lights hitting polygons, and placement of visportals for culling out areas of the map and reduce overdraw (not so much overdraw as # of polygons pushed on the graphics card), they both are very important.
Not looking to bad, if you havenāt already decided to do so, might want to break up the use of that orange like texture in the 2nd pic with some trims or what have you, but well underway
Z
Updated to beta status, links and shots updated!
swd3dm2 beta (684k)
ed: updated again after squashing fps blackspot.
Iām getting quite a few black brush faces due to shadowing, even w/ my mp config:
With specular/bump turned off, these faces turn straight black, rather than having small highlights.
Also seem to have an invisible plat at PG.
Iām not so sure about RL->Mega, then RJ up to armor. Seems too powerful. Maybe if you moved the RL outside of the mega area to that room w/ the crates, it wouldnāt look so tempting to RJ up through the mega hole. (remember RJās are relatively ālow costā in D3 MP)
Odd. In my gameplay cfg, that room is really bright. Perhaps youāve got a fkd up setting somewhere? BTW, r_skipspecular always gets turned off for me in MP, are you sure you are supposed to be able to disable it? As it happens, Iāve relit the main rooms in my local copy anyway now and indeed the pg plat. Found that smaller lights using the twopass shader to be much kinder to fps than the oversized lights I had been using.
Regards the RL/MH - I see what you mean, but for a room that only has one non-trick exit and a pit of death, I think the reward needs to be significant. Shifting the RL out into the crate room wouldnāt make any difference unless you had spawned in the room (and the spawn in there is not an āinitialā spawn, so that only affects mid-game spawns). I fully expect players to RJ out of the MH room alot, the proximity of RL and RJ spot will only be a factor in learning the importance of that route.
Checked it again. Cranked r_gamma up to 5 and I still had the same black faces. Iāve got r_shadows 0, r_skipbump 1, r_skipspecular 1 in my MP config, and have never had any problems when joining servers. You just have to set it in the actual config (seta), rather than in the console during the game.
Updated to beta 3, taking onboard some of the output of discussion resulting from the column I wrote on ESReality. Beta 3 now includes barrels and some ādamageable lightsā. Unlike the regular shootable lights, these lights ārespawnā after 20 seconds. There are 3 on the top level near the RL/armour. Iāve achieved these lights with a func_damageable and 2 trigger_relays. Iād be interested to know if there were a better/easier way of achieving the same effect.
Updated to beta 4 (link @ top of post)
To prevent the chaingun from becoming all powerful: switched position of CG back to original spot, moved CG ammo (also in slightly awkward spot to run), added some pillars to give players a little extra cover.
Also: Fixed damagable lights (werenāt working online). Added some glass, pretty much for the hell of it.
1 known problem: the func_fx on the damageable lights only fires the first time in a dedi svr/remote client situation. Works fine on a listen server. Wierd.