Author Topic: [TUTORIAL] Importing models for Items/Weapons into the game.  (Read 67347 times)

Offline Karpov

  • Moderator
  • Come Together
[TUTORIAL] Importing models for Items/Weapons into the game.
« on: November 30, 2012, 11:06:38 pm »
Hello. I made this tutorial so that people that are not graphic artists or coders can help as well. As you know, there are lots of items in the game, and a lot of people was willing to model them all. But now that almost all of them are done, we need to import them. But who is going to do such job? don't look at me...

I found this little standalone application which fits perfectly our needs. It will work for static meshes.

Download here: http://www.teamxtcgames.com/files/3D%20Object%20Viewer%20v3.5.zip
 
Lets begin...
We need: 1 model file in 3ds format. 1 texture in any image format.

-Open the application and load the mesh.


-Once it is loaded, select Texture Object and search for the texture file to check if the mapping works.


-After that you will have to reposition the gun so that the handle is right in the center of all three axis'.
To do this select Limb Control from the menu. And move (or type in) the Offset values until the gun is centered. Remember, the center is where the character's hand will be.
Change rotation if needed.


-Now export as DirectX mesh, and place that model inside data/critters, and the texture file inside data/textures. Please name the mesh with the prefix "WP_" and the texture with "ITEM_"


-Now open _fohuman.fo3d and locate the "Right Handle" Layer. Below this first line there are a series of "Values". Add the value for the new weapon in a new line, with the item ID number (found in server/data/itemlist.lst).  Then Attach WP_modelfilehere.x Texture 0 Item_texturehere.tga.
 
example
Code: [Select]
Value 394 Attach WP_gausspistol.x  Texture 0 item_gauss_pistol.tga


-After that, paste the line from another weapon, from Link to the end. I used 10mm pistol coordinates. These coordinates should work for all pistols in theory. If it's a rifle, copy it from some other rifle, and so...



-Test it. In my case it looks bigger than it should. So I have to change this Scale value.


That's it.
 
ps: yeah, it's still big.

The weapons in 3ds are here, but they might be outdated. You might need to check Graf's repository.
http://www.mediafire.com/?afu2uifjqaccc01

I'll see if I can find something that converts into 3ds from obj.

Post your exported file along with it's _fohuman line here. I'll download them and add them to the repository

Re: [TUTORIAL] Importing models for Items/Weapons into the game.
« Reply #1 on: November 30, 2012, 11:25:01 pm »
Karpov, you're ALIVE!!!  ;D

Offline Graf

  • Moderator
  • "Next Day" developer
Re: [TUTORIAL] Importing models for Items/Weapons into the game.
« Reply #2 on: December 23, 2012, 03:29:18 pm »
I've been following the tutorial, but after all I couldn't get the model in game. Nothing changes, even if I simply replace the existing model with another one. I suppose the problem is in my client-server build, so would like to do a clean install to make sure. So if anyone still have "FOnline_v2_200111.zip" file - I would appreciate it.

Another weird thing - I've got "_FOHuman.fo3d" and "_FOHuman_death.fo3d". Any clue on what's the difference between them? I've been trying to replace one file with another, but still no success with importing models.

Offline Luther Blissett

  • Moderator
Re: [TUTORIAL] Importing models for Items/Weapons into the game.
« Reply #3 on: December 24, 2012, 07:15:51 pm »
I've uploaded the old FOnline_v2_200111.zip here : http://www.sendspace.com/file/evk938

Not sure how long the link will stay up on sendspace, but I can always re-upload if it's needed in future.

[Edit]
Old file has fallen off the internet. By request, reuploaded here:
Google Drive Upload 12/09/2021
« Last Edit: September 13, 2021, 12:42:30 am by Luther Blissett »

Offline Luther Blissett

  • Moderator
Re: [TUTORIAL] Importing models for Items/Weapons into the game.
« Reply #4 on: December 25, 2012, 09:10:38 pm »
Is this by equipping the weapon, or using a "~param 0 151 x" sort of thing?

If the former, how is the "client_main" in the server/scripts folder? There's a bit near the end which connects the item/model things :

