City Street Visportal Tutorial

From The DarkMod Wiki
Jump to navigationJump to search

Introduction

TDM Street Visportal Tutorial (by Baddcog & nbohr1more):

The purpose of this tutorial is to help TDM mappers learn how to build a well optimized medieval street in Dark Radiant for The Dark Mod using vis-portals.

It is assuming you have basic editor knowledge to do things like create brushes and add entities and models. I will touch on this stuff quickly, but will not get into shortcuts, etc...

A vis-portal is basically an invisible wall in your geometry that breaks up the level into 'rooms' or 'areas'. It forces the engine to cull polygons that can't be seen through it to improve performance.

Vis-portals are also used for sound propogation and keep sound from traveling through walls, instead the sound must travel through the portal.

Vis-portals always work best when cleanly butted to geometry and when in a square hole and grid snapped. However a good looking medieval map rarely has nice clean square holes to place them in (an exception is doorways).

This tutorial will show simple techniques to overcome that issue. It will also show 'tricks' that can be used for distant views and LOD of terrain in the distance.

Each stage of construction will be based on the techniques described within, so stage 1 (start area) will be boring and ugly, stage 2 will look better and so on.

You can read the tut and look at the maps, or you can mimick the techniques and build your own map. I suggest doing the latter for best understanding of the techniques. But this is not a step by step on how to create that terrain, you just need to look at pics and do it (ie: needing to understand basic usage of editor). This will NOT teach you anything beyond vis-portalling properly and tricks to make your map look nicer (ie: no AI tuts, no texturing tips, no scripting)

It will cover the following techniques.



Stage 1: Building a very simple 'base' terrain 
to seal from the void and have quick and easy 
working vis-portals.
		
This will speed up work flow and will make sure your map
is properly optimized from day one, avoiding 
the hassles of reverse engineering complex terrain for 
good performance. It will be flat, it will be ugly, 
in fact it won't even be fully textured 
(and there is a reason for that later on, so do not fully texture)
		
It should only take 20 minutes or so.




Stage 2: Detailing to hide the ugly square holes 
we just stuck a square peg in (ie: vis-portal) 
using func_statics and patches.

Again, this tut is not about detailing, 
so this section will be ugly too, but not as ugly. 
It will have a hill, enter-able location or two, 
and we will build some details on top of a vis-portal.



Stage 3: Will be much the same as stage 2, 
but we will make a horizontal vis-portal or two. 
Possibly a sewer and a 'courtyard' that we have 
to climb over a roof to access. It will also add the 'final area',
a city square. This will be in the far side of the U from the start,
but will only be behind a wall to seal it apart. 
The tower that we add here in Stage 4 will be viewable 
from the start area.



 
Stage 4: Will be 'complex' vis-portal interaction 
(ie: the trick stage). 
Basically showing how you can render terrain 
from the start area, that is actually in a sealed of 
and closed portal area across the map. 
This is good for towers, backdrops, skyboxes, etc... 
It will also show you how to use 
LOD's (Level of Detail) for those details.


(After building Stage 2 I realize I may have overscaled everyhting a bit. Mainly it would just take a lot of time and details to fill everything in nicely at this scale. Not to worried though, it helps illustrate that you can still build pretty large areas and still portal well. If I was really serious about making this a map I'd probably use more door frame props along the way just to give myself a better sense of scale as I went.)

Preparation:

I suggest drawing out at least a quick reference of what you want. I skipped it because I was basically shooting for a U shape and am not too concerned about the overall result,just that it shows techniques I am describing.

I'm not worried about details, ie: how a shop face looks, just mainly things like skinny street, T intersection, plaza area... I typically get a rough idea and hack it out as I go in the editor.

This tut is a large U bending to the left. The purpose of that is that I want the player to see a tower at the end of the map from the start point. But we will get to that in Stage 4. So you can make your own layout, but for the purpose of this tut a large U shape is best.