Jump to content
Sign in to follow this  
Alwarren

Weapon Modelling (newbie needing input)

Recommended Posts

Hi all.

Recently, I started to dabble in the arts of modelling. So far I have done next to no modelling so please bear this in mind when you see the results :)

I am using Blender 2.6 for modelling (with Leopotam's import/export plugins) and have successfully (more or less) imported a creation into ARMA II. My first project is the Remington ACR (since I like the gun and found good reference pictures of it). But I am not sure how many polygons are acceptable, and there are other questions that popped up.

First, here's my first model (as I said, my first modelling job at all, so don't be too harsh :)):

blender2011110115481463.th.png

blender2011110115534629.th.png

blender2011110116553109.th.png

(ACOG in the last picture done by Varanon)



Obviously untextured except for a baked Ambient Occlusion map.

Now for the questions:

1) How many polys are okay to use? The ACOG version has some 7500 faces. I looked at the ARMA example models and they are much lower, but then, time has passed since ARMA and I assume that ARMA 2 generally has more polies.

2) Is there any preference on Quads vs. Triangles? I use mostly quads since it is easier to model with Blender. Should I convert them to triangles, or are quads ok?

3) How big should textures generally be? The ACR uses a 2048x2048 UV map, the ACOG as well. Is that too much?

4) Is there a better way of positioning the model than trial and error? I had a hard time getting the model to fit into the soldier's hand with his finger on the trigger.

5) Am I right in assuming that the pilot view LOD is used in first person view?

6) How do I animate the bolt, trigger, etc? I don't suppose that can be done in Blender?

That's it for now :) Any feedback from the pro's would be highly appreciated.

Share this post


Link to post
Share on other sites

1. if 7500 is for both gun and acog, it's ok. Seems that the gun is around 5000, which is decent. There is no set limit (besides the p3d limit). You are right about A2 models: they have higher poly counts, especially because of the moving parts (the scars have around 4k without any attachments, and it is fair to assume they can go up to 6000+ with scopes and grenade launchers etc). I think you could optimize the polycount on the scope, but you should be fine either way

2. quads will do fine. Either way DX converts/read everything to/from triangles, but you don't need to have only triangles in O2.

3. 2k for ACR seems fine. 2k for the acog seems a bit much, maybe 1k? Anyhow, as a rule of thumb, it is better to get everything on a 2048x2048 texture than have 2 1024x1024 map. You can have the other maps or some of them (spec, ambient shadow/occlusion and normals) at lower resolution if needed

4. you don't need to do it that way. There is a mem lod and configs to set its position in guys hand

5. yes, you are.

6. you can't do it in blender. You will need to create a model.cfg and config the animations yourself using the selections you previously set. Have a look over A1 samples.

Edited by PuFu

Share this post


Link to post
Share on other sites

Thanks for the input :)

Yes, the gun itself is about 5k. Since there's no other attachments yet, I guess optimizing the polycount on the ACOG would be a good idea.

Share this post


Link to post
Share on other sites

Alright, thanks to the pointers I got the gun animated, brass ejecting, bolt moving and staying open when the gun is empty.

I am trying to find out now how to do the zeroing. In general, my gun shoots too high. I have put the eye vertex in the memory LOD in line with the front and rear gunsight, but that doesn't work.

Any pointers?

Share this post


Link to post
Share on other sites
I am trying to find out now how to do the zeroing. In general, my gun shoots too high. I have put the eye vertex in the memory LOD in line with the front and rear gunsight, but that doesn't work.

Any pointers?

Where abouts are your 'konec hlavne' and 'usti hlavne' memory points?

They should be completely in-line with each other along the bore-line of your barrel, with 'usti hlavne' at the muzzle and 'konec hlavne' towards the breech.

Secondly, check the value of your 'distanceZoomMin=' and 'distanceZoomMax=' entries in the config. These correspond roughly to the distances in meters at which the bullet should cross middle of the sights - if the value is very large the bullet will hit high at short ranges - depending on the trajectory of the ammo you use (it's more noticeable with low-velocity rounds as their ballistic arc is more severe).

Share this post


Link to post
Share on other sites
They should be completely in-line with each other along the bore-line of your barrel, with 'usti hlavne' at the muzzle and 'konec hlavne' towards the breech.

Cheers, that was the problem. The front memory point was 0.2 mm off. Re-placed them and entered numerical coordinates directly, and now it is accurately zeroed at 300 meters.

I'm using the M4A1 config as a base and haven't changed anything yet except for the icon, name etc., so I guess the other values are okay for now.

Thanks again. Coming along nicely :)

