Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 13/12/22 in all areas

  1. Introduction: Blender is an open-sourced piece of software which provides various of features that are available through different of 3D tools, attempting to offer a componation of different applications like zBrush, Maya, 3dsmax and Substance Painter, from modelling (obviously), sculpting, animations to texture painting, in this tutorial, we are going to introduce you to the basics of Blender and prepair you to be able produce 3D models that can be used in MTA:SA and RenderWare GTA games (3D franchise), we will use a plugin called "DragonFF" for this tutorial so any pre-2.8 versions of Blender will not be compatible with this topic. We may update this topic regularly to cover newer features of the plugin. Q&A What can Blender do using DragonFF? - Export and Import DFF (vehicle, skin & object) meshes including vertex painting, UV (multiple) maps, materials, material effects (Environment - UV Animation). - Export and Import COL collision meshes (vehicle, skin & object). - Import map files (ipl/ide). (More features available here) Can blender do animations? Yes, but no, as DragonFF plugin doesn't support pre-2.8 Blender versions but you could use this for < 2.8 versions of Blender. Downloading Blender: - Head to https://www.blender.org/ and press "Download Blender". - Choose your operating system and make sure you are downloading the latest version. Before you continue (do not skip this part if you have barely any skills about Blender or 3D modelling). It is highly advised to watch the following video multiple of times in order to get a brief idea about the controls and what will be used, it is recommended to watch the first 3 parts of the tutorial. Installation of DragonFF: 1. Head to https://github.com/Parik27/DragonFF. 2. Click the green "Code" button and click "Download". 3. Open Blender, click anywhere to hide the splash screen. 4. Head to Edit > Preferences. 5. Click "Add-ons" then at the top-right "Install". 6. Locate the downloaded .zip file and click "Install Add-on". 7. Tick/Activate the plugin (use the search box). In order to make sure that the plugin is installed and activated successfully head to "File" > "Import" and check if "DragonFF DFF" is available as an option. Blender Controls There is a lot of controls in Blender and it is mandatory to learn at least the following: Camera Navigation: - Scroll Up/Down: Zoom In/out. - Scroll Button: Rotate view. - Scroll + Shift: Pan. - . (dot in Numpad): teleport to selected object/mesh. Selection: - Left Mouse Button: Selects an object/vertex/line/face. - Right Mouse Button: Opens the context menu. Toggling: - Tab: Toggle between Edit and Object Mode. Different behaviors between Edit and Object Mode: (with a combonation of X, Y and Z, you could move/scale/rotate in the desired axis.) - G: Move the selected object/mesh. - S: Scale the selected object/mesh. - R: Rotate the selected object/mesh. these are also available through the bar on the left: - Z: toggle between Solid, Rendered, Wireframe and Material Preview modes. Working with Models for MTA 1. Let's start with making our model, you can just use the default cube as a starting point, I have made this house for this tutorial. 2. Now let's do some pre-lighting, vertex painting is a technique used in game models to manipulate lighting in meshes, we will use the vertex painting interaction mode in Blender. (this is an example of bad Vertex Painting). - Head to interaction mode selection combobox, selected Vertex Paint. - go to "Paint" tab > Dirty Vertex Color. - Make sure to add "2" color Attribute for day & night prelight via the object data properties, work on both. - If there are bright areas in the model, try using a black brush and start painting the model. 3. Exporting the model to MTA. - Head to Object Properties > DragonFF - Export Object and make sure to be on "Object" mode. - go to File > Export > DragonFF > select .dff (make sure to name your model and choose a path, otherwise it's going to show you an error and export a corrupted model.) (If your model looks different than what it looks in the viewport, then make sure to apply the object transforms). Exporting the collision I highly recommend you to export the object and import it back as the current option will export it 1:1 (1 by 1), even if the mesh is simple the game's engine is not optimised to handle large amounts of collision meshes, collisions are meant to be extremely simple, this is a well known mistake made by modellers within the community that causes crashes and lag even with high-end PCs. - Head to Object Properties & Select "Collision Object" as the export type. - as a final step, it is highly recommended to import the mesh into Col Editor before importing it to the game, col editor will adjust the bounding box and optimise certain aspects of the collision mesh. - Edit > Add > Select the collsion model > right click the collsion mesh and click "Optimize". - To export the mesh head to FIle > Save As. Importing game assets Extracting the game assets can be useful to modify the game assets to your liking. Head to the following topic and read through the Extracting game assets section. - I highly recommend you to make a shared folder to include .png textures and model assets to be able to import the textures automatically into Blender. - Head to File > Import > DFF > Select the file (make sure the .png textures are in the same folder). (To check if you have sucessfully imported the texutres, hold Z & hover over "Material Preview") Changing Object Material/Texture - Go to the "Shading" tab, down below (by the default layout, zoom into the material tab). - - By default, DragonFF creates a "texture" node, you could simply click the folder image to replace the image. (You could rename the image texture to the current one "semi2Dirty.PNG" to match the name on the texture file) - If the texture looks "streched" then you need to adjust the UV wrapping. - Export the model (follow the steps above within the "Working with Models for MTA). - Now you need to update the texture file (TXD), to look up for the right TXD file, you could to search it through prindeside.com. - Enter the Model ID/Name and click search. - Click the model picture, expand & press Details. - The TXD file name should be under Files > TXD. - Find the TXD file within your game assets folder (or export it via gta3.img/other img container files using alic's img tool). - Open the TXD file using Magic.TXD > find & select the texture > replace > select the same image you used in Blender. - Change the "Texture Name" to match the name on texture node. - For Raster Format it's recommend to use DX3/DX4/DX5 for textures with an alpha channel (images with transparency as DX1 does not support transparency). - Press Replace > File > Save. - Replace both of the model & texture files in-game to apply the new changes. UV Wrapping - Switch to the UV Editing tab & switch to Edit Mode (Press Tab). - Select the faces you want to adjust and adjust accordingly to your desire. - Controls (you can use the following binds or the buttons on your left): A: Select all. S: Scale. G: Move. R: Rotate. - Watch the following video for more details: https://www.youtube.com/watch?v=Y7M-B6xnaEM
    1 point
  2. Many of the times we don't need to use MTA SDK. Otherwise, he is trying to build an api, so, it useless to use MTA SQL connector in this case aswell .. -------------------------------------------------------- Well, I have done some researches about the issue its in php file. You are not receiveing a JSON, so, the decoding function won't never work. If you directly output the content, you probably are going to get something un-parsed which is related with 'WebKitFormBoundary' or similar. There are methods made by people to parse it and try to get a json content, but, it doesn't support weird content. Regards.
    1 point
  3. i suggest you to use mta sdk for this project, + you used sql codes, put them on Lua side. http://code.opencoding.net/mta/mtaphpsdk_0.4.zip [TUT] : https://forum.multitheftauto.com/topic/32557-tut-php-sdk/
    1 point
  4. function test (url) sendOptions = { formFields = { verifyUserAccessTOJSON = toJSON( {busca = '1' }) }, } fetchRemote ( url, sendOptions, notificationCallback ) end function notificationCallback(data, info) test = fromJSON("["..data.."]") outputDebugString(test) end test('noLinkForSecurity') hi you should test this code and let me know if you have any problem on debug side,I don't understand exactly what you want
    1 point
  5. ?. You can access the field using $_POST["verifyUserAccessTOJSON"]
    1 point
  6. To apply the S@moke box shader to a texture instead of the screen, you need to remove the followin fragments of code: sampler TextureSampler = sampler_state { Texture = <screenSource>; AddressU = Mirror; AddressV = Mirror; }; and float4 PixelShaderFunction(float2 texCoords : TEXCOORD0) : COLOR0 { // shader code } then you need to add following code sampler TextureSampler = sampler_state { Texture = <tex>; AddressU = Mirror; AddressV = Mirror; }; technique Draw { pass P0 { PixelShader = compile ps_3_0 PixelShaderFunction(texCoords); } } In the above code, `tex` is used as the name of the texture that the shader should be applied to, instead of `screenSource`. Also, a `technique` section was added, which allows the shader to be called from code. Including these changes should allow the shader to be applied to the texture instead of the screen. @raynner
    1 point
  7. Draw distance v1.0.2 This resource improves the draw distance of all your resources that make use of map files. It makes your maps 10x more beautiful in my opinion! Greatly improves the draw distance of map objects Maxed out the draw-distance for peds and vehicles. (See MTA settings > video: Render vehicles always in high detail + Render peds always in high detail ) Multi-resources support (this effect is applied on every mapRoot element) Parallel loading method is used, but the loading speed is in that case reduced to improve performance. The effect is not only applied on resources that are starting, but also resources that are already running. Download here This resource is uncompiled! Repository: https://gitlab.com/IIYAMA12/draw-distance Video - Created by @Anx1ty Comparison Starting at 200 units distance 400 units distance (this is the distance where a lot of objects will be unloaded, but in this case switched with lowLOD objects) And even on 600 units distance, it is technically visible -> (while the fog is slowly eating it up... ) Download here Can all hardware run this? --> I have no idea... most likely ?. Just give it a try.
    1 point
×
×
  • Create New...