Skip to content

Guns models (.obj)

Info

ModularWarfare provide a strong .obj renderer designed to be easy to add your own gun models without restarting Minecraft.

The software Blender is advised to setup your gun models correctly.

Download Blender here

Download the AK47 sample file here

Starting with an example

  • Open Blender and import the .obj sample file

Each parts of the gun have a specific object name on Blender.

Info

Each objects child must have the same name of his parent object.

Info

Parts name:

  • gunModel

  • slideModel

  • ammoModel

  • flashModel

  • defaultScopeModel

  • defaultBarrelModel

  • defaultStockModel

  • defaultGripModel

  • defaultGadgetModel

  • boltModel

  • pumpModel

  • chargeModel

  • triggerModel

OBJ Structure

Here we have an object with the name flashModel.

Having a correct object name from the list above allows the mod to animate certain parts of your models.

o flashModel
v 12.327478 -2.216826 -0.897541
v 12.327477 2.202816 3.522110
v 12.327478 2.202822 -0.897538
v 12.327477 -2.216830 3.522105
vt 0.999900 0.000100
vt 0.000100 0.999900
vt 0.000100 0.000100
vt 0.999900 0.999900
vn -1.0000 -0.0000 -0.0000
usemtl (null).002
s off
f 2296/2951/2269 2297/2952/2269 2298/2953/2269
f 2296/2951/2269 2299/2954/2269 2297/2952/2269

Create/Setup your gun models

First, import your model in the existing project with the ak47 in Blender, and try to place the sight in the same position that the sample object.

  • Setup the correct size/position of a gun model

    Press S to scale the model

    Press R to rotate the model + [X, Y, Z]

  • Align sight via blender

Textures

Failure

Warning, you can have only one texture for a gun model. This means that the .mtl file is not necessary.

Example of an UV map for the MP40, it only use one texture for the whole gun.

Note: The flashModel need this type of UV, that take the whole texture range. Because when rendered, it will not use the gun texture but the flash textures instead. You can take the flashModel from the ak47 sample file.

To understand how to make your UV mappings I recommend you this video: https://www.youtube.com/watch?v=Bh0YV-Y_qHY

Finally

Your gun model is ready now, export your .obj and select this export parameter on blender.

Failure

Triangulate faces need to be checked !