Share this post


Link to post
Share on other sites
Cheers, that was the problem. The front memory point was 0.2 mm off. Re-placed them and entered numerical coordinates directly, and now it is accurately zeroed at 300 meters.

I'm using the M4A1 config as a base and haven't changed anything yet except for the icon, name etc., so I guess the other values are okay for now.

Thanks again. Coming along nicely :)

Glad you got it sorted. I recently had a problem with one of the guns I'm working on, shooting too high, and the view being shifted well above the 'eye' memory point I had given it; you had to aim at the floor for it to shoot forward - turns out I deleted one of the hlavne memory points completely.

For future reference: A quick way to align them is to select one of the mem vertexes, press 'c' to place a pin on that point (should appear as a large-ish black +), press shift+c to activate the pin (should now appear as a black + through a circle), then select the other mem point and use the scale tool to input a scale of zero in the two planar axes where you want it to align with the pin/mem point.

Share this post


Link to post
Share on other sites

2) Is there any preference on Quads vs. Triangles? I use mostly quads since it is easier to model with Blender. Should I convert them to triangles, or are quads ok?

You can export quads in same way as triangles.

Share this post


Link to post
Share on other sites

Directx uses triangles only, so it's the same at the end of the day. Sometimes the way you 'triangulate' a quad (and the quads around it) affects the vertex shading. The human brain has a much easier time with quads and quad flow. Since it's all the same at the end, and it's easier to understand flow, fix problems, etc. with quads, I would use quads. As you discover obvious shading and/or normals problems, you can manually triangulate or otherwise influence the triangulation of the offending polygons then.

Share this post


Link to post
Share on other sites

Hi.

Thanks for all the feedback, it's highly appreciated. I guess it wouldn't hurt if I write all of this down once I am finished with this, some of the stuff is difficult to come by.

Another thing I wonder about now is the following: I have external p3d's with e.g. a laser target painter or a flashlight. These need memory LOD reference points, like position/direction.

  1. I currently use these as proxies, i.e. I didn't make them part of the weapon but rather put a proxy on the weapon where e.g. the aimpoint should be, and they show up in game. I am wondering now, though, is that a recommended practice, or is there any advantage of replicating the attachments in the model?
  2. Are all LOD's of models merged? I.e. when I have a laser that comes with its own memory LOD with reference points, are these available for defining the laser, or do I need to have them with my weapon?

Thanks!

~~~ Alwarren

Share this post


Link to post
Share on other sites
Are all LOD's of models merged? I.e. when I have a laser that comes with its own memory LOD with reference points, are these available for defining the laser, or do I need to have them with my weapon?

Alright, at least this question I can answer now - no they aren't, I need to manually extract the proxy in the Memory lod to get the laser reference points.

Now I have a different problem:

arma2oa2011112221414074.th.png

arma2oa2011112221404630.th.png

These two screenshots show my new Eotech/EOLAD-1V laser combo. As you can see, the laser is positioned correctly IF the laser is not in front of the weapon (in screen space).

However

arma2oa2011112221405204.th.png

As soon as the weapon is behind the laser, the part of the laser overlapping the laser vanishes. I have no idea how to fix this, if at all possible.

Any hints would be appreciated.

Share this post


Link to post
Share on other sites

I'm not sure if many people have put lasers on their custom rifles. You may be a pioneer.

Share this post


Link to post
Share on other sites
I'm not sure if many people have put lasers on their custom rifles. You may be a pioneer.

I think RobertHammer has put lasers on his rifles. I think the major problem seems to be that the laser is on the left side of the gun, while almost any other gun I've seen has it on the right :)

Share this post


Link to post
Share on other sites

I would ask Robert Hammer. And maybe if you could post the answer here too if you find out. I'm not sure how the lasers are done in ArmA. I think they are some kind of shader. Maybe you have memory points that emit the laser and they are in the wrong place.

Share this post


Link to post
Share on other sites

PM me your msn adress and ill send you the stuff you need to put a laser on your rifle.

http://forums.bistudio.com/showthread.php?t=101568

Arrowhead cqb-laser-light-backpack stuff

This is a model containing weapon ref for the CQB Laser and Light

