Map-Craft TutorialsConverting brushes/patches to .ase models Author : Darth G 1 Converting brushes/patches to .ase models Basically, you copy the brushes and patches to a separate .map, and place them near the origin point (x, y, z = 0, 0, 0) usually with an important or symmetrical point at the origin. Enclose it in a big box of caulk and throw in a spawn point and call it something (e.g. "mymodel.map". Compile with q3map2, using "q3map2 -meta -patchmeta -subdivisions 1 mymodel.map" (you can leave the latter two off if there are no patches, and the -subdivisions line if there are only degenerate patches, i.e. flat ones with no curving edges). The result is a "mymodel.bsp" but you don't vis and light it. Instead, you use "q3map2 -convert ase mymodel.bsp" -- note that's ".bsp" not ".map"! The result should be "mymodel.ase" in the maps directory. You may want to move this to the models/mapobjects directory. Whether you do or not, you use it in your level by right clicking in a 2d view at the point where you want the thing, selecting "misc" and "misc_model", and then locating the "mymodel.ase" in the resulting dialog box. You'll probably want to position the model precisely after that, set the angle or angles key in the entity inspector, and slap on "spawnflags 4" key/value on it so it will be lightmapped instead of looking like crap:) and embed it in a clip brush. (Large models with sizable triangles, like terrain, you'll probably want to "spawnflags 6" to combine lightmapping and autoclipping.) thanks to Twisted for this tutorial 2 Creating an .ase model out of brushwork Original source: http://en.wikibooks.org/wiki/Q3Map2
Et voila! You've now got a misc_model created out of brushwork. Play with the "modelscale" and "angles" entity keys, and see why Q3Map2 .ase conversion is completely and totally great. For extra moxie, import model.map as a prefab to your new map. Nuke the caulk box, select the rest of the "model" brushwork, and texture it with clip. Rotate these new clip brushes into place over your misc_model (assuming it has been rotated with angles... why else would you be converting to .ase, anyway); the brush vertexes of these clip brushes will get screwed up a bit, but since the player can't see clip, you really can't tell in-game. It's lovely, and doesn't have any of the ill effects of Q3Map2 autoclipping. 3 Coverting with BATCH files (Bmodel to ase model) Original Source: http://www.lucasforums.com/showthread.php?s=&threadid=129245 Put this batch file into your Radiant folder..... Here is the batch file I use to convert brush work into ASE models: "C:\Program Files\GtkRadiant-1.4\q3map2.exe" -meta -patchmeta -subdivisions 4 -game ja "C:\Program Files\LucasArts\Star Wars Jedi Knight Jedi Academy\GameData\base\maps\example.map" "C:\Program Files\GtkRadiant-1.4\q3map2.exe" -convert -format ase -game ja "C:\Program Files\LucasArts\Star Wars Jedi Knight Jedi Academy\GameData\base\maps\example.bsp" Here is a TUTORIAL from mslaf: 1. Create a model build with brushes and/or patches and save it as a Radiant's prefab. Result: You will have model separated from the rest of geometry. ################################################## ############# 2. Start a new map and load previously saved prefab. Move it to the center (0,0,0 or |_ ) as this point will become the center of an ASE model after conversion process. You can adjust this position according to your needs. Result: Your new map will contain the single model build with brushed. ################################################## ############# 3. Create a room surrounding the model - to separate it from the void and avoid leaks. Apply the system/caulk texture on all room surfaces: external and internal. Result: You will have your further ASE model (currently build with radian's polyhedrons) inside an empty caulked room. ################################################## ############# 4. Create an "info_player_start" entity inside the room. The entity will be removed during BSP2ASE conversion but you need it to avoid "map leaked" error during the bsp phase. Save your map as map2ase.map. Result: You will have a model and info_player_start inside the caulked room saved as “map2ase.map” ################################################## ############# 5. Compile the saved map with: [ modify the "C:\Games\Jedi Academy\GameData" according to your installation path ] C:> q3map2 -meta -patchmeta -subdivisions 3 -game ja -fs_basepath "C:\Games\Jedi Academy\GameData" "C:\Games\Jedi Academy\GameData\base\maps\map2ase.map" and if there's no errors, convert it to an ASE format with: C:> q3map2 -convert -format ase -game ja -fs_basepath "C:\Games\Jedi Academy\GameData" "C:\Games\Jedi Academy\GameData\base\maps\map2ase.bsp" Now, you can move the map2ase.ase model to "models\map_objects\youmap" subdirectory. Result: You will have an ASE model converted from the map file. ################################################## ############# 6. Now you must fix shader/textures names inside an ASE model. Open the map2ase.ase in your favorite editor and look for every line starting with: *MATERIAL_NAME " like: *MATERIAL_NAME "\something\something\texture.jpg" or *MATERIAL_NAME "/something/something/texture.tga" or *MATERIAL_NAME "..\something\something\texture.tga" The shader/texture names above are incorrect and should be modified. The correct material name should be like: *MATERIAL_NAME "textures/something/something/texture" so you should: - replace all "\" with "/" - remove all ".." - remove all extensions like ".tga", ".jpg" etc. no matter if it's a shader or a 'simple' texture. - remove the "/" or "\" on the beginning of material's name as the shader name must start with a letter. - insert the "textures/" on the beginning of material's name if it's missing. I use the linux's "sed" utility for this operation but if you don't know it or don't have it you can automate these changes with an editor macros or other techniques. Apply the changes, save your ase2map.ase and try to load it in the Radiant. Check the Radian's log if something is not right. If the model loads successfully and looks fine in the editor it should be fine in the game. Try to create a simple map with your model and check it out. Good luck. ms.- |