File: cs_68.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 (158 lines) | stat: -rw-r--r-- 6,515 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<!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: mdl2spr</TITLE>

<META NAME="description" CONTENT="Crystal Space: mdl2spr">
<META NAME="keywords" CONTENT="Crystal Space: mdl2spr">
<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="SEC154"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_67.html#SEC150"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_69.html#SEC157"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_63.html#SEC144"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_53.html#SEC134"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_69.html#SEC157"> &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>
<H2> 4.4 Quake Model Converter (<CODE>mdl2spr</CODE>) </H2>
<!--docid::SEC154::-->
<P>

<EM>By Nathaniel Saint Martin, <A HREF="mailto:noote@bigfoot.com">noote@bigfoot.com</A>.
Back seam fix and skin resizing by Seth Galbraith,
<A HREF="mailto:sgalbrai@linknet.kitsap.lib.wa.us">sgalbrai@linknet.kitsap.lib.wa.us</A>.
Project overhauled by Eric Sunshine, <A HREF="mailto:sunshine@sunshineco.com">sunshine@sunshineco.com</A>.</EM>
</P><P>

`<TT>mdl2spr</TT>' is a model converter for Quake1 MDL and Quake2 MD2
files.  It converts these files into Crystal Space's sprite format.  If the
Quake1 MDL contains skins, they are extracted and saved as PNG image
files.  If skin height or width is not a power of two, it will be resized.
</P><P>

<A NAME="SEC155"></A>
<H3> Usage </H3>
<!--docid::SEC155::-->
<P>

`<TT>mdl2spr</TT>' is invoked from the command line, and is given the name of an
input `<TT>.mdl</TT>' or `<TT>.md2</TT>' model file, as well as the name of the
desired output sprite file.
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>mdl2spr [<VAR>options</VAR>] <VAR>model-file</VAR> <VAR>output-sprite-name</VAR>
</pre></td></tr></table></P><P>

Both `<SAMP><VAR>model-file</VAR></SAMP>' and `<SAMP><VAR>output-sprite-name</VAR></SAMP>' are required.
`<SAMP><VAR>model-file</VAR></SAMP>' is the filename of the input `<TT>.mdl</TT>' or
`<TT>.md2</TT>' model file, and `<SAMP><VAR>output-sprite-name</VAR></SAMP>' is the name of the
output sprite without the trailing `<TT>.spr</TT>' extension (which will be
appended automatically by `<TT>mdl2spr</TT>').
</P><P>

If a skin is extracted from a MDL file, then it will be written to a file
named `<TT><VAR>output-srite-name</VAR>.png</TT>'.  If more than one skin exists within
the model, then each skin will be placed in its own PNG file and a number
(and possibly letter) will be appended to the sprite name before the
`<TT>.png</TT>' extension.
</P><P>

Here is a summary of the options understood by `<TT>mdl2spr</TT>':
</P><P>

<DL COMPACT>
<DT><CODE>-h</CODE>
<DD>Display usage and option summary.
<P>

<DT><CODE>-s &#60;<VAR>float</VAR>&#62;</CODE>
<DD>Set the global scale of model based upon the floating point number
`<SAMP><VAR>float</VAR></SAMP>'.  Default is 0.025.
<P>

<DT><CODE>-d &#60;<VAR>int</VAR>&#62;</CODE>
<DD>Specify the frame delay in Quake ticks from `<SAMP><VAR>int</VAR></SAMP>' for frames which
don't otherwise have a built-in delay.  Default is 100.
<P>

<DT><CODE>-n</CODE>
<DD>Disable automatic naming of action frame sets.  Enabled by default.
<P>

<DT><CODE>-x &#60;<VAR>float</VAR>&#62;</CODE>
<DD>Set center of sprite on X axis from `<SAMP><VAR>float</VAR></SAMP>'.  Default is 0.0.
<P>

<DT><CODE>-y &#60;<VAR>float</VAR>&#62;</CODE>
<DD>Set center of sprite on Y axis from `<SAMP><VAR>float</VAR></SAMP>'.  Default is 0.0.
<P>

<DT><CODE>-z &#60;<VAR>float</VAR>&#62;</CODE>
<DD>Set center of sprite on Z axis from `<SAMP><VAR>float</VAR></SAMP>'.  Default is 0.0.
<P>

<DT><CODE>-r</CODE>
<DD>Disable automatic power-of-2 skin resizing.  Enabled by default.  This option
only applies to Quake1 MDL files (not Quake2 MD2 files).
</DL>
<P>

<A NAME="SEC156"></A>
<H3> Future Plans </H3>
<!--docid::SEC156::-->
<P>

This is a list of planned future enhancements to `<TT>mdl2spr</TT>'.
</P><P>

<UL>
<LI>
Add a command-line option so user can manually specify a replacement
`<TT>palette.lmp</TT>' file rather than using the built-in one.
</UL>
<P>

<A NAME="Tutorials"></A>
<HR SIZE=1>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_67.html#SEC150"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_69.html#SEC157"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_63.html#SEC144"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_53.html#SEC134"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_69.html#SEC157"> &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>
<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>