Jump to content

Any good weapon model creation tutorial?


Pendra37

Recommended Posts

I've been messing around with weapon models for days now.

Installed 3D Studio 2016. Created a basic model and some textures. I exported a FBX model from a weapon upk. Loaded it into 3D studio as well. I can see the model and some bones OK. I sized and moved my weapon model to match the exported FBX. Set up the Skin to the bones. Exported this into a new FBX and tried to import it back to the UPK but it doesn't really work. It seems the bones do not export well from 3D Studio.

 

When I try to import as Skeletal Mesh into an UPK, I get an import failed message. When use an existing UPK and modify a skeletal mesh with "reload" it works in some cases but never imports the skeleton. Practically, I can't load the bones into the UPK.

 

I can't seem to be able to attach anything to imported model. Set the archetype so the model shows up in game. However, the standard assault rifle stock and the grip doesn't show up, even thou I set it up in the code OK and the exact same thing works for other models, just not mine. How do I set up the attachment points?

 

I changed the fire visual from bullet to beam. It works, but the origin of the effect is way off. The beam comes from thin air and not the rifle barrel. I looked through the XCOMWeapon element but I don't see anything that deals with the origin of the beam.

 

I would appreciate any help.

Edited by Pendra37
Link to comment
Share on other sites

I'm not sure if 3d Studio's FBX exporter is any good with UnrealEd. You might be better off using Blender, Maya or 3ds max 2012+. Blender is free and open source, Maya and 3ds max is not, unless you get the student version, which is free for two years, I think. Unreal supports any FBX that comes from those programs.

 

The reason why the stock and grip, etc, doesn't show up is because you need to set it up in the weapon template in the *.uc, whereever it might be.

 

For the firing effects, You'll have to use the Socket Editor within the AnimSet Editor to adjust the gun_fire socket. You did copy the socket's from an existing weapon, right? If you want to further adjust the firing particle effect, you'll have to copy the particle effect, and edit it through UnrealCascade.

Link to comment
Share on other sites

I found this in the meantime: http://vblanco20-1.github.io/LightSwordXCOM2Mod/

It doesn't really go deep into details, but I managed to get some info out of it. Especially regarding the sockets. I was under the impression that the position of stuff were set based on the bones. I can see in this tutorial that there is something odd going on with bone import.

In the meantime, I noticed that the exported FBX has a "Skin" modifier on the mesh. It links vertexes to certain bones. All nice. However, if I export that back to FBX and try to import it back to uc, it will fail. I had to collapse all the modifiers before the FBX export then I could import back.

 

I'm working on simple guns at the moment so animation is not a concern. However, it would still be good to know what is up with bones and the "Skin" modifier.

Link to comment
Share on other sites

I found this in the meantime: http://vblanco20-1.github.io/LightSwordXCOM2Mod/

It doesn't really go deep into details, but I managed to get some info out of it. Especially regarding the sockets. I was under the impression that the position of stuff were set based on the bones. I can see in this tutorial that there is something odd going on with bone import.

In the meantime, I noticed that the exported FBX has a "Skin" modifier on the mesh. It links vertexes to certain bones. All nice. However, if I export that back to FBX and try to import it back to uc, it will fail. I had to collapse all the modifiers before the FBX export then I could import back.

 

I'm working on simple guns at the moment so animation is not a concern. However, it would still be good to know what is up with bones and the "Skin" modifier.

 

Yeah, you need the skin modifier to add each bone to the mesh, and set the weights for each bone (not all of them though, Mag and Left_hand doesn't need to be weighted). All vertices must have some weight to them. Setting Root's weight to 1 on all vertices should do the trick. You can Ctrl+A (Select All) to select all vertices on the selected mesh, if you enabled selecting vertices, then go down to the weight table and set the weights to 1.

 

For the trigger and ejection bones, setting them to .9 while the Root bone is set to .1 on each vertex should work. If you don't have a Skin modifier, then the weapon you are trying to import will become a static mesh, which doesn't work for X2.

 

Hope this helps.

Edited by E3245
Link to comment
Share on other sites

I think I narrowed the issues down.

 

First problem is that 3D Studio creates an extra dummy object called SM_ModelName. When you export it and try to load it back into UC, there is an import failed message. If you delete this dummy SM_ModelName object, you it will be able to import the FBX back to to UC with the Skin modifier intact.

 

Second problem is the Units setting in the FBX export. It must be set to Centimeter.

Link to comment
Share on other sites

I think I narrowed the issues down.

 

First problem is that 3D Studio creates an extra dummy object called SM_ModelName. When you export it and try to load it back into UC, there is an import failed message. If you delete this dummy SM_ModelName object, you it will be able to import the FBX back to to UC with the Skin modifier intact.

 

Second problem is the Units setting in the FBX export. It must be set to Centimeter.

 

I kinda forgot that the importer does that. I haven't been importing anything from X2 lately, just using some of my weapons as a base.

 

I'm glad you figured out the problems you been having.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...