01-02-2014, 09:47 AM
This tutorial will not cover modelling. It will cover briefly subject of importing models into the netradiant and setting, adjusting them properly.
The tutorial is done only for learning purposes, model itself was done quickly and only for this tutorial and the appearance might not be great! Although I have been helping others in mapping related stuff mind that this is my first tutorial like this therefore it might not be complete. If you have any questions, just ask.
The final result of this tutorial in my case looks like this (light bugs might caused by low quality of light settings or scaling)
Let's start:
First we have our model. Select it, go to File/export selected and save the model as .ASE file. (check on mesh definition, materials, mesh normals, mapping coordinates, geometric, shapes)
Next step is to open the .ase file in a text editor (might be WordPad)
Change the material and texture absolute paths into relative paths (make sure the textures exist) like this. IF YOU HAVE MULTIPLE textures on your model (applied to different surfaces by ID) you will want to use multi-material in your modelling software and change paths of the submaterials. Make sure you didn't make typo and you have those textures set in right folder: xonotic/data/textures. In text editor you should write: textures/... (without xonotic/data)
Now its time to place changed .ase file in the data/models folder:
At this point if you did everything properly you should jump into editor and rightclick on one of the viewports, choose misc/ model. Models list should pop out and show offical Xonotic models (if you have paths set properly). Filter those models displaying .ase files and you should be able to find your custom model among others:
Once you have the model in the editor you should press 'N' to bring up the entities menu and check boxes like: Solid, Force meta and also add other keys like: _castshadows 1, _receiveshadows 1, to increase shadows quality you also might add _lightmapscale key and set it to .1 for instance, if the model is not scaled properly you can add modelscale [value] key or adjust it manually using vector scale tool. You can also rotate models (use angle [value] key). After setting map and adding quickly player spawns build the map:
Finally:jump into game, open console with '`'(key above Tab button on your keyboard), type 'map [mapname]' and hit enter. If its not showing textures on your model that might mean that your paths are set up wrongly. Make sure that your textures exist and have dimensions in powers of 2 (4x4, 8x8, 512x256, 1024x2048....). If the map does not want to launch, check that .bsp file is in the right place (Xonotic/data/maps) and make sure that none of the player spawns are in solid (player spawn should not be placed inside anything, make it slightly floating above the ground and away from the walls and solid models).
Good luck!
The tutorial is done only for learning purposes, model itself was done quickly and only for this tutorial and the appearance might not be great! Although I have been helping others in mapping related stuff mind that this is my first tutorial like this therefore it might not be complete. If you have any questions, just ask.
The final result of this tutorial in my case looks like this (light bugs might caused by low quality of light settings or scaling)
Let's start:
First we have our model. Select it, go to File/export selected and save the model as .ASE file. (check on mesh definition, materials, mesh normals, mapping coordinates, geometric, shapes)
Next step is to open the .ase file in a text editor (might be WordPad)
Change the material and texture absolute paths into relative paths (make sure the textures exist) like this. IF YOU HAVE MULTIPLE textures on your model (applied to different surfaces by ID) you will want to use multi-material in your modelling software and change paths of the submaterials. Make sure you didn't make typo and you have those textures set in right folder: xonotic/data/textures. In text editor you should write: textures/... (without xonotic/data)
Now its time to place changed .ase file in the data/models folder:
At this point if you did everything properly you should jump into editor and rightclick on one of the viewports, choose misc/ model. Models list should pop out and show offical Xonotic models (if you have paths set properly). Filter those models displaying .ase files and you should be able to find your custom model among others:
Once you have the model in the editor you should press 'N' to bring up the entities menu and check boxes like: Solid, Force meta and also add other keys like: _castshadows 1, _receiveshadows 1, to increase shadows quality you also might add _lightmapscale key and set it to .1 for instance, if the model is not scaled properly you can add modelscale [value] key or adjust it manually using vector scale tool. You can also rotate models (use angle [value] key). After setting map and adding quickly player spawns build the map:
Finally:jump into game, open console with '`'(key above Tab button on your keyboard), type 'map [mapname]' and hit enter. If its not showing textures on your model that might mean that your paths are set up wrongly. Make sure that your textures exist and have dimensions in powers of 2 (4x4, 8x8, 512x256, 1024x2048....). If the map does not want to launch, check that .bsp file is in the right place (Xonotic/data/maps) and make sure that none of the player spawns are in solid (player spawn should not be placed inside anything, make it slightly floating above the ground and away from the walls and solid models).
Good luck!