Original default one, which is dependent on the naming of objects etc :

One Karpov altered, which just attached by number and therefore may be easier to add new models to :

Offline Graf

  • Moderator
  • "Next Day" developer
Re: [TUTORIAL] Importing models for Items/Weapons into the game.
« Reply #5 on: December 27, 2012, 06:00:34 pm »
Is this by equipping the weapon, or using a "~param 0 151 x" sort of thing?

This was the point I had missed. Thanks Luther! Here's the result of importing of this model:



The only disappointing thing, is that it's not yet available from the inventory.

P.S. Me and KatzSmile (author of this precious piece of art, and many other things) will be currently busy with importing of the weapon models. If anyone wants - feel free to do the same with the miscellaneous items, which are available from here. This file includes all misc. models ever made, even those, which aren't available from my repository.

UPDATE.

Added the M202 Rocket Launcher. Looks pretty cool, in my opinion. It's also really easy to do, just follow the tutorial. More stuff to follow.




JovankaB

  • Guest
Re: [TUTORIAL] Importing models for Items/Weapons into the game.
« Reply #6 on: December 27, 2012, 06:12:07 pm »
yeah, it's still big.

I think small weapons can be slightly bigger than in reality, it allows you to see more details on them in 100% zoom.
In Fallout some weapons are a bit big too, e.g. the pistol is about the size of forearm.

Offline Haraldx

  • This forum... The memories... The history...
Re: [TUTORIAL] Importing models for Items/Weapons into the game.
« Reply #7 on: December 27, 2012, 06:35:01 pm »
In Fallout some weapons are a bit big too
*coughsubmachineguncough* The size of a gun in the post apocalyptic wasteland is impressive... But highly confusing.
I still can be reached over e-mail if you somehow need anything from me. Don't see a reason why you would, but if you do, e-mail remains the safest bet, as I do not visit this forum reliably anymore.

Offline Graf

  • Moderator
  • "Next Day" developer
Re: [TUTORIAL] Importing models for Items/Weapons into the game.
« Reply #8 on: December 29, 2012, 12:13:24 pm »
Some new stuff, as promised.



Stay tuned for more.

P.S. I'm still waiting for some completed jobs from you, guys.

Offline Mike Crosser

  • Gambling: 60%
Re: [TUTORIAL] Importing models for Items/Weapons into the game.
« Reply #9 on: December 29, 2012, 12:17:35 pm »
I'm sorry but I have to say that those look amazing.

Re: [TUTORIAL] Importing models for Items/Weapons into the game.
« Reply #10 on: December 29, 2012, 01:38:05 pm »
This really looks good, time to read on this tutorial a bit more.

Offline Graf

  • Moderator
  • "Next Day" developer
Re: [TUTORIAL] Importing models for Items/Weapons into the game.
« Reply #11 on: December 30, 2012, 06:28:01 pm »
A few other models has been done. Been mostly busy making the fohuman file more convenient. Now every weapons got the same number as it has in the SDK. Also now there isn't any unnecessary VB models (I suppose). To install you should replace the existing files in your data folder. Clean install preferable.

Download link



Also take a look at this:



Editable version are available from here - http://goo.gl/cMkcg

Offline Gob

  • The Good
Re: [TUTORIAL] Importing models for Items/Weapons into the game.
« Reply #12 on: December 30, 2012, 06:31:02 pm »
omg i can't wait for this to be finnished !!! keep up the good work !!

Offline Graf

  • Moderator
  • "Next Day" developer
Re: [TUTORIAL] Importing models for Items/Weapons into the game.
« Reply #13 on: December 31, 2012, 11:22:53 am »
Update. Pistols and SMG's subsection has been finished.



That's it for today.

Happy new year!
« Last Edit: December 31, 2012, 11:26:45 am by Graf »

Offline vedaras

  • King of the wasteland
Re: [TUTORIAL] Importing models for Items/Weapons into the game.
« Reply #14 on: January 01, 2013, 11:10:30 pm »
for me personally  i think its even more amazing to watch 3d progress than receive a game devs update :) keep up guys :)