File: cs_96.html

package info (click to toggle)
crystalspace 0.94-20020412-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 62,276 kB
  • ctags: 52,843
  • sloc: cpp: 274,783; ansic: 6,608; perl: 6,276; objc: 3,952; asm: 2,942; python: 2,354; php: 542; pascal: 530; sh: 430; makefile: 370; awk: 193
file content (103 lines) | stat: -rw-r--r-- 4,178 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created by texi2html 1.64 -->
<!-- 
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
 
-->
<HTML>
<HEAD>
<TITLE>Crystal Space: map2cs Tutorial Step 9</TITLE>

<META NAME="description" CONTENT="Crystal Space: map2cs Tutorial Step 9">
<META NAME="keywords" CONTENT="Crystal Space: map2cs Tutorial Step 9">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64">

</HEAD>

<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">

<A NAME="SEC196"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_95.html#SEC195"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_97.html#SEC197"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_83.html#SEC181"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_87.html#SEC185"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_99.html#SEC200"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_285.html#SEC711">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<HR SIZE=1>
<H3> 5.5.9 Step 9: Adding Manual Sectors </H3>
<!--docid::SEC196::-->
<P>

To further optimize your map, you can manually add sectoring information.  For 
such a small map, this is not really needed, but on large maps you will 
probably see some improvements.  
</P><P>

To do this create a brush, select it, and press <EM>To Entity</EM>.  For 
classname use `<SAMP>cs_sector</SAMP>'.  Then select the "Visgroups" tab on the 
"Brushs Properties" dialog.  Press "Edit Groups", type the name 
"Sectors" (or anything you like).  Then select the visgroup "Sectors" for 
that brush.  (Otherwise you may have a hard time reselecting the brush later 
on.) 
</P><P>

Duplicate the brush twice, so you have one for every room, and one for the 
corridor.  Align the sector brush <EM>exactly</EM> with all inside walls.  Do 
this with both rooms and the corridor.  
</P><P>

In the editor it should look like this:
</P><P>

<CENTER><IMG SRC="tutorial/map2cs/wcmap2.png" ALT="tutorial/map2cs/wcmap2"></CENTER>
</P><P>

Now compile your map again.  At first, the result should look just the same.  
But if you enable edge drawing, you will see, that the large surrounding 
automatic sector is gone, you have just eliminated significant overdraw.  (In 
fact, now only half the fillrate is required.) But you will also see, that the 
floor is split into many polygons.  which is completely unnecessary.  
</P><P>

You can see this here (look especially at the area of the table): 
</P><P>

<CENTER><IMG SRC="tutorial/map2cs/csmap5a.jpg" ALT="tutorial/map2cs/csmap5a"></CENTER>
</P><P>

`<TT>map2cs</TT>' was created with this problem in mind, so you can avoid it 
pretty easily.
</P><P>

Just select all furniture and do a "To Entity".  (`<TT>map2cs</TT>' will only 
use regular world brushes to texture the sector walls, so the table and the 
other furniture are "invisble" to the algorithm that textures the walls.  
</P><P>

The much better result can be seen here:
</P><P>

<CENTER><IMG SRC="tutorial/map2cs/csmap5b.jpg" ALT="tutorial/map2cs/csmap5b"></CENTER>
<A NAME="map2cs Tutorial Skybox"></A>
<HR SIZE=1>
<BR>  
<FONT SIZE="-1">
This document was generated

using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>

</BODY>
</HTML>