root/trunk/README.txt

Revision 184, 11.0 kB (checked in by pdjonov, 2 years ago)

o Starting to put together a de-facto x42 implementation.

Line 
1 maya2q3 GPL source release
2 ==================================
3
4 HermitWorks Entertainment Corporation
5 Email: phill@hermitworksentertainment.com
6
7
8 This file contains the following sections:
9
10 LICENSE
11 GENERAL NOTES
12 COMPILING ON WIN32
13 COMPILING ON GNU/LINUX
14 USAGE
15
16 LICENSE
17 =======
18
19 See COPYING.txt for the GNU GENERAL PUBLIC LICENSE
20 -----------------------------------------------------------------------------
21
22 Some source code in this release is not covered by the GPL:
23
24 NVMeshMender.cpp
25 NVMeshMender.h
26 NvTriStrip.cpp
27 NvTriStrip.h
28 NvTriStripObjects.cpp
29 NvTriStripObjects.h
30 VertexCache.h
31
32 Copyright NVIDIA Corporation 2003
33 TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
34 *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
35 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
36 AND FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL NVIDIA OR ITS SUPPLIERS
37 BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES
38 WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS,
39 BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS)
40 ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF NVIDIA HAS
41 BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
42
43 DXVec.h is also not covered under the GPL as it is copied from the DirectX SDK.
44 -----------------------------------------------------------------------------
45
46 GENERAL NOTES
47 =============
48
49 A short summary of the file layout:
50
51 maya2q3                         maya2q3 source code
52 glew                            GL Extension Wrangler library http://glew.sourceforge.net
53 physfs-1.1.0            PhysicsFS file system library http://icculus.org/physfs/
54
55 These folders will be created by the Win32 build process:
56
57 maya2q3/win32/bin/CONFIG        exporter executable binary (and debug symbols)
58 maya2q3/win32/obj/CONFIG        intermediate files (.obj, etc)
59
60 Release builds also generate .pdb debugging databases, however due to compiler
61 optimizations these are not sufficient for debugging - they will not allow you
62 to properly step through the code. If you're trying to debug, use a debug build.
63
64 COMPILING ON WIN32
65 ==================
66
67   DEPENDENCIES:
68
69 The plugin depends on the GLEW library for access to OpenGL and OpenGL extensions,
70 and on the PhysicsFS library for access to assets in a Quake 3 style game directory.
71 The source for both libraries is included in the repository to make building the
72 plugin easier.
73
74 You will need to build these libraries before you can build the plugin. To do this
75 open and build libs.sln. The project files it references have already been set up
76 with the correct compiler and linker settings, and will put the .lib files where
77 the maya2q3 project expects to find them.
78
79 You only have to do this once.
80
81 Note that neither I nor anyone else at Hermitworks Entertainment are responsible for
82 the development or maintenance of either project. You can find the people that *are*
83 responsible for them here:
84
85     GLEW: http://glew.sourceforge.net/
86     PhysicsFS: http://icculus.org/physfs/
87
88   THE PLUGIN:
89
90 Note: You MUST have Maya (or at least the SDK components) installed on your system.
91
92 Open maya2q3.sln.
93
94 There are 4 configurations in the solution: debug for Maya 6.0, debug for
95 Maya 7.0, release for Maya 6.0, and release for Maya 7.0 (note that only the
96 Maya 7.0 configurations are being actively developed or supported). You must
97 match the configuration to the version of Maya you are building against.
98
99 The solution is already configured to build the exporter and copy it to the
100 appropriate directory, along with its supporting script(s). Note that building
101 a debug will overwrite an existing release build. Modify the Custom Build Step
102 project property's command line of you want to change this but we find it makes
103 it easier to debug the plugin if only one copy ever exists: going back to a
104 release plugin is as easy as rebuilding.
105
106   IF MAYA IS INSTALLED TO A NON-DEFAULT DIRECTORY:
107
108 If Maya is not installed in the default folder $(Program Files)\Alias\Maya\VERSION
109 then you will have to edit the project's properties to get it to reference the
110 correct header and library files. Open up the project properties and change
111
112 C/C++ -> General -> Additional Include Directories
113 Linker ->General -> Additional Library Directories
114 Build Events -> Post-Build Event -> Command Line
115
116   SUPPORTING OTHER MAYA VERSIONS:
117
118 If you're adding code to support another version of Maya, create new solution
119 configurations and update the above properties. The code automatically retargets
120 itself to the current Maya version based on the value of the MAYA_API_VERSION
121 macro, so it is imperative that the compiler is directed to the correct version
122 of the headers.
123
124 COMPILING ON GNU/LINUX
125 ==================
126
127 Download the tar.gz, and extract with tar -zxf maya2q3-VERSION.tar.gz
128
129 then run make from inside of the mata2q3-1.0/maya2q3 folder.  Once it is
130 done there should be a maya2q3.so in the linux/bin directory.  Copy that to
131 your maya plug-ins folder.  On my system it's in /usr/aw/maya7.0/bin/plug-ins/
132
133 You can also use maya to browse for the plugin if you do not have rights to
134 copy it into the plug-ins folder.
135
136 $ tar -zxf maya2q3-VERSION.tar.gz
137 $ cd maya2q3-VERSION/maya2q3
138 $ make
139 $ sudo cp linux/bin/maya2q3.so /usr/aw/maya7.0/bin/plug-ins/
140
141 The Makefile assumes that the environment variable MAYA_LOCATION is properly
142 defined in your environment, on my system is is set to /usr/aw/maya7.0/
143
144 If you have any problems with the linux build, contact
145 scott@hermitworksentertainment.com
146
147 USAGE
148 =====
149   MODELLING GUIDE:
150  
151 The exporter only outputs geometry from meshes. That said, it can handle ANY mesh
152 geometry. It supports parenting, instancing, N-sided polygons, and isn't even
153 picky about non-manifold geometry. If you create more than one UV mapping for an
154 object, the exporter will use the first one Maya gives it, whichever that may be.
155
156 The MD3 format includes a surface name and a default shader name. These are
157 derived from Maya as follows:
158
159   A surface is basically a set of polygons that share the same material. It is
160   named after the shading group that it belongs to. To access this, select the
161   material and press Go to Output Connection in the attribute editor (this will
162   take you to the shading group).
163  
164   NEW (version 2) WAY:
165   Each surface is connected to a default Q3 shader. The shader is specified by
166   applying a Q3Shader material to the object and setting the shaderName attribute.
167   If a non-Q3Shader material is assigned to an object, it will export using the
168   old rules (below).
169  
170   NOTE: the Q3Shader material understands Quake 3 shader rules and can accept the
171     name of a shader or the path of a texture, in game notation. In order for it
172     to be able to load the shader, you must configure your Maya project to include
173     your game data search paths. To create the appropriate entry execute this MEL
174     script at the command line (after that the entry will appear in the project
175     settings GUI and you can modify it from there).
176    
177     workspace -rt "Q3GameData" "GAME_DATA_PATHS" ;
178    
179     The GAME_DATA_PATHS may be absolute or relative to the project folder. To
180     maintain a cross-platform project, use forward slashes (/) and let the plugin
181     convert them. Multiple paths must be seperated by semicolons. PK3 files in
182     these folders are automatically added to the search as well, in Q3 order.
183    
184     If you are using Maya 6.x you must do this before creating the first Q3Shader
185     node in your scene, and you must restart Maya if you change this variable.
186     The Maya 7.0 build automatically refreshes the nodes when the path changes.
187     This is due to a limitation in the Maya 6.x API.
188    
189     When editing a Q3Shader-bound object's UVs in the UV Texture Editor, use the
190     Image -> Selected Images -> SHADER_IMAGE_NAME to display any texture referenced
191     by the shader in the UV Texture Editor window.
192    
193     Bear in mind that as this is an early release, the plugin only supports DDS and
194     TGA images. BMP and PCX support may be added later. There are no plans to add JPG.
195    
196     For more info on MEL or Maya's project system, check your Maya documentation.
197  
198   OLD WAY:
199   Each surface is connected to a default Q3 shader. The shader is named after
200   the material assigned to the object. In order to maintain compatibility with
201   Q3, this name is mangled (a little bit). The default shader is the material
202   name, with all underscores converted to forward slashes, except if a pair of
203   underscores is found near the end of a name it will be converted to a period.
204  
205   So:
206  
207   sample_shader_name            becomes         sample/shader/name
208   sample_shader_name__tga       becomes         sample/shader/name.tga
209  
210   BOTH CASES:
211   NOTE: polygons assigned to the default shader "lambert1" will never be exported.
212     You can use this to your advantage: if you need reference geometry that you
213     don't want to export, simply stick lambert1 on it and leave it in your scene.
214     This is handled on a per-face basis, so you can also use it to create holes
215     in the exported object, while keeping the geometry solid in Maya (which helps
216     with certain tools).
217    
218 Any shape who's name starts with "tag_" (case insensitive) will have its world
219 transform exported as a tag of the same name. If you use polygon shapes for your
220 tags, keep in mind that they will also be exported as geometry, unless you leave
221 lambert1 on them.
222
223   WIN32 INSTALLATION:
224  
225 1. Copy maya2q3.mll into MAYA_INSTALL_DIR\bin\plug-ins
226    NOTE: if you are building from Visual Studio and already have your project
227      set up with Maya's installation directory you should skip this step.
228      
229 2. Copy AEQ3ShaderTemplate.mel into MAYA_INSTALL_DIR\scripts\AETemplates
230    Note: if you are buliding from Visual Studio and already have your project
231      set up with Maya's installation directory you should skip this step.
232      
233 3. Start up Maya, go to Window -> Settings/Preferences -> Plug-in Manager.
234
235 4. Check "loaded" and "auto-load" next to the maya2q3 entry.
236    Note: if checking loaded makes Maya pause briefly but not load the plugin, make sure you have
237      the new version of the MS CRT libraries installed (see step 2).
238
239   EXPORTING:
240 1. Set your project and point it to your game data (see modelling guide notes).
241
242 2. Model your object. Make sure you give it a Q3Shader material with a meaningful name
243    (see modelling guide).
244
245 3. Animate it (if you want).
246
247 4. Set the range slider to include the exact frames you want to export (this is
248    important!).
249
250 5. Go File -> Export All or File -> Export Selected.
251    NOTE: When exporting a selection, you must select all instances of the
252      geometry you want to expect (even though Maya makes it look like they're
253      all selected when you click on one, you still need to SHIFT-click on the
254      others) AS WELL AS all tags you want to export. Otherwise the exporter
255      won't export everything you intended.
256
257 6. Select Export MD3 from the file types list.
258
259 7. Type in a file name.
260
261 8. Hit Export.
Note: See TracBrowser for help on using the browser.