Plus the infantry proxy for the backpack

Readme

Operation Arrowhead New features template.

This is a helper to put the new features from Arrowhead on your models.

Flashlight

Laser

CQB sights

Backpack

How to use:

Lod 0.000 1.000 2.000 contains memory lod memorypoints.

Lod 3.000 contains the backpack proxy.

The features do NOT work in Arma2

Edited by RavenDK

Share this post


Link to post
Share on other sites

@Max Power

Yeah, I guess I'll send him a PM (unless you are reading this, RobertHammer ;))

@RavenDK

I don't have MSN anymore, will Skype do?

I found that file when I searched for bow to add a laser. I have the two memory points in my model, and the config contains

irLaserPos = "laser pos";

irLaserEnd = "laser dir";

irDistance = 100;

to define the laser.

I've done a test: In third person view, position your gun in such a way that it sticks inside an object, like an ammo crate. Then switch to first person view and you will see the whole gun. My conclusion to that is that the view model is rendered differently from the rest, probably last with a fresh Z buffer to make sure it is always completely visible. In that case, it would also overdraw the laser. That would mean that in first person view, the laser can never pass in front of the gun.

I'd be grateful if one of the devs could confirm this.

Share this post


Link to post
Share on other sites

I don't know anything about the laser but this is my impression of the behaviour of the viewpilotLODs of any model.

Share this post


Link to post
Share on other sites
I don't know anything about the laser but this is my impression of the behaviour of the viewpilotLODs of any model.

Yes, and it seems that the laser is not rendered as part of the pilot view LOD. I'll try to get hold of a BI dev to confirm this, if that is the case, then the laser will never be able to pass in front of the gun (I.e. from the left side of the weapon) in pilot view since it will always be overdrawn by the weapon.

Share this post


Link to post
Share on other sites
"laser dir" and "laser pos" are MemoryLOD Selection's !

Yeah, they are there. The laser is at the right position and in the right direction, and if I move around it becomes visible as long as the weapon and the laser don't overlap. But as soon as it is in front of the weapon, the part of the laser vanishes.

I'll make a video of the issue, I think that's easier than trying to explain it :)

Share this post


Link to post
Share on other sites

Like you said; I think it's down to the way that the game renders things in first person.

I've experienced problems in the past where proxy objects in the pilot LOD of vehicle models are rendered behind the rest of the mesh when they should be in front. Only solution we could find was to had physically add them to the mesh in the pilot LOD instead of using proxies.

Since the laser effect is similarly, an external model added to the weapon I can imagine that it also experiences such rendering quirks.

I've not experienced this problem myself since all the weapons I've modelled have had the laser on the 3-o'clock, 6-o'clock rail. And the laser is mounted much further forward on the rails of weapons addons I have seen with lasers on the 9-o'clock or 12-o'clock rail.

Maybe you could consider moving the EOTech to the far end of the rail and adding a magnifier behind it (like the ACE_SOC_M4A1_Eotech_4x in ACE mod), so that it doesn't look weird having it mounted so far forward?

Share this post


Link to post
Share on other sites
Maybe you could consider moving the EOTech to the far end of the rail and adding a magnifier behind it (like the ACE_SOC_M4A1_Eotech_4x in ACE mod), so that it doesn't look weird having it mounted so far forward?

Yes, I actually intended to make the magnifier as well. I wanted to remove the rear iron sight for that, but try moving everything forward and see if that works.

In the meantime, I uploaded a video to Youtube:

(leave annotations enabled to see my comments)

It really seems to be an issue with the way the pilot view is rendered.

Share this post


Link to post
Share on other sites

Yeah the laser beam is correctly.

Try on ViewPilot:

Select the complete Model and then Faces/Move Top "Ctrl+Shift+Home"

Share this post


Link to post
Share on other sites
Yeah the laser beam is correctly.

Try on ViewPilot:

Select the complete Model and then Faces/Move Top "Ctrl+Shift+Home"

Tried it, but it didn't make a difference.

I've now moved the Eotech forward a bit and will place the magnifier behind it. That way, the effect is still noticeable but less than with the previous version. Doesn't seem to be fixable really :mad:

(Hope that they fix this for ARMA III :))

Share this post


Link to post
Share on other sites

Hmmmm, really Strange.

I find spontaneously no other Solution on this Problem, maybe knows RH more on this Part.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×