[Tutorial] Converting weapons to Gta 4
Converting weapons with zmodeler and autodesk 3ds max
- Autodesk 3ds max
- Nvidia Photoshop filter (optional but recommended)
- GIMS IV (an autodesk 3ds max plugin) get it here and follow the instruction in the readme: http://www.gtaforums.com/index.php?showtopic=474215
- 3D weapon model (in .obj format) with textures you want to convert
Make sure your GIMS IV is working before continuing with this tutorial, if it’s not working you can’t use autodesk 3dsmax. Just start autodesk 3dsmax and it should load (probably have to update). It might give a few errors, like mine always does but just make sure the program itself work (it should be on the right, at the bottem)
The entire process of converting and texturing can be done alone with Zmodeler also, in this tutorial I’ll show texturing with Autodesk 3ds max. The reason for this is that texturing with Zmodeler causes the weapons to be transparent in some ENB mods (like Icenhancer) while weapons textured in autodesk are never transparent.
If you don’t care about this and want to convert your weapons with Zmodeler alone, I recommend coltmaster’s (video)tutorial :
I’ll just show you the complete process I follow to make weapons
- First make sure you export the default version of the weapon you want to replace from the original weapons.img (you can just go to your backup folder and open the weapons.img with sparkIV or openIV). In this tutorial I’ll use the m4 as an example and I’ll show you how I made my m1918 BAR.
- Open up zmodeler and import the w_m4.wdr, next import your custom file (usually a .obj).
- If your model has anything but the same orientation as the original gun , it's best to adjust that first (in autodesk) just open up the .obj in autodesk and use the rotate button to set the orientation right. Look at the example below, view the weapon from the front (thing on the upper-right on the preview window) and make sure it aligns with the grid. (20 images max on this post so just click the link to view them, can't show them as image)
- If your custom model has different (loose) parts, use the modify, attach option to attach all the parts to one (doesn’t matter which one as long as they are all attached to eachother). Make sure you don’t accidentally attach your custom model to the default weapon
- Resize your custom model with the modify, scale option. Ctrl+click allows you to use percentages, for example if you’re custom model is twice as large (x2) you can use ctrl+click and put in 50.0 (50percent) if you’re custom model is still a little bit to large just keep filling in 95% until you hit the right size.
- Using the back and top window position your custom weapon correctly (for now make sure they lign up in the top window, but place it under the default weapon in the back window). Like this (make sure you drag you custom model to the same place in the ‘top’ window, so make sure there’s no distance between them):
-Now, using the back window , make the triggers of both guns overlap, like this:
So now your weapons are suppose to overlap in both windows. Next unfold the w_m4.wdr in the index window (the window next to your back and top window). Drag all the items like gun_grip, gun_muzzle to your default) like this:
So after dragging it will look like this:
-You can now use modify, delete to delete the original ‘W_M4’ (the rifle itself, just click it) after that drag your ‘default’ in the index window to the w_m4.wdr. So it looks like this:
Now make sure the ‘gun_muzzle’ , gun_grip2 and Mag are positioned correctly (the gun_ejec is already positioned correctly like you see but if not, also change that).
If one of the blue squares isn’t accessible (because it is underneath the gun) drag it outside the default tab and right click it, show isolated. This way you can move it a little downwards and after that just drag it back.
Now you can just position it correctly (this blue square is the gun muzzle which was under the handle, now I can just drag it to the barrel end).
If everything is positioned correctly
Hit export, and save it as the original m4 (w_m4.wdr)
I recommend saving your project before closing Zmodeler, you might need to adjust the handpositioning later.
Now open up open IV, go to your pc/models/cdimages and open up weapons.img. Go into edit mode and right click your m4.wdr and select replace.
Next open it up to see if it’s working (it should be all-white since you haven’t textured it yet):
-At this point you can either trust your handpositioning is done correctly, or you can try it out ingame before continuing on with texturing. I recommend the last if you have a weapon with alot of texture maps. Don’t worry about it all being white and transparent, just look at the handpositioning. You can only adjust it so far, some weapons will simply not be easy to fit within gta 4’s limited handpositioning.
- Next, right-click your m4 again and select ‘Export to openFormats (.odr) and save it to someplace
Autodesk 3ds max
- Now start up autodesk 3dsmax, let it load and then start up gims:
- Next, import your file (.odr)
- Navigate using the ‘perspective’ window (usually the window on the lower-right) to your weapon so that you have a clear view of it. It’s usually a little outside the green box you see. You can resize the perspective window, you won’t need the other windows. Don’t pay any attention to the hand positioning, if you did it correctly in zmodeler it might show up wrong in autodesk but it will not have any effect. Don't adjust it either, just leave it like it is
Now open up the material editor in GIMS
- Minimize GIMS and leave the GIMS Material editor up, now select the following icon in the toolbar (top left) and click on your weapon (to select it).
A bunch of materials should now show up in the material window
Click the first material in the list and change the shader to ‘Bump’ and the Parameter set to ‘gta_normal_spec’ follow these same steps with all the other materials in the list.
Now go back to the first material again, it’s now time to assign the right materials to the right parts of the gun. If you’re lucky it’s say which textures are assigned to which part (check ‘1st diffuse) but usually it just says ‘vehicle_generic_smallspecmap’. Click on it and navigate to where the textures are stored. Assign a material to it to see if it’s the right one, if it’s not try a different one. It might help converting the .dds textures to jpg so that you can see which texture map to use.
Select the right textures for the ‘1st diffuse’ and then imput the normal map of that texture in the ‘Norm map.’ (under Normal bump) you have to scroll down in the model material window. If the file you use doesn't have normal maps, I recommend making them with the photoshop filter I mentioned (link at the start of tutorial).
You can use the preview window to see if you’ve used the right textures, with some materials it’s hard to see which part of the weapon is actually being textured. In such cases I usually apply a normal map to it (so that it’s purple-ish and stands out).
Some textures are for things inside the weapon (because some weapons are ment for games like CSS in which you can take out the magazine and you’ll see the bullets in it) you don’t have to apply the right materials for those parts since you’ll not see them in gta4.
Once you’re done texturing, use the viewport to see if the textures are indeed all applied correctly. If so, open up GIMS again and select export (ODR/ODD):
If you have applied alot of materials this might take a minute
Now open up OpenIV again (select grand theft auto 4 , obviously) and now select File->Create Archive. Select GTA IMG Archive (.IMG) and just pick a random name (we’ll delete this .img later, it’s only meant for converting the .odr file). A warning message will appear (saying something like you’re in edit mode etc). just hit yes. Select new ->Import openformats and select the .odr you’ve just exported with autodesk.
Your weapons should now be as .wdr in the list (in this case w_m4.wdr) right-click it and select extract(not export to openformats)
After you’ve saved it to a location, go back to the normal screen of open IV again (Hit ‘GTA IV’ on the left of the edit button and select browse game, or just close openiv and open it up again.)
You should still be in edit mode (the edit mode button is pressed down) if not, go into edit mode again. Now replace the weapon you were aiming to replace with the file you’ve just extracted (you can delete the .img file)
Next, open up the .wtd of that weapon and import all the textures you’ve used (and delete all the other ones except for the icon). Hit save when you’re done. Sometimes openIV freezes up when trying to import .dds textures (usually when importing alot at once), in this case you can convert the .dds textures to jpg for example (with photoshop, imageconverter, dds converter or a program like that) and just import them as jpg (the model will still recognize those textures).
Now open up your .wdr file to check if the textures are applied to it:
If the result is like this, you’ve successfully converted a weapon to gta4 and you can now test it ingame. When viewing your weapon in SparkIV it’ll not show properly, that’s just a bug In SparkIV the weapon will work fine ingame.
very easy for me, i can leran how i convert car in 3DMax :(
I know this is an old thread, but GREAT information. I was working on a handgun that I made from scratch and I was super curious to how you convert these. Thanks!
No problem, if you need any ferther help just let me now. I also have instructions on how to convert guns with the sole use of autodesk, this tutorial is indeed a bit dated
|All times are GMT -6. The time now is 06:50 PM.|
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.