Finding the best FireOffset for weapon viewmeshes

Discussions about Coding and Scripting
Post Reply
User avatar
deuxsonic
Novice
Posts: 11
Joined: Sun Mar 03, 2019 4:56 pm
Personal rank: Unreal!
Location: Ohio, USA, Earth
Contact:

Finding the best FireOffset for weapon viewmeshes

Post by deuxsonic » Sun Apr 28, 2019 11:28 pm

So far I've been doing this entirely by eye, trying to choose what looks best without any additional tools. Is there a more accurate way of finding the best settings for FireOffset that I'm not aware of?

User avatar
Feralidragon
Godlike
Posts: 5105
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: Finding the best FireOffset for weapon viewmeshes

Post by Feralidragon » Mon Apr 29, 2019 1:23 pm

Well, I am not aware of any tools, but here's what worked for me, especially during the development of NW3: first I would do a preliminary compilation of the package with the weapon mesh in it, then I would open it in UnrealEd, and place the weapon somewhere in a map (I generally used CTF-Face for this, a very clean and spacious map), and then used the grid of the editor itself, sometimes even set to 1uu, to figure out in a 2D->3D manner exactly what the offset would be.

Since the offset is relative to the origin of the mesh, I would also set the UnrealEd to show the collision cylinder in the 2D view, and set the collision of the weapon to zero, so I would have a red dot in the 2D views showing where the weapon center was, and then use the grid to figure out exactly what I wanted my offsets to be.

I used this methodology not only for fire offsets (in NW3 I implemented different ones), but also for all sorts of things I needed offsets, namely all the glows and other effects these weapons have and which required to have a fully precise offset in order for them to not look off, as well to correct any import directives especially in relation to where the third person view of the weapon would connect to the player hand.

I could also have used the 3D modeler I was using, but given that during the import I could be moving the center and scaling a bit, it was just easier to figure things out with the final meshes in UnrealEd itself.

User avatar
deuxsonic
Novice
Posts: 11
Joined: Sun Mar 03, 2019 4:56 pm
Personal rank: Unreal!
Location: Ohio, USA, Earth
Contact:

Re: Finding the best FireOffset for weapon viewmeshes

Post by deuxsonic » Mon Apr 29, 2019 10:11 pm

Are the numbers for the coordinates in Unreal Units? I'm not quite sure how this translates to settings for the viewmesh, but it does sound very accurate if I can duplicate what you did. Perhaps a screenshot?

User avatar
Feralidragon
Godlike
Posts: 5105
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: Finding the best FireOffset for weapon viewmeshes

Post by Feralidragon » Thu May 02, 2019 7:21 pm

Yes, although for the first-person view itself, I did another step: I would often set the camera and mesh in the 2D view, and then I would check how it looked like in the 3D view, and adjust in the 2D view.

Also, albeit I am not entirely sure (it's been many years since I last looked at any of this, so my memory is very fuzzy), I think I was also able to change the offset dynamically in-game with a specific command, although it would reset whenever I changed weapon, but I don't remember the exact command, nor even if I was really able to do that and if I am remembering this right.

As for a screenshot, I don't have one at the moment (I haven't opened UEd for some months already), but I may try to provide one this weekend, since it's likely I will open UEd again this weekend anyway for something else. :)

Post Reply