![]() |
#1 | |||
SA-MP Developer
![]() ![]() ![]() ![]() ![]() Join Date: Apr 2005
Location: 846
Posts: 852
Reputation: 2612
|
![]()
The main export tools for GTA:SA are written for 3dsmax. But if you're like me and don't model professionally, the cost of 3dsmax can be a bit much.
Blender is a free modeling program with importers and exporters for many different games, including GTA:SA. Tools needed: - blender 2.63+ - gtatools blender scripts by ponz - TXD Workshop by TurtleL - kdff.exe command line tool (comes with the SA-MP server package) - Collision File Editor II 0.4 BETA Instructions for getting started. - Download and install blender. Check that it runs. - Extract the gtatools scripts in to your blender addons folder e.g. C:\blender-2.71-windows64\2.71\scripts\addons. You should then have a "space_view3d_gta_tools" folder in your blender addons folder. - Enable GTA tools in blender by going to File > User Preferences > Addons > and checking 3D View: GTA Tools. We'll be exporting blender's default cube as a dff with a collision attached. Find a texture for the cube. Open a txd material in TXD workshop and export it to something blender can read like bmp or png. ![]() Step 01) Open up blender. ![]() Step 02) Game engines use triangles to render, but modeling programs support different types of edges like quads (squares). We need to triangulate the cube's faces so it can be exported to the game. 02_triangulate_cube.mp4 Step 03) Create a UV map by running UV unwrap and apply the texture we exported earlier. 03_add_cube_texture.mp4 Step 04) Make sure the material name in blender matches the material name in our txd file. 04_change_material_to_txdmatname.mp4 Step 05) Export the cube as a dff and we'll attach a collision. I named my cube as testcube1.dff. 05_export_cube.mp4 Now we need to use the kdff.exe tool in the server package to generate a collision (.col file) then attach the collision to the dff. Copy the kdff.exe tool to the folder where you are exporting your models, then open a command prompt, cd to that folder, then run kdff on your dff file. Example: Quote:
Quote:
Quote:
Step 06) Bake lighting to vertex colors, export the dff again and reattach the col. Make sure Shadeless is turned off in the material tab so we can see the lights being applied to the model. 06_vertex_lighting.mp4 Step 07) After we've re-exported our dff, reattached the col so we have testcubeC.dff ready, we can go ahead and see our final result. 07_test_cube.mp4 ![]() More on kdff.exe kdff can generate 3 types of collision files: empty, box, mesh. 'empty' is for objects that don't need a physical collision, such as objects attached to players. 'box' mode will generate a single box around the object. A box is suitable for many simple interior objects like fridges, plants etc. 'mesh' mode will use the object's faces to create a proper collision. After exporting in 'mesh' mode, you should take the .col file in to 'Collision Editor II' and generate face groups and also set the material type of the surfaces if needed. Last edited by Kalcor; 24/10/2017 at 01:11 PM. |
|||
![]() |
![]() |
![]() |
#2 |
Big Clucker
![]() ![]() Join Date: Feb 2017
Posts: 127
Reputation: 57
|
![]()
Great tutorial, thanks.
|
![]() |
![]() |
![]() |
#3 |
Banned
![]() Join Date: Jun 2017
Location: Phillipines
Posts: 368
Reputation: 91
|
![]()
Thats nice.
|
![]() |
![]() |
![]() |
#4 |
Banned
![]() Join Date: Oct 2017
Posts: 85
Reputation: 9
|
![]()
Thats great.
|
![]() |
![]() |
![]() |
#5 |
Gangsta
![]() ![]() ![]() ![]() Join Date: Oct 2016
Posts: 737
Reputation: 120
|
![]()
Well done, Kye.
|
![]() |
![]() |
![]() |
#6 |
Banned
![]() Join Date: Aug 2014
Location: United Kingdom, England.
Posts: 1,138
Reputation: 259
|
![]()
Could you give us more insight on the parameters of AddCharModel and AddSimpleModel?
For example, what is the 1st param of AddCharModel? I used a valid skin ID then used the skin ID from the 2nd one in SetPlayerSkin and it worked. |
![]() |
![]() |
![]() |
#7 | |
SA-MP Developer
![]() ![]() ![]() ![]() ![]() Join Date: Apr 2005
Location: 846
Posts: 852
Reputation: 2612
|
![]() Quote:
|
|
![]() |
![]() |
![]() |
#8 | |
Banned
![]() Join Date: Aug 2014
Location: United Kingdom, England.
Posts: 1,138
Reputation: 259
|
![]() Quote:
Here's a little thing that's annoying with the GUI program, it attempts to open up the ballontest dff file, what I removed so every time I open it, it gives me an error about not finding it. ![]() Also I'm getting this when I try and open a specific .txd file from a model I got from a gta website to test it. (in game the txd is also invisible.) |
|
![]() |
![]() |
![]() |
#9 |
Huge Clucker
![]() ![]() ![]() Join Date: Oct 2013
Posts: 413
Reputation: 3
|
![]()
Is there possibility to access my own object's texture via native SA:MP functions (SetObjectMaterial)?
|
![]() |
![]() |
![]() |
#10 |
Banned
![]() Join Date: Aug 2014
Location: United Kingdom, England.
Posts: 1,138
Reputation: 259
|
![]()
It seems the gui always access violates with ANY txd file.
|
![]() |
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Model Editing with Blender | SkittlesAreFalling | Everything and Nothing | 2 | 26/02/2014 09:10 AM |
Exporting | Saurik | Everything and Nothing | 1 | 25/11/2011 05:36 PM |
3ds max or blender | SourceCode | Everything and Nothing | 6 | 15/11/2011 05:08 PM |
Weather blender | niCe | Help Archive | 13 | 12/10/2009 09:47 PM |
[FilterScript] [FS]Car exporting | stanLeys | Filterscripts | 8 | 03/08/2009 02:45 PM |